Merge pull request #9380 from Ghommie/Ghommie_cit212

refactoring and fixing altdisarm() exploits (ergo pushing people over directional windows etc).
This commit is contained in:
kevinz000
2019-10-01 23:58:27 -07:00
committed by Dip
parent c7bc366210
commit 3a84791e6c
6 changed files with 179 additions and 165 deletions
@@ -21,6 +21,7 @@
anchored = TRUE
layer = TABLE_LAYER
climbable = TRUE
obj_flags = CAN_BE_HIT|SHOVABLE_ONTO
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
var/frame = /obj/structure/table_frame
var/framestack = /obj/item/stack/rods
@@ -136,6 +137,15 @@
var/mob/living/carbon/human/H = pushed_mob
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
if(!target.resting)
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
target.forceMove(src.loc)
log_combat(user, target, "shoved", "onto [src] (table)")
return TRUE
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(!(flags_1 & NODECONSTRUCT_1))
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)