mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Locker based combat, evolved. (#60000)
* Locker bullying, reloaded. * Start work on refactoring the whole gosh damn thing * I'm stuck. * Checkpoint * Restart work: Lets get this scrap to compile * Workin on it, having to swtich back to walls project * Revert "Restart work: Lets get this scrap to compile" This reverts commit baa1814fd1ed2c86f2009a54a90d9306264762fc. * Compiles (Check), Signals are backwards (Fix) * 90% complete yet again I have grown powerful * I HAVE GOT IT WORKING PERFECTLY * Removes a small part of commented code * Perfection*
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
. = ..()
|
||||
update_appearance()
|
||||
PopulateContents()
|
||||
RegisterSignal(src, COMSIG_CARBON_DISARM_COLLIDE, .proc/locker_carbon)
|
||||
|
||||
//USE THIS TO FILL IT, NOT INITIALIZE OR NEW
|
||||
/obj/structure/closet/proc/PopulateContents()
|
||||
@@ -326,7 +327,9 @@
|
||||
/obj/structure/closet/proc/after_close(mob/living/user)
|
||||
return
|
||||
|
||||
|
||||
/**
|
||||
* Toggles a closet open or closed, to the opposite state. Does not respect locked or welded states, however.
|
||||
*/
|
||||
/obj/structure/closet/proc/toggle(mob/living/user)
|
||||
if(opened)
|
||||
return close(user)
|
||||
@@ -676,4 +679,19 @@
|
||||
/obj/structure/closet/return_temperature()
|
||||
return
|
||||
|
||||
/obj/structure/closet/proc/locker_carbon(obj/structure/closet/closet, mob/living/carbon/shover, mob/living/carbon/target)
|
||||
SIGNAL_HANDLER
|
||||
if(opened)
|
||||
target.forceMove(src)
|
||||
if(!(locked || welded))
|
||||
toggle()
|
||||
update_icon()
|
||||
target.visible_message(span_danger("[shover.name] shoves [target.name] into \the [src]!"),
|
||||
span_userdanger("You're shoved into \the [src] by [target.name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, src)
|
||||
to_chat(src, span_danger("You shove [target.name] into \the [src]!"))
|
||||
log_combat(src, target, "shoved", "into [src] (locker/crate)")
|
||||
if(locked || welded)
|
||||
return
|
||||
return COMSIG_CARBON_SHOVE_HANDLED
|
||||
|
||||
#undef LOCKER_FULL
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
if(_buildstack)
|
||||
buildstack = _buildstack
|
||||
AddElement(/datum/element/climbable)
|
||||
RegisterSignal(src, COMSIG_CARBON_DISARM_COLLIDE, .proc/table_carbon)
|
||||
|
||||
/obj/structure/table/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -258,6 +259,15 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/proc/table_carbon(obj/structure/table/the_table, mob/living/carbon/shover, mob/living/carbon/target)
|
||||
SIGNAL_HANDLER
|
||||
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
|
||||
target.visible_message(span_danger("[shover.name] shoves [target.name] onto \the [the_table]!"),
|
||||
span_userdanger("You're shoved onto \the [the_table] by [shover.name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, src)
|
||||
to_chat(shover, span_danger("You shove [target.name] onto \the [the_table]!"))
|
||||
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(src, target, "shoved", "onto [the_table] (table)")
|
||||
return COMSIG_CARBON_SHOVE_HANDLED
|
||||
|
||||
/obj/structure/table/greyscale
|
||||
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
|
||||
|
||||
Reference in New Issue
Block a user