![image](https://github.com/user-attachments/assets/32a5f39a-59b8-46c3-8418-1a089379d6a4)

This PR adds "platforms" to the game, a port of the window frames from
the Wallening branch but with no windows attached.
You can craft them with two stacks of many kinds of materials.
Functionally they're basically just tables for standing on and act as a
decorative tool allowing you to make raised areas like stages.
Largely as far as I can tell I _think_ these were sprited by @Krysonism
although it's a little hard to check if there's any that were done by
someone else.

You can walk directly from tables to platforms (and crates) and vice
versa. You can also tableslam people onto them.

This PR also comes with "steps" (AKA small stairs)
You can use steps to walk onto platforms (or tables, or crates) without
needing to do the climbing action first.

![dreamseeker_umhbakZ4lE](https://github.com/user-attachments/assets/675e815b-8901-49d2-81b1-64ef7a56cd31)
If you try to run through them the wrong way you will trip.
Right now they only come in "Iron" flavour. Maybe one day someone will
sprite some wooden ones, or other varieties.

Basically the intention is to use them to build a little stage or altar
or maze or something. They don't have a lot of non-decorative purpose.

Don't be alarmed by the touched files list. It's mostly sprites and
there's barely even any code in this PR. It's almost entirely elements
and boilerplate.

Mappers keep asking me to add these.
Salvages some sprites from the Wallening project which we can still use.
You can make a really really big multitile pizza.

🆑 Jacquerel, Smartkar, sprites by Kryson
add: Added "platforms", or "half-walls" which are a kind of decorative
block similar to tables which you can walk around on.
add: You can walk freely between tables, platforms, and crates that
happen to be near tables or platforms.
add: You can construct iron steps to traverse tables and platforms
without needing to climb on, but try not to trip over them.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
This commit is contained in:
Jacquerel
2025-07-11 08:21:02 +01:00
committed by Roxy
parent a099de2826
commit 43aa3d40d8
115 changed files with 910 additions and 172 deletions
@@ -41,6 +41,7 @@
/obj/structure/closet/crate/Initialize(mapload)
AddElement(/datum/element/climbable, climb_time = crate_climb_time, climb_stun = 0) //add element in closed state before parent init opens it(if it does)
if(elevation)
AddComponent(/datum/component/climb_walkable)
AddElement(/datum/element/elevation, pixel_shift = elevation)
. = ..()
+276
View File
@@ -0,0 +1,276 @@
#define PLATFORM_BASE_MATERIAL_AMOUNT 2000
/// A raised platform you can stand on top of
/obj/structure/platform
name = "platform"
desc = "A raised platform which can make you slightly taller."
icon = 'icons/obj/smooth_structures/platform/window_frame_normal.dmi'
icon_state = "window_frame_normal-0"
base_icon_state = "window_frame_normal"
smoothing_flags = SMOOTH_BITMASK|SMOOTH_OBJ
smoothing_groups = SMOOTH_GROUP_PLATFORMS
canSmoothWith = SMOOTH_GROUP_PLATFORMS
pass_flags_self = PASSTABLE | LETPASSTHROW | PASSGRILLE | PASSWINDOW
opacity = FALSE
density = TRUE
rad_insulation = null
max_integrity = 50
anchored = TRUE
armor_type = /datum/armor/half_wall
material_flags = MATERIAL_EFFECTS | MATERIAL_AFFECT_STATISTICS
/// Icon used for the frame
var/frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_normal.dmi'
/// Material used in our construction
var/sheet_type = /obj/item/stack/sheet/iron
/// Count of sheets used in our construction
var/sheet_amount = 2
/// What footstep do we use?
var/footstep = FOOTSTEP_FLOOR
/// Traits to give people who have clambered onto our tile
var/static/list/turf_traits = list(TRAIT_TURF_IGNORE_SLOWDOWN, TRAIT_TURF_IGNORE_SLIPPERY, TRAIT_IMMERSE_STOPPED)
/datum/armor/half_wall
melee = 50
bullet = 70
laser = 70
energy = 100
bomb = 10
bio = 100
fire = 0
acid = 0
/obj/structure/platform/Initialize(mapload)
. = ..()
register_context()
update_appearance(UPDATE_OVERLAYS)
AddComponent(/datum/component/climb_walkable)
AddElement(/datum/element/climbable)
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)
/obj/structure/platform/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(isnull(held_item))
return NONE
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
context[SCREENTIP_CONTEXT_RMB] = "Disassemble"
. = CONTEXTUAL_SCREENTIP_SET
if(held_item.tool_behaviour == TOOL_WRENCH)
context[SCREENTIP_CONTEXT_RMB] = "Deconstruct"
. = CONTEXTUAL_SCREENTIP_SET
return . || NONE
/obj/structure/platform/screwdriver_act_secondary(mob/living/user, obj/item/tool)
to_chat(user, span_notice("You start disassembling [src]..."))
if(tool.use_tool(src, user, 2 SECONDS, volume=50))
deconstruct(TRUE)
return ITEM_INTERACT_SUCCESS
/obj/structure/platform/wrench_act_secondary(mob/living/user, obj/item/tool)
to_chat(user, span_notice("You start deconstructing [src]..."))
if(tool.use_tool(src, user, 4 SECONDS, volume=50))
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
deconstruct(TRUE)
return ITEM_INTERACT_SUCCESS
/obj/structure/platform/update_overlays()
. = ..()
if (frame_icon)
. += mutable_appearance(frame_icon, "[base_icon_state]-[smoothing_junction]", appearance_flags = KEEP_APART)
/obj/structure/platform/set_smoothed_icon_state(new_junction)
. = ..()
update_appearance(UPDATE_OVERLAYS)
/obj/structure/platform/atom_deconstruct(disassembled = TRUE)
var/turf/target_turf = drop_location()
if(sheet_type)
new sheet_type(target_turf, sheet_amount)
else
for(var/datum/material/mat in custom_materials)
new mat.sheet_type(target_turf, FLOOR(custom_materials[mat] / SHEET_MATERIAL_AMOUNT, 1))
/obj/structure/platform/rusty
icon = 'icons/obj/smooth_structures/platform/window_frame_rusty.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_rusty.dmi'
icon_state = "window_frame_rusty-0"
base_icon_state = "window_frame_rusty"
// Shuttle themed
/obj/structure/platform/titanium
icon = 'icons/obj/smooth_structures/platform/window_frame_shuttle.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_shuttle.dmi'
icon_state = "window_frame_shuttle-0"
base_icon_state = "window_frame_shuttle"
sheet_type = /obj/item/stack/sheet/mineral/titanium
custom_materials = list(/datum/material/titanium = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_SHUTTLE
canSmoothWith = SMOOTH_GROUP_PLATFORMS_SHUTTLE
/obj/structure/platform/plastitanium
icon = 'icons/obj/smooth_structures/platform/window_frame_plastitanium.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_plastitanium.dmi'
icon_state = "window_frame_plastitanium-0"
base_icon_state = "window_frame_plastitanium"
sheet_type = /obj/item/stack/sheet/mineral/plastitanium
custom_materials = list(/datum/material/alloy/plastitanium = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_SHUTTLE
canSmoothWith = SMOOTH_GROUP_PLATFORMS_SHUTTLE
// Metallic material themed
/obj/structure/platform/material
icon = 'icons/obj/smooth_structures/platform/window_frame_material.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_material.dmi'
icon_state = "window_frame_material-0"
base_icon_state = "window_frame_material"
material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
/obj/structure/platform/iron
name = "rough iron platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_iron.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_iron.dmi'
icon_state = "window_frame_iron-0"
base_icon_state = "window_frame_iron"
sheet_type = /obj/item/stack/sheet/iron
custom_materials = list(/datum/material/iron = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
/obj/structure/platform/silver
name = "silver platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_silver.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_silver.dmi'
icon_state = "window_frame_silver-0"
base_icon_state = "window_frame_silver"
sheet_type = /obj/item/stack/sheet/mineral/silver
custom_materials = list(/datum/material/silver = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
/obj/structure/platform/gold
name = "golden platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_gold.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_gold.dmi'
icon_state = "window_frame_gold-0"
base_icon_state = "window_frame_gold"
sheet_type = /obj/item/stack/sheet/mineral/gold
custom_materials = list(/datum/material/gold = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
/obj/structure/platform/bronze
name = "clockwork platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_bronze.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_bronze.dmi'
icon_state = "window_frame_bronze-0"
base_icon_state = "window_frame_bronze"
sheet_type = /obj/item/stack/sheet/bronze
custom_materials = list(/datum/material/bronze = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
/obj/structure/platform/uranium
name = "depleted uranium platform"
desc = "A heavy duty platform, thankfully not radioactive."
icon = 'icons/obj/smooth_structures/platform/window_frame_uranium.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_uranium.dmi'
icon_state = "window_frame_uranium-0"
base_icon_state = "window_frame_uranium"
material_flags = NONE
sheet_type = /obj/item/stack/sheet/mineral/uranium
custom_materials = list(/datum/material/uranium = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_MATERIAL
canSmoothWith = SMOOTH_GROUP_PLATFORMS_MATERIAL
// Wooden themed
/obj/structure/platform/wood
name = "wooden platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_wood.dmi'
frame_icon = null
icon_state = "window_frame_wood-0"
base_icon_state = "window_frame_wood"
sheet_type = /obj/item/stack/sheet/mineral/wood
custom_materials = list(/datum/material/wood = PLATFORM_BASE_MATERIAL_AMOUNT)
footstep = FOOTSTEP_WOOD
smoothing_groups = SMOOTH_GROUP_PLATFORMS_WOOD
canSmoothWith = SMOOTH_GROUP_PLATFORMS_WOOD
/obj/structure/platform/wood/stage
name = "wooden stage"
desc = "A raised platform you can perform upon."
icon = 'icons/obj/smooth_structures/platform/window_frame_hotel.dmi'
icon_state = "window_frame_hotel-0"
base_icon_state = "window_frame_hotel"
/obj/structure/platform/bamboo
name = "bamboo platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_bamboo.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_bamboo.dmi'
icon_state = "window_frame_bamboo-0"
base_icon_state = "window_frame_bamboo"
sheet_type = /obj/item/stack/sheet/mineral/bamboo
custom_materials = list(/datum/material/bamboo = PLATFORM_BASE_MATERIAL_AMOUNT)
footstep = FOOTSTEP_WOOD
smoothing_groups = SMOOTH_GROUP_PLATFORMS_WOOD
canSmoothWith = SMOOTH_GROUP_PLATFORMS_WOOD
// Misc
/obj/structure/platform/sandstone
name = "stone platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_sandstone.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_sandstone.dmi'
icon_state = "window_frame_sandstone-0"
base_icon_state = "window_frame_sandstone"
sheet_type = /obj/item/stack/sheet/mineral/sandstone
custom_materials = list(/datum/material/sandstone = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_STONE
canSmoothWith = SMOOTH_GROUP_PLATFORMS_STONE
/obj/structure/platform/cult
name = "runed stone platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_cult.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_cult.dmi'
icon_state = "window_frame_cult-0"
base_icon_state = "window_frame_cult"
sheet_type = /datum/material/runedmetal
custom_materials = list(/datum/material/runedmetal = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_STONE
canSmoothWith = SMOOTH_GROUP_PLATFORMS_STONE
/obj/structure/platform/pizza
name = "huge pizza"
desc = "Big enough to stand on, although possibly you shouldn't eat it after that."
icon = 'icons/obj/smooth_structures/platform/window_frame_pizza.dmi'
frame_icon = null
icon_state = "window_frame_pizza-0"
base_icon_state = "window_frame_pizza"
custom_materials = list(/datum/material/pizza = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_PIZZA
canSmoothWith = SMOOTH_GROUP_PLATFORMS_PIZZA
footstep = FOOTSTEP_MEAT
/obj/structure/platform/paper
name = "japanese platform"
icon = 'icons/obj/smooth_structures/platform/window_frame_paperframe.dmi'
frame_icon = 'icons/obj/smooth_structures/platform/frame_faces/window_frame_paperframe.dmi'
icon_state = "window_frame_paperframe-0"
base_icon_state = "window_frame_paperframe"
sheet_type = /obj/item/stack/sheet/paperframes
custom_materials = list(/datum/material/paper = PLATFORM_BASE_MATERIAL_AMOUNT)
smoothing_groups = SMOOTH_GROUP_PLATFORMS_PAPER
canSmoothWith = SMOOTH_GROUP_PLATFORMS_PAPER
footstep = FOOTSTEP_WOOD
#undef PLATFORM_BASE_MATERIAL_AMOUNT
+58
View File
@@ -0,0 +1,58 @@
/// Short stairs you can use to climb tables quickly
/obj/structure/steps
name = "steps"
desc = "A small set of steps you can use to reach high shelves or climb onto platforms, just watch your ankles."
icon = 'icons/obj/small_stairs.dmi'
icon_state = "iron"
anchored = TRUE
move_resist = INFINITY
/obj/structure/steps/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_enter),
)
AddElement(/datum/element/connect_loc, loc_connections)
AddComponent(/datum/component/climb_walkable)
AddComponent(/datum/component/simple_rotation)
register_context()
/obj/structure/steps/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if(!held_item)
return NONE
if(held_item.tool_behaviour == TOOL_WRENCH)
context[SCREENTIP_CONTEXT_LMB] = anchored ? "Unsecure" : "Secure"
return CONTEXTUAL_SCREENTIP_SET
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
context[SCREENTIP_CONTEXT_LMB] = "Deconstruct"
return CONTEXTUAL_SCREENTIP_SET
/obj/structure/steps/wrench_act(mob/living/user, obj/item/tool)
default_unfasten_wrench(user, tool)
return ITEM_INTERACT_SUCCESS
/obj/structure/steps/screwdriver_act(mob/living/user, obj/item/tool)
to_chat(user, span_notice("You start disassembling [src]..."))
if(tool.use_tool(src, user, 2 SECONDS, volume=50))
deconstruct(TRUE)
return ITEM_INTERACT_SUCCESS
/obj/structure/steps/atom_deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/iron(drop_location(), 2)
/// Watch your ankles
/obj/structure/steps/proc/on_enter(turf/our_turf, mob/living/arrived, turf/old_loc, list/atom/old_locs)
SIGNAL_HANDLER
if (!isliving(arrived) || !isturf(old_loc) || !our_turf.Adjacent(old_loc) || !has_gravity(src) || HAS_TRAIT(arrived, TRAIT_MOB_ELEVATED) || (arrived.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || arrived.move_intent != MOVE_INTENT_RUN)
return
var/entered_dir = get_dir(our_turf, old_loc)
if (entered_dir == dir)
arrived.Knockdown(1 SECONDS)
to_chat(arrived, span_warning("You tripped over \the [src]!"))
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/steps, 0)
+20 -161
View File
@@ -50,6 +50,8 @@
var/use_matrices_instead = FALSE
/// Matrix to return to on unflipping table
var/matrix/before_flipped_matrix
/// Do we place people onto the table rather than slamming them?
var/slam_gently = FALSE
/obj/structure/table/Initialize(mapload, obj/structure/table_frame/frame_used, obj/item/stack/stack_used)
. = ..()
@@ -62,7 +64,6 @@
on_init_smoothed_vars = list(smoothing_groups, canSmoothWith)
var/static/list/loc_connections = list(
COMSIG_LIVING_DISARM_COLLIDE = PROC_REF(table_living),
COMSIG_ATOM_EXIT = PROC_REF(on_exit),
)
@@ -82,8 +83,13 @@
return
make_climbable()
AddElement(/datum/element/give_turf_traits, turf_traits)
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)))
/// Called after someone is harmfully smashed into us
/obj/structure/table/proc/after_smash(mob/living/smashed)
return // This is mostly for our children
/// Applies additional properties based on the frame used to construct this table.
/obj/structure/table/proc/apply_frame_properties(obj/structure/table_frame/frame_used)
@@ -97,6 +103,7 @@
///Adds the element used to make the object climbable, and also the one that shift the mob buckled to it up.
/obj/structure/table/proc/make_climbable()
AddComponent(/datum/component/climb_walkable)
AddElement(/datum/element/climbable)
AddElement(/datum/element/elevation, pixel_shift = 12)
@@ -123,6 +130,7 @@
//proc that removes elements present in now-flipped tables
/obj/structure/table/proc/flip_table(new_dir = SOUTH)
playsound(src, 'sound/items/trayhit/trayhit1.ogg', 100)
qdel(GetComponent(/datum/component/climb_walkable))
RemoveElement(/datum/element/climbable)
RemoveElement(/datum/element/footstep_override, priority = STEP_SOUND_TABLE_PRIORITY)
RemoveElement(/datum/element/give_turf_traits, turf_traits)
@@ -242,6 +250,7 @@
return FALSE
if(border_dir == dir)
return FALSE
return TRUE
/obj/structure/table/update_icon(updates=ALL)
@@ -261,38 +270,6 @@
/obj/structure/table/attack_hand(mob/living/user, list/modifiers)
if(is_flipped)
return
if(Adjacent(user) && user.pulling)
if(isliving(user.pulling))
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
if(pushed_mob.buckled == src)
//Already buckled to the table, you probably meant to unbuckle them
return ..()
to_chat(user, span_warning("[pushed_mob] is buckled to [pushed_mob.buckled]!"))
return
if(user.combat_mode)
switch(user.grab_state)
if(GRAB_PASSIVE)
to_chat(user, span_warning("You need a better grip to do that!"))
return
if(GRAB_AGGRESSIVE)
tablepush(user, pushed_mob)
if(GRAB_NECK to GRAB_KILL)
tablelimbsmash(user, pushed_mob)
else
pushed_mob.visible_message(span_notice("[user] begins to place [pushed_mob] onto [src]..."), \
span_userdanger("[user] begins to place [pushed_mob] onto [src]..."))
if(do_after(user, 3.5 SECONDS, target = pushed_mob))
tableplace(user, pushed_mob)
else
return
user.stop_pulling()
else if(user.pulling.pass_flags & PASSTABLE)
user.Move_Pulled(src)
if (user.pulling.loc == loc)
user.visible_message(span_notice("[user] places [user.pulling] onto [src]."),
span_notice("You place [user.pulling] onto [src]."))
user.stop_pulling()
return ..()
/obj/structure/table/attack_hand_secondary(mob/user, list/modifiers)
@@ -332,16 +309,6 @@
/obj/structure/table/attack_tk(mob/user)
return
/obj/structure/table/CanAllowThrough(atom/movable/mover, border_dir)
. = ..()
if(.)
return
if(mover.throwing)
return TRUE
for(var/obj/structure/table/table in get_turf(mover))
if(!table.is_flipped)
return TRUE
/obj/structure/table/CanAStarPass(to_dir, datum/can_pass_info/pass_info)
if(!density)
return TRUE
@@ -349,52 +316,6 @@
return TRUE
return FALSE
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(loc)
pushed_mob.set_resting(TRUE, TRUE)
pushed_mob.visible_message(span_notice("[user] places [pushed_mob] onto [src]."), \
span_notice("[user] places [pushed_mob] onto [src]."))
log_combat(user, pushed_mob, "places", null, "onto [src]")
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, span_danger("Throwing [pushed_mob] onto the table might hurt them!"))
return
var/passtable_key = REF(user)
passtable_on(pushed_mob, passtable_key)
for (var/obj/obj in user.loc.contents)
if(!obj.CanAllowThrough(pushed_mob))
return
pushed_mob.Move(src.loc)
passtable_off(pushed_mob, passtable_key)
if(pushed_mob.loc != loc) //Something prevented the tabling
return
pushed_mob.Knockdown(30)
pushed_mob.apply_damage(10, BRUTE)
pushed_mob.apply_damage(40, STAMINA)
playsound(pushed_mob, 'sound/effects/tableslam.ogg', 90, TRUE)
pushed_mob.visible_message(span_danger("[user] slams [pushed_mob] onto \the [src]!"), \
span_userdanger("[user] slams you onto \the [src]!"))
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
pushed_mob.add_mood_event("table", /datum/mood_event/table)
SEND_SIGNAL(user, COMSIG_LIVING_TABLE_SLAMMING, pushed_mob, src)
/obj/structure/table/proc/tablelimbsmash(mob/living/user, mob/living/pushed_mob)
pushed_mob.Knockdown(30)
var/obj/item/bodypart/banged_limb = pushed_mob.get_bodypart(user.zone_selected) || pushed_mob.get_bodypart(BODY_ZONE_HEAD)
var/extra_wound = 0
if(HAS_TRAIT(user, TRAIT_HULK))
extra_wound = 20
pushed_mob.apply_damage(30, BRUTE, banged_limb, wound_bonus = extra_wound)
pushed_mob.apply_damage(60, STAMINA)
take_damage(50)
playsound(pushed_mob, 'sound/effects/bang.ogg', 90, TRUE)
pushed_mob.visible_message(span_danger("[user] smashes [pushed_mob]'s [banged_limb.plaintext_zone] against \the [src]!"),
span_userdanger("[user] smashes your [banged_limb.plaintext_zone] against \the [src]"))
log_combat(user, pushed_mob, "head slammed", null, "against [src]")
pushed_mob.add_mood_event("table", /datum/mood_event/table_limbsmash, banged_limb)
SEND_SIGNAL(user, COMSIG_LIVING_TABLE_LIMB_SLAMMING, pushed_mob, src)
/obj/structure/table/screwdriver_act_secondary(mob/living/user, obj/item/tool)
if(!deconstruction_ready)
return NONE
@@ -426,8 +347,6 @@
. = deck_act(user, tool, modifiers, !!LAZYACCESS(modifiers, RIGHT_CLICK))
if(istype(tool, /obj/item/storage/bag/tray))
. = tray_act(user, tool)
else if(istype(tool, /obj/item/riding_offhand))
. = riding_offhand_act(user, tool)
// Continue to placing if we don't do anything else
if(.)
@@ -459,37 +378,6 @@
card.Flip()
return table_place_act(user, card, modifiers)
/obj/structure/table/proc/riding_offhand_act(mob/living/user, obj/item/riding_offhand/riding_item)
var/mob/living/carried_mob = riding_item.rider
if(carried_mob == user) //Piggyback user.
return NONE
if(user.combat_mode)
user.unbuckle_mob(carried_mob)
tablelimbsmash(user, carried_mob)
return ITEM_INTERACT_SUCCESS
var/tableplace_delay = 3.5 SECONDS
var/skills_space = ""
if(HAS_TRAIT(user, TRAIT_QUICKER_CARRY))
tableplace_delay = 2 SECONDS
skills_space = " expertly"
else if(HAS_TRAIT(user, TRAIT_QUICK_CARRY))
tableplace_delay = 2.75 SECONDS
skills_space = " quickly"
var/obj/item/organ/cyberimp/chest/spine/potential_spine = user.get_organ_slot(ORGAN_SLOT_SPINE)
if(istype(potential_spine))
tableplace_delay *= potential_spine.athletics_boost_multiplier
carried_mob.visible_message(span_notice("[user] begins to[skills_space] place [carried_mob] onto [src]..."),
span_userdanger("[user] begins to[skills_space] place [carried_mob] onto [src]..."))
if(!do_after(user, tableplace_delay, target = carried_mob))
return ITEM_INTERACT_BLOCKING
user.unbuckle_mob(carried_mob)
tableplace(user, carried_mob)
return ITEM_INTERACT_SUCCESS
// Where putting things on tables is handled.
/obj/structure/table/proc/table_place_act(mob/living/user, obj/item/tool, list/modifiers)
if(tool.item_flags & ABSTRACT)
@@ -535,18 +423,6 @@
return TRUE
return FALSE
/obj/structure/table/proc/table_living(datum/source, mob/living/shover, mob/living/target, shove_flags, obj/item/weapon)
SIGNAL_HANDLER
if((shove_flags & SHOVE_KNOCKDOWN_BLOCKED) || !(shove_flags & SHOVE_BLOCKED))
return
target.Knockdown(SHOVE_KNOCKDOWN_TABLE, daze_amount = 3 SECONDS)
target.visible_message(span_danger("[shover.name] shoves [target.name] onto \the [src]!"),
span_userdanger("You're shoved onto \the [src] by [shover.name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, shover)
to_chat(shover, span_danger("You shove [target.name] onto \the [src]!"))
target.throw_at(src, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
log_combat(shover, target, "shoved", "onto [src] (table)[weapon ? " with [weapon]" : ""]")
return COMSIG_LIVING_SHOVE_HANDLED
/obj/structure/table/greyscale
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
icon_state = "table_greyscale-0"
@@ -746,31 +622,18 @@
smoothing_groups = SMOOTH_GROUP_WOOD_TABLES //Don't smooth with SMOOTH_GROUP_TABLES
canSmoothWith = SMOOTH_GROUP_WOOD_TABLES
/obj/structure/table/wood/table_living(datum/source, mob/living/shover, mob/living/target, shove_flags, obj/item/weapon)
. = ..()
if(prob(33))
wood_table_shatter(target)
/obj/structure/table/wood/tablepush(mob/living/user, mob/living/pushed_mob)
. = ..()
if(!QDELETED(src) && prob(33))
wood_table_shatter(pushed_mob)
/obj/structure/table/wood/tablelimbsmash(mob/living/user, mob/living/pushed_mob)
. = ..()
if(!QDELETED(src) && prob(33))
wood_table_shatter(pushed_mob)
/obj/structure/table/wood/proc/wood_table_shatter(mob/living/victim)
/obj/structure/table/wood/after_smash(mob/living/smashed)
if(QDELETED(src) || prob(66))
return
visible_message(
span_warning("[src] smashes into bits!"),
blind_message = span_hear("You hear the loud cracking of wood being split."),
)
playsound(src, 'sound/effects/wounds/crack2.ogg', 50, TRUE)
victim.Knockdown(10 SECONDS)
victim.Paralyze(2 SECONDS)
victim.apply_damage(20, BRUTE)
smashed.Knockdown(10 SECONDS)
smashed.Paralyze(2 SECONDS)
smashed.apply_damage(20, BRUTE)
deconstruct(FALSE)
/obj/structure/table/wood/narsie_act(total_override = TRUE)
@@ -981,8 +844,7 @@
canSmoothWith = SMOOTH_GROUP_BRONZE_TABLES
can_flip = FALSE
/obj/structure/table/bronze/tablepush(mob/living/user, mob/living/pushed_mob)
..()
/obj/structure/table/bronze/after_smash(mob/living/pushed_mob)
playsound(src, 'sound/effects/magic/clockwork/fellowship_armory.ogg', 50, TRUE)
/obj/structure/table/reinforced/rglass
@@ -1041,6 +903,7 @@
buckle_lying = 90
custom_materials = list(/datum/material/silver = SHEET_MATERIAL_AMOUNT)
can_flip = FALSE
slam_gently = TRUE
/// Mob currently lying on the table
var/mob/living/carbon/patient = null
/// Operating computer we're linked to, to sync operations from
@@ -1159,11 +1022,6 @@
/obj/structure/table/optable/make_climbable()
AddElement(/datum/element/elevation, pixel_shift = 12)
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(loc)
pushed_mob.set_resting(TRUE, TRUE)
visible_message(span_notice("[user] lays [pushed_mob] on [src]."))
///Align the mob with the table when buckled.
/obj/structure/table/optable/post_buckle_mob(mob/living/buckled)
buckled.add_offsets(type, z_add = 6)
@@ -1562,3 +1420,4 @@
R.add_fingerprint(user)
qdel(src)
building = FALSE