Skip to content

Commit

Permalink
Move buckling via grab attack onto structures
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Feb 3, 2025
1 parent 8c024d1 commit c46dd91
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 15 deletions.
6 changes: 6 additions & 0 deletions code/game/objects/structures/__structure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@
)
victim.standard_weapon_hit_effects(S, user, S.expend_attack_force()*2, BP_HEAD)
qdel(grab)
return TRUE
else if(can_buckle && !buckled_mob && istype(victim) && istype(user))
user.visible_message(SPAN_NOTICE("\The [user] attempts to put \the [victim] onto \the [src]!"))
if(do_after(user, 2 SECONDS, src) && !QDELETED(victim) && !QDELETED(user) && !QDELETED(grab) && user_buckle_mob(victim, user))
qdel(grab)
return TRUE
else if(atom_flags & ATOM_FLAG_CLIMBABLE)
var/obj/occupied = turf_is_crowded()
if (occupied)
Expand Down
10 changes: 0 additions & 10 deletions code/game/objects/structures/beds/bed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// TODO by end of Q2 2025: Repath /obj/structure/bed/chair to just /obj/structure/chair.
// Remaining steps:
// - Move padding interactions and padding_color var onto an extension
// - Allow /obj/structure/grab_attack to handle buckling
/obj/structure/bed
name = "bed"
desc = "A raised, padded platform for sleeping on. This one has straps for ensuring restful snoozing in microgravity."
Expand Down Expand Up @@ -126,15 +125,6 @@
remove_padding()
return TRUE

/obj/structure/bed/grab_attack(obj/item/grab/grab, mob/user)
var/mob/living/victim = grab.get_affecting_mob()
if(istype(victim) && istype(user))
user.visible_message(SPAN_NOTICE("\The [user] attempts to put \the [victim] onto \the [src]!"))
if(do_after(user, 2 SECONDS, src) && !QDELETED(victim) && !QDELETED(user) && !QDELETED(grab) && user_buckle_mob(victim, user))
qdel(grab)
return TRUE
return ..()

/obj/structure/bed/proc/add_padding(var/padding_type, var/new_padding_color)
reinf_material = GET_DECL(padding_type)
padding_color = new_padding_color
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/defensive_barrier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
throwpass = TRUE
anchored = TRUE
atom_flags = ATOM_FLAG_CLIMBABLE | ATOM_FLAG_CHECKS_BORDER
can_buckle = TRUE
can_buckle = TRUE // TODO: Is it actually... intended that you can buckle stuff to this?
material = /decl/material/solid/metal/steel
material_alteration = MAT_FLAG_ALTERATION_DESC | MAT_FLAG_ALTERATION_NAME
max_health = 200
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/dogbed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
desc = "A bed made especially for dogs, or other similarly sized pets."
icon = 'icons/obj/furniture.dmi'
icon_state = "dogbed"
can_buckle = 1
can_buckle = TRUE
buckle_dir = SOUTH
buckle_lying = 1
buckle_lying = TRUE
2 changes: 1 addition & 1 deletion code/game/objects/structures/quicksand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
icon_state = "open"
density = FALSE
anchored = TRUE
can_buckle = 1
can_buckle = TRUE
buckle_dir = SOUTH
var/exposed = 0
var/busy
Expand Down
2 changes: 1 addition & 1 deletion code/modules/atmospherics/pipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
stat_immune = NOSCREEN | NOINPUT | NOPOWER
interact_offline = TRUE //Needs to be set so that pipes don't say they lack power in their description

can_buckle = 1
can_buckle = TRUE
buckle_require_restraints = 1
buckle_lying = -1
build_icon_state = "simple"
Expand Down

0 comments on commit c46dd91

Please sign in to comment.