From d296d7eb781df01b177c2a4e3d098429c8a4cfde Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Mon, 10 Oct 2016 19:30:40 -0400 Subject: [PATCH] You can no longer hide in a mech to avoid gods --- code/game/mecha/mecha_defense.dm | 31 ++++++++++++++++++++++- code/modules/mob/living/living_defense.dm | 5 +++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index a8c31514f66..da5c40728ed 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -266,4 +266,33 @@ /obj/mecha/mech_melee_attack(obj/mecha/M) if(M.damtype == BRUTE || M.damtype == BURN) add_logs(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])") - . = ..() \ No newline at end of file + . = ..() + +/obj/mecha/narsie_act() + if(occupant) + var/mob/living/L = occupant + go_out(TRUE) + if(L) + L.narsie_act() + +/obj/mecha/ratvar_act() + if(occupant) + if(is_servant_of_ratvar(occupant)) //reward the minion that got a mech by repairing it + obj_integrity = max_integrity + if(cell) + cell.charge = cell.maxcharge + if(internal_damage & MECHA_INT_FIRE) + clearInternalDamage(MECHA_INT_FIRE) + if(internal_damage & MECHA_INT_TEMP_CONTROL) + clearInternalDamage(MECHA_INT_TEMP_CONTROL) + if(internal_damage & MECHA_INT_SHORT_CIRCUIT) + clearInternalDamage(MECHA_INT_SHORT_CIRCUIT) + if(internal_damage & MECHA_INT_TANK_BREACH) + clearInternalDamage(MECHA_INT_TANK_BREACH) + if(internal_damage & MECHA_INT_CONTROL_LOST) + clearInternalDamage(MECHA_INT_CONTROL_LOST) + else + var/mob/living/L = occupant + go_out(TRUE) + if(L) + L.ratvar_act() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 4810d0da39d..bf2d47892b7 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -309,7 +309,7 @@ adjustBruteLoss(35) if(src && reagents) reagents.add_reagent("heparin", 5) - return 0 + return FALSE if(client) makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, src, null, 0) else @@ -324,6 +324,7 @@ new /mob/living/simple_animal/hostile/construct/harvester/hostile(get_turf(src)) spawn_dust() gib() + return TRUE /mob/living/ratvar_act() @@ -333,6 +334,8 @@ if(src) adjust_fire_stacks(1) IgniteMob() + return FALSE + return TRUE //called when the mob receives a bright flash