Files
Bubberstation/code/game/objects/structures/destructible_structures.dm
san7890 5ce9d5806d Scopes NODECONSTRUCT_1 from flags_1 to obj_flags (#80104)
This flag only worked on the `/obj/structure` and `/obj/machinery`
level, so let's rescope it from `flags_1` and put it where it belongs -
`obj_flags`.
Bitflag operators should be scoped to their subtype specific bitfield,
not really useful to have this take up a spot on the `/atom` level if
absolutely nothing other than `/obj`s use it.
2023-12-08 08:49:14 +00:00

20 lines
805 B
Plaintext

/obj/structure/destructible //a base for destructible structures
max_integrity = 100
var/break_message = "<span class='warning'>The strange, admin-y structure breaks!</span>" //The message shown when a structure breaks
var/break_sound = 'sound/magic/clockwork/invoke_general.ogg' //The sound played when a structure breaks
var/list/debris = null //Parts left behind when a structure breaks, takes the form of list(path = amount_to_spawn)
/obj/structure/destructible/deconstruct(disassembled = TRUE)
if(!disassembled)
if(!(obj_flags & NO_DECONSTRUCTION))
if(islist(debris))
for(var/I in debris)
for(var/i in 1 to debris[I])
new I (get_turf(src))
if(break_message)
visible_message(break_message)
if(break_sound)
playsound(src, break_sound, 50, TRUE)
qdel(src)
return 1