mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Converts table_smash component into an element (#94585)
## About The Pull Request <img width="573" height="30" alt="firefox_EhVA73C1LZ" src="https://github.com/user-attachments/assets/f77baf9c-2585-4cb7-a08f-5ce8322b0a54" /> ## Why It's Good For The Game Less overhead and memory usage. ## Changelog 🆑 refactor: refactors table_smash component into an element /🆑
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
AddElement(/datum/element/elevation, pixel_shift = 12)
|
||||
AddElement(/datum/element/give_turf_traits, string_list(turf_traits))
|
||||
AddElement(/datum/element/footstep_override, footstep = footstep, priority = STEP_SOUND_TABLE_PRIORITY)
|
||||
AddComponent(/datum/component/table_smash)
|
||||
AddElement(/datum/element/table_smash)
|
||||
|
||||
/obj/structure/platform/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
. = ..()
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
make_climbable()
|
||||
AddElement(/datum/element/give_turf_traits, string_list(turf_traits))
|
||||
AddElement(/datum/element/footstep_override, priority = STEP_SOUND_TABLE_PRIORITY)
|
||||
AddComponent(/datum/component/table_smash, gentle_push = slam_gently, after_smash = CALLBACK(src, PROC_REF(after_smash)))
|
||||
AddElement(/datum/element/table_smash, gentle_push = slam_gently)
|
||||
|
||||
/// Called after someone is harmfully smashed into us
|
||||
/obj/structure/table/proc/after_smash(mob/living/smashed)
|
||||
/obj/structure/table/after_smash(mob/living/smashed_onto)
|
||||
return // This is mostly for our children
|
||||
|
||||
/// Applies additional properties based on the frame used to construct this table.
|
||||
@@ -633,7 +633,7 @@
|
||||
canSmoothWith = SMOOTH_GROUP_WOOD_TABLES
|
||||
custom_materials = list(/datum/material/wood = SHEET_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/structure/table/wood/after_smash(mob/living/smashed)
|
||||
/obj/structure/table/wood/after_smash(mob/living/smashed_onto)
|
||||
if(QDELETED(src) || prob(66))
|
||||
return
|
||||
visible_message(
|
||||
@@ -642,9 +642,9 @@
|
||||
)
|
||||
|
||||
playsound(src, 'sound/effects/wounds/crack2.ogg', 50, TRUE)
|
||||
smashed.Knockdown(10 SECONDS)
|
||||
smashed.Paralyze(2 SECONDS)
|
||||
smashed.apply_damage(20, BRUTE)
|
||||
smashed_onto.Knockdown(10 SECONDS)
|
||||
smashed_onto.Paralyze(2 SECONDS)
|
||||
smashed_onto.apply_damage(20, BRUTE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/wood/narsie_act(total_override = TRUE)
|
||||
@@ -855,7 +855,7 @@
|
||||
canSmoothWith = SMOOTH_GROUP_BRONZE_TABLES
|
||||
can_flip = FALSE
|
||||
|
||||
/obj/structure/table/bronze/after_smash(mob/living/pushed_mob)
|
||||
/obj/structure/table/bronze/after_smash(mob/living/smashed_onto)
|
||||
playsound(src, 'sound/effects/magic/clockwork/fellowship_armory.ogg', 50, TRUE)
|
||||
|
||||
/obj/structure/table/reinforced/rglass
|
||||
|
||||
Reference in New Issue
Block a user