Cleaned up environment_smash vars with bitflag defines (#30154)

* Switched to bitflags

* CB's change.

* fixed

* i can spell i swear

* cb2
This commit is contained in:
ShizCalev
2017-08-27 12:49:58 +02:00
committed by AnturK
parent 14e63ffd8c
commit 7056b38410
8 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -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()
..()
@@ -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
+1 -1
View File
@@ -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