Skip to content

Commit

Permalink
oof
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Nov 15, 2023
1 parent cd0c4eb commit be9ecea
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@
/obj/structure/machinery/cm_vending/sorted/cargo_guns/cargo/blend,
)

/// The type of wall decoration we use, to avoid the wall changing icon all the time
var/decoration_type

/turf/closed/wall/almayer/Initialize(mapload, ...)
if(!special_icon && prob(20))
decoration_type = rand(0,3)
return ..()

/turf/closed/wall/almayer/update_icon()
..()
if(special_icon)
return
if(decoration_type == null)
return ..()
if(neighbors_list in list(EAST|WEST))
var/r1 = rand(0,10) //Make a random chance for this to happen
var/r2 = rand(0,3) // Which wall if we do choose it
if(r1 >= 9)
overlays += image(icon, icon_state = "almayer_deco_wall[r2]")
special_icon = TRUE
icon_state = "almayer_deco_wall[decoration_type]"
else // Wall connection was broken, return to normality
special_icon = FALSE
return ..()

/turf/closed/wall/almayer/take_damage(dam, mob/M)
var/damage_check = max(0, damage + dam)
Expand Down

0 comments on commit be9ecea

Please sign in to comment.