From e5f4deba9d2b3a9d09db010b68dced0a33f3c32f Mon Sep 17 00:00:00 2001 From: VistaPOWA Date: Sun, 18 Aug 2013 23:06:58 +0200 Subject: [PATCH 1/4] Stops idle syndicate mobs from destroying surroundings Adds a variable ('idle_env_destroyer') to all hostile mobs, denoting whether the mob destroys it's environment while idling or not. Default value is 0 (no). Syndicate, russian and pirate mobs are affected. Also prevents aforementioned mobs from suiciding and/or wrecking away mission environments before the player could see them. Fixes hostile mobs interpreting 'null' as a valid target and always being in HOSTILE_ATTACK stance. --- code/modules/mob/living/simple_animal/hostile/alien.dm | 1 + code/modules/mob/living/simple_animal/hostile/bear.dm | 1 + code/modules/mob/living/simple_animal/hostile/carp.dm | 1 + code/modules/mob/living/simple_animal/hostile/creature.dm | 1 + code/modules/mob/living/simple_animal/hostile/faithless.dm | 1 + code/modules/mob/living/simple_animal/hostile/giant_spider.dm | 1 + code/modules/mob/living/simple_animal/hostile/hivebot.dm | 1 + code/modules/mob/living/simple_animal/hostile/hostile.dm | 4 +++- code/modules/mob/living/simple_animal/hostile/mimic.dm | 1 + code/modules/mob/living/simple_animal/hostile/pirate.dm | 1 + .../mob/living/simple_animal/hostile/retaliate/clown.dm | 1 + code/modules/mob/living/simple_animal/hostile/russian.dm | 1 + code/modules/mob/living/simple_animal/hostile/syndicate.dm | 1 + code/modules/mob/living/simple_animal/hostile/tree.dm | 1 + 14 files changed, 16 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 384963ff056..c27a46ec24f 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -33,6 +33,7 @@ status_flags = CANPUSH minbodytemp = 0 heat_damage_per_tick = 20 + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/alien/drone diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 0a83d7aa5d1..e38e56a1bcb 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -36,6 +36,7 @@ var/stance_step = 0 faction = "russian" + idle_env_destroyer = 1 //SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!! /mob/living/simple_animal/hostile/bear/Hudson diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index d2601c3303d..4122a5957fc 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -35,6 +35,7 @@ minbodytemp = 0 faction = "carp" + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0) return 1 //No drifting in space for space carp! //original comments do not steal diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm index 614095277c7..554970d49e0 100644 --- a/code/modules/mob/living/simple_animal/hostile/creature.dm +++ b/code/modules/mob/living/simple_animal/hostile/creature.dm @@ -12,3 +12,4 @@ attacktext = "chomps" attack_sound = 'sound/weapons/bite.ogg' faction = "creature" + idle_env_destroyer = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index c9a3907e796..6bb4ee5d6fe 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -30,6 +30,7 @@ minbodytemp = 0 faction = "faithless" + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/check_drift = 0) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 3da3cecb760..3c578bb12d2 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -33,6 +33,7 @@ var/busy = 0 pass_flags = PASSTABLE move_to_delay = 6 + idle_env_destroyer = 1 //nursemaids - these create webs and eggs /mob/living/simple_animal/hostile/giant_spider/nurse diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index c8a74487949..f4f9ac53005 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -26,6 +26,7 @@ min_n2 = 0 max_n2 = 0 minbodytemp = 0 + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/hivebot/range name = "hivebot" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f8262ce8832..b2e210ed232 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -11,6 +11,7 @@ var/move_to_delay = 2 //delay for the automated movement. var/list/friends = list() var/vision_range = 10 + var/idle_env_destroyer = 0 stop_automated_movement_when_pulled = 0 /mob/living/simple_animal/hostile/proc/FindTarget() @@ -45,7 +46,8 @@ /mob/living/simple_animal/hostile/proc/GiveTarget(var/new_target) target = new_target - stance = HOSTILE_STANCE_ATTACK + if(target != null || src.idle_env_destroyer == 1) + stance = HOSTILE_STANCE_ATTACK return /mob/living/simple_animal/hostile/proc/Goto(var/target, var/delay) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4d692e5e4d6..14df792a33a 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -35,6 +35,7 @@ faction = "mimic" move_to_delay = 8 + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/mimic/FindTarget() . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm index 10b744a1f06..913693cd899 100644 --- a/code/modules/mob/living/simple_animal/hostile/pirate.dm +++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm @@ -33,6 +33,7 @@ var/weapon1 = /obj/item/weapon/melee/energy/sword/pirate faction = "pirate" + idle_env_destroyer = 0 /mob/living/simple_animal/hostile/pirate/ranged name = "Pirate Gunner" diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 283849d5896..82594359c18 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -37,3 +37,4 @@ heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp unsuitable_atoms_damage = 10 + idle_env_destroyer = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 04e16208787..e1d545bba44 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -32,6 +32,7 @@ unsuitable_atoms_damage = 15 faction = "russian" status_flags = CANPUSH + idle_env_destroyer = 0 /mob/living/simple_animal/hostile/russian/ranged diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index a9fce0633f2..bee74b1dd7d 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -34,6 +34,7 @@ wall_smash = 1 faction = "syndicate" status_flags = CANPUSH + idle_env_destroyer = 0 /mob/living/simple_animal/hostile/syndicate/Die() ..() diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index c757ecf8b82..e15491712bc 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -36,6 +36,7 @@ minbodytemp = 0 faction = "carp" + idle_env_destroyer = 1 /mob/living/simple_animal/hostile/tree/FindTarget() . = ..() From 30d5ccb1d627657b19a35dc331a7c8fb37dc6361 Mon Sep 17 00:00:00 2001 From: VistaPOWA Date: Mon, 19 Aug 2013 19:31:04 +0200 Subject: [PATCH 2/4] Makes hostile mobs destroy their surroundings by default. --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b2e210ed232..a4ea513b719 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -11,7 +11,7 @@ var/move_to_delay = 2 //delay for the automated movement. var/list/friends = list() var/vision_range = 10 - var/idle_env_destroyer = 0 + var/idle_env_destroyer = 1 stop_automated_movement_when_pulled = 0 /mob/living/simple_animal/hostile/proc/FindTarget() From a8673533298eeb811b4527a8a7a3ea5f9aba88af Mon Sep 17 00:00:00 2001 From: VistaPOWA Date: Tue, 20 Aug 2013 00:39:05 +0200 Subject: [PATCH 3/4] Removed redundant var idle_env_destroyer from hostile mobs --- code/modules/mob/living/simple_animal/hostile/alien.dm | 2 -- code/modules/mob/living/simple_animal/hostile/bear.dm | 1 - code/modules/mob/living/simple_animal/hostile/carp.dm | 1 - code/modules/mob/living/simple_animal/hostile/creature.dm | 2 +- code/modules/mob/living/simple_animal/hostile/faithless.dm | 1 - code/modules/mob/living/simple_animal/hostile/giant_spider.dm | 1 - code/modules/mob/living/simple_animal/hostile/hivebot.dm | 1 - code/modules/mob/living/simple_animal/hostile/mimic.dm | 1 - code/modules/mob/living/simple_animal/hostile/tree.dm | 1 - 9 files changed, 1 insertion(+), 10 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index c27a46ec24f..77a2d2eb766 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -33,8 +33,6 @@ status_flags = CANPUSH minbodytemp = 0 heat_damage_per_tick = 20 - idle_env_destroyer = 1 - /mob/living/simple_animal/hostile/alien/drone name = "alien drone" diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index e38e56a1bcb..0a83d7aa5d1 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -36,7 +36,6 @@ var/stance_step = 0 faction = "russian" - idle_env_destroyer = 1 //SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!! /mob/living/simple_animal/hostile/bear/Hudson diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index 4122a5957fc..d2601c3303d 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -35,7 +35,6 @@ minbodytemp = 0 faction = "carp" - idle_env_destroyer = 1 /mob/living/simple_animal/hostile/carp/Process_Spacemove(var/check_drift = 0) return 1 //No drifting in space for space carp! //original comments do not steal diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm index 554970d49e0..f3eea3c044c 100644 --- a/code/modules/mob/living/simple_animal/hostile/creature.dm +++ b/code/modules/mob/living/simple_animal/hostile/creature.dm @@ -12,4 +12,4 @@ attacktext = "chomps" attack_sound = 'sound/weapons/bite.ogg' faction = "creature" - idle_env_destroyer = 1 + diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index 6bb4ee5d6fe..c9a3907e796 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -30,7 +30,6 @@ minbodytemp = 0 faction = "faithless" - idle_env_destroyer = 1 /mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/check_drift = 0) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 3c578bb12d2..3da3cecb760 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -33,7 +33,6 @@ var/busy = 0 pass_flags = PASSTABLE move_to_delay = 6 - idle_env_destroyer = 1 //nursemaids - these create webs and eggs /mob/living/simple_animal/hostile/giant_spider/nurse diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index f4f9ac53005..c8a74487949 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -26,7 +26,6 @@ min_n2 = 0 max_n2 = 0 minbodytemp = 0 - idle_env_destroyer = 1 /mob/living/simple_animal/hostile/hivebot/range name = "hivebot" diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 14df792a33a..4d692e5e4d6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -35,7 +35,6 @@ faction = "mimic" move_to_delay = 8 - idle_env_destroyer = 1 /mob/living/simple_animal/hostile/mimic/FindTarget() . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index e15491712bc..c757ecf8b82 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -36,7 +36,6 @@ minbodytemp = 0 faction = "carp" - idle_env_destroyer = 1 /mob/living/simple_animal/hostile/tree/FindTarget() . = ..() From 537e422afc5b3e6e94b966897415bf1659567b49 Mon Sep 17 00:00:00 2001 From: VistaPOWA Date: Tue, 20 Aug 2013 03:03:33 +0200 Subject: [PATCH 4/4] oops, missed a mob --- .../mob/living/simple_animal/hostile/retaliate/clown.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index 82594359c18..023815cfd49 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -36,5 +36,4 @@ maxbodytemp = 370 heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp - unsuitable_atoms_damage = 10 - idle_env_destroyer = 1 + unsuitable_atoms_damage = 10 \ No newline at end of file