mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fixes #9913
Also axes hidden var in lieu of using implants like other foreign objects. Now instead of one object, amount of stuff you can put in someone's organ is restricted by stuff's combined w_class.
This commit is contained in:
@@ -281,8 +281,9 @@
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
for(var/obj/item/organ/external/affecting in H.organs)
|
||||
if(affecting.hidden == card)
|
||||
if(card in affecting.implants)
|
||||
affecting.take_damage(rand(30,50))
|
||||
affecting.implants -= card
|
||||
H.visible_message("<span class='danger'>\The [src] explodes out of \the [H]'s [affecting.name] in shower of gore!</span>")
|
||||
break
|
||||
holder.drop_from_inventory(card)
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
var/cavity = 0
|
||||
var/sabotaged = 0 // If a prosthetic limb is emagged, it will detonate when it fails.
|
||||
var/encased // Needs to be opened with a saw to access the organs.
|
||||
var/obj/item/hidden = null
|
||||
var/list/implants = list()
|
||||
var/wound_update_accuracy = 1 // how often wounds should be updated, a higher number means less often
|
||||
var/joint = "joint" // Descriptive string used in dislocation.
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && !affected.cavity && !affected.hidden
|
||||
return affected && !affected.cavity
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -112,7 +112,15 @@
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
if(..())
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
return affected && !istype(user,/mob/living/silicon/robot) && !affected.hidden && affected.cavity && tool.w_class <= get_max_wclass(affected)
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
return
|
||||
if(affected && affected.cavity)
|
||||
var/total_volume = tool.w_class
|
||||
for(var/obj/item/I in affected.implants)
|
||||
if(istype(I,/obj/item/weapon/implant))
|
||||
continue
|
||||
total_volume += I.w_class
|
||||
return total_volume <= get_max_wclass(affected)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
@@ -132,8 +140,8 @@
|
||||
affected.wounds += I
|
||||
affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
|
||||
user.drop_item()
|
||||
affected.hidden = tool
|
||||
tool.loc = target
|
||||
affected.implants += tool
|
||||
tool.loc = affected
|
||||
affected.cavity = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -174,7 +182,7 @@
|
||||
|
||||
if (affected.implants.len)
|
||||
|
||||
var/obj/item/obj = affected.implants[1]
|
||||
var/obj/item/obj = pick(affected.implants)
|
||||
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
@@ -201,6 +209,8 @@
|
||||
worm.leave_host()
|
||||
else
|
||||
obj.loc = get_turf(target)
|
||||
obj.add_blood(target)
|
||||
obj.update_icon()
|
||||
if(istype(obj,/obj/item/weapon/implant))
|
||||
var/obj/item/weapon/implant/imp = obj
|
||||
imp.imp_in = null
|
||||
@@ -208,16 +218,6 @@
|
||||
else
|
||||
user.visible_message("\blue [user] removes \the [tool] from [target]'s [affected.name].", \
|
||||
"\blue There's something inside [target]'s [affected.name], but you just missed it this time." )
|
||||
else if (affected.hidden)
|
||||
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.name] with \the [tool].", \
|
||||
"\blue You take something out of incision on [target]'s [affected.name]s with \the [tool]." )
|
||||
affected.hidden.loc = get_turf(target)
|
||||
if(!affected.hidden.blood_DNA)
|
||||
affected.hidden.blood_DNA = list()
|
||||
affected.hidden.blood_DNA[target.dna.unique_enzymes] = target.dna.b_type
|
||||
affected.hidden.update_icon()
|
||||
affected.hidden = null
|
||||
|
||||
else
|
||||
user.visible_message("\blue [user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.", \
|
||||
"\blue You could not find anything inside [target]'s [affected.name]." )
|
||||
|
||||
Reference in New Issue
Block a user