mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Chickens can be scooped up (#17801)
* Add chicken holder, standardises code * Updates mouse scooping * Adds chicken scooping * Adds inhand icons * Removes unnecessary src Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -63,14 +63,17 @@
|
||||
//Mob procs and vars for scooping up
|
||||
/mob/living/var/holder_type
|
||||
|
||||
/mob/living/proc/get_scooped(mob/living/carbon/grabber)
|
||||
if(!holder_type) return
|
||||
/mob/living/proc/get_scooped(mob/living/carbon/grabber, has_variant = FALSE)
|
||||
if(!holder_type)
|
||||
return
|
||||
|
||||
var/obj/item/holder/H = new holder_type(loc)
|
||||
src.forceMove(H)
|
||||
forceMove(H)
|
||||
H.name = name
|
||||
if(istype(H, /obj/item/holder/mouse)) H.icon_state = icon_state
|
||||
if(desc) H.desc = desc
|
||||
if(has_variant)
|
||||
H.icon_state = icon_state
|
||||
if(desc)
|
||||
H.desc = desc
|
||||
H.attack_hand(grabber)
|
||||
|
||||
to_chat(grabber, "<span class='notice'>You scoop up \the [src].")
|
||||
@@ -110,3 +113,9 @@
|
||||
desc = "Awww a cute bunny"
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "m_bunny"
|
||||
|
||||
/obj/item/holder/chicken
|
||||
name = "chicken"
|
||||
desc = "Hopefully the eggs are good this season."
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
icon_state = "chicken_brown"
|
||||
|
||||
@@ -272,6 +272,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
|
||||
var/icon_prefix = "chicken"
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
holder_type = /obj/item/holder/chicken
|
||||
can_hide = 1
|
||||
can_collar = 1
|
||||
var/list/feedMessages = list("It clucks happily.","It clucks happily.")
|
||||
@@ -312,6 +313,11 @@ GLOBAL_VAR_INIT(chicken_count, 0)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/attack_hand(mob/living/carbon/human/M)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
get_scooped(M, TRUE)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/chicken/Life(seconds, times_fired)
|
||||
. = ..()
|
||||
if((. && prob(3) && eggsleft > 0) && egg_type)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
get_scooped(M)
|
||||
get_scooped(M, TRUE)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE)//Prevents mouse from pulling things
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 178 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 175 KiB |
Reference in New Issue
Block a user