more foolproofing.

This commit is contained in:
Ghommie
2019-10-02 00:37:02 +02:00
parent e635a05d16
commit 81fc0c1b32
5 changed files with 27 additions and 14 deletions
+1
View File
@@ -235,6 +235,7 @@
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
. = P.on_hit(src, 0, def_zone)
//used on altdisarm() for special interactions between the shoved victim (target) and the src, with user being the one shoving the target on it.
/atom/proc/shove_act(mob/living/target, mob/living/user)
return FALSE
+2 -1
View File
@@ -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
@@ -141,7 +142,7 @@
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.throw_at(src, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
target.forceMove(src.loc)
log_combat(user, target, "shoved", "onto [src] (table)")
return TRUE
+10 -3
View File
@@ -382,10 +382,17 @@
if(ismob(A) || .)
A.ratvar_act()
/turf/shove_act(mob/living/target, mob/living/user)
//called on /datum/species/proc/altdisarm()
/turf/shove_act(mob/living/target, mob/living/user, pre_act = FALSE)
var/list/possibilities
for(var/obj/O in contents)
if(O.shove_act(target, user))
return TRUE
if(CHECK_BITFIELD(O.obj_flags, SHOVABLE_ONTO))
LAZYADD(possibilities)
else if(!O.CanPass(target, src))
return FALSE
if(possibilities)
var/obj/O = pick(possibilities)
return O.shove_act(target, user)
return FALSE
/turf/proc/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)