mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 23:42:27 +00:00
Medical Expansion (#6465)
* Starts work on the Medical Expansion. * Further Work * Save Everything! * Large volume of things. * Log of Change * I'm an idiot. * Kidney assisted sprites. They didn't exist, for some reason. * Fixfix * Fixfix * Update encased.dm * Update glass.dm * Update Chemistry-Reagents.dm I am once more an idiot. * Split augs. * Fixfix
This commit is contained in:
262
code/modules/organs/internal/augment/armmounted.dm
Normal file
262
code/modules/organs/internal/augment/armmounted.dm
Normal file
@@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Arm mounted augments.
|
||||
*/
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted
|
||||
name = "laser rifle implant"
|
||||
desc = "A large implant that fits into a subject's arm. It deploys a laser-emitting array by some painful means."
|
||||
|
||||
icon_state = "augment_laser"
|
||||
|
||||
w_class = ITEMSIZE_LARGE
|
||||
|
||||
organ_tag = O_AUG_L_FOREARM
|
||||
|
||||
parent_organ = BP_L_ARM
|
||||
|
||||
target_slot = slot_l_hand
|
||||
|
||||
target_parent_classes = list(ORGAN_FLESH, ORGAN_ASSISTED)
|
||||
|
||||
integrated_object_type = /obj/item/weapon/gun/energy/laser/mounted/augment
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_FOREARM)
|
||||
organ_tag = O_AUG_R_FOREARM
|
||||
parent_organ = BP_R_ARM
|
||||
target_slot = slot_r_hand
|
||||
if(O_AUG_R_FOREARM)
|
||||
organ_tag = O_AUG_L_FOREARM
|
||||
parent_organ = BP_L_ARM
|
||||
target_slot = slot_l_hand
|
||||
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the lower [parent_organ] mount.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/taser
|
||||
name = "taser implant"
|
||||
desc = "A large implant that fits into a subject's arm. It deploys a taser-emitting array by some painful means."
|
||||
|
||||
icon_state = "augment_taser"
|
||||
|
||||
integrated_object_type = /obj/item/weapon/gun/energy/taser/mounted/augment
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/dartbow
|
||||
name = "crossbow implant"
|
||||
desc = "A small implant that fits into a subject's arm. It deploys a dart launching mechanism through the flesh through unknown means."
|
||||
|
||||
icon_state = "augment_dart"
|
||||
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
integrated_object_type = /obj/item/weapon/gun/energy/crossbow
|
||||
|
||||
// Wrist-or-hand-mounted implant
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/hand
|
||||
name = "resonant analyzer implant"
|
||||
desc = "An augment that fits neatly into the hand, useful for determining the usefulness of an object for research."
|
||||
icon_state = "augment_box"
|
||||
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
integrated_object_type = /obj/item/weapon/portable_scanner
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/hand/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_HAND)
|
||||
organ_tag = O_AUG_R_HAND
|
||||
parent_organ = BP_R_HAND
|
||||
target_slot = slot_r_hand
|
||||
if(O_AUG_R_HAND)
|
||||
organ_tag = O_AUG_L_HAND
|
||||
parent_organ = BP_L_HAND
|
||||
target_slot = slot_l_hand
|
||||
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/hand/sword
|
||||
name = "energy blade implant"
|
||||
|
||||
integrated_object_type = /obj/item/weapon/melee/energy/sword
|
||||
|
||||
/*
|
||||
* Shoulder augment.
|
||||
*/
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder
|
||||
name = "shoulder augment"
|
||||
desc = "A large implant that fits into a subject's arm. It looks kind of like a skeleton."
|
||||
|
||||
icon_state = "augment_armframe"
|
||||
|
||||
organ_tag = O_AUG_R_UPPERARM
|
||||
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
integrated_object_type = null
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.is_screwdriver())
|
||||
switch(organ_tag)
|
||||
if(O_AUG_L_UPPERARM)
|
||||
organ_tag = O_AUG_R_UPPERARM
|
||||
parent_organ = BP_R_ARM
|
||||
target_slot = slot_r_hand
|
||||
if(O_AUG_R_UPPERARM)
|
||||
organ_tag = O_AUG_L_UPPERARM
|
||||
parent_organ = BP_L_ARM
|
||||
target_slot = slot_l_hand
|
||||
to_chat(user, "<span class='notice'>You swap \the [src]'s servos to install neatly into \the upper [parent_organ] mount.</span>")
|
||||
return
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/surge
|
||||
name = "muscle overclocker"
|
||||
|
||||
aug_cooldown = 1.5 MINUTES
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/surge/augment_action()
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if(aug_cooldown)
|
||||
if(last_activate <= world.time + aug_cooldown)
|
||||
last_activate = world.time
|
||||
else
|
||||
return
|
||||
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.add_modifier(/datum/modifier/melee_surge, 0.75 MINUTES)
|
||||
|
||||
// The toolkit / multi-tool implant.
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple
|
||||
name = "rotary toolkit"
|
||||
desc = "A large implant that fits into a subject's arm. It deploys an array of tools by some painful means."
|
||||
|
||||
icon_state = "augment_toolkit"
|
||||
|
||||
organ_tag = O_AUG_R_UPPERARM
|
||||
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
integrated_object_type = null
|
||||
|
||||
toolspeed = 0.8
|
||||
|
||||
var/list/integrated_tools = list(
|
||||
/obj/item/weapon/tool/screwdriver = null,
|
||||
/obj/item/weapon/tool/wrench = null,
|
||||
/obj/item/weapon/tool/crowbar = null,
|
||||
/obj/item/weapon/tool/wirecutters = null,
|
||||
/obj/item/device/multitool = null,
|
||||
/obj/item/stack/cable_coil/gray = null,
|
||||
/obj/item/weapon/tape_roll = null
|
||||
)
|
||||
|
||||
var/list/integrated_tools_by_name
|
||||
|
||||
var/list/integrated_tool_images
|
||||
|
||||
var/list/synths
|
||||
|
||||
var/list/synth_types = list(
|
||||
/datum/matter_synth/wire
|
||||
)
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple/Initialize()
|
||||
..()
|
||||
|
||||
if(integrated_object)
|
||||
integrated_tools[integrated_object_type] = integrated_object
|
||||
|
||||
if(integrated_tools && integrated_tools.len)
|
||||
|
||||
integrated_tools_by_name = list()
|
||||
|
||||
integrated_tool_images = list()
|
||||
|
||||
if(synth_types)
|
||||
synths = list()
|
||||
for(var/datumpath in synth_types)
|
||||
var/datum/matter_synth/MS = new datumpath
|
||||
synths += MS
|
||||
|
||||
for(var/path in integrated_tools)
|
||||
if(!integrated_tools[path])
|
||||
integrated_tools[path] = new path(src)
|
||||
var/obj/item/I = integrated_tools[path]
|
||||
I.canremove = FALSE
|
||||
I.toolspeed = toolspeed
|
||||
I.my_augment = src
|
||||
I.name = "integrated [I.name]"
|
||||
|
||||
for(var/tool in integrated_tools)
|
||||
var/obj/item/Tool = integrated_tools[tool]
|
||||
if(istype(Tool, /obj/item/stack))
|
||||
var/obj/item/stack/S = Tool
|
||||
S.synths = synths
|
||||
S.uses_charge = synths.len
|
||||
integrated_tools_by_name[Tool.name] = Tool
|
||||
integrated_tool_images[Tool.name] = image(icon = Tool.icon, icon_state = Tool.icon_state)
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple/handle_organ_proc_special()
|
||||
..()
|
||||
|
||||
if(!owner || is_bruised() || !synths)
|
||||
return
|
||||
|
||||
if(prob(20))
|
||||
for(var/datum/matter_synth/MS in synths)
|
||||
MS.add_charge(MS.recharge_rate)
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple/augment_action()
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
|
||||
for(var/Iname in integrated_tools_by_name)
|
||||
options[Iname] = integrated_tool_images[Iname]
|
||||
|
||||
var/list/choice = list()
|
||||
if(length(options) == 1)
|
||||
for(var/key in options)
|
||||
choice = key
|
||||
else
|
||||
choice = show_radial_menu(owner, owner, options)
|
||||
|
||||
integrated_object = integrated_tools_by_name[choice]
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/augment/armmounted/shoulder/multiple/medical
|
||||
name = "rotary medical kit"
|
||||
icon_state = "augment_medkit"
|
||||
integrated_object_type = null
|
||||
|
||||
integrated_tools = list(
|
||||
/obj/item/weapon/surgical/hemostat = null,
|
||||
/obj/item/weapon/surgical/retractor = null,
|
||||
/obj/item/weapon/surgical/cautery = null,
|
||||
/obj/item/weapon/surgical/surgicaldrill = null,
|
||||
/obj/item/weapon/surgical/scalpel = null,
|
||||
/obj/item/weapon/surgical/circular_saw = null,
|
||||
/obj/item/weapon/surgical/bonegel = null,
|
||||
/obj/item/weapon/surgical/FixOVein = null,
|
||||
/obj/item/weapon/surgical/bonesetter = null,
|
||||
/obj/item/stack/medical/crude_pack = null
|
||||
)
|
||||
|
||||
synth_types = list(
|
||||
/datum/matter_synth/bandage
|
||||
)
|
||||
104
code/modules/organs/internal/augment/bio.dm
Normal file
104
code/modules/organs/internal/augment/bio.dm
Normal file
@@ -0,0 +1,104 @@
|
||||
// The base organic-targeting augment.
|
||||
|
||||
/obj/item/organ/internal/augment/bioaugment
|
||||
name = "bioaugmenting implant"
|
||||
|
||||
icon_state = "augment_hybrid"
|
||||
dead_icon = "augment_hybrid_dead"
|
||||
|
||||
robotic = ORGAN_ASSISTED
|
||||
target_parent_classes = list(ORGAN_FLESH)
|
||||
|
||||
/* Jensen Shades. Your vision can be augmented.
|
||||
* This, technically, no longer needs its unique organ verb, however I have chosen to leave it for posterity
|
||||
* in the event it needs to be referenced, while still remaining perfectly functional with either system.
|
||||
*/
|
||||
|
||||
/obj/item/organ/internal/augment/bioaugment/thermalshades
|
||||
name = "integrated thermolensing implant"
|
||||
desc = "A miniscule implant that houses a pair of thermolensed sunglasses. Don't ask how they deploy, you don't want to know."
|
||||
icon_state = "augment_shades"
|
||||
dead_icon = "augment_shades_dead"
|
||||
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
organ_tag = O_AUG_EYES
|
||||
|
||||
robotic = ORGAN_ROBOT
|
||||
|
||||
parent_organ = BP_HEAD
|
||||
|
||||
organ_verbs = list(
|
||||
/mob/living/carbon/human/proc/augment_menu,
|
||||
/mob/living/carbon/human/proc/toggle_shades)
|
||||
|
||||
integrated_object_type = /obj/item/clothing/glasses/hud/security/jensenshades
|
||||
|
||||
/obj/item/organ/internal/augment/bioaugment/thermalshades/augment_action()
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
owner.toggle_shades()
|
||||
|
||||
// Here for posterity and example.
|
||||
/mob/living/carbon/human/proc/toggle_shades()
|
||||
set name = "Toggle Integrated Thermoshades"
|
||||
set desc = "Toggle your flash-proof, thermal-integrated sunglasses."
|
||||
set category = "Augments"
|
||||
|
||||
var/obj/item/organ/internal/augment/aug = internal_organs_by_name[O_AUG_EYES]
|
||||
|
||||
if(glasses)
|
||||
if(aug && aug.integrated_object == glasses)
|
||||
drop_from_inventory(glasses)
|
||||
aug.integrated_object.forceMove(aug)
|
||||
if(!glasses)
|
||||
to_chat(src, "<span class='alien'>Your [aug.integrated_object] retract into your skull.</span>")
|
||||
else if(!istype(glasses, /obj/item/clothing/glasses/hud/security/jensenshades))
|
||||
to_chat(src, "<span class='notice'>\The [glasses] block your shades from deploying.</span>")
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/hud/security/jensenshades))
|
||||
var/obj/item/G = glasses
|
||||
if(G.canremove)
|
||||
to_chat(src, "<span class='notice'>\The [G] are not your integrated shades.</span>")
|
||||
else
|
||||
drop_from_inventory(G)
|
||||
to_chat(src, "<span class='notice'>\The [G] retract into your skull.</span>")
|
||||
qdel(G)
|
||||
|
||||
else
|
||||
if(aug && aug.integrated_object)
|
||||
to_chat(src, "<span class='alien'>Your [aug.integrated_object] deploy.</span>")
|
||||
equip_to_slot(aug.integrated_object, slot_glasses, 0, 1)
|
||||
if(!glasses || glasses != aug.integrated_object)
|
||||
aug.integrated_object.forceMove(aug)
|
||||
else
|
||||
var/obj/item/clothing/glasses/hud/security/jensenshades/J = new(get_turf(src))
|
||||
equip_to_slot(J, slot_glasses, 1, 1)
|
||||
to_chat(src, "<span class='notice'>Your [aug.integrated_object] deploy.</span>")
|
||||
|
||||
/obj/item/organ/internal/augment/bioaugment/sprint_enhance
|
||||
name = "locomotive optimization implant"
|
||||
desc = "A chunk of meat and metal that can manage an individual's leg musculature."
|
||||
|
||||
organ_tag = O_AUG_PELVIC
|
||||
|
||||
parent_organ = BP_GROIN
|
||||
|
||||
target_parent_classes = list(ORGAN_FLESH, ORGAN_ASSISTED)
|
||||
|
||||
aug_cooldown = 2 MINUTES
|
||||
|
||||
/obj/item/organ/internal/augment/bioaugment/sprint_enhance/augment_action()
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if(aug_cooldown)
|
||||
if(last_activate <= world.time + aug_cooldown)
|
||||
last_activate = world.time
|
||||
else
|
||||
return
|
||||
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.add_modifier(/datum/modifier/sprinting, 1 MINUTES)
|
||||
|
||||
Reference in New Issue
Block a user