Shooting walls can create bullet holes/dents (#30714)
* Bullet holes in walls * Code standards, new sprite
This commit is contained in:
committed by
CitadelStationBot
parent
d25894447e
commit
bdae94f60c
@@ -12,6 +12,7 @@
|
||||
#define HIGH_TURF_LAYER 2.03
|
||||
#define ABOVE_OPEN_TURF_LAYER 2.04
|
||||
#define CLOSED_TURF_LAYER 2.05
|
||||
#define BULLET_HOLE_LAYER 2.06
|
||||
#define ABOVE_NORMAL_TURF_LAYER 2.08
|
||||
#define LATTICE_LAYER 2.2
|
||||
#define DISPOSAL_PIPE_LAYER 2.3
|
||||
|
||||
@@ -138,3 +138,16 @@
|
||||
desc = "A wall made out of a strange metal. The squares on it pulse in a predictable pattern."
|
||||
icon = 'icons/turf/walls/hierophant_wall.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
/turf/closed/bullet_act(obj/item/projectile/Proj)
|
||||
..()
|
||||
if(!Proj.nodamage && (Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
var/mutable_appearance/bullet_hole = mutable_appearance('icons/effects/effects.dmi', "bullet_hole", BULLET_HOLE_LAYER)
|
||||
|
||||
var/random_x = rand(-13, 13)
|
||||
bullet_hole.pixel_x += random_x
|
||||
|
||||
var/random_y = rand(-13, 13)
|
||||
bullet_hole.pixel_y += random_y
|
||||
|
||||
add_overlay(bullet_hole, TRUE)
|
||||
Reference in New Issue
Block a user