mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Fixes #3081
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
var/construction_time = 100
|
||||
var/list/construction_cost = list("metal"=20000,"glass"=5000)
|
||||
var/list/part = null
|
||||
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
|
||||
/obj/item/robot_parts/l_arm
|
||||
name = "robot left arm"
|
||||
@@ -278,3 +279,13 @@
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/robot_parts/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/card/emag))
|
||||
if(sabotaged)
|
||||
user << "\red [src] is already sabotaged!"
|
||||
else
|
||||
user << "\red You slide [W] into the dataport on [src] and short out the safeties."
|
||||
sabotaged = 1
|
||||
return
|
||||
..()
|
||||
@@ -161,6 +161,17 @@ emp_act
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(!(affecting.status & ORGAN_ROBOT))
|
||||
user << "\red That limb isn't robotic."
|
||||
return
|
||||
if(affecting.sabotaged)
|
||||
user << "\red [src]'s [affecting.display_name] is already sabotaged!"
|
||||
else
|
||||
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
|
||||
affecting.sabotaged = 1
|
||||
return
|
||||
|
||||
if(I.attack_verb.len)
|
||||
visible_message("\red <B>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!</B>")
|
||||
else
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
var/open = 0
|
||||
var/stage = 0
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
|
||||
var/obj/item/hidden = null
|
||||
var/list/implants = list()
|
||||
@@ -482,8 +483,8 @@
|
||||
owner.u_equip(owner.shoes)
|
||||
if(organ)
|
||||
destspawn = 1
|
||||
//Robotic limbs explode until specified otherwise
|
||||
if(status & ORGAN_ROBOT && !no_explode)
|
||||
//Robotic limbs explode if sabotaged.
|
||||
if(status & ORGAN_ROBOT && !no_explode && sabotaged)
|
||||
owner.visible_message("\red \The [owner]'s [display_name] explodes violently!",\
|
||||
"\red <b>Your [display_name] explodes!</b>",\
|
||||
"You hear an explosion followed by a scream!")
|
||||
@@ -494,10 +495,10 @@
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
else
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
owner.visible_message("\red [owner.name]'s [display_name] flies off in an arc.",\
|
||||
"<span class='moderate'><b>Your [display_name] goes flying off!</b></span>",\
|
||||
"You hear a terrible sound of ripping tendons and flesh.")
|
||||
|
||||
//Throw organs around
|
||||
var/lol = pick(cardinal)
|
||||
|
||||
@@ -190,7 +190,16 @@
|
||||
max_duration = 160
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
return ..() && target_zone != "chest" && target_zone != "groin" && target_zone != "head"
|
||||
if (target_zone == "eyes") //there are specific steps for eye surgery
|
||||
return 0
|
||||
if (!hasorgans(target))
|
||||
return 0
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected == null)
|
||||
return 0
|
||||
if (affected.status & ORGAN_DESTROYED)
|
||||
return 0
|
||||
return target_zone != "chest" && target_zone != "groin" && target_zone != "head"
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -203,11 +212,11 @@
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts off [target]'s [affected.display_name] with \the [tool].", \
|
||||
"\blue You cut off [target]'s [affected.display_name] with \the [tool].")
|
||||
affected.droplimb(1,1)
|
||||
affected.droplimb(1,0)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\red [user]'s hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!", \
|
||||
"\red Your hand slips, sawwing through the bone in [target]'s [affected.display_name] with \the [tool]!")
|
||||
affected.createwound(CUT, 30)
|
||||
affected.fracture()
|
||||
affected.fracture()
|
||||
@@ -144,10 +144,15 @@
|
||||
"You start attaching [tool] where [target]'s [affected.display_name] used to be.")
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/robot_parts/L = tool
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
|
||||
"\blue You have attached [tool] where [target]'s [affected.display_name] used to be.")
|
||||
affected.robotize()
|
||||
if(L.sabotaged)
|
||||
affected.sabotaged = 1
|
||||
else
|
||||
affected.sabotaged = 0
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
|
||||
Reference in New Issue
Block a user