diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 299c7eb27d3..f49433d6afc 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -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 diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 0c642bd9e14..b014a672712 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -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) \ No newline at end of file + del(src) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 7339c88646d..c8ef0afbde5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -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) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index f8cb733e30f..28f5dbfdf49 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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("[user] smashes [src] apart!") 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("[user] smashes [src] apart!") destroy() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 70c5ff7aaa3..24b61d8a5f0 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -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 << "You smash through the wall." 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) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index e53e13b6169..4739b872cbf 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 786eb77ba4d..d5aeb2dab37 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index b9eb70f1d55..a885aa47387 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -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" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f62d5fb396f..771a9159e14 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -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 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/simple_animal/vox.dm b/code/modules/mob/living/simple_animal/vox.dm index f3354ce8561..58491911e79 100644 --- a/code/modules/mob/living/simple_animal/vox.dm +++ b/code/modules/mob/living/simple_animal/vox.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm index 14faaffdd57..1e8b6f97217 100644 --- a/code/modules/mob/living/simple_animal/worm.dm +++ b/code/modules/mob/living/simple_animal/worm.dm @@ -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