mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Breakable objects: cameras, wall-mounted lanterns, beakers, and flashlights (#32184)
* Generalize breakability to obj. Standardize health and maxHealth for objs. Make flashlights, cameras, beakers, and wall-mounted lanterns breakable. * Moved breakable.dm. * Fix metaclub beepsky's maxhealth to maxHealth. * Attempted to fix named argument error. * Attempt to fix take_damage() derived proc named argument error. * Attempt to fixed named argument error. * Fragments can be obj not just item. * Remove debug. * . * Fixed conflicting proc definitions. * Attempt to fix runtime. * Partly dissolve existing implementations of object health into general framework. * Declare parent args in take_damage() proc overrides. * Typo fix. * Comment change. * Change destroy to qdel. * Update breakable.dm Check for null teeth. * Teeth check. * . * Gum check.
This commit is contained in:
@@ -25,6 +25,23 @@
|
||||
var/start_with_lantern = /obj/item/device/flashlight/lantern/on
|
||||
var/busy = 0
|
||||
|
||||
health = 60
|
||||
breakable_flags = BREAKABLE_ALL
|
||||
damage_armor = BREAKARMOR_MEDIUM
|
||||
damage_resist = BREAKARMOR_WEAK
|
||||
damaged_examine_text = "It is dented."
|
||||
take_hit_text = "denting"
|
||||
take_hit_text2 = "dents"
|
||||
breaks_text = "breaks apart"
|
||||
glanced_sound = 'sound/items/trayhit1.ogg'
|
||||
|
||||
/obj/structure/hanging_lantern/try_break()
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/structure/hanging_lantern/New(turf/T, var/build_dir)
|
||||
|
||||
..()
|
||||
@@ -88,6 +105,9 @@
|
||||
update()
|
||||
return 1
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/hanging_lantern/update_icon()
|
||||
|
||||
if(lantern)
|
||||
|
||||
Reference in New Issue
Block a user