Fix some RTs - 03JUL2017 (#2938)

Fix the most common RTs from Sunday's testing.

Also works on orebags. Limits their capacity to 200, as anything higher than that breaks the fancy inventory system something awful. Maybe I should write a UT to test and confirm this. Expanding: I don't think TICK_CHECK in inventory procs is a good idea, without fully implementing a non-fancy storage subclass. Non-fancy would just be speedy without all of the fancy inventory orientation bullshit. But CBA to do that now and I'm not sure if it's worth it for the edgecase of drone satchels atm.
This commit is contained in:
skull132
2017-07-05 23:26:35 +03:00
committed by GitHub
parent 6637052899
commit e92f1fdd2e
11 changed files with 50 additions and 24 deletions
+6 -4
View File
@@ -171,7 +171,7 @@
if(owner)
replaced(owner)
sync_colour_to_human(owner)
addtimer(CALLBACK(src, .proc/get_icon), 1)
if ((status & ORGAN_PLANT))
@@ -229,7 +229,7 @@
brute -= brute / 2
if(status & ORGAN_BROKEN && prob(40) && brute)
if (!(owner.species && (owner.species.flags & NO_PAIN)))
if (owner && !(owner.species && (owner.species.flags & NO_PAIN)))
owner.emote("scream") //getting hit on broken hand hurts
if(used_weapon)
add_autopsy_data("[used_weapon]", brute + burn)
@@ -272,12 +272,14 @@
spillover += max(0, burn - can_inflict)
//If there are still hurties to dispense
if (spillover)
if (spillover && owner)
owner.shock_stage += spillover * config.organ_damage_spillover_multiplier
// sync the organ's damage with its wounds
src.update_damages()
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
if (owner)
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner && !is_stump())