Fix for missing and robotic limbs getting infected with germs and being incurable.
This commit is contained in:
Nanai
2013-11-04 12:40:08 -05:00
parent dd7ba7f500
commit 25c55ed354
2 changed files with 17 additions and 11 deletions

View File

@@ -45,6 +45,7 @@
// how often wounds should be updated, a higher number means less often // how often wounds should be updated, a higher number means less often
var/wound_update_accuracy = 1 var/wound_update_accuracy = 1
/datum/organ/external/New(var/datum/organ/external/P) /datum/organ/external/New(var/datum/organ/external/P)
if(P) if(P)
parent = P parent = P
@@ -297,6 +298,11 @@ This function completely restores a damaged organ to perfect condition.
#define GANGREN_LEVEL_TERMINAL 2500 #define GANGREN_LEVEL_TERMINAL 2500
#define GERM_TRANSFER_AMOUNT germ_level/500 #define GERM_TRANSFER_AMOUNT germ_level/500
/datum/organ/external/proc/update_germs() /datum/organ/external/proc/update_germs()
if(status & ORGAN_ROBOT|ORGAN_DESTROYED) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
germ_level = 0
return
if(germ_level > 0 && owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs if(germ_level > 0 && owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
//Syncing germ levels with external wounds //Syncing germ levels with external wounds
for(var/datum/wound/W in wounds) for(var/datum/wound/W in wounds)

View File

@@ -4,7 +4,7 @@
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
/datum/surgery_step/limb/ /datum/surgery_step/limb/
can_infect = 1 can_infect = 0
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!hasorgans(target)) if (!hasorgans(target))
return 0 return 0
@@ -65,8 +65,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone) var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] is beginning to reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \ user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
"You start repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].") "You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -101,8 +101,8 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone) var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts adjusting the area around [target]'s [affected.display_name] with \the [tool].", \ user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
"You start adjusting the area around [target]'s [affected.display_name] with \the [tool].") "You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
..() ..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -125,7 +125,6 @@
/datum/surgery_step/limb/attach /datum/surgery_step/limb/attach
allowed_tools = list(/obj/item/robot_parts = 100) allowed_tools = list(/obj/item/robot_parts = 100)
can_infect = 0
min_duration = 80 min_duration = 80
max_duration = 100 max_duration = 100
@@ -140,14 +139,15 @@
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone) var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("[user] starts attaching \the [tool] where [target]'s [affected.display_name] used to be.", \ user.visible_message("[user] starts attaching [tool] where [target]'s [affected.display_name] used to be.", \
"You start attaching \the [tool] where [target]'s [affected.display_name] used to be.") "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) end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool var/obj/item/robot_parts/L = tool
var/datum/organ/external/affected = target.get_organ(target_zone) var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\blue [user] has attached \the [tool] where [target]'s [affected.display_name] used to be.", \ user.visible_message("\blue [user] has attached [tool] where [target]'s [affected.display_name] used to be.", \
"\blue You have attached \the [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.germ_level = 0
affected.robotize() affected.robotize()
if(L.sabotaged) if(L.sabotaged)
affected.sabotaged = 1 affected.sabotaged = 1