Cleaned up environment_smash vars with bitflag defines (#2515)

This commit is contained in:
CitadelStationBot
2017-08-27 07:55:07 -05:00
committed by kevinz000
parent 718940042a
commit 94429bdccc
7 changed files with 11 additions and 13 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