Replaced wall_smash in simple_animal with environment_smash, because before, you either tables AND walls, or nothing. If set to 1, smash crate/locker/rack/table, 2 for wallsmash, 3 for rwall smash

Hostile mobs with environment smash will also unbuckle themselves by destroying whatever they're buckled to when angered.

Conflicts:
	code/game/objects/structures/stool_bed_chair_nest/bed.dm
	code/game/objects/structures/tables_racks.dm
	code/game/turfs/simulated/walls.dm
	code/modules/mob/living/simple_animal/hostile/hostile.dm
This commit is contained in:
Ergovisavi
2014-01-23 23:31:36 -05:00
committed by ZomgPonies
parent 8ef0c5c859
commit 7ad68dd693
11 changed files with 27 additions and 39 deletions
@@ -166,7 +166,7 @@
return
/obj/structure/closet/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
if(user.environment_smash)
visible_message("\red [user] destroys the [src]. ")
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
@@ -99,7 +99,7 @@
return
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob)
if(user.wall_smash)
if(user.environment_smash)
for(var/mob/M in src)
shatter(M)
@@ -142,4 +142,4 @@
user.dust()
dump_contents()
visible_message("\red [src] shatters!. ")
del(src)
del(src)
@@ -36,9 +36,16 @@
manual_unbuckle(user)
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/attack_animal(var/mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
buckle_mob(M, user)
+2 -2
View File
@@ -391,7 +391,7 @@
destroy()
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.wall_smash || istype(user,/mob/living/simple_animal/hostile/carp))
if(user.environment_smash)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
destroy()
@@ -867,7 +867,7 @@
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
if(user.wall_smash)
if(user.environment_smash)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
destroy()
+4 -22
View File
@@ -103,28 +103,10 @@
return src.attack_hand(user)
/*/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
if(M.wall_smash)
if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
M << text("\blue This wall is far too strong for you to destroy.")
return
else
if (prob(40) || rotting)
M << text("\blue You smash through the wall.")
dismantle_wall(1)
return
else
M << text("\blue You smash against the wall.")
return
M << "\blue You push the wall but nothing happens!"
return*/
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
if(M.wall_smash)
if (istype(src, /turf/simulated/wall/r_wall))
if(M.wall_smash == 2)
if(M.environment_smash >= 2)
if(istype(src, /turf/simulated/wall/r_wall))
if(M.environment_smash == 3)
dismantle_wall(1)
M << "<span class='info'>You smash through the wall.</span>"
else
@@ -407,4 +389,4 @@
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)
..(newtype)
@@ -147,7 +147,7 @@
melee_damage_upper = 30
attacktext = "smashes their armoured gauntlet into"
speed = 3
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch3.ogg'
status_flags = 0
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
@@ -243,7 +243,7 @@
melee_damage_upper = 5
attacktext = "rams"
speed = 0
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch2.ogg'
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/construct/lesser,
/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
@@ -271,7 +271,7 @@
melee_damage_upper = 50
attacktext = "brutally crushes"
speed = 5
wall_smash = 1
environment_smash = 2
attack_sound = 'sound/weapons/punch4.ogg'
var/energy = 0
var/max_energy = 1000
@@ -2,6 +2,7 @@
faction = "hostile"
mouse_opacity = 2 //This makes it easier to hit hostile mobs, you only need to click on their tile, and is set back to 1 when they die
stop_automated_movement_when_pulled = 0
environment_smash = 1 //Set to 1 to break closets,tables,racks, etc; 2 for walls; 3 for rwalls
var/stance = HOSTILE_STANCE_IDLE //Used to determine behavior
var/atom/target
var/attack_same = 0 //Set us to 1 to allow us to attack our own faction, or 2, to only ever attack our own faction
@@ -25,7 +26,6 @@
var/list/wanted_objects = list() //A list of objects that will be checked against to attack, should we have search_objects enabled
var/stat_attack = 0 //Mobs with stat_attack to 1 will attempt to attack things that are unconscious, Mobs with stat_attack set to 2 will attempt to attack the dead.
var/stat_exclusive = 0 //Mobs with this set to 1 will exclusively attack things defined by stat_attack, stat_attack 2 means they will only attack corpses
var/environment_smash = 1 //Mobs with this set to 1 will attempt to break things in the environment to pursue targets, on by default for original simple mobs
var/attack_faction = null //Put a faction string here to have a mob only ever attack a specific faction
@@ -261,12 +261,14 @@
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
if(environment_smash)
if(buckled)//Beds and chairs are no longer hostile mob kryptonite
buckled.attack_animal(src)
var/list/directions = cardinal.Copy()
for(var/dir in directions)
var/turf/T = get_step(src, dir)
if(istype(T, /turf/simulated/wall) && wall_smash)
if(istype(T, /turf/simulated/wall))
T.attack_animal(src)
for(var/atom/A in T)
if(istype(A, /obj/structure/window) || istype(A, /obj/structure/closet) || istype(A, /obj/structure/table) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/rack))
A.attack_animal(src)
else return
return
@@ -10,7 +10,7 @@
max_n2 = 0
unsuitable_atoms_damage = 15
faction = "mining"
wall_smash = 1
environment_smash = 2
minbodytemp = 0
heat_damage_per_tick = 20
response_help = "pokes"
@@ -52,7 +52,7 @@
var/attacktext = "attacks"
var/attack_sound = null
var/friendly = "nuzzles" //If the mob does no damage with it's attack
var/wall_smash = 0 //if they can smash walls
var/environment_smash = 0 //Set to 1 to allow breaking of crates,lockers,racks,tables; 2 for walls; 3 for Rwalls
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/can_hide = 0
@@ -528,4 +528,4 @@
var/obj/mecha/M = the_target
if (M.occupant)
return 0
return 1
return 1
@@ -14,7 +14,6 @@
melee_damage_upper = 40
attacktext = "slammed its enormous claws into"
speed = -1
wall_smash = 1
attack_sound = 'sound/weapons/bladeslice.ogg'
status_flags = 0
universal_speak = 1
@@ -30,8 +30,6 @@
a_intent = "harm" //so they don't get pushed around
wall_smash = 1
speed = -1
var/mob/living/simple_animal/space_worm/previous //next/previous segments, correspondingly