Merge pull request #11889 from GhostActual/Fix-for-#11846
Mice are Nice
@@ -240,6 +240,7 @@
|
||||
|
||||
/obj/random/mob/mouse/item_to_spawn()
|
||||
return pick(prob(15);/mob/living/simple_mob/animal/passive/mouse/white,
|
||||
prob(15);/mob/living/simple_mob/animal/passive/mouse/black,
|
||||
prob(30);/mob/living/simple_mob/animal/passive/mouse/brown,
|
||||
prob(30);/mob/living/simple_mob/animal/passive/mouse/gray,
|
||||
prob(30);/mob/living/simple_mob/animal/passive/mouse/rat)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
things_to_spawn = list(
|
||||
/mob/living/simple_mob/animal/passive/mouse/gray,
|
||||
/mob/living/simple_mob/animal/passive/mouse/brown,
|
||||
/mob/living/simple_mob/animal/passive/mouse/black,
|
||||
/mob/living/simple_mob/animal/passive/mouse/white,
|
||||
/mob/living/simple_mob/animal/passive/mouse/rat
|
||||
)
|
||||
|
||||
@@ -91,7 +91,7 @@ var/list/holder_mob_icon_cache = list()
|
||||
else if(istype(loc, /obj/item/clothing/accessory/holster))
|
||||
var/obj/item/clothing/accessory/holster/holster = loc
|
||||
if(holster.holstered == src)
|
||||
holster.clear_holster()
|
||||
holster.clear_holster()
|
||||
to_chat(held, "<span class='warning'>You extricate yourself from [holster].</span>")
|
||||
forceMove(get_turf(src))
|
||||
else if(isitem(loc))
|
||||
@@ -120,11 +120,30 @@ var/list/holder_mob_icon_cache = list()
|
||||
item_state = held.icon_state
|
||||
|
||||
/obj/item/weapon/holder/mouse
|
||||
name = "mouse"
|
||||
desc = "It's a small rodent."
|
||||
item_state = "mouse_gray"
|
||||
slot_flags = SLOT_EARS | SLOT_HEAD | SLOT_ID
|
||||
origin_tech = list(TECH_BIO = 2)
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/weapon/holder/pai/Initialize(mapload, mob/held)
|
||||
. = ..()
|
||||
item_state = held.icon_state
|
||||
/obj/item/weapon/holder/mouse/white
|
||||
item_state = "mouse_white"
|
||||
|
||||
/obj/item/weapon/holder/mouse/gray
|
||||
item_state = "mouse_gray"
|
||||
|
||||
/obj/item/weapon/holder/mouse/brown
|
||||
item_state = "mouse_brown"
|
||||
|
||||
/obj/item/weapon/holder/mouse/black
|
||||
item_state = "mouse_black"
|
||||
|
||||
/obj/item/weapon/holder/mouse/operative
|
||||
item_state = "mouse_operative"
|
||||
|
||||
/obj/item/weapon/holder/mouse/rat
|
||||
item_state = "mouse_rat"
|
||||
|
||||
/obj/item/weapon/holder/possum
|
||||
origin_tech = list(TECH_BIO = 2)
|
||||
@@ -259,8 +278,6 @@ var/list/holder_mob_icon_cache = list()
|
||||
/mob/living/MouseDrop(var/atom/over_object)
|
||||
var/mob/living/carbon/human/H = over_object
|
||||
if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP)) //VOREStation Edit
|
||||
if(istype(src, /mob/living/simple_mob/animal/passive/mouse)) //vorestation edit
|
||||
return ..() //vorestation edit
|
||||
if(!issmall(H) || !istype(src, /mob/living/carbon/human))
|
||||
get_scooped(H, (usr == src))
|
||||
return
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
item_state = "mouse_gray"
|
||||
icon_living = "mouse_gray"
|
||||
icon_dead = "mouse_gray_dead"
|
||||
icon_rest = "mouse_gray_sleep"
|
||||
kitchen_tag = "rodent"
|
||||
|
||||
maxHealth = 5
|
||||
@@ -59,6 +60,17 @@
|
||||
icon_rest = "mouse_[body_color]_sleep"
|
||||
if (body_color != "rat")
|
||||
desc = "A small [body_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
|
||||
holder_type = /obj/item/weapon/holder/mouse/rat
|
||||
if (body_color == "operative")
|
||||
holder_type = /obj/item/weapon/holder/mouse/operative
|
||||
if (body_color == "brown")
|
||||
holder_type = /obj/item/weapon/holder/mouse/brown
|
||||
if (body_color == "gray")
|
||||
holder_type = /obj/item/weapon/holder/mouse/gray
|
||||
if (body_color == "white")
|
||||
holder_type = /obj/item/weapon/holder/mouse/white
|
||||
if (body_color == "black")
|
||||
holder_type = /obj/item/weapon/holder/mouse/black
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
@@ -96,25 +108,20 @@
|
||||
/mob/living/simple_mob/animal/passive/mouse/white
|
||||
body_color = "white"
|
||||
icon_state = "mouse_white"
|
||||
icon_rest = "mouse_white_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/white
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/gray
|
||||
body_color = "gray"
|
||||
icon_state = "mouse_gray"
|
||||
icon_rest = "mouse_gray_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/gray
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/brown
|
||||
body_color = "brown"
|
||||
icon_state = "mouse_brown"
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/rat
|
||||
name = "rat"
|
||||
tt_desc = "E Rattus rattus"
|
||||
desc = "A large rodent, often seen hiding in maintenance areas and making a nuisance of itself."
|
||||
body_color = "rat"
|
||||
icon_state = "mouse_rat"
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive
|
||||
icon_rest = "mouse_brown_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/brown
|
||||
|
||||
//TOM IS ALIVE! SQUEEEEEEEE~K :)
|
||||
/mob/living/simple_mob/animal/passive/mouse/brown/Tom
|
||||
@@ -126,9 +133,60 @@
|
||||
// Change my name back, don't want to be named Tom (666)
|
||||
name = initial(name)
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/black
|
||||
body_color = "black"
|
||||
icon_state = "mouse_black"
|
||||
icon_rest = "mouse_black_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/black
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/rat
|
||||
name = "rat"
|
||||
tt_desc = "E Rattus rattus"
|
||||
desc = "A large rodent, often seen hiding in maintenance areas and making a nuisance of itself."
|
||||
body_color = "rat"
|
||||
icon_state = "mouse_rat"
|
||||
icon_rest = "mouse_rat_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/rat
|
||||
maxHealth = 20
|
||||
health = 20
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/operative
|
||||
name = "mouse operative"
|
||||
desc = "A cute mouse fitted with a custom blood red suit. Sneaky."
|
||||
body_color = "operative"
|
||||
icon_state = "mouse_operative"
|
||||
icon_rest = "mouse_operative_sleep"
|
||||
holder_type = /obj/item/weapon/holder/mouse/operative
|
||||
maxHealth = 35
|
||||
|
||||
//It's wearing a void suit, it don't care about atmos
|
||||
health = 35
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
min_tox = 0
|
||||
max_tox = 0
|
||||
min_co2 = 0
|
||||
max_co2 = 0
|
||||
min_n2 = 0
|
||||
max_n2 = 0
|
||||
maxbodytemp = 700
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive
|
||||
|
||||
//The names Cheese... Agent Cheese
|
||||
/mob/living/simple_mob/animal/passive/mouse/operative/agent_cheese
|
||||
name = "Agent Cheese"
|
||||
desc = "I like my cheese Swiss... not American."
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/operative/agent_cheese/New()
|
||||
..()
|
||||
// Change my name back, don't want to be named agent_cheese (666)
|
||||
name = initial(name)
|
||||
|
||||
// Mouse noises
|
||||
/datum/say_list/mouse
|
||||
speak = list("Squeek!","SQUEEK!","Squeek?")
|
||||
emote_hear = list("squeeks","squeaks","squiks")
|
||||
emote_see = list("runs in a circle", "shakes", "scritches at something")
|
||||
emote_see = list("runs in a circle", "shakes", "scritches at something")
|
||||
@@ -12,41 +12,45 @@
|
||||
movement_cooldown = 5
|
||||
universal_understand = 1
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/living/L)
|
||||
if(L.a_intent == I_HELP && !istype(loc, /obj/item/weapon/holder)) //if lime intent and not in a holder already
|
||||
if(!src.attempt_to_scoop(L)) //the superior way to handle scooping, checks size
|
||||
..() //mouse too big to grab? pet the large mouse instead
|
||||
else
|
||||
..()
|
||||
|
||||
//No longer in use, as mice create a holder/micro object instead
|
||||
/obj/item/weapon/holder/mouse/attack_self(var/mob/U)
|
||||
for(var/mob/living/simple_mob/M in src.contents)
|
||||
if((I_HELP) && U.checkClickCooldown()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects
|
||||
U.setClickCooldown(U.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this
|
||||
U.visible_message("<span class='notice'>[U] [M.response_help] \the [M].</span>")
|
||||
|
||||
//Jank grabber that uses the 'attack_hand' insead of 'MouseDrop'
|
||||
/mob/living/simple_mob/animal/passive/mouse/attack_hand(var/atom/over_object)
|
||||
var/mob/living/carbon/human/H = over_object
|
||||
if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP))
|
||||
if(!issmall(H) || !istype(src, /mob/living/carbon/human))
|
||||
get_scooped(H, (usr == src))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/MouseDrop(var/obj/O) //this proc would be very easy to apply to all mobs, holders generate dynamically
|
||||
if(!(usr == src || O))
|
||||
return ..()
|
||||
if(istype(O, /mob/living) && O.Adjacent(src)) //controls scooping by mobs
|
||||
var/mob/living/L = O
|
||||
if(!src.attempt_to_scoop(L, (src == usr)))
|
||||
return //this way it doesnt default to the generic animal pickup which isnt size restricted
|
||||
if(istype(O, /obj/item/weapon/storage) && O.Adjacent(src)) //controls diving into storage
|
||||
var/obj/item/weapon/storage/S = O
|
||||
var/obj/item/weapon/holder/H = new holder_type(get_turf(src),src) //this works weird, but it creates an empty holder, to see if that holder can fit
|
||||
if(S.can_be_inserted(H) && (src.size_multiplier <= 0.75))
|
||||
visible_message("<b>\The [src]</b> squeezes into \the [S].")
|
||||
H.forceMove(S)
|
||||
return 1
|
||||
else
|
||||
qdel(H) //this deletes the empty holder if it doesnt work
|
||||
to_chat(usr,"<span class='notice'>You can't fit inside \the [S]!</span>")
|
||||
return 0
|
||||
/mob/living/proc/mouse_scooped(var/mob/living/carbon/grabber, var/self_grab)
|
||||
|
||||
if(!holder_type || buckled || pinned.len)
|
||||
return
|
||||
|
||||
if(self_grab)
|
||||
if(src.incapacitated()) return
|
||||
else
|
||||
..()
|
||||
if(grabber.incapacitated()) return
|
||||
|
||||
var/obj/item/weapon/holder/H = new holder_type(get_turf(src), src)
|
||||
grabber.put_in_hands(H)
|
||||
|
||||
if(self_grab)
|
||||
to_chat(grabber, "<span class='notice'>\The [src] clambers onto you!</span>")
|
||||
to_chat(src, "<span class='notice'>You climb up onto \the [grabber]!</span>")
|
||||
grabber.equip_to_slot_if_possible(H, slot_back, 0, 1)
|
||||
else
|
||||
to_chat(grabber, "<span class='notice'>You scoop up \the [src]!</span>")
|
||||
to_chat(src, "<span class='notice'>\The [grabber] scoops you up!</span>")
|
||||
|
||||
add_attack_logs(grabber, H.held_mob, "Scooped up", FALSE) // Not important enough to notify admins, but still helpful.
|
||||
return H
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse/white/apple
|
||||
name = "Apple"
|
||||
desc = "Dainty, well groomed and cared for, her eyes glitter with untold knowledge..."
|
||||
@@ -56,4 +60,12 @@
|
||||
..()
|
||||
// Change my name back, don't want to be named Apple (666)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
desc = initial(desc)
|
||||
|
||||
/obj/item/weapon/holder/mouse/attack_self(mob/living/carbon/user)
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
for(var/L in contents)
|
||||
if(isanimal(L))
|
||||
var/mob/living/simple_mob/S = L
|
||||
user.visible_message("<span class='notice'>[user] [S.response_help] \the [S].</span>")
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 248 KiB |
|
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |