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.
This commit is contained in:
VistaPOWA
2013-08-18 23:06:58 +02:00
parent 756cf79f1c
commit e5f4deba9d
14 changed files with 16 additions and 1 deletions
@@ -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
@@ -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
@@ -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
@@ -12,3 +12,4 @@
attacktext = "chomps"
attack_sound = 'sound/weapons/bite.ogg'
faction = "creature"
idle_env_destroyer = 1
@@ -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
@@ -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
@@ -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"
@@ -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)
@@ -35,6 +35,7 @@
faction = "mimic"
move_to_delay = 8
idle_env_destroyer = 1
/mob/living/simple_animal/hostile/mimic/FindTarget()
. = ..()
@@ -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"
@@ -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
@@ -32,6 +32,7 @@
unsuitable_atoms_damage = 15
faction = "russian"
status_flags = CANPUSH
idle_env_destroyer = 0
/mob/living/simple_animal/hostile/russian/ranged
@@ -34,6 +34,7 @@
wall_smash = 1
faction = "syndicate"
status_flags = CANPUSH
idle_env_destroyer = 0
/mob/living/simple_animal/hostile/syndicate/Die()
..()
@@ -36,6 +36,7 @@
minbodytemp = 0
faction = "carp"
idle_env_destroyer = 1
/mob/living/simple_animal/hostile/tree/FindTarget()
. = ..()