reworking the shoving people action.
This commit is contained in:
@@ -235,6 +235,9 @@
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone)
|
||||
. = P.on_hit(src, 0, def_zone)
|
||||
|
||||
/atom/proc/shove_act(mob/living/target, mob/living/user)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/in_contents_of(container)//can take class or object instance as argument
|
||||
if(ispath(container))
|
||||
if(istype(src.loc, container))
|
||||
|
||||
@@ -136,6 +136,17 @@
|
||||
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.Adjacent(src))
|
||||
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.throw_at(target_table, 1, 1, null, FALSE) //1 speed throws with no spin are basically just forcemoves with a hard collision check
|
||||
log_combat(user, target, "shoved", "onto [src] (table)")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
|
||||
@@ -382,6 +382,12 @@
|
||||
if(ismob(A) || .)
|
||||
A.ratvar_act()
|
||||
|
||||
/turf/proc/shove_act(mob/living/target, mob/living/user)
|
||||
for(var/obj/O in contents)
|
||||
if(O.shove_act(target, user))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/proc/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
||||
underlay_appearance.icon = icon
|
||||
underlay_appearance.icon_state = icon_state
|
||||
|
||||
Reference in New Issue
Block a user