mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 04:48:18 +01:00
ports give emote msg from bay (#7467)
This commit is contained in:
@@ -5,38 +5,39 @@
|
||||
if(incapacitated())
|
||||
return
|
||||
if(!istype(target) || target.stat || target.lying || target.resting || target.restrained() || target.client == null)
|
||||
to_chat(usr, "<span class='warning'>[target.name] is in no condition to handle items!</span>")
|
||||
to_chat(usr, span("warning", "[target.name] is in no condition to handle items!"))
|
||||
return
|
||||
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(!I)
|
||||
I = usr.get_inactive_hand()
|
||||
if(!I)
|
||||
to_chat(usr, "<span class='warning'>You don't have anything in your hands to give to \the [target].</span>")
|
||||
to_chat(usr, span("warning", "You don't have anything in your hands to give to \the [target]."))
|
||||
return
|
||||
|
||||
if(alert(target,"[usr] wants to give you \a [I]. Will you accept it?",,"Yes","No") == "No")
|
||||
target.visible_message("<span class='notice'>\The [usr] tried to hand \the [I] to \the [target], \
|
||||
but \the [target] didn't want it.</span>")
|
||||
target.visible_message(span("warning", "\The [usr] tried to hand \the [I] to \the [target], \
|
||||
but \the [target] didn't want it."))
|
||||
return
|
||||
|
||||
if(!I) return
|
||||
|
||||
if(!Adjacent(target))
|
||||
to_chat(usr, "<span class='warning'>You need to stay in reaching distance while giving an object.</span>")
|
||||
to_chat(target, "<span class='warning'>\The [usr] moved too far away.</span>")
|
||||
to_chat(usr, span("warning", "You need to stay in reaching distance while giving an object."))
|
||||
to_chat(target, span("warning", "\The [usr] moved too far away."))
|
||||
return
|
||||
|
||||
if(I.loc != usr || (usr.l_hand != I && usr.r_hand != I))
|
||||
to_chat(usr, "<span class='warning'>You need to keep the item in your hands.</span>")
|
||||
to_chat(target, "<span class='warning'>\The [usr] seems to have given up on passing \the [I] to you.</span>")
|
||||
to_chat(usr, span("warning", "You need to keep the item in your hands."))
|
||||
to_chat(target, span("warning", "\The [usr] seems to have given up on passing \the [I] to you."))
|
||||
return
|
||||
|
||||
if(target.r_hand != null && target.l_hand != null)
|
||||
to_chat(target, "<span class='warning'>Your hands are full.</span>")
|
||||
to_chat(usr, "<span class='warning'>Their hands are full.</span>")
|
||||
to_chat(target, span("warning", "Your hands are full."))
|
||||
to_chat(usr, span("warning", "Their hands are full."))
|
||||
return
|
||||
|
||||
if(usr.unEquip(I))
|
||||
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
|
||||
target.visible_message("<span class='notice'>\The [usr] handed \the [I] to \the [target].</span>")
|
||||
usr.visible_message(span("notice", "\The [usr] handed \the [I] to \the [target]."), span("notice", "You give \the [I] to \the [target]."))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user