Skip to content

Commit

Permalink
Add checks for uniqueness for equipment presets, species, and predato…
Browse files Browse the repository at this point in the history
…r cloaks
  • Loading branch information
Drulikar committed Jun 10, 2024
1 parent 63ce33d commit ecbee89
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 93 deletions.
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
6 changes: 3 additions & 3 deletions code/datums/map_config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@
/datum/equipment_preset/synth/survivor/bartender_synth,
/datum/equipment_preset/synth/survivor/atc_synth,
/datum/equipment_preset/synth/survivor/cmb_synth,
/datum/equipment_preset/synth/survivor/wy/security_synth,
/datum/equipment_preset/synth/survivor/wy/protection_synth,
/datum/equipment_preset/synth/survivor/wy/corporate_synth,
/datum/equipment_preset/synth/survivor/wy_security_synth,
/datum/equipment_preset/synth/survivor/wy_protection_synth,
/datum/equipment_preset/synth/survivor/wy_corporate_synth,
/datum/equipment_preset/synth/survivor/icc_synth,
/datum/equipment_preset/synth/survivor/radiation_synth,
)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/landmarks/corpsespawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@

/obj/effect/landmark/corpsespawner/wy/manager
name = "Corporate Supervisor"
equip_path = /datum/equipment_preset/corpse/wy/manager
equip_path = /datum/equipment_preset/corpse/wy_manager

/obj/effect/landmark/corpsespawner/wy/manager/burst
name = "Burst Corporate Supervisor"
equip_path = /datum/equipment_preset/corpse/wy/manager/burst
equip_path = /datum/equipment_preset/corpse/wy_manager/burst


///////////Faction Specific Corpses//////////////////////
Expand Down
10 changes: 5 additions & 5 deletions code/game/objects/effects/landmarks/survivor_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

/obj/effect/landmark/survivor_spawner/lv624_corporate_dome_cl
equipment = /datum/equipment_preset/survivor/wy/executive
synth_equipment = /datum/equipment_preset/synth/survivor/wy/security_synth
synth_equipment = /datum/equipment_preset/synth/survivor/wy_security_synth
intro_text = list("<h2>You are the last alive Executive of Lazarus Landing!</h2>",\
"<span class='notice'>You are aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to survive the outbreak.</span>")
Expand All @@ -98,7 +98,7 @@

/obj/effect/landmark/survivor_spawner/lv624_corporate_dome_goon
equipment = /datum/equipment_preset/survivor/goon
synth_equipment = /datum/equipment_preset/synth/survivor/wy/security_synth
synth_equipment = /datum/equipment_preset/synth/survivor/wy_security_synth
intro_text = list("<h2>You are a Corporate Security Officer!</h2>",\
"<span class='notice'>You are aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to survive the outbreak.</span>")
Expand Down Expand Up @@ -160,7 +160,7 @@

/obj/effect/landmark/survivor_spawner/shivas_panic_room_cl
equipment = /datum/equipment_preset/survivor/wy/asstmanager
synth_equipment = /datum/equipment_preset/synth/survivor/wy/corporate_synth
synth_equipment = /datum/equipment_preset/synth/survivor/wy_corporate_synth
intro_text = list("<h2>You are the last alive Senior Administrator on the Colony!</h2>",\
"<span class='notice'>You are aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to survive the outbreak.</span>")
Expand Down Expand Up @@ -202,7 +202,7 @@

/obj/effect/landmark/survivor_spawner/fiorina_armory_cmb
equipment = /datum/equipment_preset/survivor/cmb/standard
synth_equipment = /datum/equipment_preset/synth/survivor/cmb/synth
synth_equipment = /datum/equipment_preset/synth/survivor/cmb_synth
intro_text = list("<h2>You are a CMB Deputy!</h2>",\
"<span class='notice'>You are aware of the 'alien' threat.</span>",\
"<span class='danger'>Your primary objective is to survive the infestation.</span>")
Expand All @@ -212,7 +212,7 @@

/obj/effect/landmark/survivor_spawner/fiorina_armory_riot_control
equipment = /datum/equipment_preset/survivor/cmb/ua
synth_equipment = /datum/equipment_preset/synth/survivor/cmb/ua_synth
synth_equipment = /datum/equipment_preset/synth/survivor/cmb_ua_synth
intro_text = list("<h2>You are a United Americas Riot Control Officer!</h2>",\
"<span class='notice'>You are aware of the 'alien' threat.</span>",\
"<span class='danger'>Your primary objective is to survive the infestation.</span>")
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
6 changes: 3 additions & 3 deletions code/modules/gear_presets/corpses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@

//Colonial Supervisor

/datum/equipment_preset/corpse/wy/manager
/datum/equipment_preset/corpse/wy_manager
name = "Corpse - Corporate Supervisor"
assignment = "Colony Supervisor"
flags = EQUIPMENT_PRESET_EXTRA
Expand All @@ -549,7 +549,7 @@
ACCESS_ILLEGAL_PIRATE,
)

/datum/equipment_preset/corpse/wy/manager/load_gear(mob/living/carbon/human/new_human)
/datum/equipment_preset/corpse/wy_manager/load_gear(mob/living/carbon/human/new_human)
add_ice_colony_survivor_equipment(new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/manager(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/lockable/liaison(new_human), WEAR_BACK)
Expand All @@ -562,7 +562,7 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/tools/full(new_human), WEAR_R_STORE)
add_random_cl_survivor_loot(new_human)

/datum/equipment_preset/corpse/wy/manager/burst
/datum/equipment_preset/corpse/wy_manager/burst
name = "Corpse - Burst Corporate Supervisor"
xenovictim = TRUE

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 @@ -84,7 +84,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE)

// cmb synth
/datum/equipment_preset/synth/survivor/cmb/synth
/datum/equipment_preset/synth/survivor/cmb_synth
name = "Survivor - Synthetic - CMB Investigative Synthetic(Riot Response)"
paygrade = PAY_SHORT_CMBS
idtype = /obj/item/card/id/deputy
Expand All @@ -95,10 +95,10 @@
languages = ALL_SYNTH_LANGUAGES
skills = /datum/skills/synthetic/cmb

/datum/equipment_preset/synth/survivor/cmb/synth/load_race(mob/living/carbon/human/new_human)
/datum/equipment_preset/synth/survivor/cmb_synth/load_race(mob/living/carbon/human/new_human)
new_human.set_species(SYNTH_COLONY)

/datum/equipment_preset/synth/survivor/cmb/synth/load_gear(mob/living/carbon/human/new_human)
/datum/equipment_preset/synth/survivor/cmb_synth/load_gear(mob/living/carbon/human/new_human)
//backpack
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/security, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_BACK)
Expand Down Expand Up @@ -224,7 +224,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_R_STORE)

// ua synth
/datum/equipment_preset/synth/survivor/cmb/ua_synth
/datum/equipment_preset/synth/survivor/cmb_ua_synth
name = "Survivor - Synthetic - UA Police Synthetic(Riot Response)"
paygrade = PAY_SHORT_CMBS
role_comm_title = "UA Syn"
Expand All @@ -234,10 +234,10 @@
skills = /datum/skills/colonial_synthetic
idtype = /obj/item/card/id/silver

/datum/equipment_preset/synth/survivor/cmb/ua_synth/load_race(mob/living/carbon/human/new_human)
/datum/equipment_preset/synth/survivor/cmb_ua_synth/load_race(mob/living/carbon/human/new_human)
new_human.set_species(SYNTH_COLONY)

/datum/equipment_preset/synth/survivor/cmb/ua_synth/load_gear(mob/living/carbon/human/new_human)
/datum/equipment_preset/synth/survivor/cmb_ua_synth/load_gear(mob/living/carbon/human/new_human)
//backpack
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs, WEAR_IN_BACK)
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 @@ -151,43 +151,47 @@
rank = JOB_PMC_SYNTH
role_comm_title = "WY Syn"

/datum/equipment_preset/synth/survivor/pmc/New()
. = ..()
access = get_access(ACCESS_LIST_WY_PMC)

/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)
Loading

0 comments on commit ecbee89

Please sign in to comment.