diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 8f5d243696a..96b9b94805d 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
new /obj/item/reagent_containers/food/snacks/meat/slab/corgi(loc)
qdel(src)
-/mob/living/simple_animal/pet/dog/corgi/machine_wash(obj/machinery/washing_machine/WM)
+/mob/living/simple_animal/pet/machine_wash(obj/machinery/washing_machine/WM)
WM.bloody_mess = TRUE
gib()
@@ -239,6 +239,10 @@ GLOBAL_LIST_INIT(dye_registry, list(
addtimer(VARSET_CALLBACK(src, freshly_laundered, FALSE), 5 MINUTES, TIMER_UNIQUE | TIMER_OVERRIDE)
..()
+/obj/item/clothing/head/mob_holder/machine_wash(obj/machinery/washing_machine/WM)
+ ..()
+ held_mob.machine_wash(WM)
+
/obj/item/clothing/shoes/sneakers/machine_wash(obj/machinery/washing_machine/WM)
if(chained)
chained = 0
@@ -292,7 +296,6 @@ GLOBAL_LIST_INIT(dye_registry, list(
if(!user.transferItemToLoc(W, src))
to_chat(user, "\The [W] is stuck to your hand, you cannot put it in the washing machine!")
return TRUE
-
if(W.dye_color)
color_source = W
update_icon()
@@ -313,7 +316,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
if(L.buckled || L.has_buckled_mobs())
return
if(state_open)
- if(iscorgi(L))
+ if(istype(L, /mob/living/simple_animal/pet))
L.forceMove(src)
update_icon()
return
diff --git a/code/modules/mob/living/inhand_holder.dm b/code/modules/mob/living/inhand_holder.dm
index cce936d2789..917075b81f0 100644
--- a/code/modules/mob/living/inhand_holder.dm
+++ b/code/modules/mob/living/inhand_holder.dm
@@ -5,24 +5,22 @@
desc = "Yell at coderbrush."
icon = null
icon_state = ""
- item_flags = DROPDEL
+ slot_flags = NONE
var/mob/living/held_mob
- var/can_head = TRUE
var/destroying = FALSE
-/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/M, _worn_state, head_icon, lh_icon, rh_icon, _can_head = TRUE)
+/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/M, worn_state, head_icon, lh_icon, rh_icon, worn_slot_flags = NONE)
. = ..()
- can_head = _can_head
if(head_icon)
mob_overlay_icon = head_icon
- if(_worn_state)
- item_state = _worn_state
+ if(worn_state)
+ item_state = worn_state
if(lh_icon)
lefthand_file = lh_icon
if(rh_icon)
righthand_file = rh_icon
- if(!can_head)
- slot_flags = NONE
+ if(worn_slot_flags)
+ slot_flags = worn_slot_flags
deposit(M)
/obj/item/clothing/head/mob_holder/Destroy()
@@ -45,6 +43,11 @@
/obj/item/clothing/head/mob_holder/proc/update_visuals(mob/living/L)
appearance = L.appearance
+/obj/item/clothing/head/mob_holder/dropped()
+ ..()
+ if(held_mob && isturf(loc))
+ release()
+
/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE)
if(!held_mob)
if(del_on_release && !destroying)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 8f142dea3c9..eeddc54d56f 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -1285,18 +1285,19 @@
..()
update_z(new_z)
-/mob/living/MouseDrop(mob/over)
+/mob/living/MouseDrop_T(atom/dropping, atom/user)
+ var/mob/living/U = user
+ if(isliving(dropping))
+ var/mob/living/M = dropping
+ if(M.can_be_held && U.pulling == M)
+ M.mob_try_pickup(U)//blame kevinz
+ return//dont open the mobs inventory if you are picking them up
. = ..()
- var/mob/living/user = usr
- if(!istype(over) || !istype(user))
- return
- if(!over.Adjacent(src) || (user != src) || !canUseTopic(over))
- return
- if(can_be_held)
- mob_try_pickup(over)
/mob/living/proc/mob_pickup(mob/living/L)
- return
+ var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, held_state, head_icon, held_lh, held_rh, worn_slot_flags)
+ L.visible_message("[L] scoops up [src]!")
+ L.put_in_hands(holder)
/mob/living/proc/set_name()
numba = rand(1, 1000)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index e5c83816829..22ec966267b 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -113,7 +113,8 @@
var/list/obj/effect/proc_holder/abilities = list()
- var/can_be_held = FALSE ///whether this can be picked up and held.
+ var/can_be_held = FALSE //whether this can be picked up and held.
+ var/worn_slot_flags = NONE //if it can be held, can it be equipped to any slots? (think pAI's on head)
var/radiation = 0 ///If the mob is irradiated.
var/ventcrawl_layer = PIPING_LAYER_DEFAULT
@@ -125,8 +126,14 @@
var/slowed_by_drag = TRUE ///Whether the mob is slowed down when dragging another prone mob
- var/list/ownedSoullinks ///soullinks we are the owner of
- var/list/sharedSoullinks ///soullinks we are a/the sharer of
-
+ var/list/ownedSoullinks //soullinks we are the owner of
+ var/list/sharedSoullinks //soullinks we are a/the sharer of
+
/// List of changes to body temperature, used by desease symtoms like fever
var/list/body_temp_changes = list()
+
+ //this stuff is here to make it simple for admins to mess with custom held sprites
+ var/icon/held_lh = 'icons/mob/pets_held_lh.dmi'//icons for holding mobs
+ var/icon/held_rh = 'icons/mob/pets_held_rh.dmi'
+ var/icon/head_icon = 'icons/mob/pets_held.dmi'//what it looks like on your head
+ var/held_state = ""//icon state for the above
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 07aa17ea900..b545c1acce4 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -13,6 +13,10 @@
maxHealth = 500
layer = BELOW_MOB_LAYER
can_be_held = TRUE
+ worn_slot_flags = ITEM_SLOT_HEAD
+ held_lh = 'icons/mob/pai_item_lh.dmi'
+ held_rh = 'icons/mob/pai_item_rh.dmi'
+ head_icon = 'icons/mob/pai_item_head.dmi'
radio = /obj/item/radio/headset/silicon/pai
var/network = "ss13"
var/obj/machinery/camera/current = null
@@ -65,9 +69,6 @@
var/obj/item/card/id/access_card = null
var/chassis = "repairbot"
var/list/possible_chassis = list("cat" = TRUE, "mouse" = TRUE, "monkey" = TRUE, "corgi" = FALSE, "fox" = FALSE, "repairbot" = TRUE, "rabbit" = TRUE, "bat" = FALSE, "butterfly" = FALSE, "hawk" = FALSE, "lizard" = FALSE, "duffel" = TRUE) //assoc value is whether it can be picked up.
- var/static/item_head_icon = 'icons/mob/pai_item_head.dmi'
- var/static/item_lh_icon = 'icons/mob/pai_item_lh.dmi'
- var/static/item_rh_icon = 'icons/mob/pai_item_rh.dmi'
var/emitterhealth = 20
var/emittermaxhealth = 20
diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm
index a32316f9afc..2e404b29dbe 100644
--- a/code/modules/mob/living/silicon/pai/pai_shell.dm
+++ b/code/modules/mob/living/silicon/pai/pai_shell.dm
@@ -36,6 +36,7 @@
client.eye = src
set_light(0)
icon_state = "[chassis]"
+ held_state = "[chassis]"
visible_message("[src] folds out its holochassis emitter and forms a holoshell around itself!")
holoform = TRUE
@@ -74,6 +75,8 @@
if(!choice)
return FALSE
chassis = choice
+ icon_state = "[chassis]"
+ held_state = "[chassis]"
update_resting()
to_chat(src, "You switch your holochassis projection composite to [chassis].")
@@ -97,13 +100,6 @@
set_light(0)
to_chat(src, "You disable your integrated light.")
-/mob/living/silicon/pai/mob_pickup(mob/living/L)
- var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, chassis, item_head_icon, item_lh_icon, item_rh_icon)
- if(!L.put_in_hands(holder))
- qdel(holder)
- else
- L.visible_message("[L] scoops up [src]!")
-
/mob/living/silicon/pai/mob_try_pickup(mob/living/user)
if(!possible_chassis[chassis])
to_chat(user, "[src]'s current form isn't able to be carried!")
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index f0768339c14..4f1f0fadd57 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -34,6 +34,8 @@
var/mob/living/simple_animal/mouse/movement_target
gold_core_spawnable = FRIENDLY_SPAWN
collar_type = "cat"
+ can_be_held = TRUE
+ held_state = "cat2"
footstep_type = FOOTSTEP_MOB_CLAW
@@ -61,6 +63,7 @@
unsuitable_atmos_damage = 0
minbodytemp = TCMB
maxbodytemp = T0C + 40
+ held_state = "spacecat"
/mob/living/simple_animal/pet/cat/original
name = "Batsy"
@@ -71,6 +74,7 @@
icon_dead = "original_dead"
collar_type = null
unique_pet = TRUE
+ held_state = "original"
/mob/living/simple_animal/pet/cat/kitten
name = "kitten"
@@ -97,6 +101,7 @@
var/list/children = list()//Actual mob instances of children
var/cats_deployed = 0
var/memory_saved = FALSE
+ held_state = "cat"
/mob/living/simple_animal/pet/cat/Runtime/Initialize()
if(prob(5))
@@ -265,6 +270,7 @@
attacked_sound = 'sound/items/eatfood.ogg'
deathmessage = "loses its false life and collapses!"
deathsound = "bodyfall"
+ held_state = "cak"
/mob/living/simple_animal/pet/cat/cak/CheckParts(list/parts)
..()
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index ace11bd8543..1273a4261e3 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -16,6 +16,7 @@
see_in_dark = 5
speak_chance = 1
turns_per_move = 10
+ can_be_held = TRUE
var/turns_since_scan = 0
var/obj/movement_target
@@ -84,11 +85,11 @@
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
+ held_state = "corgi"
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/corgi = 3, /obj/item/stack/sheet/animalhide/corgi = 1)
childtype = list(/mob/living/simple_animal/pet/dog/corgi/puppy = 95, /mob/living/simple_animal/pet/dog/corgi/puppy/void = 5)
animal_species = /mob/living/simple_animal/pet/dog
gold_core_spawnable = FRIENDLY_SPAWN
- can_be_held = TRUE
collar_type = "corgi"
var/obj/item/inventory_head
var/obj/item/inventory_back
@@ -123,6 +124,7 @@
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/pug = 3)
gold_core_spawnable = FRIENDLY_SPAWN
collar_type = "pug"
+ held_state = "pug"
/mob/living/simple_animal/pet/dog/corgi/exoticcorgi
name = "Exotic Corgi"
@@ -210,13 +212,6 @@
..()
update_corgi_fluff()
-/mob/living/simple_animal/pet/dog/corgi/mob_pickup(mob/living/L)
- var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, "corgi", null, 'icons/mob/pets_held_lh.dmi', 'icons/mob/pets_held_rh.dmi', FALSE)
- if(!L.put_in_hands(holder))
- qdel(holder)
- else
- L.visible_message("[L] scoops up [src]!")
-
/mob/living/simple_animal/pet/dog/corgi/Topic(href, href_list)
if(!(iscarbon(usr) || iscyborg(usr)) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
usr << browse(null, "window=mob[REF(src)]")
@@ -420,6 +415,7 @@
else if(age == record_age)
icon_state = "old_corgi"
icon_living = "old_corgi"
+ held_state = "old_corgi"
icon_dead = "old_corgi_dead"
desc = "At a ripe old age of [record_age], Ian's not as spry as he used to be, but he'll always be the HoP's beloved corgi." //RIP
turns_per_move = 20
@@ -493,6 +489,7 @@
gold_core_spawnable = NO_SPAWN
nofur = TRUE
unique_pet = TRUE
+ held_state = "narsian"
/mob/living/simple_animal/pet/dog/corgi/narsie/Life()
..()
@@ -596,6 +593,7 @@
unsuitable_atmos_damage = 0
minbodytemp = TCMB
maxbodytemp = T0C + 40
+ held_state = "void_puppy"
/mob/living/simple_animal/pet/dog/corgi/puppy/void/Process_Spacemove(movement_dir = 0)
return 1 //Void puppies can navigate space.
@@ -618,6 +616,7 @@
response_disarm_simple = "bop"
response_harm_continuous = "kicks"
response_harm_simple = "kick"
+ held_state = "lisa"
var/puppies = 0
//Lisa already has a cute bow!
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 4d69998f7c6..afb90604318 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -51,6 +51,7 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
see_in_dark = 7
can_be_held = TRUE
+ worn_slot_flags = ITEM_SLOT_HEAD
held_items = list(null, null)
var/staticChoice = "static"
var/list/staticChoices = list("static", "blank", "letter", "animal")
diff --git a/code/modules/mob/living/simple_animal/friendly/fox.dm b/code/modules/mob/living/simple_animal/friendly/fox.dm
index 365d7262ebe..29500c78663 100644
--- a/code/modules/mob/living/simple_animal/friendly/fox.dm
+++ b/code/modules/mob/living/simple_animal/friendly/fox.dm
@@ -21,6 +21,8 @@
response_harm_continuous = "kicks"
response_harm_simple = "kick"
gold_core_spawnable = FRIENDLY_SPAWN
+ can_be_held = TRUE
+ held_state = "fox"
footstep_type = FOOTSTEP_MOB_CLAW
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 51c7db91c28..e86b7cf0e8c 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -28,6 +28,8 @@
var/body_color //brown, gray and white, leave blank for random
gold_core_spawnable = FRIENDLY_SPAWN
var/chew_probability = 1
+ can_be_held = TRUE
+ held_state = "mouse_gray"
/mob/living/simple_animal/mouse/Initialize()
. = ..()
@@ -99,6 +101,7 @@
/mob/living/simple_animal/mouse/white
body_color = "white"
icon_state = "mouse_white"
+ held_state = "mouse_white"
/mob/living/simple_animal/mouse/gray
body_color = "gray"
@@ -107,6 +110,7 @@
/mob/living/simple_animal/mouse/brown
body_color = "brown"
icon_state = "mouse_brown"
+ held_state = "mouse_brown"
/mob/living/simple_animal/mouse/Destroy()
SSmobs.cheeserats -= src
diff --git a/code/modules/mob/living/simple_animal/friendly/sloth.dm b/code/modules/mob/living/simple_animal/friendly/sloth.dm
index 9b022d4fd0b..adf0f5bd8a5 100644
--- a/code/modules/mob/living/simple_animal/friendly/sloth.dm
+++ b/code/modules/mob/living/simple_animal/friendly/sloth.dm
@@ -25,6 +25,7 @@
maxHealth = 50
speed = 10
glide_size = 2
+ held_state = "sloth"
footstep_type = FOOTSTEP_MOB_CLAW
diff --git a/icons/mob/monkey_held.dmi b/icons/mob/monkey_held.dmi
deleted file mode 100644
index 6a9eb8aac78..00000000000
Binary files a/icons/mob/monkey_held.dmi and /dev/null differ
diff --git a/icons/mob/pets_held.dmi b/icons/mob/pets_held.dmi
new file mode 100644
index 00000000000..1a8d30b6abf
Binary files /dev/null and b/icons/mob/pets_held.dmi differ
diff --git a/icons/mob/pets_held_lh.dmi b/icons/mob/pets_held_lh.dmi
index 6b2db6e9c28..b5b7fe7bf7a 100644
Binary files a/icons/mob/pets_held_lh.dmi and b/icons/mob/pets_held_lh.dmi differ
diff --git a/icons/mob/pets_held_rh.dmi b/icons/mob/pets_held_rh.dmi
index 55246b7e154..5c5870e8852 100644
Binary files a/icons/mob/pets_held_rh.dmi and b/icons/mob/pets_held_rh.dmi differ