mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Adds breathing tube implant, changes how heart works, reworks arm-mounted implants
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
requires_organic_bodypart = 0
|
||||
|
||||
/datum/surgery/organ_manipulation/soft
|
||||
possible_locs = list("groin", "eyes", "mouth")
|
||||
possible_locs = list("groin", "eyes", "mouth", "l_arm", "r_arm")
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders,
|
||||
/datum/surgery_step/incise, /datum/surgery_step/manipulate_organs)
|
||||
|
||||
/datum/surgery/organ_manipulation/alien
|
||||
name = "alien organ manipulation"
|
||||
possible_locs = list("chest", "head", "groin", "eyes", "mouth")
|
||||
possible_locs = list("chest", "head", "groin", "eyes", "mouth", "l_arm", "r_arm")
|
||||
species = list(/mob/living/carbon/alien/humanoid)
|
||||
steps = list(/datum/surgery_step/saw, /datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/manipulate_organs)
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/obj/item/organ/internal/cyberimp/arm
|
||||
name = "arm-mounted implant"
|
||||
desc = "You shouldn't see this! Adminhelp and report this as an issue on github!"
|
||||
zone = "r_arm"
|
||||
slot = "r_arm_device"
|
||||
icon_state = "implant-toolkit"
|
||||
w_class = 3
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
|
||||
var/list/items_list = list()
|
||||
// Used to store a list of all items inside, for multi-item implants.
|
||||
// I would use contents, but they shuffle on every activation/deactivation leading to interface inconsistencies.
|
||||
|
||||
var/obj/item/holder = null
|
||||
// You can use this var for item path, it would be converted into an item on New()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/New()
|
||||
..()
|
||||
if(ispath(holder))
|
||||
holder = new holder(src)
|
||||
|
||||
update_icon()
|
||||
slot = zone + "_device"
|
||||
items_list = contents.Copy()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/update_icon()
|
||||
if(zone == "r_arm")
|
||||
transform = null
|
||||
else // Mirroring the icon
|
||||
transform = matrix(-1, 0, 0, 0, 1, 0)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='info'>[src] is assembled in the [zone == "r_arm" ? "right" : "left"] arm configuration. You can use a screwdriver to reassemble it.</span>"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(zone == "r_arm")
|
||||
zone = "l_arm"
|
||||
else
|
||||
zone = "r_arm"
|
||||
slot = zone + "_device"
|
||||
user << "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>"
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
emag_act()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/Remove(mob/living/carbon/M, special = 0)
|
||||
Retract()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/emag_act()
|
||||
return 0
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/emp_act(severity)
|
||||
if(prob(15/severity))
|
||||
owner << "<span class='warning'>[src] is hit by EMP!</span>"
|
||||
// give the owner an idea about why his implant is glitching
|
||||
Retract()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/proc/Retract()
|
||||
if(!holder || (holder in src))
|
||||
return
|
||||
|
||||
owner.visible_message("<span class='notice'>[owner] retracts [holder] back into \his [zone == "r_arm" ? "right" : "left"] arm.</span>",
|
||||
"<span class='notice'>[holder] snaps back into your [zone == "r_arm" ? "right" : "left"] arm.</span>",
|
||||
"<span class='italics'>You hear a short mechanical noise.</span>")
|
||||
|
||||
owner.unEquip(holder, 1)
|
||||
holder.loc = src
|
||||
holder = null
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/proc/Extend(var/obj/item/item)
|
||||
if(!(item in src))
|
||||
return
|
||||
|
||||
holder = item
|
||||
|
||||
holder.flags |= NODROP
|
||||
holder.unacidable = 1
|
||||
holder.slot_flags = null
|
||||
holder.w_class = 5
|
||||
holder.materials = null
|
||||
|
||||
var/arm_slot = (zone == "r_arm" ? slot_r_hand : slot_l_hand)
|
||||
var/obj/item/arm_item = owner.get_item_by_slot(arm_slot)
|
||||
|
||||
if(arm_item)
|
||||
if(!owner.unEquip(arm_item))
|
||||
owner << "<span class='warning'>Your [arm_item] interferes with [src]!</span>"
|
||||
return
|
||||
else
|
||||
owner << "<span class='notice'>You drop [arm_item] to activate [src]!</span>"
|
||||
|
||||
if(zone == "r_arm" ? !owner.put_in_r_hand(holder) : !owner.put_in_l_hand(holder))
|
||||
owner << "<span class='warning'>Your [src] fails to activate!</span>"
|
||||
return
|
||||
|
||||
// Activate the hand that now holds our item.
|
||||
if(zone == "r_arm" ? owner.hand : !owner.hand)
|
||||
owner.swap_hand()
|
||||
|
||||
owner.visible_message("<span class='notice'>[owner] extends [holder] from \his [zone == "r_arm" ? "right" : "left"] arm.</span>",
|
||||
"<span class='notice'>You extend [holder] from your [zone == "r_arm" ? "right" : "left"] arm.</span>",
|
||||
"<span class='italics'>You hear a short mechanical noise.</span>")
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/ui_action_click()
|
||||
if(crit_fail || (!holder && !contents.len))
|
||||
owner << "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>"
|
||||
return
|
||||
|
||||
// You can emag the arm-mounted implant by activating it while holding emag in it's hand.
|
||||
var/arm_slot = (zone == "r_arm" ? slot_r_hand : slot_l_hand)
|
||||
if(istype(owner.get_item_by_slot(arm_slot), /obj/item/weapon/card/emag) && emag_act())
|
||||
return
|
||||
|
||||
if(!holder || (holder in src))
|
||||
holder = null
|
||||
if(contents.len == 1)
|
||||
Extend(contents[1])
|
||||
else // TODO: make it similar to borg's storage-like module selection
|
||||
var/obj/item/choise = input("Activate which item?", "Arm Implant", null, null) as null|anything in items_list
|
||||
if(owner && owner == usr && owner.stat != DEAD && (src in owner.internal_organs) && !holder && istype(choise) && (choise in contents))
|
||||
// This monster sanity check is a nice example of how bad input() is.
|
||||
Extend(choise)
|
||||
else
|
||||
Retract()
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/emp_act(severity)
|
||||
if(prob(30/severity) && owner && !crit_fail)
|
||||
Retract()
|
||||
owner.visible_message("<span class='danger'>A loud bang comes from [owner]\'s [zone == "r_arm" ? "right" : "left"] arm!</span>")
|
||||
playsound(get_turf(owner), 'sound/weapons/flashbang.ogg', 100, 1)
|
||||
owner << "<span class='userdanger'>You feel an explosion erupt inside your [zone == "r_arm" ? "right" : "left"] arm as your implant breaks!</span>"
|
||||
owner.adjust_fire_stacks(20)
|
||||
owner.IgniteMob()
|
||||
owner.adjustFireLoss(25)
|
||||
crit_fail = 1
|
||||
else // The gun will still discharge anyway.
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/laser
|
||||
name = "arm-mounted laser implant"
|
||||
desc = "A variant of the arm cannon implant that fires lethal laser beams. The cannon emerges from the subject's arm and remains inside when not in use."
|
||||
icon_state = "arm_laser"
|
||||
origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4;syndicate=5"//this is kinda nutty and i might lower it
|
||||
holder = /obj/item/weapon/gun/energy/laser/mounted
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/laser/l/zone = "l_arm"
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/taser
|
||||
name = "arm-mounted taser implant"
|
||||
desc = "A variant of the arm cannon implant that fires electrodes and disabler shots. The cannon emerges from the subject's arm and remains inside when not in use."
|
||||
icon_state = "arm_taser"
|
||||
origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4"
|
||||
holder = /obj/item/weapon/gun/energy/gun/advtaser/mounted
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/gun/taser/l/zone = "l_arm"
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/toolset
|
||||
name = "integrated toolset implant"
|
||||
desc = "A stripped-down version of engineering cyborg toolset, designed to be installed on subject's arm. Contains all neccessary tools."
|
||||
origin_tech = "materials=5;engineering=5;biotech=4;powerstorage=3"
|
||||
contents = newlist(/obj/item/weapon/screwdriver/cyborg, /obj/item/weapon/wrench/cyborg, /obj/item/weapon/weldingtool/largetank/cyborg,
|
||||
/obj/item/weapon/crowbar/cyborg, /obj/item/weapon/wirecutters/cyborg, /obj/item/device/multitool/cyborg)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/toolset/l/zone = "l_arm"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/toolset/emag_act()
|
||||
if(!(locate(/obj/item/weapon/kitchen/knife/combat/cyborg) in items_list))
|
||||
owner << "<span class='notice'>You unlock [src]'s integrated knife!</span>"
|
||||
items_list += new /obj/item/weapon/kitchen/knife/combat/cyborg(src)
|
||||
return 1
|
||||
return 0
|
||||
@@ -0,0 +1,106 @@
|
||||
/obj/item/organ/internal/cyberimp/chest
|
||||
name = "cybernetic torso implant"
|
||||
desc = "implants for the organs in your torso"
|
||||
icon_state = "chest_implant"
|
||||
implant_overlay = "chest_implant_overlay"
|
||||
zone = "chest"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment
|
||||
name = "Nutriment pump implant"
|
||||
desc = "This implant with synthesize and pump into your bloodstream a small amount of nutriment when you are starving."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#00AA00"
|
||||
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
||||
var/synthesizing = 0
|
||||
var/poison_amount = 5
|
||||
slot = "stomach"
|
||||
origin_tech = "materials=5;programming=3;biotech=4"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/on_life()
|
||||
if(synthesizing)
|
||||
return
|
||||
|
||||
if(owner.nutrition <= hunger_threshold)
|
||||
synthesizing = 1
|
||||
owner << "<span class='notice'>You feel less hungry...</span>"
|
||||
owner.nutrition += 50
|
||||
spawn(50)
|
||||
synthesizing = 0
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning
|
||||
owner << "<span class='warning'>You feel like your insides are burning.</span>"
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/plus
|
||||
name = "Nutriment pump implant PLUS"
|
||||
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are hungry."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#006607"
|
||||
hunger_threshold = NUTRITION_LEVEL_HUNGRY
|
||||
poison_amount = 10
|
||||
origin_tech = "materials=5;programming=3;biotech=5"
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver
|
||||
name = "Reviver implant"
|
||||
desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!"
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#AD0000"
|
||||
origin_tech = "materials=6;programming=3;biotech=6;syndicate=4"
|
||||
slot = "heartdrive"
|
||||
var/revive_cost = 0
|
||||
var/reviving = 0
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/on_life()
|
||||
if(reviving)
|
||||
if(owner.stat == UNCONSCIOUS)
|
||||
spawn(30)
|
||||
if(prob(90) && owner.getOxyLoss())
|
||||
owner.adjustOxyLoss(-3)
|
||||
revive_cost += 5
|
||||
if(prob(75) && owner.getBruteLoss())
|
||||
owner.adjustBruteLoss(-1)
|
||||
revive_cost += 20
|
||||
if(prob(75) && owner.getFireLoss())
|
||||
owner.adjustFireLoss(-1)
|
||||
revive_cost += 20
|
||||
if(prob(40) && owner.getToxLoss())
|
||||
owner.adjustToxLoss(-1)
|
||||
revive_cost += 50
|
||||
else
|
||||
cooldown = revive_cost + world.time
|
||||
reviving = 0
|
||||
return
|
||||
|
||||
if(cooldown > world.time)
|
||||
return
|
||||
if(owner.stat != UNCONSCIOUS)
|
||||
return
|
||||
if(owner.suiciding)
|
||||
return
|
||||
|
||||
revive_cost = 0
|
||||
reviving = 1
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if(reviving)
|
||||
revive_cost += 200
|
||||
else
|
||||
cooldown += 200
|
||||
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat != DEAD && prob(50 / severity))
|
||||
H.heart_attack = 1
|
||||
spawn(600 / severity)
|
||||
H.heart_attack = 0
|
||||
if(H.stat == CONSCIOUS)
|
||||
H << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
@@ -116,7 +116,7 @@
|
||||
implant_color = "#101010"
|
||||
flash_protect = 2
|
||||
aug_message = null
|
||||
eye_color = "fff"
|
||||
eye_color = null
|
||||
|
||||
/obj/item/organ/internal/cyberimp/eyes/shield/emp_act(severity)
|
||||
return
|
||||
@@ -26,6 +26,7 @@
|
||||
icon_state = "brain_implant"
|
||||
implant_overlay = "brain_implant_overlay"
|
||||
zone = "head"
|
||||
w_class = 1
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/emp_act(severity)
|
||||
if(!owner)
|
||||
@@ -37,7 +38,7 @@
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_drop
|
||||
name = "Anti-drop implant"
|
||||
name = "anti-drop implant"
|
||||
desc = "This cybernetic brain implant will allow you to force your hand muscles to contract, preventing item dropping. Twitch ear to toggle."
|
||||
var/active = 0
|
||||
var/l_hand_ignore = 0
|
||||
@@ -101,11 +102,11 @@
|
||||
if(L_item)
|
||||
A = pick(oview(range))
|
||||
L_item.throw_at(A, range, 2)
|
||||
owner << "<span class='notice'>Your left arm spasms and throws the [L_item.name]!</span>"
|
||||
owner << "<span class='warning'>Your left arm spasms and throws the [L_item.name]!</span>"
|
||||
if(R_item)
|
||||
A = pick(oview(range))
|
||||
R_item.throw_at(A, range, 2)
|
||||
owner << "<span class='notice'>Your right arm spasms and throws the [R_item.name]!</span>"
|
||||
owner << "<span class='warning'>Your right arm spasms and throws the [R_item.name]!</span>"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_drop/proc/release_items()
|
||||
if(!l_hand_ignore && l_hand_obj in owner.contents)
|
||||
@@ -144,185 +145,24 @@
|
||||
crit_fail = 0
|
||||
|
||||
|
||||
//[[[[CHEST]]]]
|
||||
//[[[[MOUTH]]]]
|
||||
/obj/item/organ/internal/cyberimp/mouth
|
||||
zone = "mouth"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest
|
||||
name = "cybernetic torso implant"
|
||||
desc = "implants for the organs in your torso"
|
||||
icon_state = "chest_implant"
|
||||
implant_overlay = "chest_implant_overlay"
|
||||
zone = "chest"
|
||||
/obj/item/organ/internal/cyberimp/mouth/breathing_tube
|
||||
name = "breathing tube implant"
|
||||
desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked."
|
||||
icon_state = "breathing_tube"
|
||||
slot = "breathing_tube"
|
||||
w_class = 1
|
||||
origin_tech = "materials=2;biotech=3"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment
|
||||
name = "Nutriment pump implant"
|
||||
desc = "This implant with synthesize and pump into your bloodstream a small amount of nutriment when you are starving."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#00AA00"
|
||||
var/hunger_threshold = NUTRITION_LEVEL_STARVING
|
||||
var/synthesizing = 0
|
||||
var/poison_amount = 5
|
||||
slot = "stomach"
|
||||
origin_tech = "materials=5;programming=3;biotech=4"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/on_life()
|
||||
if(synthesizing)
|
||||
return
|
||||
|
||||
if(owner.nutrition <= hunger_threshold)
|
||||
synthesizing = 1
|
||||
owner << "<span class='notice'>You feel less hungry...</span>"
|
||||
owner.nutrition += 50
|
||||
spawn(50)
|
||||
synthesizing = 0
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning
|
||||
owner << "<span class='warning'>You feel like your insides are burning.</span>"
|
||||
/obj/item/organ/internal/cyberimp/mouth/breathing_tube/emp_act(severity)
|
||||
if(prob(60/severity))
|
||||
owner << "<span class='warning'>Your breathing tube suddenly closes!</span>"
|
||||
owner.losebreath += 2
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/plus
|
||||
name = "Nutriment pump implant PLUS"
|
||||
desc = "This implant will synthesize and pump into your bloodstream a small amount of nutriment when you are hungry."
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#006607"
|
||||
hunger_threshold = NUTRITION_LEVEL_HUNGRY
|
||||
poison_amount = 10
|
||||
origin_tech = "materials=5;programming=3;biotech=5"
|
||||
|
||||
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver
|
||||
name = "Reviver implant"
|
||||
desc = "This implant will attempt to revive you if you lose consciousness. For the faint of heart!"
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#AD0000"
|
||||
origin_tech = "materials=6;programming=3;biotech=6;syndicate=4"
|
||||
slot = "heartdrive"
|
||||
var/revive_cost = 0
|
||||
var/reviving = 0
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/on_life()
|
||||
if(reviving)
|
||||
if(owner.stat == UNCONSCIOUS)
|
||||
spawn(30)
|
||||
if(prob(90) && owner.getOxyLoss())
|
||||
owner.adjustOxyLoss(-3)
|
||||
revive_cost += 5
|
||||
if(prob(75) && owner.getBruteLoss())
|
||||
owner.adjustBruteLoss(-1)
|
||||
revive_cost += 20
|
||||
if(prob(75) && owner.getFireLoss())
|
||||
owner.adjustFireLoss(-1)
|
||||
revive_cost += 20
|
||||
if(prob(40) && owner.getToxLoss())
|
||||
owner.adjustToxLoss(-1)
|
||||
revive_cost += 50
|
||||
else
|
||||
cooldown = revive_cost + world.time
|
||||
reviving = 0
|
||||
return
|
||||
|
||||
if(cooldown > world.time)
|
||||
return
|
||||
if(owner.stat != UNCONSCIOUS)
|
||||
return
|
||||
if(owner.suiciding)
|
||||
return
|
||||
|
||||
revive_cost = 0
|
||||
reviving = 1
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/emp_act(severity)
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if(reviving)
|
||||
revive_cost += 200
|
||||
else
|
||||
cooldown += 200
|
||||
|
||||
if(istype(owner, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat != DEAD && prob(50 / severity))
|
||||
H.heart_attack = 1
|
||||
spawn(600 / severity)
|
||||
H.heart_attack = 0
|
||||
if(H.stat == CONSCIOUS)
|
||||
H << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod//dummy parent item for making arm-mod implants. works best with nodrop items that are sent to nullspace upon being dropped.
|
||||
name = "Arm-mounted item implant"
|
||||
desc = "You shouldn't see this! Adminhelp and report this as an issue on github!"
|
||||
icon_state = "chest_implant"
|
||||
implant_color = "#007ACC"
|
||||
slot = "shoulders"
|
||||
origin_tech = "materials=5;biotech=4;powerstorage=4"
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
var/obj/holder//is defined as the retractable item itself. ensure this is defined somewhere!
|
||||
var/out = 0//determines if the item is in the owner's hand or not
|
||||
var/overloaded = 0//is set to 1 when owner gets EMPed. if set to 1, implant doesn't work.
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/ui_action_click()
|
||||
if(overloaded)//ensure the implant isn't broken
|
||||
owner << "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>"
|
||||
return
|
||||
if(holder == null)
|
||||
owner << "<span class='warning'>You should not be attempting to use this implant, as it is a dummy item that should never appear. Please adminhelp and report this as an issue on github.</span>"
|
||||
return
|
||||
if(out)//check if the owner has the item out already
|
||||
owner.unEquip(holder, 1)//if he does, take it away. then,
|
||||
holder.loc = null//stash it in nullspace
|
||||
out = 0//and set this to clarify the item isn't out.
|
||||
owner << "<span class='notice'>You retract [holder].</span>"
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
else//if he doesn't have the item out
|
||||
if(owner.put_in_hands(holder))//put it in his hands.
|
||||
out = 1
|
||||
owner << "<span class='notice'>You extend [holder]!</span>"
|
||||
playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1)
|
||||
else//if this fails to put the item in his hands,
|
||||
holder.loc = null//keep it in nullspace
|
||||
owner << "<span class='warning'>You can't extend [holder] if you can't use your hands!</span>"
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/emp_act(severity)//if the implant gets EMPed...
|
||||
if(!owner || overloaded)//ensure that it's in an owner and that it's not already EMPed, then...
|
||||
return
|
||||
if(out)//check if he has the item out...
|
||||
owner.unEquip(holder, 1)//if he does, take it away.
|
||||
holder.loc = null
|
||||
out = 0
|
||||
owner << "<span class='warning'>[holder] forcibly retracts into your arm.</span>"
|
||||
owner.visible_message("<span class='danger'>A loud bang comes from [owner]...</span>")
|
||||
playsound(get_turf(owner), 'sound/weapons/flashbang.ogg', 100, 1)
|
||||
owner << "<span class='warning'>You feel an explosion erupt inside you as your chest implant breaks. Is it hot in here?</span>"
|
||||
owner.adjust_fire_stacks(20)
|
||||
owner.IgniteMob()//ignite the owner, as well as
|
||||
owner.say("AUUUUUUUUUUUUUUUUUUGH!!")
|
||||
owner.adjustFireLoss(25)//severely injure him!
|
||||
overloaded = 1//then make sure this can't happen again by breaking the implant.
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/tase//mounted, self-charging taser!
|
||||
name = "Arm-cannon taser implant"
|
||||
desc = "A variant of the arm cannon implant that fires electrodes and disabler shots. The cannon emerges from the subject's arms and remains in the shoulders when not in use."
|
||||
icon_state = "armcannon_tase_implant"
|
||||
origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4"
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/tase/New()//when the implant is created...
|
||||
holder = new /obj/item/weapon/gun/energy/gun/advtaser/mounted(src)//assign a brand new item to it. (in this case, a gun)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/lase//mounted, self-charging laser!
|
||||
name = "Arm-cannon laser implant"
|
||||
desc = "A variant of the arm cannon implant that fires lethal laser beams. The cannon emerges from the subject's arms and remains in the shoulders when not in use."
|
||||
icon_state = "armcannon_lase_implant"
|
||||
origin_tech = "materials=5;combat=5;biotech=4;powerstorage=4;syndicate=5"//this is kinda nutty and i might lower it
|
||||
actions_types = list(/datum/action/item_action/organ_action/toggle)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/arm_mod/lase/New()
|
||||
holder = new /obj/item/weapon/gun/energy/laser/mounted(src)
|
||||
|
||||
//BOX O' IMPLANTS
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@ mob/living/carbon/getorganszone(zone, var/subzones = 0)
|
||||
return returnorg
|
||||
|
||||
mob/living/carbon/getorganslot(slot)
|
||||
for(var/obj/item/organ/internal/O in internal_organs)
|
||||
if(slot == O.slot)
|
||||
return O
|
||||
return internal_organs_slot[slot]
|
||||
|
||||
mob/proc/getlimb()
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
throwforce = 0
|
||||
var/zone = "chest"
|
||||
var/slot
|
||||
// DO NOT add slots with matching names to different zones - it will break internal_organs_slot list!
|
||||
var/vital = 0
|
||||
|
||||
|
||||
@@ -18,6 +19,7 @@
|
||||
|
||||
owner = M
|
||||
M.internal_organs |= src
|
||||
M.internal_organs_slot[slot] = src
|
||||
loc = null
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
@@ -28,6 +30,8 @@
|
||||
owner = null
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
if(M.internal_organs_slot[slot] == src)
|
||||
M.internal_organs_slot.Remove(slot)
|
||||
if(vital && !special)
|
||||
M.death()
|
||||
for(var/X in actions)
|
||||
@@ -41,6 +45,12 @@
|
||||
/obj/item/organ/internal/proc/on_life()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/examine(mob/user)
|
||||
..()
|
||||
if(status == ORGAN_ROBOTIC && crit_fail)
|
||||
user << "<span class='warning'>[src] seems to be broken!</span>"
|
||||
|
||||
|
||||
/obj/item/organ/internal/proc/prepare_eat()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/organ/S = new
|
||||
S.name = name
|
||||
@@ -56,7 +66,6 @@
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
|
||||
list_reagents = list("nutriment" = 5)
|
||||
|
||||
|
||||
@@ -92,7 +101,6 @@
|
||||
zone = "chest"
|
||||
slot = "heart"
|
||||
origin_tech = "biotech=3"
|
||||
vital = 1
|
||||
var/beating = 1
|
||||
var/icon_base = "heart"
|
||||
|
||||
@@ -102,16 +110,46 @@
|
||||
else
|
||||
icon_state = "[icon_base]-off"
|
||||
|
||||
/obj/item/organ/internal/heart/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
beating = 1
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/internal/heart/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.stat == DEAD || H.heart_attack)
|
||||
Stop()
|
||||
return
|
||||
if(!special)
|
||||
H.heart_attack = 1
|
||||
|
||||
spawn(120)
|
||||
beating = 0
|
||||
update_icon()
|
||||
if(!owner)
|
||||
Stop()
|
||||
|
||||
/obj/item/organ/internal/heart/attack_self(mob/user)
|
||||
..()
|
||||
if(!beating)
|
||||
Restart()
|
||||
spawn(80)
|
||||
if(!owner)
|
||||
Stop()
|
||||
|
||||
|
||||
/obj/item/organ/internal/heart/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(ishuman(M) && beating)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.heart_attack)
|
||||
H.heart_attack = 0
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/heart/proc/Stop()
|
||||
beating = 0
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/organ/internal/heart/proc/Restart()
|
||||
beating = 1
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/organ/internal/heart/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
|
||||
Reference in New Issue
Block a user