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

Fix global list lookups by name for 3 GLOBs #6421

Merged
merged 3 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes())
rkey++
var/datum/species/S = new T
S.race_key = rkey //Used in mob icon caching.
var/datum/species/existing = all_species[S.name]
if(existing)
stack_trace("[S.name] from [T] overlaps with [existing.type]! It must have a unique name for lookup!")
all_species[S.name] = S
return all_species

Expand Down Expand Up @@ -353,6 +356,9 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes())
if (!initial(EP.flags))
continue
EP = new T
var/datum/equipment_preset/existing = gear_path_presets_list[EP.name]
if(existing)
stack_trace("[EP.name] from [T] overlaps with [existing.type]! It must have a unique name for lookup!")
gear_path_presets_list[EP.name] = EP
return sortAssoc(gear_path_presets_list)

Expand Down Expand Up @@ -464,7 +470,11 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes())
/proc/setup_yautja_capes()
var/list/cape_list = list()
for(var/obj/item/clothing/yautja_cape/cape_type as anything in typesof(/obj/item/clothing/yautja_cape))
cape_list[initial(cape_type.name)] = cape_type
var/cape_name = initial(cape_type.name)
var/obj/item/clothing/yautja_cape/existing = cape_list[cape_name]
if(existing)
stack_trace("[cape_name] from [cape_type] overlaps with [existing.type]! It must have a unique name for lookup!")
cape_list[cape_name] = cape_type
return cape_list


Expand Down
12 changes: 0 additions & 12 deletions code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,6 @@
/datum/equipment_preset/uscm/cmb/leader
name = "USCM Anchorpoint Station Team Leader"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
/datum/equipment_preset/uscm/cmb/leader/New()
. = ..()

assignment = "Anchorpoint Station Marine Team Leader"
rank = JOB_SQUAD_LEADER
paygrade = PAY_SHORT_ME6
Expand Down Expand Up @@ -505,9 +502,6 @@
/datum/equipment_preset/uscm/cmb/rto
name = "USCM Anchorpoint Station Technical Specialist"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
/datum/equipment_preset/uscm/cmb/rto/New()
. = ..()

assignment = "Anchorpoint Station Marine Technical Specialist"
rank = JOB_SQUAD_TEAM_LEADER
paygrade = PAY_SHORT_ME4
Expand Down Expand Up @@ -550,9 +544,6 @@
/datum/equipment_preset/uscm/cmb/medic
name = "USCM Anchorpoint Station Corpsman"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
/datum/equipment_preset/uscm/cmb/medic/New()
. = ..()

assignment = "Anchorpoint Station Hospital Corpsman"
rank = JOB_SQUAD_MEDIC
paygrade = PAY_SHORT_ME3
Expand Down Expand Up @@ -611,9 +602,6 @@
/datum/equipment_preset/uscm/cmb/smartgunner
name = "USCM Anchorpoint Station Smartgunner"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
/datum/equipment_preset/uscm/cmb/smartgunner/New()
. = ..()

assignment = "Anchorpoint Station Marine Smartgunner"
rank = JOB_SQUAD_SMARTGUN
paygrade = PAY_SHORT_ME3
Expand Down
3 changes: 3 additions & 0 deletions code/modules/gear_presets/corpses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@

//Colonial Supervisor

/datum/equipment_preset/corpse/wy
flags = EQUIPMENT_PRESET_STUB

/datum/equipment_preset/corpse/wy/manager
name = "Corpse - Corporate Supervisor"
assignment = "Colony Supervisor"
Expand Down
1 change: 1 addition & 0 deletions code/modules/gear_presets/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -968,4 +968,5 @@
new_human.nutrition = NUTRITION_LOW

/datum/equipment_preset/tutorial/fed
name = "Tutorial (Fed)"
underfed = FALSE
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE)

// cmb synth
// cmb synth (of note /datum/equipment_preset/synth/survivor/cmb_synth also exists)
/datum/equipment_preset/synth/survivor/cmb
flags = EQUIPMENT_PRESET_STUB

/datum/equipment_preset/synth/survivor/cmb/synth
name = "Survivor - Synthetic - CMB Investigative Synthetic(Riot Response)"
paygrade = PAY_SHORT_CMBS
Expand Down
7 changes: 4 additions & 3 deletions code/modules/gear_presets/survivors/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ Everything below isn't used or out of place.

// ----- Mercenary Survivors

// after double check pmc/miner/one isn't being used anywhere.
/datum/equipment_preset/survivor/pmc/miner/one
// after double check pmc/miner isn't being used anywhere.
/datum/equipment_preset/survivor/pmc/miner
name = "Survivor - Mercenary"
flags = EQUIPMENT_PRESET_START_OF_ROUND

Expand All @@ -214,7 +214,7 @@ Everything below isn't used or out of place.
flags = EQUIPMENT_PRESET_START_OF_ROUND
access = list(ACCESS_CIVILIAN_PUBLIC)

/datum/equipment_preset/survivor/pmc/miner/one/load_gear(mob/living/carbon/human/new_human)
/datum/equipment_preset/survivor/pmc/miner/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/veteran/mercenary/miner, WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/mercenary/miner, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/mercenary/miner, WEAR_HEAD)
Expand Down Expand Up @@ -293,6 +293,7 @@ Everything below isn't used or out of place.
/// used in Shivas Snowball

/datum/equipment_preset/survivor/clf/cold
name = "CLF Survivor (Cold)"

//children of spawn rebel shoes proc
/datum/equipment_preset/survivor/clf/cold/spawn_rebel_suit(mob/living/carbon/human/human)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,42 +152,42 @@
role_comm_title = "WY Syn"

/datum/equipment_preset/synth/survivor/pmc/load_race(mob/living/carbon/human/new_human)
new_human.set_species(SYNTH_GEN_THREE)
new_human.set_species(SYNTH_GEN_THREE)

/datum/equipment_preset/synth/survivor/pmc/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/veteran/pmc, WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/droppouch, WEAR_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/tool/surgery/scalpel/manager, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/drinks/flask/weylandyutani, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/synth, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)

new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc, WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/pmc/command/hvh, WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/pmc, WEAR_FACE)

new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran/pmc, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/veteran/pmc/knife, WEAR_FEET)

new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/smartpack/white, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/roller, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/roller/surgical, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/extinguisher/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator/upgraded, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/crew_monitor, WEAR_IN_BACK)

new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/lifesaver/full/dutch, WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/nailgun/compact, WEAR_J_STORE)

new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/tactical, WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/screwdriver/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/wirecutters/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/wrench, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/stack/cable_coil, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/stack/cable_coil, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/multitool, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/weldingtool/hugetank, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full_barbed_wire, WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/veteran/pmc, WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/droppouch, WEAR_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/tool/surgery/scalpel/manager, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/reagent_container/food/drinks/flask/weylandyutani, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/synth, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)

new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc, WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/pmc/command/hvh, WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/pmc, WEAR_FACE)

new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran/pmc, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/veteran/pmc/knife, WEAR_FEET)

new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/smartpack/white, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/roller, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/roller/surgical, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/extinguisher/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator/upgraded, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/crew_monitor, WEAR_IN_BACK)

new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/lifesaver/full/dutch, WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/nailgun/compact, WEAR_J_STORE)

new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/tactical, WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/screwdriver/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/crowbar/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/wirecutters/tactical, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/wrench, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/stack/cable_coil, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/stack/cable_coil, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/multitool, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/tool/weldingtool/hugetank, WEAR_IN_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/construction/full_barbed_wire, WEAR_R_STORE)
9 changes: 9 additions & 0 deletions code/modules/gear_presets/synths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@
. = ..()
access = get_access(ACCESS_LIST_WY_PMC)

/datum/equipment_preset/synth/survivor/wy
flags = EQUIPMENT_PRESET_STUB

/datum/equipment_preset/synth/survivor/wy/New()
. = ..()
access = get_access(ACCESS_LIST_COLONIAL_ALL) + get_region_accesses(2) + get_region_accesses(4) + ACCESS_MARINE_RESEARCH + ACCESS_WY_GENERAL // for WY synths - admin building and wy fax machines access
Expand Down Expand Up @@ -268,6 +271,9 @@

survivor_variant = ENGINEERING_SURVIVOR

/datum/equipment_preset/synth/survivor/corporate_synth
name = "Survivor - Synthetic - Corporate Synth"

/datum/equipment_preset/synth/survivor/corporate_synth/load_gear(mob/living/carbon/human/new_human)
..()
add_random_cl_survivor_loot(new_human)
Expand Down Expand Up @@ -473,6 +479,7 @@
)

survivor_variant = SECURITY_SURVIVOR
flags = EQUIPMENT_PRESET_EXTRA

/datum/equipment_preset/synth/survivor/wy/protection_synth
name = "Survivor - Synthetic - Corporate Protection Synth"
Expand All @@ -495,6 +502,7 @@
)

survivor_variant = SECURITY_SURVIVOR
flags = EQUIPMENT_PRESET_EXTRA

/datum/equipment_preset/synth/survivor/wy/corporate_synth
name = "Survivor - Synthetic - Corporate Clerical Synth"
Expand All @@ -517,6 +525,7 @@
)

survivor_variant = CORPORATE_SURVIVOR
flags = EQUIPMENT_PRESET_EXTRA

/datum/equipment_preset/synth/survivor/icc_synth
name = "Survivor - Synthetic - Interstellar Commerce Commission Synthetic"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
//*****************************************************************************************************/

/datum/equipment_preset/uscm/sg/full
name = "USCM Squad Smartgunner"
name = "USCM Squad Smartgunner (Full)"
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE

/datum/equipment_preset/uscm/sg/full/load_gear(mob/living/carbon/human/new_human)
Expand Down
4 changes: 0 additions & 4 deletions code/modules/gear_presets/uscm_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@

new_human.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(new_human), WEAR_EYES)

/datum/equipment_preset/uscm_event/general/o7
name = "USCM O-7 - Brigadier General (High Command)"
paygrade = PAY_SHORT_MO7

/datum/equipment_preset/uscm_event/general/o8
name = "USCM O-8 - Major General (High Command)"
paygrade = PAY_SHORT_MO8
Expand Down
4 changes: 2 additions & 2 deletions code/modules/gear_presets/uscm_medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
//*****************************************************************************************************/

/datum/equipment_preset/uscm_ship/uscm_medical/doctor
name = "USCM Surgeon"
name = "USCM Doctor"

assignment = JOB_DOCTOR
rank = JOB_DOCTOR
Expand All @@ -85,7 +85,7 @@
//Surgeon this part of the code is to change the name on your ID

/datum/equipment_preset/uscm_ship/uscm_medical/doctor/surgeon

name = "USCM Surgeon"
assignment = JOB_SURGEON

/datum/equipment_preset/uscm_ship/uscm_medical/doctor/surgeon/load_gear(mob/living/carbon/human/new_human)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
//*****************************************************************************************************/

/datum/equipment_preset/uscm_ship/reporter
name = "Combat Correspondent"
name = "Combat Correspondent (Press)"
flags = EQUIPMENT_PRESET_START_OF_ROUND

access = list(
Expand Down Expand Up @@ -586,7 +586,6 @@
flags = EQUIPMENT_PRESET_START_OF_ROUND|EQUIPMENT_PRESET_MARINE

idtype = /obj/item/card/id/silver
access
assignment = JOB_SEA
rank = JOB_SEA
paygrade = PAY_SHORT_ME7
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/whiteout.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
//*****************************************************************************************************/

/datum/equipment_preset/pmc/w_y_whiteout/low_threat/medic
name = "Whiteout Team Medic"
name = "Whiteout Team Operative Medic"

/datum/equipment_preset/pmc/w_y_whiteout/low_threat/medic/load_gear(mob/living/carbon/human/new_human)
// back
Expand Down
Loading