Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Trait: Pet Lover #11341

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_BRAIN_TUMOR "brain_tumor"
#define TRAIT_PROSKATER "pro_skater"
#define TRAIT_PLUSHIELOVER "plushie lover"

#define TRAIT_PETLOVER "pet lover"
///Trait for dryable items
#define TRAIT_DRYABLE "trait_dryable"
///Trait for dried items
Expand Down
15 changes: 15 additions & 0 deletions code/datums/traits/positive_quirk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,18 @@
"hands" = ITEM_SLOT_HANDS,
)
H.equip_in_one_of_slots(B, slots , qdel_on_fail = TRUE)

/datum/quirk/petlover
name = "Pet Lover"
desc = "You love the company a pet. You start with a pet delivery beacon."
icon = "dog"
value = 1
mob_trait = TRAIT_PETLOVER
gain_text = "<span class='notice'>You can't wait to pet some adorable critters!.</span>"
lose_text = "<span class='danger'>You don't feel that passion for pets anymore.</span>"

/datum/quirk/petlover/on_spawn()
var/mob/living/carbon/human/Z = quirk_target
Z.equip_to_slot_or_del(new /obj/item/choice_beacon/radial/pets(Z), ITEM_SLOT_BACKPACK)
Z.equip_to_slot_or_del(new /obj/item/pet_carrier(Z), ITEM_SLOT_HANDS)
Z.equip_to_slot_or_del(new /obj/item/clothing/neck/petcollar(Z), ITEM_SLOT_BACKPACK)
ClownMoff marked this conversation as resolved.
Show resolved Hide resolved
54 changes: 54 additions & 0 deletions code/game/objects/items/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,57 @@

/obj/item/choice_beacon/janicart/generate_display_names()
return list("janitor cart" = /obj/vehicle/ridden/janicart/upgraded/keyless)

/obj/item/choice_beacon/radial/pets
name = "Pets delivery beacon"
desc = "Summon your new friend!"
icon_state = "gangtool-pets"
var/static/list/pets_list = list( //havent included snake because the poison and foxes because the captain gets one because his status
/mob/living/simple_animal/pet/dog/corgi,
/mob/living/simple_animal/pet/dog/corgi/puppy,
/mob/living/simple_animal/pet/dog/bullterrier,
/mob/living/simple_animal/pet/dog/pug,
/mob/living/simple_animal/pet/cat,
/mob/living/simple_animal/pet/cat/kitten,
/mob/living/simple_animal/pet/dog/corgi/capybara,
/mob/living/simple_animal/mouse,
/mob/living/simple_animal/pet/hamster,
/mob/living/simple_animal/pet/penguin/baby,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/chicken,
/mob/living/simple_animal/chick,
/mob/living/simple_animal/hostile/retaliate/frog,
/mob/living/basic/mothroach,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/hostile/retaliate/goose,
/mob/living/simple_animal/parrot,
)

/obj/item/choice_beacon/radial/pets/generate_options(mob/living/M)
var/list/item_list = generate_item_list()
if(!length(item_list))
return
var/choice = show_radial_menu(M, src, item_list, radius = 36, require_near = TRUE)
if(!QDELETED(src) && !(isnull(choice)) && !M.incapacitated() && in_range(M,src))
for(var/V in pets_list)
var/atom/A = V
if(initial(A.name) == choice)
spawn_option(A,M)
uses--
if(!uses)
qdel(src)
else
balloon_alert(M, "[uses] use[uses > 1 ? "s" : ""] remaining")
to_chat(M, "<span class='notice'>[uses] use[uses > 1 ? "s" : ""] remaining on the [src].</span>")
return

/obj/item/choice_beacon/radial/pets/generate_item_list()
var/static/list/item_list
if(!item_list)
item_list = list()
for(var/obj/item/toy/plush/I as() in pets_list)
var/image/pets_icon = image(initial(I.icon), initial(I.icon_state))
var/datum/radial_menu_choice/choice = new
choice.image = pets_icon
item_list[initial(I.name)] = choice
return item_list
ClownMoff marked this conversation as resolved.
Show resolved Hide resolved
Binary file modified icons/obj/device.dmi
Binary file not shown.
Loading