Skip to content

Commit

Permalink
Table Smasher (Table now Cracks with Damage, and Table Smashing now D…
Browse files Browse the repository at this point in the history
…eals Damage.) (#519)
  • Loading branch information
Andrymeda authored Jul 8, 2024
1 parent e65d1f2 commit c1df956
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6172,6 +6172,7 @@
#include "maplestation_modules\code\game\objects\structures\stasis.dm"
#include "maplestation_modules\code\game\objects\structures\static_plaques.dm"
#include "maplestation_modules\code\game\objects\structures\surgery_table.dm"
#include "maplestation_modules\code\game\objects\structures\tables_racks.dm"
#include "maplestation_modules\code\game\objects\structures\vital_floor_scanner.dm"
#include "maplestation_modules\code\game\objects\structures\vital_reader.dm"
#include "maplestation_modules\code\game\objects\structures\crate_lockers\crates.dm"
Expand Down
23 changes: 23 additions & 0 deletions maplestation_modules/code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/obj/structure/table
var/crack_states_count = 9
var/static/list/crack_states

/obj/structure/table/Initialize(mapload)
. = ..()
if(!crack_states)
crack_states = list()
for(var/i in 1 to crack_states_count)
crack_states += "crack[i]"

AddElement(/datum/element/crackable, 'icons/obj/pipes_n_cables/stationary_canisters.dmi', crack_states)

/obj/structure/table/tablepush(mob/living/user, mob/living/pushed_mob)
. = ..()
take_damage(20)

/obj/structure/table/deconstruct(disassembled, wrench_disassembly)
if(!disassembled)
playsound(src, 'sound/effects/bang.ogg', 90, TRUE)
visible_message(span_danger("[src] breaks down!"),
blind_message = span_danger("You hear something breaking."))
. = ..()

0 comments on commit c1df956

Please sign in to comment.