adds sloth holding (#49439)

* fixing some kevcode

* kills a runtime

* hold everyone

* adds some sprites

* makes drone and pai up to date with mob holding

* this was meant for the last commit

* hold every pet and put them into a washing machine

* Update monkey.dm

* the cutting edge in pet holding technology

* i hate travis

* i love janitors

* every time i make a commit i tell myself its the last one and then i close out of the tab and dont check back for a few hours
This commit is contained in:
imsxz
2020-03-01 06:00:19 -05:00
committed by GitHub
parent b657cb7084
commit 558db1e806
16 changed files with 66 additions and 42 deletions
+11 -8
View File
@@ -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)
+10 -9
View File
@@ -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("<span class='warning'>[L] scoops up [src]!</span>")
L.put_in_hands(holder)
/mob/living/proc/set_name()
numba = rand(1, 1000)
+11 -4
View File
@@ -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
+4 -3
View File
@@ -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
@@ -36,6 +36,7 @@
client.eye = src
set_light(0)
icon_state = "[chassis]"
held_state = "[chassis]"
visible_message("<span class='boldnotice'>[src] folds out its holochassis emitter and forms a holoshell around itself!</span>")
holoform = TRUE
@@ -74,6 +75,8 @@
if(!choice)
return FALSE
chassis = choice
icon_state = "[chassis]"
held_state = "[chassis]"
update_resting()
to_chat(src, "<span class='boldnotice'>You switch your holochassis projection composite to [chassis].</span>")
@@ -97,13 +100,6 @@
set_light(0)
to_chat(src, "<span class='notice'>You disable your integrated light.</span>")
/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("<span class='warning'>[L] scoops up [src]!</span>")
/mob/living/silicon/pai/mob_try_pickup(mob/living/user)
if(!possible_chassis[chassis])
to_chat(user, "<span class='warning'>[src]'s current form isn't able to be carried!</span>")
@@ -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)
..()
@@ -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("<span class='warning'>[L] scoops up [src]!</span>")
/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!
@@ -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")
@@ -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
@@ -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
@@ -25,6 +25,7 @@
maxHealth = 50
speed = 10
glide_size = 2
held_state = "sloth"
footstep_type = FOOTSTEP_MOB_CLAW