mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Merge pull request #9475 from Zuhayr/paiscoop
Allows pAIs to be scooped up and worn as hats.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
)
|
||||
|
||||
/obj/item/weapon/holder/New()
|
||||
item_state = icon_state
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
@@ -51,7 +50,7 @@
|
||||
grabber << "You scoop up [src]."
|
||||
src << "[grabber] scoops you up."
|
||||
grabber.status_flags |= PASSEMOTES
|
||||
return
|
||||
return H
|
||||
|
||||
//Mob specific holders.
|
||||
|
||||
@@ -115,3 +114,8 @@
|
||||
name = "neaera"
|
||||
desc = "It's a neaera."
|
||||
icon_state = "neara"
|
||||
|
||||
/obj/item/weapon/holder/pai
|
||||
name = "pAI"
|
||||
desc = "It's a little robot."
|
||||
icon_state = "pai"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(istype(M) && M.a_intent == I_HELP)
|
||||
if(M.species && M.species.name == "Diona" && do_merge(M))
|
||||
/mob/living/carbon/alien/diona/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == "help")
|
||||
if(H.species && H.species.name == "Diona" && do_merge(H))
|
||||
return
|
||||
get_scooped(M)
|
||||
get_scooped(H)
|
||||
return
|
||||
..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person)
|
||||
small = 1
|
||||
pass_flags = 1
|
||||
holder_type = /obj/item/weapon/holder/pai
|
||||
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -380,7 +381,16 @@
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
src.client.eye = card
|
||||
|
||||
//This seems redundant but not including the forced loc setting messes the behavior up.
|
||||
// If we are being held, handle removing our holder from their inv.
|
||||
var/obj/item/weapon/holder/H = loc
|
||||
if(istype(H))
|
||||
var/mob/living/M = H.loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(H)
|
||||
H.loc = get_turf(src)
|
||||
src.loc = get_turf(H)
|
||||
|
||||
// Move us into the card and move the card to the ground.
|
||||
src.loc = card
|
||||
card.loc = get_turf(card)
|
||||
src.forceMove(card)
|
||||
@@ -402,4 +412,23 @@
|
||||
|
||||
// No binary for pAIs.
|
||||
/mob/living/silicon/pai/binarycheck()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
// Handle being picked up.
|
||||
/mob/living/silicon/pai/get_scooped(var/mob/living/carbon/grabber)
|
||||
var/obj/item/weapon/holder/H = ..()
|
||||
if(!istype(H))
|
||||
return
|
||||
H.icon_state = "pai-[icon_state]"
|
||||
grabber.update_inv_l_hand()
|
||||
grabber.update_inv_r_hand()
|
||||
return H
|
||||
|
||||
/mob/living/silicon/pai/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == "help")
|
||||
get_scooped(H)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -21,9 +21,11 @@
|
||||
|
||||
return
|
||||
|
||||
//Actual picking-up event.
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(M.a_intent == I_HELP)
|
||||
get_scooped(M)
|
||||
..()
|
||||
/mob/living/silicon/robot/drone/MouseDrop(atom/over_object)
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H) || !Adjacent(H)) return ..()
|
||||
if(H.a_intent == "help")
|
||||
get_scooped(H)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
Reference in New Issue
Block a user