Some refactors, DMDoc and UT (#18365)

* dsfa

* accessories fix

* fixed "has been hit by" message with intent check

* sdfa
This commit is contained in:
Fluffy
2024-02-12 15:32:23 +00:00
committed by GitHub
parent 58dbaf8be6
commit 9afe761db3
620 changed files with 5733 additions and 5200 deletions
@@ -1,8 +1,11 @@
/datum/gear/accessory
abstract_type = /datum/gear/accessory
sort_category = "Accessories"
/datum/gear/accessory/locket
display_name = "silver locket"
path = /obj/item/clothing/accessory/locket
slot = slot_tie
sort_category = "Accessories"
/datum/gear/accessory/suspenders
display_name = "suspenders"
@@ -4,6 +4,9 @@
sort_category = "Modular Computers"
cost = 2
/datum/gear/computer/handheld
abstract_type = /datum/gear/computer/handheld
/datum/gear/computer/handheld/tablet
display_name = "tablet"
path = /obj/item/modular_computer/handheld/preset
@@ -23,6 +26,9 @@
tablets["machinist tablet"] = /obj/item/modular_computer/handheld/preset/supply/machinist
gear_tweaks += new /datum/gear_tweak/path(tablets)
/datum/gear/computer/handheld/wristbound
abstract_type = /datum/gear/computer/handheld/wristbound
/datum/gear/computer/handheld/wristbound/selection
display_name = "wristbound computer selection"
path = /obj/item/modular_computer/handheld/wristbound/preset
@@ -1,14 +1,20 @@
/datum/gear/religion
display_name = "trinary perfection mask"
path = /obj/item/clothing/mask/trinary_mask
slot = slot_wear_mask
abstract_type = /datum/gear/religion
sort_category = "Religion"
flags = GEAR_HAS_DESC_SELECTION
/datum/gear/religion/shaman_staff
display_name = "shaman staff"
path = /obj/item/cane/shaman
slot = slot_l_hand
/datum/gear/religion/trinary
display_name = "trinary perfection brooch"
path = /obj/item/clothing/accessory/badge/trinary
slot = slot_tie
abstract_type = /datum/gear/religion/trinary
/datum/gear/religion/trinary/mask
display_name = "trinary perfection mask"
path = /obj/item/clothing/mask/trinary_mask
slot = slot_wear_mask
/datum/gear/religion/trinary/coif
display_name = "trinary perfection coif"
@@ -98,6 +104,9 @@
slot = slot_tie
flags = GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
/datum/gear/religion/dominia
abstract_type = /datum/gear/religion/dominia
/datum/gear/religion/dominia/robe
display_name = "dominian robe selection"
description = "A selection of robes belonging to Dominia's Moroz Holy Tribunal."
@@ -142,21 +151,6 @@
cape["tribunalist surcoat"] = /obj/item/clothing/accessory/poncho/dominia/red/surcoat
gear_tweaks += new /datum/gear_tweak/path(cape)
/datum/gear/religion/assunzione/robe
display_name = "assunzione robe selection"
description = "A selection of robes worn by adherents to Luceism."
path = /obj/item/clothing/accessory/poncho/assunzione
slot = slot_wear_suit
origin_restriction = list(/singleton/origin_item/origin/assunzione, /singleton/origin_item/origin/ipc_assunzione)
/datum/gear/religion/assunzione/robe/New()
..()
var/list/assunzionerobe = list()
assunzionerobe["assunzione robe"] = /obj/item/clothing/accessory/poncho/assunzione
assunzionerobe["assunzione vine-inlaid robe"] = /obj/item/clothing/accessory/poncho/assunzione/vine
assunzionerobe["assunzione gold-inlaid robe"] = /obj/item/clothing/accessory/poncho/assunzione/gold
gear_tweaks += new /datum/gear_tweak/path(assunzionerobe)
/datum/gear/religion/dominia/accessory
display_name = "tribunal necklace"
path = /obj/item/clothing/accessory/dominia
@@ -186,11 +180,6 @@
allowed_roles = list("Chief Medical Officer", "Physician", "Surgeon", "Pharmacist", "First Responder", "Medical Intern", "Medical Personnel")
culture_restriction = list(/singleton/origin_item/culture/dominia, /singleton/origin_item/culture/dominian_unathi)
/datum/gear/religion/shaman_staff
display_name = "shaman staff"
path = /obj/item/cane/shaman
slot = slot_l_hand
/datum/gear/religion/dominia/robe_consular
display_name = "tribunalist consular uniform"
description = "The traditional red-black-gold uniform of a priestly member of His Majesty's Diplomatic Service."
@@ -215,24 +204,6 @@
allowed_roles = list("Consular Officer")
culture_restriction = list(/singleton/origin_item/culture/dominia, /singleton/origin_item/culture/dominian_unathi)
/datum/gear/religion/assunzione/accessory
display_name = "luceian amulet"
path = /obj/item/clothing/accessory/assunzione
slot = slot_tie
origin_restriction = list(/singleton/origin_item/origin/assunzione, /singleton/origin_item/origin/ipc_assunzione)
/datum/gear/religion/assunzioneorb
display_name = "assunzione warding sphere"
description = "A religious artefact commonly associated with Luceism."
path = /obj/item/assunzioneorb
origin_restriction = list(/singleton/origin_item/origin/assunzione, /singleton/origin_item/origin/ipc_assunzione)
/datum/gear/religion/assunzionesheath
display_name = "assunzione warding sphere sheath"
description = "A small metal shell designed to hold a warding sphere."
path = /obj/item/storage/assunzionesheath
origin_restriction = list(/singleton/origin_item/origin/assunzione, /singleton/origin_item/origin/ipc_assunzione)
/datum/gear/religion/dominia/codex
display_name = "tribunal codex"
path = /obj/item/device/versebook/tribunal
@@ -254,3 +225,36 @@
dominiaicon["icon of the martyr, matteo"] = /obj/item/sign/painting_frame/martyr/matteo
dominiaicon["icon of the martyr, valeria"] = /obj/item/sign/painting_frame/martyr/valeria
gear_tweaks += new /datum/gear_tweak/path(dominiaicon)
/datum/gear/religion/assunzione
abstract_type = /datum/gear/religion/assunzione
origin_restriction = list(/singleton/origin_item/origin/assunzione, /singleton/origin_item/origin/ipc_assunzione)
/datum/gear/religion/assunzione/robe
display_name = "assunzione robe selection"
description = "A selection of robes worn by adherents to Luceism."
path = /obj/item/clothing/accessory/poncho/assunzione
slot = slot_wear_suit
/datum/gear/religion/assunzione/robe/New()
..()
var/list/assunzionerobe = list()
assunzionerobe["assunzione robe"] = /obj/item/clothing/accessory/poncho/assunzione
assunzionerobe["assunzione vine-inlaid robe"] = /obj/item/clothing/accessory/poncho/assunzione/vine
assunzionerobe["assunzione gold-inlaid robe"] = /obj/item/clothing/accessory/poncho/assunzione/gold
gear_tweaks += new /datum/gear_tweak/path(assunzionerobe)
/datum/gear/religion/assunzione/accessory
display_name = "luceian amulet"
path = /obj/item/clothing/accessory/assunzione
slot = slot_tie
/datum/gear/religion/assunzione/orb
display_name = "assunzione warding sphere"
description = "A religious artefact commonly associated with Luceism."
path = /obj/item/assunzioneorb
/datum/gear/religion/assunzione/sheath
display_name = "assunzione warding sphere sheath"
description = "A small metal shell designed to hold a warding sphere."
path = /obj/item/storage/assunzionesheath
@@ -375,6 +375,8 @@
jacket["departmental jacket, service"] = /obj/item/clothing/suit/storage/toggle/serv_dep_jacket
gear_tweaks += new /datum/gear_tweak/path(jacket)
/datum/gear/suit/miscellaneous
abstract_type = /datum/gear/suit/miscellaneous
/datum/gear/suit/miscellaneous/peacoat
display_name = "peacoat"
@@ -8,6 +8,9 @@
flags = GEAR_NO_SELECTION
culture_restriction = list(/singleton/origin_item/culture/diona_sol)
/datum/gear/suit/diona
abstract_type = /datum/gear/suit/diona
/datum/gear/suit/diona/eternal
display_name = "mesh weave robes"
description = "A set of mesh weave robes worn almost exclusively by priests of the Orthodox Eternal faith."
@@ -122,8 +125,9 @@
whitelisted = list(SPECIES_DIONA, SPECIES_DIONA_COEUS)
sort_category = "Xenowear - Diona"
culture_restriction = list(/singleton/origin_item/culture/dionae_nralakk, /singleton/origin_item/culture/eum, /singleton/origin_item/culture/xrim)
/datum/gear/accessory/skrell_passport/diona
/datum/gear/accessory/diona
abstract_type = /datum/gear/accessory/diona
/datum/gear/accessory/diona/skrell_passport
display_name = "dionae nralakk federation passport"
path = /obj/item/clothing/accessory/badge/passport/nralakk
whitelisted = list(SPECIES_DIONA, SPECIES_DIONA_COEUS)
@@ -140,6 +140,9 @@
goldendeep["golden deep skirtsuit"] = /obj/item/clothing/under/goldendeep/skirtsuit
gear_tweaks += new /datum/gear_tweak/path(goldendeep)
/datum/gear/augment/machine
abstract_type = /datum/gear/augment/machine
/datum/gear/augment/machine/gustatorial
display_name = "gustatorial centre (tongue)"
description = "An extremely complex augment, capable of translating taste into binary code, allowing synthetic beings to experience food."
@@ -1,3 +1,6 @@
/datum/gear/ears/skrell
abstract_type = /datum/gear/ears/skrell
/datum/gear/ears/skrell/chains //Chains
display_name = "headtail chain selection"
path = /obj/item/clothing/ears/skrell/chain
@@ -295,6 +298,9 @@ var/datum/gear_tweak/social_credit/social_credit_tweak = new()
outfit["iqi medical"] = /obj/item/clothing/under/skrell/nralakk/iqi/med
gear_tweaks += new /datum/gear_tweak/path(outfit)
/datum/gear/suit/skrell
abstract_type = /datum/gear/suit/skrell
/datum/gear/suit/skrell/jacket
display_name = "work jackets"
path = /obj/item/clothing/suit/storage/toggle/skrell
@@ -327,6 +333,8 @@ var/datum/gear_tweak/social_credit/social_credit_tweak = new()
jacket["iqi medical"] = /obj/item/clothing/suit/storage/toggle/skrell/iqi/med
gear_tweaks += new /datum/gear_tweak/path(jacket)
/datum/gear/accessory/skrell
abstract_type = /datum/gear/accessory/skrell
/datum/gear/accessory/skrell/starcoat
display_name = "star coat"
path = /obj/item/clothing/suit/storage/toggle/skrell/starcoat
@@ -1,3 +1,6 @@
/datum/gear/shoes/tajara
abstract_type = /datum/gear/shoes/tajara
/datum/gear/shoes/tajara/boots
display_name = "tajaran boots selection"
description = "A selection of boots fitted for Tajara."
@@ -230,6 +230,9 @@
gear_tweaks += new /datum/gear_tweak/path(lunchboxes)
gear_tweaks += new /datum/gear_tweak/contents(lunchables_vaurca(), lunchables_vaurca_snack(), lunchables_drinks(), lunchables_utensil())
/datum/gear/ears/vaurca
abstract_type = /datum/gear/ears/vaurca
/datum/gear/ears/vaurca/rings
display_name = "bulwark horn rings"
description = "Rings worn by Bulwarks to decorate their horns."
@@ -15,6 +15,10 @@ var/list/gear_datums = list()
for(var/geartype in subtypesof(/datum/gear))
var/datum/gear/G = geartype
//We do not want placeholders
if(G.type == G.abstract_type)
continue
var/use_name = initial(G.display_name)
var/use_category = initial(G.sort_category)
@@ -406,19 +410,74 @@ var/list/gear_datums = list()
return ..()
/datum/gear
var/display_name //Name/index. Must be unique.
var/description //Description of this gear. If left blank will default to the description of the pathed item.
var/path //Path to item.
var/cost = 1 //Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points.
var/slot //Slot to equip to.
var/list/allowed_roles //Roles that can spawn with this item.
var/whitelisted //Term to check the whitelist for..
var/faction //Is this item whitelisted for a faction?
var/list/culture_restriction //Is this item restricted to certain cultures? The contents are paths.
var/list/origin_restriction //Is this item restricted to certain origins? The contents are paths.
/**
* Name and index, _must be unique_
*
* Otherwise, if this is just a placeholder, set the `abstract_type` variable to the path of itself
*/
var/display_name
/**
* Description of this gear
*
* If left blank will default to the description of the pathed item.
*/
var/description
///The path to item to spawn
var/path
///Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points.
var/cost = 1
/**
* Slot to equip to, one of the `slot_*` defines, see `code\__DEFINES\items_clothing.dm`
*
* If `null`, it will be sent to the storage (eg. backpack)
*/
var/slot
/**
* A `/list` of roles that can spawn with this item
*
* If left `null`, any role can spawn with this item
*/
var/list/allowed_roles
/**
* A `/list` of `SPECIES_*` that can spawn with this item
*
* If left `null`, any specie can spawn with this item
*/
var/list/whitelisted
/**
* A string of the faction that can use this item
*
* If left `null`, any faction can spawn with this item
*/
var/faction
/**
* A `/list` of [/singleton/origin_item/culture] paths that can use this item
*/
var/list/singleton/origin_item/culture/culture_restriction
/**
* A `/list` of [/singleton/origin_item/origin] paths that can use this item
*/
var/list/singleton/origin_item/origin/origin_restriction
///A string of the category this item will be listed in
var/sort_category = "General"
var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned.
///A `/list` of [/datum/gear_tweak] to apply
var/list/datum/gear_tweak/gear_tweaks = list()
///Bitflag field of `GEAR_*`, see `code\modules\client\preference_setup\loadout\_defines.dm`
var/flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION
///Boolean, if this gear is an augment
var/augment = FALSE
/datum/gear/New()