Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1453,10 +1453,20 @@
#include "code\modules\atmospherics\components\unary\vent_scrubber.dm"
#include "code\modules\augment\active.dm"
#include "code\modules\augment\augment.dm"
#include "code\modules\augment\simple.dm"
#include "code\modules\augment\implanter.dm"
#include "code\modules\augment\item.dm"
#include "code\modules\augment\active\adaptive_binoculars.dm"
#include "code\modules\augment\active\armblades.dm"
#include "code\modules\augment\active\circuit.dm"
#include "code\modules\augment\active\corrective_lenses.dm"
#include "code\modules\augment\active\glare_dampeners.dm"
#include "code\modules\augment\active\hudimplants.dm"
#include "code\modules\augment\active\iatric_monitor.dm"
#include "code\modules\augment\active\leukocyte_breeder.dm"
#include "code\modules\augment\active\nerve_dampeners.dm"
#include "code\modules\augment\active\polytool.dm"
#include "code\modules\augment\active\popout_guns.dm"
#include "code\modules\augment\active\powerfists.dm"
#include "code\modules\augment\active\tool\engineering.dm"
#include "code\modules\augment\active\tool\surgical.dm"
#include "code\modules\augment\passive\armor.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define ORGAN_ROBOTIC (1<<11) // The organ is robotic. Changes numerous behaviors, search BP_IS_ROBOTIC for checks.
#define ORGAN_BRITTLE (1<<12) // The organ takes additional blunt damage. If robotic, cannot be repaired through normal means.
#define ORGAN_CRYSTAL (1<<13) // The organ does not suffer laser damage, but shatters on droplimb.
#define ORGAN_CONFIGURE (1<<14) // The organ has an extra configuration step for surgery that it handles itself.

// Organ flag defines.
#define ORGAN_FLAG_CAN_AMPUTATE (1<<0) // The organ can be amputated.
Expand Down
25 changes: 23 additions & 2 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,30 @@
#define BP_AUGMENT_CHEST_ACTIVE "active chest augment"
#define BP_AUGMENT_HEAD "head augment"

/**
* Augment Slots
* Flags used by /obj/item/organ/internal/augment/var/augment_slots
* Augment slots is used to control which body parts an augment may be installed into
*/

//Augment slots
#define AUGMENT_ARM 0x1 ///The augment can be installed in arms
#define AUGMENT_HAND 0x2 ///The augment can be installed in hands
#define AUGMENT_LEG 0x4 ///The augment can be installed in legs
#define AUGMENT_FOOT 0x8 ///The augment can be installed in legs
#define AUGMENT_CHEST 0x10 ///The augment can be installed in the chest
#define AUGMENT_GROIN 0x20 ///The augment can be installed in the lower body
#define AUGMENT_HEAD 0x40 ///The augment can be installed in the head
#define AUGMENT_ARMOR 0x80 ///The augment can be installed externally
#define AUGMENT_FLUFF 0x100 ///The augment can be installed in a secondary head slot


//Augment flags
#define AUGMENTATION_MECHANIC 1
#define AUGMENTATION_ORGANIC 2
#define AUGMENT_MECHANICAL 0x1 ///The augment can be installed in mechanical organs
#define AUGMENT_BIOLOGICAL 0x2 ///The augment can be installed in biological organs
#define AUGMENT_CRYSTALINE 0x4 ///The augment can be installed in crystaline organs
#define AUGMENT_SCANNABLE 0x10 ///The augment is visible on body scanner results
#define AUGMENT_INSPECTABLE 0x20 ///The augment is visible via grab inspection

// Limbs.
#define BP_L_FOOT "l_foot"
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/ability_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@
ability_master.toggle_open(1)

/mob/Initialize()
ability_master = new /obj/screen/movable/ability_master(null,src)
. = ..()
ability_master = new /obj/screen/movable/ability_master(null,src)

///////////ACTUAL ABILITIES////////////
//This is what you click to do things//
Expand Down
17 changes: 7 additions & 10 deletions code/modules/augment/active.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,33 @@
action_button_name = "Activate"
var/obj/item/organ/external/limb


/obj/item/organ/internal/augment/active/proc/activate()

//Give verbs on install
/obj/item/organ/internal/augment/active/onInstall()
limb = owner.get_organ(parent_organ)

/obj/item/organ/internal/augment/active/onRemove()
limb = null

/obj/item/organ/internal/augment/active/proc/can_activate()
if(!owner || owner.incapacitated() || !is_usable())
if (!owner || owner.incapacitated() || !is_usable())
to_chat(owner, SPAN_WARNING("You can't do that now!"))
return FALSE

return TRUE


/obj/item/organ/internal/augment/active/attack_self()
. = ..()
if(.)
if (.)
activate()

//Need to change icon?
/obj/item/organ/internal/augment/active/refresh_action_button()
. = ..()
if(.)
if (.)
action.button_icon_state = icon_state
if(action.button) action.button.UpdateIcon()

if (action.button)
action.button.UpdateIcon()

/obj/item/organ/internal/augment/active/Destroy()
limb = null
. = ..()
. = ..()
21 changes: 21 additions & 0 deletions code/modules/augment/active/adaptive_binoculars.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/obj/item/organ/internal/augment/active/item/adaptive_binoculars
name = "adaptive binoculars"
augment_slots = AUGMENT_HEAD
icon_state = "adaptive_binoculars"
desc = "Digital glass 'screens' can be deployed over the eyes. At the user's control, their image can be greatly enhanced, providing a view of distant areas."
action_button_name = "Deploy lenses"
origin_tech = list(TECH_DATA = 3, TECH_BIO = 2)
item = /obj/item/clothing/glasses/augment_binoculars


/obj/item/organ/internal/augment/active/item/adaptive_binoculars/hidden
augment_flags = AUGMENT_MECHANICAL | AUGMENT_BIOLOGICAL


/obj/item/organ/internal/augment/active/item/adaptive_binoculars/emp_act(severity)
. = ..()
if (item?.zoom)
to_chat(owner, SPAN_WARNING("Your eyes fill with static as \the [item.name] malfunction\s!"))
owner.eye_blind += 10
owner.eye_blurry += 20
item.unzoom()
66 changes: 46 additions & 20 deletions code/modules/augment/active/armblades.dm
Original file line number Diff line number Diff line change
@@ -1,41 +1,67 @@
/obj/item/weapon/material/armblade
/obj/item/weapon/material/armblade //Tested in game, force = 30 with steel which is what it's usually made of. Variations can exist.
icon_state = "armblade"
item_state = null
name = "armblade"
icon = 'icons/obj/augment.dmi'
applies_material_colour = 0
desc = "A handy utility blade for the discerning augmentee. Warranty void if used for cutting."
base_parry_chance = 30
unbreakable = 1
force_divisor = 0.2
sharp = 1
edge = 1
base_parry_chance = 30 //Difference between armblades is how well it parries and the blade size, which controls what it can dismember
unacidable = TRUE
sharp = TRUE
edge = TRUE
attack_verb = list("stabbed", "sliced", "cut")
applies_material_colour = 0

/obj/item/organ/internal/augment/active/simple/armblade

/obj/item/organ/internal/augment/active/item/armblade
name = "embedded blade"
desc = "A sturdy housing for a steel utility blade."
action_button_name = "Deploy blade"
icon_state = "armblade"
allowed_organs = list(BP_AUGMENT_R_ARM, BP_AUGMENT_L_ARM)
holding_type = /obj/item/weapon/material/armblade
//Limited to robolimbs
augment_flags = AUGMENTATION_MECHANIC
augment_slots = AUGMENT_ARM
item = /obj/item/weapon/material/armblade
augment_flags = AUGMENT_MECHANICAL | AUGMENT_SCANNABLE


/obj/item/weapon/material/armblade/claws
icon_state = "wolverine"
name = "combat claws"
desc = "These do not grow back."
force_divisor = 0.3
base_parry_chance = 40


//Alternate look
/obj/item/organ/internal/augment/active/simple/wolverine
/obj/item/organ/internal/augment/active/item/wolverine
name = "cyberclaws"
desc = "An unusual type of cybernetic weaponry, these sharp blades are bound to turn heads."
action_button_name = "Deploy claws"
icon_state = "wolverine"
allowed_organs = list(BP_AUGMENT_R_HAND, BP_AUGMENT_L_HAND)
holding_type = /obj/item/weapon/material/armblade/claws
//Limited to robolimbs
augment_flags = AUGMENTATION_MECHANIC
augment_slots = AUGMENT_HAND
item = /obj/item/weapon/material/armblade/claws
augment_flags = AUGMENT_MECHANICAL | AUGMENT_SCANNABLE


/// Traitor version - no parry chance but good damage, and compatible with organic limbs
/obj/item/organ/internal/augment/active/item/wrist_blade
name = "concealed wrist blade"
desc = "A concealed sheath made from bio-compatible cloth, shaped for a thin blade."
action_button_name = "Deploy blade"
icon_state = "armblade"
augment_slots = AUGMENT_ARM
item = /obj/item/weapon/material/armblade/wrist
origin_tech = list(TECH_COMBAT = 3, TECH_ESOTERIC = 4)
deploy_sound = 'sound/effects/holster/sheathout.ogg'
retract_sound = 'sound/effects/holster/sheathin.ogg'
augment_flags = AUGMENT_MECHANICAL | AUGMENT_BIOLOGICAL


/obj/item/weapon/material/armblade/wrist
name = "wrist blade"
desc = "A thin and very sharp folding blade specially made for combat, made from a specialized alloy that prevents all that nasty blood and viscera from sticking to it. Its light weight allows for rapid slashing attacks."
icon_state = "wristblade"
item_state = "wristblade"
base_parry_chance = 0

/// SMALL prevents dismembering limbs - only hands & feet
w_class = ITEM_SIZE_SMALL


/obj/item/weapon/material/armblade/wrist/add_blood(mob/living/carbon/human/M)
return FALSE
45 changes: 18 additions & 27 deletions code/modules/augment/active/circuit.dm
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
/obj/item/organ/internal/augment/active/simple/circuit
/obj/item/organ/internal/augment/active/item/circuit
name = "integrated circuit frame"
action_button_name = "Activate Circuit"
icon_state = "circuit"
allowed_organs = list(BP_AUGMENT_R_ARM, BP_AUGMENT_L_ARM)
holding_type = null //We must get the holding item externally
//Limited to robolimbs
augment_flags = AUGMENTATION_MECHANIC
desc = "A DIY modular assembly, courtesy of Xion Industrial. Circuitry not included"
augment_slots = AUGMENT_ARM
augment_flags = AUGMENT_MECHANICAL | AUGMENT_SCANNABLE
desc = "A DIY modular assembly, courtesy of Xion Industrial. Circuitry not included."


/obj/item/organ/internal/augment/active/simple/circuit/left
allowed_organs = list(BP_AUGMENT_L_ARM)

/obj/item/organ/internal/augment/active/simple/circuit/right
allowed_organs = list(BP_AUGMENT_R_ARM)

/obj/item/organ/internal/augment/active/simple/circuit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isCrowbar(W))
//Remove internal circuit
if(holding)
holding.canremove = 1
holding.dropInto(loc)
to_chat(user, SPAN_NOTICE("You take out \the [holding]."))
holding = null
/obj/item/organ/internal/augment/active/item/circuit/attackby(obj/item/I, mob/user)
if (isCrowbar(I))
if (item)
item.canremove = TRUE
item.dropInto(loc)
to_chat(user, SPAN_NOTICE("You take out \the [item]."))
item = null
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
else to_chat(user, SPAN_WARNING("The augment is empty!"))
else
to_chat(user, SPAN_WARNING("The augment is empty!"))
return
if(istype(W, /obj/item/device/electronic_assembly/augment))
if(holding)
if (istype(I, /obj/item/device/electronic_assembly/augment))
if (item)
to_chat(user, SPAN_WARNING("There's already an assembly in there."))
else if(user.unEquip(W, src))
holding = W
holding.canremove = 0
else if (user.unEquip(I, src))
item = I
item.canremove = FALSE
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
return

..()
21 changes: 21 additions & 0 deletions code/modules/augment/active/corrective_lenses.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/obj/item/organ/internal/augment/active/item/corrective_lenses
name = "corrective lenses"
augment_slots = AUGMENT_HEAD
icon_state = "corrective_lenses"
desc = "A pair of retractable, ultrathin corrective lenses are installed into the eye sockets. They can be deployed or retracted at will and serve as prescription glasses."
action_button_name = "Deploy lenses"
augment_flags = AUGMENT_BIOLOGICAL | AUGMENT_SCANNABLE | AUGMENT_INSPECTABLE
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)
item = /obj/item/clothing/glasses/augment


/obj/item/organ/internal/augment/active/item/corrective_lenses/onRoundstart()
deploy()


/obj/item/clothing/glasses/augment
name = "corrective lenses"
desc = "The most expensive prescription on this side of Sol."
body_parts_covered = null
prescription = 7
unacidable = TRUE
9 changes: 9 additions & 0 deletions code/modules/augment/active/glare_dampeners.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/obj/item/organ/internal/augment/active/item/glare_dampeners
name = "glare dampeners"
augment_slots = AUGMENT_HEAD
icon_state = "glare_dampeners"
desc = "Thick, tinted lenses installed in your head can deploy over your eyes, reducing visibility but providing protection from welding glare and bright lights."
action_button_name = "Deploy dampeners"
augment_flags = AUGMENT_BIOLOGICAL
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)
item = /obj/item/clothing/glasses/glare_dampeners
47 changes: 35 additions & 12 deletions code/modules/augment/active/hudimplants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@
desc = "A small implantable heads-up display."
icon_state = "eye"
action_button_name = "Toggle HUD"
allowed_organs = list(BP_AUGMENT_HEAD)
augment_slots = AUGMENT_HEAD
var/list/hud_type = list(HUD_MEDICAL, HUD_SECURITY)
var/active = FALSE


/obj/item/organ/internal/augment/active/hud/Process()
..()
if (!owner)
return

if (active)
if (hud_type == HUD_MEDICAL)
req_access = list(access_medical)
if (allowed(owner))
process_med_hud(owner, 1)
else if (hud_type == HUD_SECURITY)
req_access = list(access_security)
if (allowed(owner))
process_sec_hud(owner, 1)
switch(hud_type)
if (HUD_MEDICAL)
req_access = list(access_medical)
if (allowed(owner))
process_med_hud(owner, 1)
if (HUD_SECURITY)
req_access = list(access_security)
if (allowed(owner))
process_sec_hud(owner, 1)
if (HUD_JANITOR)
process_jani_hud(owner)


/obj/item/organ/internal/augment/active/hud/emp_act(severity)
if (istype(src.loc, /mob/living/carbon/human))
Expand All @@ -32,18 +37,36 @@
if (active)
active = FALSE


/obj/item/organ/internal/augment/active/hud/activate()
if (!can_activate())
return
active = !active
to_chat(owner, SPAN_NOTICE("You [active ? "enable" : "disable"] \the [src]."))


/obj/item/organ/internal/augment/active/hud/health
name = "integrated health HUD"
desc = "The Vey-Med H-27 is an implantable HUD, designed to interface directly with the user's optic nerve and display information about patient vitals."
desc = "The Vey-Med H-27 is an implantable HUD, designed to interface with the user's optic nerve and display information about patient vitals."
icon_state = "eye_medical"
hud_type = HUD_MEDICAL


/obj/item/organ/internal/augment/active/hud/security
name = "integrated security HUD"
desc = "The Hephaestus Industries C-VSR is an implantable HUD, designed to interface directly with the user's optic nerve and local databases to display security information."
hud_type = HUD_SECURITY
desc = "The Hephaestus Industries C-VSR is an implantable HUD, designed to interface with the user's optic nerve and local databases to display security information."
hud_type = HUD_SECURITY


/obj/item/organ/internal/augment/active/hud/janitor
name = "integrated filth HUD"
desc = "An implantable HUD based on the wearable janitorial version, designed to interface with the user's optic nerve and display information about nearby messes."
icon_state = "eye_janitor"
hud_type = HUD_JANITOR


/obj/item/organ/internal/augment/active/hud/science
name = "integrated sciHUD"
desc = "An implantable HUD fitted with a portable analyzer capable of determining the research potential of a visible item or the components of a machine."
icon_state = "eye_science"
hud_type = HUD_SCIENCE
Loading