diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index bff067dce1..52e324bd76 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -97,13 +97,11 @@ #define AI_IDLE 2 #define AI_OFF 3 +//determines if a mob can smash through it #define ENVIRONMENT_SMASH_NONE 0 - -#define ENVIRONMENT_SMASH_STRUCTURES 1 - -#define ENVIRONMENT_SMASH_WALLS 2 - -#define ENVIRONMENT_SMASH_RWALLS 3 +#define ENVIRONMENT_SMASH_STRUCTURES 1 //crates, lockers, ect +#define ENVIRONMENT_SMASH_WALLS 2 //walls +#define ENVIRONMENT_SMASH_RWALLS 4 //rwalls //SNPCs diff --git a/code/game/turfs/simulated/minerals.dm b/code/game/turfs/simulated/minerals.dm index 47dc4ff15e..9e0d57d782 100644 --- a/code/game/turfs/simulated/minerals.dm +++ b/code/game/turfs/simulated/minerals.dm @@ -87,7 +87,7 @@ playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction /turf/closed/mineral/attack_animal(mob/living/simple_animal/user) - if(user.environment_smash >= 2) + if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS)) gets_drilled() ..() diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index 8e4c3bc632..261e856629 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -40,7 +40,7 @@ M.do_attack_animation(src) if(!M.environment_smash) return - if(M.environment_smash == 3) + if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS) dismantle_wall(1) playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) else diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 3b3784bf30..0e44a88fef 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -116,7 +116,7 @@ /turf/closed/wall/attack_animal(mob/living/simple_animal/M) M.changeNext_move(CLICK_CD_MELEE) M.do_attack_animation(src) - if(M.environment_smash >= 2) + if((M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS)) playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) dismantle_wall(1) return diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 18e713e7af..7b4fe44d37 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -2,7 +2,7 @@ faction = list("hostile") stop_automated_movement_when_pulled = 0 obj_damage = 40 - environment_smash = ENVIRONMENT_SMASH_STRUCTURES //Set to 1 to break closets,tables,racks, etc; 2 for walls; 3 for rwalls + environment_smash = ENVIRONMENT_SMASH_STRUCTURES //Bitflags. Set to ENVIRONMENT_SMASH_STRUCTURES to break closets,tables,racks, etc; ENVIRONMENT_SMASH_WALLS for walls; ENVIRONMENT_SMASH_RWALLS for rwalls var/atom/target var/ranged = 0 var/rapid = 0 @@ -253,7 +253,7 @@ if(target.loc != null && get_dist(targets_from, target.loc) <= vision_range) //We can't see our target, but he's in our vision range still if(ranged_ignores_vision && ranged_cooldown <= world.time) //we can't see our target... but we can fire at them! OpenFire(target) - if(environment_smash >= 2) //If we're capable of smashing through walls, forget about vision completely after finding our target + if((environment_smash & ENVIRONMENT_SMASH_WALLS) || (environment_smash & ENVIRONMENT_SMASH_RWALLS)) //If we're capable of smashing through walls, forget about vision completely after finding our target Goto(target,move_to_delay,minimum_distance) FindHidden() return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm index fff5781405..3568f55a31 100644 --- a/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm +++ b/code/modules/mob/living/simple_animal/hostile/wumborian_fugu.dm @@ -122,6 +122,6 @@ A.melee_damage_lower = max((A.melee_damage_lower * 2), 10) A.melee_damage_upper = max((A.melee_damage_upper * 2), 10) A.transform *= 2 - A.environment_smash += 2 + A.environment_smash |= ENVIRONMENT_SMASH_STRUCTURES | ENVIRONMENT_SMASH_RWALLS to_chat(user, "You increase the size of [A], giving it a surge of strength!") qdel(src) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index b52ac83d40..5a0f096564 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -128,7 +128,7 @@ field_generator power level display return ..() /obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M) - if(M.environment_smash >= 3 && active == FG_OFFLINE && state != FG_UNSECURED) + if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED) state = FG_UNSECURED anchored = FALSE M.visible_message("[M] rips [src] free from its moorings!")