Merge pull request #15918 from LeDrascol/port-heirloom-update

[PORT] Non-global heirloom definitions
This commit is contained in:
Timothy Teakettle
2023-01-12 23:39:41 +00:00
committed by GitHub
45 changed files with 245 additions and 50 deletions

View File

@@ -350,41 +350,6 @@ GLOBAL_LIST_INIT(greyscale_limb_types, list("human","moth","lizard","pod","plant
//body ids that have prosthetic sprites
GLOBAL_LIST_INIT(prosthetic_limb_types, list("xion","bishop","cybersolutions","grayson","hephaestus","nanotrasen","talon"))
//FAMILY HEIRLOOM LIST
//this works by using the first number for the species as a probability to choose one of the items in the following list for their family heirloom
//if the probability fails, or the species simply isn't in the list, then it defaults to the next global list, which has its own list of items for each job
//the first item in the list is for if your job isn't in that list
//species-heirloom list (we categorise them by the species id var)
GLOBAL_LIST_INIT(species_heirlooms, list(
"dwarf" = list(25, list(/obj/item/reagent_containers/food/drinks/dwarf_mug)), //example: 25% chance for dwarves to get a dwarf mug as their heirloom (normal container but has manly dorf icon)
"insect" = list(25, list(/obj/item/flashlight/lantern/heirloom_moth)),
"ipc" = list(25, list(/obj/item/stock_parts/cell/family)), //gives a broken powercell for flavor text!
"synthliz" = list(25, list(/obj/item/stock_parts/cell/family)), //they're also robots
"slimeperson" = list(25, list(/obj/item/toy/plush/slimeplushie)),
"lizard" = list(25, list(/obj/item/toy/plush/lizardplushie)),
))
//job-heirloom list
GLOBAL_LIST_INIT(job_heirlooms, list(
"NO_JOB" = list(/obj/item/toy/cards/deck, /obj/item/lighter, /obj/item/dice/d20),
"Clown" = list(/obj/item/paint/anycolor, /obj/item/bikehorn/golden),
"Mime" = list(/obj/item/paint/anycolor, /obj/item/toy/dummy),
"Cook" = list(/obj/item/kitchen/knife/scimitar),
"Botanist" = list(/obj/item/cultivator, /obj/item/reagent_containers/glass/bucket, /obj/item/storage/bag/plants, /obj/item/toy/plush/beeplushie),
"Medical Doctor" = list(/obj/item/healthanalyzer),
"Paramedic" = list(/obj/item/lighter), //..why?
"Station Engineer" = list(/obj/item/wirecutters/brass/family, /obj/item/crowbar/brass/family, /obj/item/screwdriver/brass/family, /obj/item/wrench/brass/family), //brass tools but without the tool speed modifier
"Atmospheric Technician" = list(/obj/item/extinguisher/mini/family),
"Lawyer" = list(/obj/item/storage/briefcase/lawyer/family),
"Janitor" = list(/obj/item/mop),
"Scientist" = list(/obj/item/toy/plush/slimeplushie),
"Assistant" = list(/obj/item/clothing/gloves/cut/family),
"Prisoner" = list (/obj/item/pen/blue),
"Chaplain" = list(/obj/item/camera/spooky/family),
"Head of Personnel" = list(/obj/item/pinpointer/ian)
))
//body ids that have non-gendered bodyparts
GLOBAL_LIST_INIT(nongendered_limb_types, list("fly", "zombie" ,"synth", "shadow", "cultgolem", "agent", "plasmaman", "clockgolem", "clothgolem"))

View File

@@ -43,27 +43,38 @@
GLOBAL_LIST_EMPTY(family_heirlooms)
/datum/quirk/family_heirloom/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
/datum/quirk/family_heirloom/on_spawn()
// Define holder and type
var/mob/living/carbon/human/human_holder = quirk_holder
var/obj/item/heirloom_type
var/species_heirloom_entry = GLOB.species_heirlooms[H.dna.species.id]
if(species_heirloom_entry)
if(prob(species_heirloom_entry[1]))
heirloom_type = pick(species_heirloom_entry[2])
// The quirk holder's species - we have a 50% chance, if we have a species with a set heirloom, to choose a species heirloom.
var/datum/species/holder_species = human_holder.dna?.species
if(holder_species && LAZYLEN(holder_species.family_heirlooms) && prob(50))
heirloom_type = pick(holder_species.family_heirlooms)
else
// Our quirk holder's job
var/datum/job/holder_job = SSjob.GetJob(human_holder.last_mind?.assigned_role)
if(holder_job && LAZYLEN(holder_job.family_heirlooms))
heirloom_type = pick(holder_job.family_heirlooms)
// If we didn't find an heirloom somehow, throw them a generic one
if(!heirloom_type)
var/job_heirloom_entry = GLOB.job_heirlooms[quirk_holder.mind.assigned_role]
if(!job_heirloom_entry)
heirloom_type = pick(GLOB.job_heirlooms["NO_JOB"]) //consider: should this be a define?
else
heirloom_type = pick(job_heirloom_entry)
heirloom_type = pick(/obj/item/toy/cards/deck, /obj/item/lighter, /obj/item/dice/d20)
// Create the heirloom item
heirloom = new heirloom_type(get_turf(quirk_holder))
// Add to global list
GLOB.family_heirlooms += heirloom
// Determine and assign item location
var/list/slots = list(
"in your left pocket" = ITEM_SLOT_LPOCKET,
"in your right pocket" = ITEM_SLOT_RPOCKET,
"in your backpack" = ITEM_SLOT_BACKPACK
)
where = H.equip_in_one_of_slots(heirloom, slots, FALSE) || "at your feet"
where = human_holder.equip_in_one_of_slots(heirloom, slots, FALSE) || "at your feet"
/datum/quirk/family_heirloom/post_add()
if(where == "in your backpack")
@@ -75,13 +86,25 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
heirloom.name = "\improper [family_name[family_name.len]] family [heirloom.name]"
/datum/quirk/family_heirloom/on_process()
if(heirloom in quirk_holder.GetAllContents())
// Ignore for dead holder
if(quirk_holder.stat == DEAD)
return
// When held: Positive mood
if(heirloom && (heirloom in quirk_holder.GetAllContents()))
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom)
// When not held: Negative mood
else
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom")
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing)
/datum/quirk/item_quirk/family_heirloom/remove()
// Clear mood events when removing this quirk
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom")
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
/datum/quirk/family_heirloom/clone_data()
return heirloom

View File

@@ -55,8 +55,9 @@
generate_items_inside(items_inside,src)
/obj/item/storage/firstaid/ancient
icon_state = "firstaid"
desc = "A first aid kit with the ability to heal common types of injuries."
name = "ancient first-aid kit"
icon_state = "oldfirstaid"
desc = "A first aid kit with the ability to heal common types of injuries. You start thinking of the good old days just by looking at it."
/obj/item/storage/firstaid/ancient/PopulateContents()
if(empty)
@@ -69,6 +70,10 @@
new /obj/item/stack/medical/mesh(src)
new /obj/item/stack/medical/mesh(src)
/obj/item/storage/firstaid/ancient/heirloom
// Long since been ransacked by hungry powergaming assistants breaking into med storage
empty = TRUE
/obj/item/storage/firstaid/brute
name = "trauma treatment kit"
desc = "A first aid kit for when you get toolboxed."

View File

@@ -69,6 +69,9 @@
///Is this job affected by weird spawns like the ones from station traits
var/random_spawns_possible = TRUE
/// List of family heirlooms this job can get with the family heirloom quirk. List of types.
var/list/family_heirlooms
var/display_order = JOB_DISPLAY_ORDER_DEFAULT
var/bounty_types = CIV_JOB_BASIC

View File

@@ -20,6 +20,11 @@ Assistant
dresscodecompliant = FALSE
always_can_respawn_as = TRUE
threat = 0.2
family_heirlooms = list(
/obj/item/storage/toolbox/mechanical/old/heirloom,
/obj/item/clothing/gloves/cut/family
)
/datum/job/assistant/get_access()
if(CONFIG_GET(flag/assistants_have_maint_access) || !CONFIG_GET(flag/jobs_have_minimal_access)) //Config has assistant maint access set

View File

@@ -26,6 +26,12 @@
display_order = JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN
threat = 0.5
family_heirlooms = list(
/obj/item/lighter,
/obj/item/lighter/greyscale,
/obj/item/storage/box/matches
)
/datum/outfit/job/atmos
name = "Atmospheric Technician"

View File

@@ -20,6 +20,12 @@
bounty_types = CIV_JOB_DRINK
display_order = JOB_DISPLAY_ORDER_BARTENDER
threat = 0.5
family_heirlooms = list(
/obj/item/reagent_containers/rag,
/obj/item/clothing/head/that,
/obj/item/reagent_containers/food/drinks/shaker
)
/datum/outfit/job/bartender
name = "Bartender"

View File

@@ -20,6 +20,12 @@
display_order = JOB_DISPLAY_ORDER_BOTANIST
threat = 1.5 // lol powergame
family_heirlooms = list(
/obj/item/cultivator,
/obj/item/reagent_containers/glass/bucket, // Watering cans don't exist yet
/obj/item/toy/plush/beeplushie,
)
/datum/outfit/job/botanist
name = "Botanist"
jobtype = /datum/job/hydro

View File

@@ -32,6 +32,11 @@
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
threat = 5
family_heirlooms = list(
/obj/item/reagent_containers/food/drinks/flask/gold,
/obj/item/toy/figure/captain
)
/datum/job/captain/get_access()
return get_all_accesses()

View File

@@ -21,6 +21,10 @@
display_order = JOB_DISPLAY_ORDER_CARGO_TECHNICIAN
bounty_types = CIV_JOB_RANDOM
threat = 0.2
family_heirlooms = list(
/obj/item/clipboard
)
/datum/outfit/job/cargo_tech
name = "Cargo Technician"

View File

@@ -19,6 +19,11 @@
display_order = JOB_DISPLAY_ORDER_CHAPLAIN
threat = 0.5
family_heirlooms = list(
/obj/item/toy/windupToolbox,
/obj/item/reagent_containers/food/drinks/bottle/holywater
)
/datum/job/chaplain/after_spawn(mob/living/H, client/C)

View File

@@ -24,6 +24,11 @@
threat = 1.5
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/book/manual/wiki/chemistry,
/obj/item/fermichem/pHbooklet
)
/datum/outfit/job/chemist
name = "Chemist"

View File

@@ -37,6 +37,15 @@
display_order = JOB_DISPLAY_ORDER_CHIEF_ENGINEER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/paraplegic, /datum/quirk/insanity)
threat = 2
family_heirlooms = list(
/obj/item/clothing/head/hardhat,
/obj/item/screwdriver/brass/family,
/obj/item/wrench/brass/family,
/obj/item/weldingtool/mini, // No brass family variant
/obj/item/crowbar/brass/family,
/obj/item/wirecutters/brass/family
)
/datum/outfit/job/ce
name = "Chief Engineer"

View File

@@ -35,6 +35,15 @@
threat = 2
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/storage/firstaid/ancient/heirloom,
/obj/item/scalpel,
/obj/item/hemostat,
/obj/item/circular_saw,
/obj/item/retractor,
/obj/item/cautery
)
/datum/outfit/job/cmo
name = "Chief Medical Officer"

View File

@@ -21,6 +21,10 @@
display_order = JOB_DISPLAY_ORDER_CLOWN
threat = 0 // honk
family_heirlooms = list(
/obj/item/bikehorn/golden
)
/datum/outfit/job/clown
name = "Clown"

View File

@@ -22,6 +22,12 @@
display_order = JOB_DISPLAY_ORDER_COOK
threat = 0.2
family_heirlooms = list(
/obj/item/reagent_containers/food/condiment/saltshaker,
/obj/item/kitchen/rollingpin,
/obj/item/clothing/head/chefhat
)
/datum/outfit/job/cook
name = "Cook"
jobtype = /datum/job/cook

View File

@@ -19,6 +19,11 @@
display_order = JOB_DISPLAY_ORDER_CURATOR
threat = 0.3
family_heirlooms = list(
/obj/item/pen/fountain,
/obj/item/storage/dice
)
/datum/outfit/job/curator
name = "Curator"

View File

@@ -27,6 +27,10 @@
display_order = JOB_DISPLAY_ORDER_DETECTIVE
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/monophobia)
threat = 1
family_heirlooms = list(
/obj/item/reagent_containers/food/drinks/flask/det
)
/datum/outfit/job/detective
name = "Detective"

View File

@@ -24,6 +24,10 @@
threat = 1.5
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/clothing/under/shorts/purple
)
/datum/outfit/job/geneticist
name = "Geneticist"

View File

@@ -39,6 +39,10 @@
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/prosopagnosia, /datum/quirk/insanity)
threat = 2
family_heirlooms = list(
/obj/item/reagent_containers/food/drinks/trophy/silver_cup
)
/datum/outfit/job/hop

View File

@@ -38,6 +38,10 @@
display_order = JOB_DISPLAY_ORDER_HEAD_OF_SECURITY
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/blindness, /datum/quirk/monophobia, /datum/quirk/insanity)
threat = 3
family_heirlooms = list(
/obj/item/book/manual/wiki/security_space_law
)
/datum/outfit/job/hos
name = "Head of Security"

View File

@@ -19,6 +19,13 @@
display_order = JOB_DISPLAY_ORDER_JANITOR
threat = 0.2
family_heirlooms = list(
/obj/item/mop,
/obj/item/clothing/suit/caution,
/obj/item/reagent_containers/glass/bucket,
/obj/item/soap
)
/datum/outfit/job/janitor
name = "Janitor"

View File

@@ -22,6 +22,11 @@
display_order = JOB_DISPLAY_ORDER_LAWYER
threat = 0.3
family_heirlooms = list(
/obj/item/gavelhammer,
/obj/item/book/manual/wiki/security_space_law
)
/datum/outfit/job/lawyer
name = "Lawyer"

View File

@@ -22,6 +22,15 @@
threat = 0.5
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/storage/firstaid/ancient/heirloom,
/obj/item/scalpel,
/obj/item/hemostat,
/obj/item/circular_saw,
/obj/item/retractor,
/obj/item/cautery
)
/datum/outfit/job/doctor
name = "Medical Doctor"

View File

@@ -20,6 +20,10 @@
display_order = JOB_DISPLAY_ORDER_MIME
threat = 0
family_heirlooms = list(
/obj/item/reagent_containers/food/snacks/baguette
)
/datum/job/mime/after_spawn(mob/living/carbon/human/H, client/C)
. = ..()

View File

@@ -23,6 +23,10 @@
threat = 0.5
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/storage/firstaid/ancient/heirloom
)
/datum/outfit/job/paramedic
name = "Paramedic"

View File

@@ -13,6 +13,10 @@
plasma_outfit = /datum/outfit/plasmaman/prisoner
display_order = JOB_DISPLAY_ORDER_PRISONER
family_heirlooms = list(
/obj/item/pen/blue
)
/datum/job/prisoner/get_latejoin_spawn_point()
return get_roundstart_spawn_point()

View File

@@ -32,6 +32,11 @@
display_order = JOB_DISPLAY_ORDER_QUARTERMASTER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
threat = 0.5
family_heirlooms = list(
/obj/item/stamp,
/obj/item/stamp/denied
)
/datum/outfit/job/quartermaster
name = "Quartermaster"

View File

@@ -38,6 +38,10 @@
starting_modifiers = list(/datum/skill_modifier/job/level/wiring)
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
threat = 5
family_heirlooms = list(
/obj/item/toy/plush/slimeplushie
)
/datum/outfit/job/rd
name = "Research Director"

View File

@@ -24,6 +24,10 @@
display_order = JOB_DISPLAY_ORDER_ROBOTICIST
threat = 1
family_heirlooms = list(
/obj/item/toy/figure/borg
)
/datum/outfit/job/roboticist
name = "Roboticist"

View File

@@ -22,6 +22,10 @@
starting_modifiers = list(/datum/skill_modifier/job/level/wiring/basic)
display_order = JOB_DISPLAY_ORDER_SCIENTIST
threat = 1.2
family_heirlooms = list(
/obj/item/toy/plush/slimeplushie
)
/datum/outfit/job/scientist
name = "Scientist"

View File

@@ -28,6 +28,11 @@
display_order = JOB_DISPLAY_ORDER_SECURITY_OFFICER
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/blindness, /datum/quirk/monophobia)
threat = 2
family_heirlooms = list(
/obj/item/book/manual/wiki/security_space_law,
/obj/item/clothing/head/beret/sec
)
/datum/job/officer/get_access()
var/list/L = list()

View File

@@ -24,6 +24,11 @@
display_order = JOB_DISPLAY_ORDER_SHAFT_MINER
threat = 1.5
family_heirlooms = list(
/obj/item/pickaxe/mini,
/obj/item/shovel
)
/datum/outfit/job/miner
name = "Shaft Miner (Lavaland)"

View File

@@ -27,6 +27,15 @@
display_order = JOB_DISPLAY_ORDER_STATION_ENGINEER
threat = 1
family_heirlooms = list(
/obj/item/clothing/head/hardhat,
/obj/item/screwdriver/brass/family,
/obj/item/wrench/brass/family,
/obj/item/weldingtool/mini, // No brass family variant
/obj/item/crowbar/brass/family,
/obj/item/wirecutters/brass/family
)
/datum/outfit/job/engineer
name = "Station Engineer"

View File

@@ -25,6 +25,10 @@
threat = 1.5
starting_modifiers = list(/datum/skill_modifier/job/surgery, /datum/skill_modifier/job/affinity/surgery)
family_heirlooms = list(
/obj/item/reagent_containers/syringe
)
/datum/outfit/job/virologist
name = "Virologist"

View File

@@ -29,6 +29,10 @@
display_order = JOB_DISPLAY_ORDER_WARDEN
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/blindness, /datum/quirk/monophobia)
threat = 2
family_heirlooms = list(
/obj/item/book/manual/wiki/security_space_law
)
/datum/job/warden/get_access()
var/list/L = list()

View File

@@ -231,6 +231,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
///For custom overrides for species ass images
var/icon/ass_image
/// List of family heirlooms this species can get with the family heirloom quirk. List of types.
var/list/family_heirlooms
///////////
// PROCS //
///////////

View File

@@ -24,3 +24,7 @@
allowed_limb_ids = list("insect","apid","moth","moth_not_greyscale")
eye_type = "insect"
family_heirlooms = list(
/obj/item/flashlight/lantern/heirloom_moth
)

View File

@@ -20,6 +20,11 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
species_language_holder = /datum/language_holder/dwarf
species_category = SPECIES_CATEGORY_BASIC //a kind of human
family_heirlooms = list(
// Dwarves get a dwarf mug as their heirloom (normal container but has manly dorf icon)
/obj/item/reagent_containers/food/drinks/dwarf_mug
)
/mob/living/carbon/human/species/dwarf //species admin spawn path
race = /datum/species/dwarf //and the race the path is set to.

View File

@@ -13,6 +13,7 @@
wagging_type = "mam_waggingtail"
species_category = SPECIES_CATEGORY_FURRY
ass_image = 'icons/ass/asscat.png'
family_heirlooms = list(/obj/item/toy/cattoy)
/datum/species/human/felinid/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
if(ishuman(C))

View File

@@ -37,6 +37,11 @@
species_category = SPECIES_CATEGORY_ROBOT
wings_icons = SPECIES_WINGS_ROBOT
family_heirlooms = list(
// Gives a broken powercell for flavor text!
/obj/item/stock_parts/cell/family
)
var/datum/action/innate/monitor_change/screen
/datum/species/ipc/on_species_gain(mob/living/carbon/human/C)

View File

@@ -34,6 +34,10 @@
ass_image = 'icons/ass/assslime.png'
blacklisted_quirks = list(/datum/quirk/glass_bones)
family_heirlooms = list(
/obj/item/toy/plush/slimeplushie
)
/datum/species/jelly/on_species_loss(mob/living/carbon/C)
C.faction -= "slime"
if(ishuman(C))

View File

@@ -33,6 +33,10 @@
ass_image = 'icons/ass/asslizard.png'
family_heirlooms = list(
/obj/item/toy/plush/lizardplushie
)
/datum/species/lizard/random_name(gender,unique,lastname)
if(unique)
return random_unique_lizard_name(gender)

View File

@@ -36,3 +36,8 @@
wagging_type = "mam_waggingtail"
species_category = SPECIES_CATEGORY_ROBOT
wings_icons = SPECIES_WINGS_ROBOT
family_heirlooms = list(
// They're also robots
/obj/item/stock_parts/cell/family
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB