replaces all mentions of bodypart_robotic with is_robotic_limb() where possible, adds BODYPART_HYBRID, adds helpers for organic / robotic limbs (is_robotic_limb() / is_organic_limb(), with a arg to override it accepting hybrid limbs)
Also makes the the surgery to heal robotic limbs work if the torso isn't a robot, but rather if there are robotic bodyparts, makes the IPC brain repair.. only accept IPC brains (obviously), makes the damage threshholds for robo-limbs vars instead of a fix 25 with hybrid ones predefined at 25 / 15 (trigger / mindamage), adds an error message to fixing them if already at theshhold, etc. Now just for replacing BODYPART_ORGANIC with is_organic_limb aswell where applicable.. also actual values for the other robo limbs. Fun!
This commit is contained in:
DeltaFire
2020-10-06 17:34:13 +02:00
parent 655d505316
commit 4146566af0
33 changed files with 157 additions and 90 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
/obj/item/storage/book/bible/proc/bless(mob/living/carbon/human/H, mob/living/user)
for(var/X in H.bodyparts)
var/obj/item/bodypart/BP = X
if(BP.status == BODYPART_ROBOTIC)
if(BP.is_robotic_limb())
to_chat(user, "<span class='warning'>[src.deity_name] refuses to heal this metallic taint!</span>")
return 0
+12 -5
View File
@@ -109,12 +109,19 @@
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
//only heal to 25 if limb is damaged to or past 25 brute, otherwise heal normally
var/difference = affecting.brute_dam - 25
if(affecting && affecting.is_robotic_limb() && user.a_intent != INTENT_HARM)
//only heal to threshhold_passed_mindamage if limb is damaged to or past threshhold, otherwise heal normally
var/damage = affecting.brute_dam
var/heal_amount = 15
if(difference >= 0)
heal_amount = difference
affecting.update_threshhold_state(burn = FALSE)
if(affecting.threshhold_brute_passed)
heal_amount = min(heal_amount, damage - affecting.threshhold_passed_mindamage)
if(!heal_amount)
to_chat(user, "<span class ='notice'[user == H ? "Your" : "[H]'s"] [affecting.name] appears to have suffered severe internal damage and requires surgery to repair further.</span>")
return
if(src.use_tool(H, user, 0, volume=50, amount=1))
if(user == H)
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",