mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Allows click-dragging onto meat spikes (#20723)
* Allows click-dragging onto meat spikes * use constant SECONDS for readability Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Styling - not spaces around equals sign Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * src is implied, removing it Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Use Adjacent instead of get_dist * Remove buckle override --------- Co-authored-by: Sean Dandrea <SeanOfAndrea@outlook.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
co-authored by
Luc
Ryan
Sean Dandrea
parent
2478724a09
commit
07987bd393
@@ -63,19 +63,30 @@
|
||||
return
|
||||
if(!istype(G, /obj/item/grab) || !G.affecting)
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
|
||||
return
|
||||
if(isliving(G.affecting))
|
||||
if(!has_buckled_mobs())
|
||||
if(do_mob(user, src, 120))
|
||||
var/mob/living/affected = G.affecting
|
||||
if(spike(affected))
|
||||
affected.visible_message("<span class='danger'>[user] slams [affected] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
return
|
||||
start_spike(G.affecting, user)
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(mob/living/victim)
|
||||
/obj/structure/kitchenspike/MouseDrop_T(mob/living/victim, mob/living/user)
|
||||
if (!user.Adjacent(src) || !user.Adjacent(victim) || isAI(user))
|
||||
return
|
||||
if(isanimal(user) && victim != user)
|
||||
return // animals cannot put mobs other than themselves onto spikes
|
||||
add_fingerprint(user)
|
||||
start_spike(victim, user)
|
||||
|
||||
/obj/structure/kitchenspike/proc/start_spike(mob/living/victim, mob/user)
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class='danger'>The spike already has something on it, finish collecting its meat first!</span>")
|
||||
return
|
||||
victim.visible_message(
|
||||
"<span class='danger'>[user] tries to slam [victim] onto the meat spike!</span>",
|
||||
"<span class='userdanger'>[user] tries to slam you onto the meat spike!</span>"
|
||||
)
|
||||
if(do_mob(user, src, 12 SECONDS))
|
||||
end_spike(victim, user)
|
||||
|
||||
/obj/structure/kitchenspike/proc/end_spike(mob/living/victim, mob/user)
|
||||
|
||||
if(!istype(victim))
|
||||
return FALSE
|
||||
@@ -87,6 +98,11 @@
|
||||
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
|
||||
victim.forceMove(drop_location())
|
||||
victim.emote("scream")
|
||||
victim.visible_message(
|
||||
"<span class='danger'>[user] slams [victim] onto the meat spike!</span>",
|
||||
"<span class='userdanger'>[user] slams you onto the meat spike!</span>",
|
||||
"<span class='italics'>You hear a squishy wet noise.</span>"
|
||||
)
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
H.add_splatter_floor()
|
||||
@@ -98,10 +114,6 @@
|
||||
victim.pixel_y = victim.get_standard_pixel_y_offset(180)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
if(buckled_mob)
|
||||
var/mob/living/M = buckled_mob
|
||||
|
||||
Reference in New Issue
Block a user