Limit bullet overlays on walls (#33364)

* Limit bullet overlays on walls

* Whitespace bad

* Okay

* Touching this because I'm testing TGS3 stuff

* Update walls.dm
This commit is contained in:
AnturK
2017-12-08 16:32:56 +01:00
committed by CitadelStationBot
parent e6fb6a5910
commit e1fece081f
+7
View File
@@ -1,3 +1,5 @@
#define MAX_DENT_DECALS 15
/turf/closed/wall
name = "wall"
desc = "A huge chunk of metal used to separate rooms."
@@ -297,6 +299,9 @@
return FALSE
/turf/closed/wall/proc/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8))
if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS)
return
var/mutable_appearance/decal = pick(dent_decal_list[denttype])
decal.pixel_x = x
decal.pixel_y = y
@@ -304,3 +309,5 @@
cut_overlay(dent_decals)
LAZYADD(dent_decals, decal)
add_overlay(dent_decals)
#undef MAX_DENT_DECALS