mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
## About The Pull Request 123 changed files and multiple crashes after writing broken regex, I replaced most remains of direct spans with macros. This cleans up the code and makes it easier to work with in general, see justification for the original PR. I also fixed a bunch of broken and/or unclosed spans here too. I intentionally avoided replacing spans with multiple classes (in most cases) and spans in the middle of strings as it would impact readability (in my opinion at least) and could be done later if required. ## Why It's Good For The Game Cleaner code, actually using our macros, fixes borked HTML in some places. See original PR. ## Changelog Nothing player-facing
17 lines
735 B
Plaintext
17 lines
735 B
Plaintext
/obj/structure/destructible //a base for destructible structures
|
|
max_integrity = 100
|
|
var/break_message = span_warning("The strange, admin-y structure breaks!") //The message shown when a structure breaks
|
|
var/break_sound = 'sound/effects/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/atom_deconstruct(disassembled = TRUE)
|
|
if(!disassembled)
|
|
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)
|