diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 0ebe8ebd563..26cbefc4825 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -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" diff --git a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm index 981ab4433f4..956171abf7c 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm @@ -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 - ..() \ No newline at end of file + else + return ..() diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 834ae505276..a1c58b69a05 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -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 \ No newline at end of file + 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 ..() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm index e5778ad4dc5..0eaf1c87793 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm @@ -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) - ..() \ No newline at end of file +/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 ..() \ No newline at end of file diff --git a/html/changelogs/Zuhayr-pAIScoop.yml b/html/changelogs/Zuhayr-pAIScoop.yml new file mode 100644 index 00000000000..ae728a09520 --- /dev/null +++ b/html/changelogs/Zuhayr-pAIScoop.yml @@ -0,0 +1,5 @@ +author: Zuhayr +delete-after: True +changes: + - rscadd: "Unfolded pAIs can now be scooped up and worn as hats." + - tweak: "Scoop-up behavior is now standardized to selecting help intent and dragging their icon onto yours." \ No newline at end of file diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 15c0f982127..d0eef8bcb33 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/items/lefthand_holder.dmi b/icons/mob/items/lefthand_holder.dmi index 3f4cecaf661..cb437ab299e 100644 Binary files a/icons/mob/items/lefthand_holder.dmi and b/icons/mob/items/lefthand_holder.dmi differ diff --git a/icons/mob/items/righthand_holder.dmi b/icons/mob/items/righthand_holder.dmi index dbc848fa5ba..7bd7f5707e8 100644 Binary files a/icons/mob/items/righthand_holder.dmi and b/icons/mob/items/righthand_holder.dmi differ diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi index ac5c73a100c..6c3702e448a 100644 Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ