From d7970f14e3b6dbc8a656d4bf51eeb27d95569a8a Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sun, 12 May 2024 01:20:49 -0500 Subject: [PATCH 01/13] idk --- code/modules/faction/faction_datum.dm | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 code/modules/faction/faction_datum.dm diff --git a/code/modules/faction/faction_datum.dm b/code/modules/faction/faction_datum.dm new file mode 100644 index 000000000000..951a055441e3 --- /dev/null +++ b/code/modules/faction/faction_datum.dm @@ -0,0 +1,6 @@ +/* +/datum/faction + var/name + var/short_name + var/datum/datacore/linked_datacore +*/ From c0f6deb7000a71abd423e8be1e3dcc78ef527fb3 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Mon, 24 Jun 2024 16:28:51 -0500 Subject: [PATCH 02/13] test cargo faction split up --- .../crates_lockers/crates/wooden.dm | 39 ++++++++ .../cargo/packs/company/hunters_pride.dm | 95 +++++++++++++++++++ code/modules/cargo/packs/gun.dm | 85 ----------------- code/modules/jobs/access.dm | 8 +- shiptest.dme | 1 + 5 files changed, 136 insertions(+), 92 deletions(-) create mode 100644 code/modules/cargo/packs/company/hunters_pride.dm diff --git a/code/game/objects/structures/crates_lockers/crates/wooden.dm b/code/game/objects/structures/crates_lockers/crates/wooden.dm index d5f9de4deb86..223ae6ae8f35 100644 --- a/code/game/objects/structures/crates_lockers/crates/wooden.dm +++ b/code/game/objects/structures/crates_lockers/crates/wooden.dm @@ -20,3 +20,42 @@ new /obj/item/pneumatic_cannon/pie(src) new /obj/item/reagent_containers/food/snacks/pie/cream(src) new /obj/item/storage/crayons(src) + +/obj/structure/closet/crate/wooden/sealed + name = "sealed wooden crate" + desc= "crowbar it" + +/obj/structure/closet/crate/wooden/sealed/attack_hand(mob/user) + add_fingerprint(user) + if(manifest) + tear_manifest(user) + else + to_chat(user, "You need a crowbar to pry this open!") + +/obj/structure/closet/crate/wooden/sealed/attackby(obj/item/W, mob/user, params) + if(W.tool_behaviour == TOOL_CROWBAR) + if(manifest) + tear_manifest(user) + + user.visible_message( + "[user] pries \the [src] open.", \ + "You pry open \the [src].", \ + "You hear splitting wood.") + playsound(src.loc, 'sound/weapons/slashmiss.ogg', 75, TRUE) + + var/turf/T = get_turf(src) + for(var/i in 1 to material_drop_amount) + new material_drop(src) + for(var/atom/movable/AM in contents) + AM.forceMove(T) + + qdel(src) + + else + if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it. + return ..() //Stops it from opening and turning invisible when items are used on it. + + else + to_chat(user, "You need a crowbar to pry this open!") + return FALSE //Just stop. Do nothing. Don't turn into an invisible sprite. Don't open like a locker. + //The large crate has no non-attack interactions other than the crowbar, anyway. diff --git a/code/modules/cargo/packs/company/hunters_pride.dm b/code/modules/cargo/packs/company/hunters_pride.dm new file mode 100644 index 000000000000..c09dc9bb74a4 --- /dev/null +++ b/code/modules/cargo/packs/company/hunters_pride.dm @@ -0,0 +1,95 @@ +/datum/supply_pack/hunters_pride + group = MANUFACTURER_HUNTERSPRIDE + crate_type = /obj/structure/closet/crate/wooden/sealed + +/* + Pistol +*/ + +/datum/supply_pack/hunters_pride/derringer + name = ".38 Derringer Crate" + desc = "A cheap, concealable pistol manufactured by the reputable Hunter's Pride. At least it's better than a disposable pistol. Chambered in .38 rounds." + cost = 350 + contains = list(/obj/item/gun/ballistic/derringer) + crate_name = "derringer crate" + +/datum/supply_pack/hunters_pride/candors + name = "Candor Pistol Crate" + desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." + cost = 1000 + contains = list(/obj/item/gun/ballistic/automatic/pistol/candor) + +/datum/supply_pack/hunters_pride/pepperbox + name = "HP Firebrand Pepperbox Revolver Crate" + desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." + cost = 1250 + contains = list(/obj/item/gun/ballistic/revolver/firebrand) + +/datum/supply_pack/hunters_pride/detrevolver + name = "Hunter's Pride Detective Revolver Crate" + desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." + cost = 600 + contains = list(/obj/item/gun/ballistic/revolver/detective) + +/datum/supply_pack/hunters_pride/shadowrevolver + name = "Shadow Revolver Crate" + desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." + cost = 1000 + contains = list(/obj/item/gun/ballistic/revolver/shadow) + +/* + Shotguns +*/ + +/datum/supply_pack/hunters_pride/doublebarrel_shotgun + name = "Double Barrel Shotgun Crate" + desc = "For when you need to deal with 2 drunkards the old-fashioned way. Contains a double-barreled shotgun, favored by Bartenders. Warranty voided if sawed off." + cost = 1000 + contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel) + crate_name = "shotguns crate" + +/datum/supply_pack/hunters_pride/hellfire_shotgun + name = "Hellfire Shotgun Crate" + desc = "For when you need to deal with 8 hooligans. Contains a pump shotgun, with a 8-round capacity." + cost = 2000 + contains = list(/obj/item/gun/ballistic/shotgun/hellfire) + crate_name = "shotgun crate" + +/datum/supply_pack/hunters_pride/brimstone_shotgun + name = "Brimstone Shotgun Crate" + desc = "For when you need to deal with 5 hooligans, and QUICKLY. Contains a slamfire shotgun, with a 5-round capacity. Warranty voided if sawed off." + cost = 2000 + contains = list(/obj/item/gun/ballistic/shotgun/brimstone) + crate_name = "shotgun crate" + +/* + Rifle +*/ + +/datum/supply_pack/hunters_pride/winchester + name = "Flaming Arrow Lever Action Rifle Crate" + desc = "Contains an antiquated lever action rifle intended for hunting wildlife. Chambered in .38 rounds." + cost = 750 + contains = list(/obj/item/gun/ballistic/shotgun/flamingarrow) + crate_name = "rifle crate" + +/datum/supply_pack/hunters_pride/illestren + name = "Illestren Rifle Crate" + desc = "Contains an expertly made bolt action rifle intended for hunting wildlife. Chambered in 8x50mmR rounds." + cost = 1250 + contains = list(/obj/item/gun/ballistic/rifle/illestren) + crate_name = "rifle crate" + +/datum/supply_pack/hunters_pride/beacon + name = "Contender Break Action Rifle Crate" + desc = "Contains a single shot break action rifle to hunt wildlife that annoys you in particular. Chambered in devastating .45-70 rounds. Warranty voided if sawed off." + cost = 2250 + contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel/beacon) + crate_name = "rifle crate" + +/datum/supply_pack/hunters_pride/scout + name = "Scout Sniper Rifle Crate" + desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." + cost = 5500 + contains = list(/obj/item/gun/ballistic/rifle/scout) + crate_name = "rifle crate" diff --git a/code/modules/cargo/packs/gun.dm b/code/modules/cargo/packs/gun.dm index 7fe9e9aa8a11..25bb6ed3ee0b 100644 --- a/code/modules/cargo/packs/gun.dm +++ b/code/modules/cargo/packs/gun.dm @@ -13,13 +13,6 @@ contains = list(/obj/item/gun/ballistic/automatic/pistol/disposable) crate_name = "disposable gun crate" -/datum/supply_pack/gun/derringer - name = ".38 Derringer Crate" - desc = "A cheap, concealable pistol manufactured by the reputable Hunter's Pride. At least it's better than a disposable pistol. Chambered in .38 rounds." - cost = 350 - contains = list(/obj/item/gun/ballistic/derringer) - crate_name = "derringer crate" - /datum/supply_pack/gun/commanders name = "Commander Pistol Crate" desc = "Contains a modified Candor 'Commander' pistol, produced by Nanotrasen and chambered in 9mm." @@ -32,31 +25,6 @@ cost = 1000 contains = list(/obj/item/gun/ballistic/automatic/pistol) -/datum/supply_pack/gun/candors - name = "Candor Pistol Crate" - desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." - cost = 1000 - contains = list(/obj/item/gun/ballistic/automatic/pistol/candor) - -/datum/supply_pack/gun/pepperbox - name = "HP Firebrand Pepperbox Revolver Crate" - desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." - cost = 1250 - contains = list(/obj/item/gun/ballistic/revolver/firebrand) - -/datum/supply_pack/gun/detrevolver - name = "Hunter's Pride Detective Revolver Crate" - desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." - cost = 600 - contains = list(/obj/item/gun/ballistic/revolver/detective) - -/datum/supply_pack/gun/shadowrevolver - name = "Shadow Revolver Crate" - desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." - cost = 1000 - contains = list(/obj/item/gun/ballistic/revolver/shadow) - - /* Energy */ @@ -105,63 +73,10 @@ contains = list(/obj/item/gun/energy/kalix) crate_name = "beam rifle crate" -/* - Shotguns -*/ - -/datum/supply_pack/gun/doublebarrel_shotgun - name = "Double Barrel Shotgun Crate" - desc = "For when you need to deal with 2 drunkards the old-fashioned way. Contains a double-barreled shotgun, favored by Bartenders. Warranty voided if sawed off." - cost = 1000 - contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel) - crate_name = "shotguns crate" - -/datum/supply_pack/gun/hellfire_shotgun - name = "Hellfire Shotgun Crate" - desc = "For when you need to deal with 8 hooligans. Contains a pump shotgun, with a 8-round capacity." - cost = 2000 - contains = list(/obj/item/gun/ballistic/shotgun/hellfire) - crate_name = "shotgun crate" - -/datum/supply_pack/gun/brimstone_shotgun - name = "Brimstone Shotgun Crate" - desc = "For when you need to deal with 5 hooligans, and QUICKLY. Contains a slamfire shotgun, with a 5-round capacity. Warranty voided if sawed off." - cost = 2000 - contains = list(/obj/item/gun/ballistic/shotgun/brimstone) - crate_name = "shotgun crate" - /* Rifles */ -/datum/supply_pack/gun/winchester - name = "Flaming Arrow Lever Action Rifle Crate" - desc = "Contains an antiquated lever action rifle intended for hunting wildlife. Chambered in .38 rounds." - cost = 750 - contains = list(/obj/item/gun/ballistic/shotgun/flamingarrow) - crate_name = "rifle crate" - -/datum/supply_pack/gun/illestren - name = "Illestren Rifle Crate" - desc = "Contains an expertly made bolt action rifle intended for hunting wildlife. Chambered in 8x50mmR rounds." - cost = 1250 - contains = list(/obj/item/gun/ballistic/rifle/illestren) - crate_name = "rifle crate" - -/datum/supply_pack/gun/beacon - name = "Contender Break Action Rifle Crate" - desc = "Contains a single shot break action rifle to hunt wildlife that annoys you in particular. Chambered in devastating .45-70 rounds. Warranty voided if sawed off." - cost = 2250 - contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel/beacon) - crate_name = "rifle crate" - -/datum/supply_pack/gun/scout - name = "Scout Sniper Rifle Crate" - desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." - cost = 5500 - contains = list(/obj/item/gun/ballistic/rifle/scout) - crate_name = "rifle crate" - /datum/supply_pack/gun/cobra20 name = "Cobra-20 SMG Crate" desc = "Contains a .45 submachine gun, manufactured by Scaraborough Arms and chambered in .45" diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index 550e413f1a59..9b1a913e14f1 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -184,7 +184,7 @@ ACCESS_MECH_MINING, ACCESS_MECH_ENGINE, ACCESS_MECH_SCIENCE, ACCESS_MECH_SECURITY, ACCESS_MECH_MEDICAL, ACCESS_VAULT, ACCESS_MINING_STATION, ACCESS_XENOBIOLOGY, ACCESS_CE, ACCESS_HOP, ACCESS_HOS, ACCESS_PHARMACY, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, ACCESS_MINISAT, ACCESS_NETWORK, ACCESS_CLONING, ACCESS_SOLGOV - ) //WS Edit - SolGov Rep + ) /proc/get_all_centcom_access() return list(ACCESS_CENT_GENERAL, ACCESS_CENT_THUNDER, ACCESS_CENT_SPECOPS, ACCESS_CENT_MEDICAL, ACCESS_CENT_LIVING, ACCESS_CENT_STORAGE, ACCESS_CENT_TELEPORTER, ACCESS_CENT_CAPTAIN) @@ -375,13 +375,10 @@ return "Science Mech Access" if(ACCESS_MECH_ENGINE) return "Engineering Mech Access" - -//WS Begin if(ACCESS_CLONING) return "Cloning Room" if(ACCESS_SOLGOV) return "SolGov Office" -//WS End /proc/get_centcom_access_desc(A) switch(A) @@ -410,8 +407,5 @@ "Atmospheric Technician", "Chief Medical Officer", "Medical Doctor", "Chemist", "Geneticist", "Virologist", "Paramedic", "Prisoner", "Psychologist", //WS Edit - Brig Phys / SolGov Rep "Research Director", "Scientist", "Roboticist", "Head of Security", "Warden", "Detective", "Security Officer", "Brig Physician", "SolGov Representative") //WS Edit - Brig Phys / SolGov Rep -/proc/get_all_job_icons() //For all existing HUD icons - return get_all_jobs() + list("Emergency Response Team Commander", "Security Response Officer", "Engineering Response Officer", "Medical Response Officer", "Entertainment Response Officer", "Religious Response Officer", "Janitorial Response Officer", "Death Commando") - /proc/get_all_centcom_jobs() return list("Central Command","VIP Guest","Custodian","Thunderdome Overseer","CentCom Official","Medical Officer","Research Officer","Special Ops Officer","Admiral","CentCom Commander","CentCom Bartender","Private Security Force") diff --git a/shiptest.dme b/shiptest.dme index b29930a658ee..810d4d25c446 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1937,6 +1937,7 @@ #include "code\modules\cargo\packs\spacesuit_armor.dm" #include "code\modules\cargo\packs\tools.dm" #include "code\modules\cargo\packs\vendor_refill.dm" +#include "code\modules\cargo\packs\company\hunters_pride.dm" #include "code\modules\chatter\chatter.dm" #include "code\modules\client\client_colour.dm" #include "code\modules\client\client_defines.dm" From 31669596127bc833da69fc3f2eaca3d48dad90ea Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Wed, 26 Jun 2024 11:22:22 -0500 Subject: [PATCH 03/13] commited from my phone lol --- _maps/configs/independent_beluga.json | 1 + _maps/configs/independent_box.json | 1 + _maps/configs/independent_bubble.json | 1 + _maps/configs/independent_dwayne.json | 1 + _maps/configs/independent_junker.json | 1 + _maps/configs/independent_kilo.json | 1 + _maps/configs/independent_lagoon.json | 1 + _maps/configs/independent_mudskipper.json | 1 + _maps/configs/independent_rigger.json | 1 + _maps/configs/independent_schmiedeberg.json | 1 + _maps/configs/independent_shetland.json | 1 + _maps/configs/independent_sunskipper.json | 1 + _maps/configs/independent_tranquility.json | 1 + _maps/configs/inteq_colossus.json | 1 + _maps/configs/inteq_hound.json | 1 + _maps/configs/inteq_talos.json | 1 + _maps/configs/inteq_valor.json | 1 + _maps/configs/inteq_vaquero.json | 1 + _maps/configs/nanotrasen_delta.json | 1 + _maps/configs/nanotrasen_gecko.json | 1 + _maps/configs/nanotrasen_heron.json | 1 + _maps/configs/nanotrasen_meta.json | 1 + _maps/configs/nanotrasen_mimir.json | 1 + _maps/configs/nanotrasen_osprey.json | 1 + _maps/configs/nanotrasen_ranger.json | 3 +- _maps/configs/nanotrasen_skipper.json | 1 + _maps/configs/pgf_crying_sun.json | 1 + _maps/configs/pirate_libertatia.json | 1 + _maps/configs/pirate_noderider.json | 1 + _maps/configs/pirate_tortuga.json | 1 + _maps/configs/solgov_chronicle.json | 1 + _maps/configs/solgov_inkwell.json | 1 + _maps/configs/solgov_paracelsus.json | 1 + _maps/configs/srm_elder.json | 1 + _maps/configs/syndicate_aegis.json | 1 + .../configs/syndicate_cybersun_kansatsu.json | 1 + _maps/configs/syndicate_gorlex_hyena.json | 1 + _maps/configs/syndicate_gorlex_komodo.json | 1 + _maps/configs/syndicate_litieguai.json | 1 + _maps/configs/syndicate_twinkleshine.json | 1 + _maps/example_ship_config.json | 1 + _maps/ship_config_schema.json | 5 ++ code/__HELPERS/names.dm | 28 -------- code/controllers/subsystem/faction.dm | 25 ++++++++ code/controllers/subsystem/mapping.dm | 2 +- code/modules/faction/faction_datum.dm | 64 +++++++++++++++++-- .../mob/dead/new_player/ship_select.dm | 2 +- shiptest.dme | 2 + 48 files changed, 136 insertions(+), 35 deletions(-) create mode 100644 code/controllers/subsystem/faction.dm diff --git a/_maps/configs/independent_beluga.json b/_maps/configs/independent_beluga.json index 6d7926a8e845..2c10f249a582 100644 --- a/_maps/configs/independent_beluga.json +++ b/_maps/configs/independent_beluga.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Beluga-class Transport", + "faction": "/datum/faction/independant", "prefix": "SV", "namelists": ["CRUISE", "NATURAL"], "map_short_name": "Beluga-class", diff --git a/_maps/configs/independent_box.json b/_maps/configs/independent_box.json index 14133f03f5bb..0a864166b37d 100644 --- a/_maps/configs/independent_box.json +++ b/_maps/configs/independent_box.json @@ -12,6 +12,7 @@ "SPACE", "NATURAL" ], + "faction": "/datum/faction/independant", "prefix": "IMV", "job_slots": { "Chief Medical Officer": { diff --git a/_maps/configs/independent_bubble.json b/_maps/configs/independent_bubble.json index f63aca854e8b..8e949450d9d6 100644 --- a/_maps/configs/independent_bubble.json +++ b/_maps/configs/independent_bubble.json @@ -12,6 +12,7 @@ "GENERAL", "SPACE" ], + "faction": "/datum/faction/independant", "prefix": "ISV", "limit": 1, "job_slots": { diff --git a/_maps/configs/independent_dwayne.json b/_maps/configs/independent_dwayne.json index 64f68af68752..61e6dc0314c9 100644 --- a/_maps/configs/independent_dwayne.json +++ b/_maps/configs/independent_dwayne.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Mark.II Dwayne-class Long Range Mining Transport", + "faction": "/datum/faction/independant", "prefix": "ISV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_junker.json b/_maps/configs/independent_junker.json index bd7807a02bb4..df15ae77ad54 100644 --- a/_maps/configs/independent_junker.json +++ b/_maps/configs/independent_junker.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Junker-class Salvaged Ship", + "faction": "/datum/faction/independant", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_kilo.json b/_maps/configs/independent_kilo.json index b1304f2e78bb..5ca2ee32471d 100644 --- a/_maps/configs/independent_kilo.json +++ b/_maps/configs/independent_kilo.json @@ -5,6 +5,7 @@ "tags": [ "Generalist" ], + "faction": "/datum/faction/independant", "prefix": "ISV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_lagoon.json b/_maps/configs/independent_lagoon.json index 313b4cd71d95..06b4de157caa 100644 --- a/_maps/configs/independent_lagoon.json +++ b/_maps/configs/independent_lagoon.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Lagoon-class Cruise Ship", + "faction": "/datum/faction/independant", "prefix": "SV", "description": "An unusual sight in the relatively impoverished Frontier, the Lagoon-class is a large pleasure vessel dedicated to transporting its passengers to any number of exotic locales. Lagoons found on the Frontier tend to contain crews and passengers of a particularly daring – or foolhardy – character, willing to pay out the nose for a tour of some of the most dangerous regions in known space. Accordingly, Lagoons in these regions typically include a small but respectably equipped security contingent to protect (and, when necessary, rein in) the passengers, and come with a surprisingly powerful thermo-electric generator to move the ship’s prodigious bulk across vast expanses of space.", "tags": [ diff --git a/_maps/configs/independent_mudskipper.json b/_maps/configs/independent_mudskipper.json index 9f4cf32e0cf8..b8d641410b75 100644 --- a/_maps/configs/independent_mudskipper.json +++ b/_maps/configs/independent_mudskipper.json @@ -2,6 +2,7 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Mudskipper-class Salvage Clipper", "map_short_name": "Mudskipper-class", + "faction": "/datum/faction/independant", "prefix": "ISV", "description": "One of the cheapest (and yet, inexplicably popular) offerings from Miskilamo Spacefaring, the Mudskipper-class is a vessel purpose-built for enterprising scrappers and looters looking to salvage bombed-out ruins and harvest boatloads of materials. Featuring a diverse set of multipurpose rooms, a charitable supply of EVA/ruin raiding equipment, and a set of anti-radiation gear for dealing with industrial accidents, the Mudskipper-class just keeps on chuggin’!", "tags": [ diff --git a/_maps/configs/independent_rigger.json b/_maps/configs/independent_rigger.json index e36b57ca750a..a4f39e75a1ae 100644 --- a/_maps/configs/independent_rigger.json +++ b/_maps/configs/independent_rigger.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Riggs-class Sloop", + "faction": "/datum/faction/independant", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_schmiedeberg.json b/_maps/configs/independent_schmiedeberg.json index d7dd360bb1e4..4fb554e076b5 100644 --- a/_maps/configs/independent_schmiedeberg.json +++ b/_maps/configs/independent_schmiedeberg.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Schmiedeberg-class Pharmacology Ship", + "faction": "/datum/faction/independant", "prefix": "IMV", "map_short_name": "Schmiedeberg-class", "description": "Interested in pharmacological science, but tired of sitting in front of a chemistry dispenser and pushing buttons all day? Eager to combine the culinary arts with the narcotic ones? Hoping to combine all of these qualities with the most important activity of all: making fat stacks of dosh? Then the Schmiedeberg-class is for you! Host to a robust ghetto chemistry lab, a high-efficiency botanical set-up and a complete kitchen-and-storefront, the Schmiedeberg is perfect for back-alley chemists and botanists everywhere.", diff --git a/_maps/configs/independent_shetland.json b/_maps/configs/independent_shetland.json index de5873f80d75..dea4e8d72c97 100644 --- a/_maps/configs/independent_shetland.json +++ b/_maps/configs/independent_shetland.json @@ -1,5 +1,6 @@ { "map_name": "Shetland-class Multipurpose Frigate", + "faction": "/datum/faction/independant", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_sunskipper.json b/_maps/configs/independent_sunskipper.json index 08a4a56f9fde..3cbaee5a270b 100644 --- a/_maps/configs/independent_sunskipper.json +++ b/_maps/configs/independent_sunskipper.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Sunskipper-class Culinary Vessel", + "faction": "/datum/faction/independant", "prefix": "ISV", "namelists": ["CRUISE", "NATURAL"], "map_short_name": "Sunskipper-class", diff --git a/_maps/configs/independent_tranquility.json b/_maps/configs/independent_tranquility.json index 07236d5e4568..7837df763fc0 100644 --- a/_maps/configs/independent_tranquility.json +++ b/_maps/configs/independent_tranquility.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Tranquility-class Flying Apartment Complex", + "faction": "/datum/faction/independant", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/inteq_colossus.json b/_maps/configs/inteq_colossus.json index 29337cb015a2..b9941d4a84bc 100644 --- a/_maps/configs/inteq_colossus.json +++ b/_maps/configs/inteq_colossus.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Colossus-class Armored Frigate", + "faction": "/datum/faction/inteq", "prefix": "IRMV", "description": "The mainstay of Inteq’s mercenary fleet, the Colossus is a professionally-militarized freighter like most of Inteq’s ships, and is designed to operate independently for some time, serving IRMG’s interests and providing vital mercenary services wherever they are needed. Key features include a secure and well-stocked armory and ample crew space, as well as a spacious cargo bay, which crews often refurbish into additional recreational or training space.", "tags": [ diff --git a/_maps/configs/inteq_hound.json b/_maps/configs/inteq_hound.json index cad19884158f..9f39357e0d73 100644 --- a/_maps/configs/inteq_hound.json +++ b/_maps/configs/inteq_hound.json @@ -1,5 +1,6 @@ { "map_name": "Hound-class Corvette", + "faction": "/datum/faction/inteq", "prefix": "IRMV", "namelists": [ "MYTHOLOGICAL", diff --git a/_maps/configs/inteq_talos.json b/_maps/configs/inteq_talos.json index e65253ad3239..3946593fb91b 100644 --- a/_maps/configs/inteq_talos.json +++ b/_maps/configs/inteq_talos.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Talos-class Command Clipper", + "faction": "/datum/faction/inteq", "prefix": "IRMV", "description": "The Talos is a command and support ship, and a rare example of a purpose-built Inteq ship. Outfitted with an abundance of construction and engineering equipment and a private bluespace communications suite capable of networking IRMG ships across any given system, Taloses are often the lynchpin of coordinated IRMG operations in a system, and offer construction and repair services as part of IRMG’s mercenary offerings. As Talos crews place a larger emphasis on support personnel, they tend to be less well-armed than other Inteq crews. One unusual feature of the Talos is its depressurized “wings” filled with redundant baffles, intended to provide extra durability in the case of impacts or weapons fire. They also double as auxiliary storage space and potential room for modification by their enterprising Artificer crews.", "tags": [ diff --git a/_maps/configs/inteq_valor.json b/_maps/configs/inteq_valor.json index 92162ac1a5da..8c7412180bb0 100644 --- a/_maps/configs/inteq_valor.json +++ b/_maps/configs/inteq_valor.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Valor-Class Field Care Cruiser", + "faction": "/datum/faction/inteq", "prefix": "IRMV", "description": "The Valor is the dedicated medical vessel of the Inteq fleet, suitable for treatment both for Inteq combat casualties, or paid treatment of outsiders. It's equipped with high-end medical equipment and a small ambulance for patient transport for this purpose.", "tags": ["Medical", "Subshuttle"], diff --git a/_maps/configs/inteq_vaquero.json b/_maps/configs/inteq_vaquero.json index e8d790a526dc..e08f6ed7d910 100644 --- a/_maps/configs/inteq_vaquero.json +++ b/_maps/configs/inteq_vaquero.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Vaquero-class Light Frigate", + "faction": "/datum/faction/inteq", "prefix": "IRMV", "description": "The Vaquero is a flexible and cheap military conversion of a light commercial freighter, widely used by Inteq Risk Management Group for picket, reconnaissance, and light escort duty, or for contracts that don't warrant a larger, more specialized ship. Unlike most Inteq ships, the Vaquero features basic medical, engineering, and military equipment all in one package, and its minimal crew requirements are an excellent fit for Vanguards with a smaller command and for training missions. Like its peers, it features a large cargo bay, which can be reconfigured as needed.", "tags": [ diff --git a/_maps/configs/nanotrasen_delta.json b/_maps/configs/nanotrasen_delta.json index 57e920f77d67..cbc8c513446e 100644 --- a/_maps/configs/nanotrasen_delta.json +++ b/_maps/configs/nanotrasen_delta.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Delta-class Frigate", + "faction": "/datum/faction/nt", "prefix": "NSSV", "namelists": [ "GENERAL", diff --git a/_maps/configs/nanotrasen_gecko.json b/_maps/configs/nanotrasen_gecko.json index 9ba0672f03db..6c3424272282 100644 --- a/_maps/configs/nanotrasen_gecko.json +++ b/_maps/configs/nanotrasen_gecko.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Gecko-class Salvage Runner", + "faction": "/datum/faction/nt", "prefix": "NTSV", "namelists": [ "NANOTRASEN", diff --git a/_maps/configs/nanotrasen_heron.json b/_maps/configs/nanotrasen_heron.json index 80bf87c0cd15..72fccb1daffe 100644 --- a/_maps/configs/nanotrasen_heron.json +++ b/_maps/configs/nanotrasen_heron.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/nt", "prefix": "NTSV", "namelists": ["WEAPONS"], "map_name": "Heron-Class Dreadnaught", diff --git a/_maps/configs/nanotrasen_meta.json b/_maps/configs/nanotrasen_meta.json index b4287c3bca3b..207a6a89864b 100644 --- a/_maps/configs/nanotrasen_meta.json +++ b/_maps/configs/nanotrasen_meta.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Meta-class Freighter", + "faction": "/datum/faction/nt", "prefix": "NTSV", "map_short_name": "Meta-class", "description": "The Meta-class is a medium freight vessel designed for comfort and sustainability over long journeys of delivering cargo. Most, if not all of these ships are no longer under the direct management of the Company, leaving regulation and professionalism at the behest of individual captains. They can be found running independent contracts, delivering cargo, smuggling illicit goods, and generally trying to stay afloat ever since the collapse of Nanotrasen's operations in the frontier.", diff --git a/_maps/configs/nanotrasen_mimir.json b/_maps/configs/nanotrasen_mimir.json index db7d8b90d198..4f50f429e210 100644 --- a/_maps/configs/nanotrasen_mimir.json +++ b/_maps/configs/nanotrasen_mimir.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/nt", "prefix": "NTSV", "namelists": [ "NANOTRASEN", diff --git a/_maps/configs/nanotrasen_osprey.json b/_maps/configs/nanotrasen_osprey.json index 7e0804a7f203..473389fce14f 100644 --- a/_maps/configs/nanotrasen_osprey.json +++ b/_maps/configs/nanotrasen_osprey.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Osprey-class Exploration Cruiser", + "faction": "/datum/faction/nt", "prefix": "NTSV", "namelists": [ "NANOTRASEN", diff --git a/_maps/configs/nanotrasen_ranger.json b/_maps/configs/nanotrasen_ranger.json index b4af3e797d39..d9c2e207e4d9 100644 --- a/_maps/configs/nanotrasen_ranger.json +++ b/_maps/configs/nanotrasen_ranger.json @@ -1,7 +1,8 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", - "prefix": "NTSV", "map_name": "Ranger-class Aid Vessel", + "faction": "/datum/faction/nt", + "prefix": "NTSV", "namelists": [ "NANOTRASEN", "NATURAL_AGGRESSIVE", diff --git a/_maps/configs/nanotrasen_skipper.json b/_maps/configs/nanotrasen_skipper.json index 2f61c3afa601..a64c4c777342 100644 --- a/_maps/configs/nanotrasen_skipper.json +++ b/_maps/configs/nanotrasen_skipper.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Skipper-class Heavy Cruiser", + "faction": "/datum/faction/nt", "map_short_name": "Skipper-class", "prefix": "NTSV", "namelists": [ diff --git a/_maps/configs/pgf_crying_sun.json b/_maps/configs/pgf_crying_sun.json index d4eb67b1fb50..c2b5242a9f89 100644 --- a/_maps/configs/pgf_crying_sun.json +++ b/_maps/configs/pgf_crying_sun.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/pgf", "prefix": "PGFN", "map_name": "Crying Sun-class Light Frigate", "namelists": [ diff --git a/_maps/configs/pirate_libertatia.json b/_maps/configs/pirate_libertatia.json index 4ed426746512..9a77cc2c5dec 100644 --- a/_maps/configs/pirate_libertatia.json +++ b/_maps/configs/pirate_libertatia.json @@ -7,6 +7,7 @@ "tags": [ "Combat" ], + "faction": "/datum/faction/frontier", "prefix": "ISV", "namelists": [ "PIRATES", diff --git a/_maps/configs/pirate_noderider.json b/_maps/configs/pirate_noderider.json index 7863a9d96896..60ce1a8501a6 100644 --- a/_maps/configs/pirate_noderider.json +++ b/_maps/configs/pirate_noderider.json @@ -2,6 +2,7 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Jupiter-class Stormrider", "map_short_name": "Jupiter-class", + "faction": "/datum/faction/frontier", "prefix": "ISV", "namelists": [ "INSTALLATION", diff --git a/_maps/configs/pirate_tortuga.json b/_maps/configs/pirate_tortuga.json index 702185c02387..6543d349bad9 100644 --- a/_maps/configs/pirate_tortuga.json +++ b/_maps/configs/pirate_tortuga.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Tortuga-class Converted Cargo Freighter", + "faction": "/datum/faction/frontier", "prefix": "ISV", "namelists": [ "PIRATES", diff --git a/_maps/configs/solgov_chronicle.json b/_maps/configs/solgov_chronicle.json index 9fe11023e376..b1b14f281938 100644 --- a/_maps/configs/solgov_chronicle.json +++ b/_maps/configs/solgov_chronicle.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Chronicle-class Sensor Frigate", + "faction": "/datum/faction/solgov", "prefix": "SCSV", "namelists": [ "SOLGOV", diff --git a/_maps/configs/solgov_inkwell.json b/_maps/configs/solgov_inkwell.json index b7ae54a1b6b9..92c1f80075f3 100644 --- a/_maps/configs/solgov_inkwell.json +++ b/_maps/configs/solgov_inkwell.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Inkwell-class Supply Freighter", + "faction": "/datum/faction/solgov", "prefix": "SCSV", "namelists": [ "SOLGOV", diff --git a/_maps/configs/solgov_paracelsus.json b/_maps/configs/solgov_paracelsus.json index a5eefc5296df..0e9695952e16 100644 --- a/_maps/configs/solgov_paracelsus.json +++ b/_maps/configs/solgov_paracelsus.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Paracelsus-class Medical Corvette", + "faction": "/datum/faction/solgov", "prefix": "SCSV", "namelists": [ "SOLGOV", diff --git a/_maps/configs/srm_elder.json b/_maps/configs/srm_elder.json index 03caf7196183..6fffaff63e2b 100644 --- a/_maps/configs/srm_elder.json +++ b/_maps/configs/srm_elder.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Elder-class Montagnes' Vessel", + "faction": "/datum/faction/srm", "prefix": "SRSV", "namelists": [ "SAINT-ROUMAIN", diff --git a/_maps/configs/syndicate_aegis.json b/_maps/configs/syndicate_aegis.json index 5946a8e78343..fd224dfa87e5 100644 --- a/_maps/configs/syndicate_aegis.json +++ b/_maps/configs/syndicate_aegis.json @@ -1,4 +1,5 @@ { + "faction": "/datum/faction/syndicate/suns", "prefix": "SUNS", "map_name": "Aegis-class Long Term Care Ship", "map_short_name": "Aegis-class", diff --git a/_maps/configs/syndicate_cybersun_kansatsu.json b/_maps/configs/syndicate_cybersun_kansatsu.json index a9c9fcb94349..9bcdd349693f 100644 --- a/_maps/configs/syndicate_cybersun_kansatsu.json +++ b/_maps/configs/syndicate_cybersun_kansatsu.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/syndicate", "prefix": "CSSV", "namelists": [ "CYBERSUN", diff --git a/_maps/configs/syndicate_gorlex_hyena.json b/_maps/configs/syndicate_gorlex_hyena.json index a835e00b1eba..c17c651a4736 100644 --- a/_maps/configs/syndicate_gorlex_hyena.json +++ b/_maps/configs/syndicate_gorlex_hyena.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/syndicate", "prefix": "NGRV", "namelists": [ "GORLEX", diff --git a/_maps/configs/syndicate_gorlex_komodo.json b/_maps/configs/syndicate_gorlex_komodo.json index 2bc7a358b754..ca72d5b0eef5 100644 --- a/_maps/configs/syndicate_gorlex_komodo.json +++ b/_maps/configs/syndicate_gorlex_komodo.json @@ -1,4 +1,5 @@ { + "faction": "/datum/faction/syndicate", "prefix": "ISV", "namelists": [ "GORLEX", diff --git a/_maps/configs/syndicate_litieguai.json b/_maps/configs/syndicate_litieguai.json index 685a53187422..44f452e8fed2 100644 --- a/_maps/configs/syndicate_litieguai.json +++ b/_maps/configs/syndicate_litieguai.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Li Tieguai-class Rescue Ship", + "faction": "/datum/faction/syndicate", "prefix": "CSSV", "map_short_name": "Li Tieguai-class", "description": "A small, nimble, and exceptionally well-built medical response vessel, the Li Tieguai is a recent addition to Cybersun’s fleet, forming a critical component of their Frontier stabilization program. Li Tieguais come equipped with high-end medical equipment, including a selection of Cybersun augments and prosthetics, as well as weaponry and armor sufficient to protect its personnel in the often-dangerous Frontier sectors, so that they can offer premium healthcare (at premium prices) in even the most dangerous of scenarios.", diff --git a/_maps/configs/syndicate_twinkleshine.json b/_maps/configs/syndicate_twinkleshine.json index ef84cca126f5..b1be2eb333d8 100644 --- a/_maps/configs/syndicate_twinkleshine.json +++ b/_maps/configs/syndicate_twinkleshine.json @@ -1,5 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", + "faction": "/datum/faction/syndicate", "prefix": "SSV", "namelists": [ "GORLEX", diff --git a/_maps/example_ship_config.json b/_maps/example_ship_config.json index 7c34d7bc6841..2051e16fea06 100644 --- a/_maps/example_ship_config.json +++ b/_maps/example_ship_config.json @@ -2,6 +2,7 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Example-class Experimental Ship", "map_short_name": "Test-class", + "faction": "/datum/faction/independant", "prefix": "STSV", "namelists": ["GENERAL", "SPACE", "MYTHOLOGICAL", "WEAPONS"], "map_path": "_maps/shuttles/shiptest/null.dmm", diff --git a/_maps/ship_config_schema.json b/_maps/ship_config_schema.json index 2afd8e065170..b9fc39587e59 100644 --- a/_maps/ship_config_schema.json +++ b/_maps/ship_config_schema.json @@ -28,6 +28,11 @@ "type": "array", "description": "A list of tags describing the ship's niche, converted into searchable strings." }, + "faction": { + "title": "Ship Faction Datum", + "type": [ "null", "string" ], + "description": "Default faction datum" + }, "prefix": { "title": "Ship Default Prefix", "type": [ "null", "string" ], diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index 7054c051f707..c889b5c9d495 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -262,31 +262,3 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) #define PREFIX_FRONTIER list("FFV") #define PREFIX_PGF list("PGF", "PGFMC", "PGFN") #define PREFIX_INDEPENDENT list("SV", "IMV", "ISV") - -/// List of all ship factions to their prefixes. -GLOBAL_LIST_INIT(ship_faction_to_prefixes, list( - FACTION_SYNDICATE = PREFIX_SYNDICATE, - FACTION_NGR = PREFIX_NGR, - FACTION_CYBERSUN = PREFIX_CYBERSUN, - FACTION_SUNS = PREFIX_SUNS, - FACTION_SOLGOV = PREFIX_SOLGOV, - FACTION_SRM = PREFIX_SRM, - FACTION_INTEQ = PREFIX_INTEQ, - FACTION_CLIP = PREFIX_CLIP, - FACTION_NT = PREFIX_NT, - FACTION_NS_LOGI = PREFIX_NS_LOGI, - FACTION_VIGILITAS = PREFIX_VIGILITAS, - FACTION_FRONTIER = PREFIX_FRONTIER, - FACTION_PGF = PREFIX_PGF, - FACTION_INDEPENDENT = PREFIX_INDEPENDENT -)) - -/proc/ship_prefix_to_faction(prefix) - for(var/faction in GLOB.ship_faction_to_prefixes) - if(prefix in GLOB.ship_faction_to_prefixes[faction]) - return faction - var/static/list/screamed = list() - if(!(prefix in screamed)) - screamed += prefix - stack_trace("attempted to get faction for unknown prefix [prefix]") - return "?!ERR!?" diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm new file mode 100644 index 000000000000..80c39852f95d --- /dev/null +++ b/code/controllers/subsystem/faction.dm @@ -0,0 +1,25 @@ +SUBSYSTEM_DEF(factions) + name = "Faction" + init_order = INIT_ORDER_EVENTS + flags = SS_NO_FIRE + var/list/datum/faction/factions = list() + +/datum/controller/subsystem/factions/Initialize(timeofday) + for(var/path in subtypesof(/datum/faction)) + factions += new path() + +/datum/controller/subsystem/factions/proc/ship_prefix_to_faction(prefix) + for(var/datum/faction/faction in factions) + if(prefix in faction.prefixes) + return faction + var/static/list/screamed = list() + if(!(prefix in screamed)) + screamed += prefix + stack_trace("attempted to get faction for unknown prefix [prefix]") + return null + +/datum/controller/subsystem/factions/proc/ship_prefix_to_name(prefix) + var/datum/faction/faction = ship_prefix_to_faction(prefix) + if(faction) + return faction.name + return "?!ERR!?" diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 03720e4d641f..dc5d93159592 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -187,7 +187,7 @@ SUBSYSTEM_DEF(mapping) if(istext(data["faction_name"])) S.faction_name = data["faction_name"] else - S.faction_name = ship_prefix_to_faction(S.prefix) + S.faction_name = SSfactions.ship_prefix_to_name(S.prefix) S.category = S.faction_name diff --git a/code/modules/faction/faction_datum.dm b/code/modules/faction/faction_datum.dm index 951a055441e3..450ee9688953 100644 --- a/code/modules/faction/faction_datum.dm +++ b/code/modules/faction/faction_datum.dm @@ -1,6 +1,62 @@ -/* /datum/faction var/name - var/short_name - var/datum/datacore/linked_datacore -*/ + var/parent_faction + var/list/prefixes + +/datum/faction/syndicate + name = FACTION_SYNDICATE + parent_faction = /datum/faction/syndicate + prefixes = list("SEV", "SSV") + +/datum/faction/syndicate/ngr + name = FACTION_NGR + prefixes = list("NGRV") + +/datum/faction/syndicate/cybersun + name = FACTION_CYBERSUN + prefixes = list("CSSV") + +/datum/faction/syndicate/suns + name = FACTION_SUNS + prefixes = list("SUNS") + +/datum/faction/solgov + name = FACTION_SOLGOV + prefixes = list("SCSV") + +/datum/faction/srm + name = FACTION_SRM + prefixes = list("SRSV") + +/datum/faction/inteq + name = FACTION_INTEQ + prefixes = list("IRMV") + +/datum/faction/clip + name = FACTION_CLIP + prefixes = list("CMSV", "CMGSV") + +/datum/faction/nt + name = FACTION_NT + parent_faction = /datum/faction/nt + prefixes = list("NTSV") + +/datum/faction/nt/ns_logi + name = FACTION_NS_LOGI + prefixes = list("NSSV") + +/datum/faction/nt/vigilitas + name = FACTION_VIGILITAS + prefixes = list("VISV") + +/datum/faction/frontier + name = FACTION_FRONTIER + prefixes = list("FFV") + +/datum/faction/pgf + name = FACTION_PGF + prefixes = list("PGF", "PGFMC", "PGFN") + +/datum/faction/independent + name = FACTION_INDEPENDENT + prefixes = list("SV", "IMV", "ISV") diff --git a/code/modules/mob/dead/new_player/ship_select.dm b/code/modules/mob/dead/new_player/ship_select.dm index fe88abdf3399..c3ed554f196c 100644 --- a/code/modules/mob/dead/new_player/ship_select.dm +++ b/code/modules/mob/dead/new_player/ship_select.dm @@ -166,7 +166,7 @@ continue var/list/ship_data = list( "name" = T.name, - "faction" = ship_prefix_to_faction(T.prefix), + "faction" = SSfactions.ship_prefix_to_name(T.prefix), "desc" = T.description, "tags" = T.tags, "crewCount" = length(T.job_slots), diff --git a/shiptest.dme b/shiptest.dme index 810d4d25c446..7d8d7abaad4c 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -321,6 +321,7 @@ #include "code\controllers\subsystem\economy.dm" #include "code\controllers\subsystem\events.dm" #include "code\controllers\subsystem\explosions.dm" +#include "code\controllers\subsystem\faction.dm" #include "code\controllers\subsystem\fire_burning.dm" #include "code\controllers\subsystem\garbage.dm" #include "code\controllers\subsystem\icon_smooth.dm" @@ -2145,6 +2146,7 @@ #include "code\modules\events\wizard\rpgloot.dm" #include "code\modules\events\wizard\shuffle.dm" #include "code\modules\events\wizard\summons.dm" +#include "code\modules\faction\faction_datum.dm" #include "code\modules\fishing\bait.dm" #include "code\modules\fishing\fish_catalog.dm" #include "code\modules\fishing\fishing_equipment.dm" From 80caf31dced9ace501dc142d314fd885f8d5ec07 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 11:25:21 -0500 Subject: [PATCH 04/13] revert that --- .../cargo/packs/company/hunters_pride.dm | 95 ------------------- shiptest.dme | 1 - 2 files changed, 96 deletions(-) delete mode 100644 code/modules/cargo/packs/company/hunters_pride.dm diff --git a/code/modules/cargo/packs/company/hunters_pride.dm b/code/modules/cargo/packs/company/hunters_pride.dm deleted file mode 100644 index c09dc9bb74a4..000000000000 --- a/code/modules/cargo/packs/company/hunters_pride.dm +++ /dev/null @@ -1,95 +0,0 @@ -/datum/supply_pack/hunters_pride - group = MANUFACTURER_HUNTERSPRIDE - crate_type = /obj/structure/closet/crate/wooden/sealed - -/* - Pistol -*/ - -/datum/supply_pack/hunters_pride/derringer - name = ".38 Derringer Crate" - desc = "A cheap, concealable pistol manufactured by the reputable Hunter's Pride. At least it's better than a disposable pistol. Chambered in .38 rounds." - cost = 350 - contains = list(/obj/item/gun/ballistic/derringer) - crate_name = "derringer crate" - -/datum/supply_pack/hunters_pride/candors - name = "Candor Pistol Crate" - desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." - cost = 1000 - contains = list(/obj/item/gun/ballistic/automatic/pistol/candor) - -/datum/supply_pack/hunters_pride/pepperbox - name = "HP Firebrand Pepperbox Revolver Crate" - desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." - cost = 1250 - contains = list(/obj/item/gun/ballistic/revolver/firebrand) - -/datum/supply_pack/hunters_pride/detrevolver - name = "Hunter's Pride Detective Revolver Crate" - desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." - cost = 600 - contains = list(/obj/item/gun/ballistic/revolver/detective) - -/datum/supply_pack/hunters_pride/shadowrevolver - name = "Shadow Revolver Crate" - desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." - cost = 1000 - contains = list(/obj/item/gun/ballistic/revolver/shadow) - -/* - Shotguns -*/ - -/datum/supply_pack/hunters_pride/doublebarrel_shotgun - name = "Double Barrel Shotgun Crate" - desc = "For when you need to deal with 2 drunkards the old-fashioned way. Contains a double-barreled shotgun, favored by Bartenders. Warranty voided if sawed off." - cost = 1000 - contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel) - crate_name = "shotguns crate" - -/datum/supply_pack/hunters_pride/hellfire_shotgun - name = "Hellfire Shotgun Crate" - desc = "For when you need to deal with 8 hooligans. Contains a pump shotgun, with a 8-round capacity." - cost = 2000 - contains = list(/obj/item/gun/ballistic/shotgun/hellfire) - crate_name = "shotgun crate" - -/datum/supply_pack/hunters_pride/brimstone_shotgun - name = "Brimstone Shotgun Crate" - desc = "For when you need to deal with 5 hooligans, and QUICKLY. Contains a slamfire shotgun, with a 5-round capacity. Warranty voided if sawed off." - cost = 2000 - contains = list(/obj/item/gun/ballistic/shotgun/brimstone) - crate_name = "shotgun crate" - -/* - Rifle -*/ - -/datum/supply_pack/hunters_pride/winchester - name = "Flaming Arrow Lever Action Rifle Crate" - desc = "Contains an antiquated lever action rifle intended for hunting wildlife. Chambered in .38 rounds." - cost = 750 - contains = list(/obj/item/gun/ballistic/shotgun/flamingarrow) - crate_name = "rifle crate" - -/datum/supply_pack/hunters_pride/illestren - name = "Illestren Rifle Crate" - desc = "Contains an expertly made bolt action rifle intended for hunting wildlife. Chambered in 8x50mmR rounds." - cost = 1250 - contains = list(/obj/item/gun/ballistic/rifle/illestren) - crate_name = "rifle crate" - -/datum/supply_pack/hunters_pride/beacon - name = "Contender Break Action Rifle Crate" - desc = "Contains a single shot break action rifle to hunt wildlife that annoys you in particular. Chambered in devastating .45-70 rounds. Warranty voided if sawed off." - cost = 2250 - contains = list(/obj/item/gun/ballistic/shotgun/doublebarrel/beacon) - crate_name = "rifle crate" - -/datum/supply_pack/hunters_pride/scout - name = "Scout Sniper Rifle Crate" - desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." - cost = 5500 - contains = list(/obj/item/gun/ballistic/rifle/scout) - crate_name = "rifle crate" diff --git a/shiptest.dme b/shiptest.dme index 810d4d25c446..b29930a658ee 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1937,7 +1937,6 @@ #include "code\modules\cargo\packs\spacesuit_armor.dm" #include "code\modules\cargo\packs\tools.dm" #include "code\modules\cargo\packs\vendor_refill.dm" -#include "code\modules\cargo\packs\company\hunters_pride.dm" #include "code\modules\chatter\chatter.dm" #include "code\modules\client\client_colour.dm" #include "code\modules\client\client_defines.dm" From 90deaa503023d9810dca6a951c0538dfcfc1b2f7 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 11:25:32 -0500 Subject: [PATCH 05/13] revert. that. --- code/modules/cargo/packs/gun.dm | 113 ++++++++++++++++++++++++++++---- 1 file changed, 99 insertions(+), 14 deletions(-) diff --git a/code/modules/cargo/packs/gun.dm b/code/modules/cargo/packs/gun.dm index 25bb6ed3ee0b..132e62bb0ada 100644 --- a/code/modules/cargo/packs/gun.dm +++ b/code/modules/cargo/packs/gun.dm @@ -9,21 +9,53 @@ /datum/supply_pack/gun/disposable name = "Disposable Gun Crate" desc = "In some sectors, these disposable pistols are the only firearms that can be legally sold for less than 200cr. That price is still far too high." - cost = 150 - contains = list(/obj/item/gun/ballistic/automatic/pistol/disposable) + cost = 300 + contains = list(/obj/item/storage/pistolcase/disposable) crate_name = "disposable gun crate" +/datum/supply_pack/gun/derringer + name = ".38 Derringer Crate" + desc = "A cheap, concealable pistol manufactured by the reputable Hunter's Pride. At least it's better than a disposable pistol. Chambered in .38 rounds." + cost = 350 + contains = list(/obj/item/storage/pistolcase/derringer) + crate_name = "derringer crate" + /datum/supply_pack/gun/commanders name = "Commander Pistol Crate" desc = "Contains a modified Candor 'Commander' pistol, produced by Nanotrasen and chambered in 9mm." cost = 750 - contains = list(/obj/item/gun/ballistic/automatic/pistol/commander) + contains = list(/obj/item/storage/pistolcase/commander) /datum/supply_pack/gun/makarovs name = "Stechkin Pistol Crate" desc = "Contains a concealable stechkin pistol, produced by Scarborough Arms and chambered in 10mm." cost = 1000 - contains = list(/obj/item/gun/ballistic/automatic/pistol) + contains = list(/obj/item/storage/pistolcase/stechkin) + +/datum/supply_pack/gun/candors + name = "Candor Pistol Crate" + desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." + cost = 1000 + contains = list(/obj/item/storage/pistolcase/candor) + +/datum/supply_pack/gun/pepperbox + name = "HP Firebrand Pepperbox Revolver Crate" + desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." + cost = 1250 + contains = list(/obj/item/storage/pistolcase/firebrand) + +/datum/supply_pack/gun/detrevolver + name = "Hunter's Pride Detective Revolver Crate" + desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." + cost = 600 + contains = list(/obj/item/storage/pistolcase/detective) + +/datum/supply_pack/gun/shadowrevolver + name = "Shadow Revolver Crate" + desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." + cost = 1000 + contains = list(/obj/item/storage/pistolcase/shadow) + /* Energy @@ -33,21 +65,21 @@ name = "Laser Gun Crate" desc = "Contains a lethal, high-energy laser gun." cost = 1000 - contains = list(/obj/item/gun/energy/laser) + contains = list(/obj/item/storage/pistolcase/laser) crate_name = "laser crate" /datum/supply_pack/gun/mini_energy name = "Mini Energy Gun Crate" desc = "Contains a small, versatile energy gun, capable of firing both nonlethal and lethal blasts, but with a limited power cell." cost = 500 - contains = list(/obj/item/gun/energy/e_gun/mini) + contains = list(/obj/item/storage/pistolcase/miniegun) crate_name = "laser crate" /datum/supply_pack/gun/energy name = "Energy Gun Crate" desc = "Contains a versatile energy gun, capable of firing both nonlethal and lethal blasts of light." cost = 1250 - contains = list(/obj/item/gun/energy/e_gun) + contains = list(/obj/item/storage/pistolcase/egun) crate_name = "energy gun crate" crate_type = /obj/structure/closet/crate/secure/plasma @@ -55,7 +87,7 @@ name = "Ion Rifle Crate" desc = "Contains a single Mk.I Ion Projector, a special anti-tank rifle designed to disable electronic threats at range." cost = 10000 - contains = list(/obj/item/gun/energy/ionrifle) + contains = list(/obj/item/storage/pistolcase/iongun) crate_name = "ion rifle crate" crate_type = /obj/structure/closet/crate/secure/plasma @@ -63,44 +95,97 @@ name = "Etherbor SG-8 Beam Pistol Crate" desc = "Contains a single SG-8 Beam Pistol, a civilian-grade sidearm developed in the PGF, manufactured by Etherbor Industries." cost = 1000 - contains = list(/obj/item/gun/energy/kalix/pistol) + contains = list(/obj/item/storage/pistolcase/kalixpistol) crate_name = "beam pistol crate" /datum/supply_pack/gun/laser/kalix name = "Etherbor BG-12 Beam Rifle Crate" desc = "Contains a single BG-12 Beam Rifle, a civilian-grade semi-automatic developed in the PGF, manufactured by Etherbor Industries." cost = 3000 - contains = list(/obj/item/gun/energy/kalix) + contains = list(/obj/item/storage/guncase/kalixrifle) crate_name = "beam rifle crate" +/* + Shotguns +*/ + +/datum/supply_pack/gun/doublebarrel_shotgun + name = "Double Barrel Shotgun Crate" + desc = "For when you need to deal with 2 drunkards the old-fashioned way. Contains a double-barreled shotgun, favored by Bartenders. Warranty voided if sawed off." + cost = 1000 + contains = list(/obj/item/storage/guncase/doublebarrel) + crate_name = "shotguns crate" + +/datum/supply_pack/gun/hellfire_shotgun + name = "Hellfire Shotgun Crate" + desc = "For when you need to deal with 8 hooligans. Contains a pump shotgun, with a 8-round capacity." + cost = 2000 + contains = list(/obj/item/gun/ballistic/shotgun/hellfire) + crate_name = "shotgun crate" + +/datum/supply_pack/gun/brimstone_shotgun + name = "Brimstone Shotgun Crate" + desc = "For when you need to deal with 5 hooligans, and QUICKLY. Contains a slamfire shotgun, with a 5-round capacity. Warranty voided if sawed off." + cost = 2000 + contains = list(/obj/item/gun/ballistic/shotgun/brimstone) + crate_name = "shotgun crate" + /* Rifles */ +/datum/supply_pack/gun/winchester + name = "Flaming Arrow Lever Action Rifle Crate" + desc = "Contains an antiquated lever action rifle intended for hunting wildlife. Chambered in .38 rounds." + cost = 750 + contains = list(/obj/item/storage/guncase/winchester) + crate_name = "rifle crate" + +/datum/supply_pack/gun/illestren + name = "Illestren Rifle Crate" + desc = "Contains an expertly made bolt action rifle intended for hunting wildlife. Chambered in 8x50mmR rounds." + cost = 1250 + contains = list(/obj/item/storage/guncase/illestren) + crate_name = "rifle crate" + +/datum/supply_pack/gun/beacon + name = "Contender Break Action Rifle Crate" + desc = "Contains a single shot break action rifle to hunt wildlife that annoys you in particular. Chambered in devastating .45-70 rounds. Warranty voided if sawed off." + cost = 2250 + contains = list(/obj/item/storage/guncase/beacon) + crate_name = "rifle crate" + +/datum/supply_pack/gun/scout + name = "Scout Sniper Rifle Crate" + desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." + cost = 5500 + contains = list(/obj/item/gun/ballistic/rifle/scout) + crate_name = "rifle crate" + /datum/supply_pack/gun/cobra20 name = "Cobra-20 SMG Crate" desc = "Contains a .45 submachine gun, manufactured by Scaraborough Arms and chambered in .45" cost = 3000 - contains = list(/obj/item/gun/ballistic/automatic/smg/c20r/cobra) + contains = list(/obj/item/storage/guncase/cobra) crate_name = "SMG crate" /datum/supply_pack/gun/wt550 name = "WT-550 Auto Rifle Crate" desc = "Contains a high-powered, automatic personal defense weapon chambered in 4.6x30mm." cost = 4000 - contains = list(/obj/item/gun/ballistic/automatic/smg/wt550) + contains = list(/obj/item/storage/guncase/wt550) crate_name = "auto rifle crate" /datum/supply_pack/gun/p16 name = "P16 Assault Rifle Crate" desc = "Contains a high-powered, automatic rifle chambered in 5.56mm." cost = 5000 - contains = list(/obj/item/gun/ballistic/automatic/assault/p16) + contains = list(/obj/item/storage/guncase/p16) crate_name = "auto rifle crate" /datum/supply_pack/gun/skm name = "SKM-24 Rifle Crate" desc = "Contains a high-powered, automatic rifle chambered in 7.62x40mm CLIP." cost = 5000 - contains = list(/obj/item/gun/ballistic/automatic/assault/skm) + contains = list(/obj/item/storage/guncase/skm) crate_name = "auto rifle crate" From 698d734b07902e11b1b86c1a4bbc412f97e502c5 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 11:26:54 -0500 Subject: [PATCH 06/13] yea --- code/modules/cargo/packs/gun.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/cargo/packs/gun.dm b/code/modules/cargo/packs/gun.dm index 132e62bb0ada..fba6c2107fcf 100644 --- a/code/modules/cargo/packs/gun.dm +++ b/code/modules/cargo/packs/gun.dm @@ -189,3 +189,4 @@ cost = 5000 contains = list(/obj/item/storage/guncase/skm) crate_name = "auto rifle crate" + From d1d0158da90853483d20b404bcb1285df17c8054 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 11:46:28 -0500 Subject: [PATCH 07/13] adds a bunch of factions to cargo packs --- code/__DEFINES/factions.dm | 30 +++++++++++++++++++++ code/__HELPERS/names.dm | 30 --------------------- code/modules/cargo/packs.dm | 4 +++ code/modules/cargo/packs/ammo.dm | 2 ++ code/modules/cargo/packs/civilian.dm | 1 + code/modules/cargo/packs/costumes_toys.dm | 12 +-------- code/modules/cargo/packs/food.dm | 2 ++ code/modules/cargo/packs/gun.dm | 19 +++++++++++++ code/modules/cargo/packs/material.dm | 1 + code/modules/cargo/packs/medical.dm | 2 ++ code/modules/cargo/packs/sec_supply.dm | 1 + code/modules/cargo/packs/spacesuit_armor.dm | 6 +++++ 12 files changed, 69 insertions(+), 41 deletions(-) diff --git a/code/__DEFINES/factions.dm b/code/__DEFINES/factions.dm index 5eb0209dda4c..67ce47e166fc 100644 --- a/code/__DEFINES/factions.dm +++ b/code/__DEFINES/factions.dm @@ -12,3 +12,33 @@ #define FACTION_PLAYER_INTEQ "playerInteq" #define FACTION_PLAYER_ROUMAIN "playerRoumain" #define FACTION_PLAYER_GEZENA "playerGezena" + +#define FACTION_SYNDICATE "Syndicate" + #define FACTION_NGR "New Gorlex Republic" + #define FACTION_CYBERSUN "CyberSun" + #define FACTION_SUNS "Student-Union of Naturalistic Sciences" +#define FACTION_SOLGOV "SolGov" +#define FACTION_SRM "Saint-Roumain Militia" +#define FACTION_INTEQ "Inteq Risk Management Group" +#define FACTION_CLIP "CLIP Minutemen" +#define FACTION_NT "Nanotrasen" + #define FACTION_NS_LOGI "N+S Logistics" + #define FACTION_VIGILITAS "Vigilitas Interstellar" +#define FACTION_FRONTIER "Frontiersmen Fleet" +#define FACTION_PGF "Pan-Gezenan Federation" +#define FACTION_INDEPENDENT "Independent" + +#define PREFIX_SYNDICATE list("SEV", "SSV") + #define PREFIX_NGR list("NGRV") + #define PREFIX_CYBERSUN list("CSSV") + #define PREFIX_SUNS list("SUNS") +#define PREFIX_SOLGOV list("SCSV") +#define PREFIX_SRM list("SRSV") +#define PREFIX_INTEQ list("IRMV") +#define PREFIX_CLIP list("CMSV", "CMGSV") +#define PREFIX_NT list("NTSV") + #define PREFIX_NS_LOGI list("NSSV") + #define PREFIX_VIGILITAS list("VISV") +#define PREFIX_FRONTIER list("FFV") +#define PREFIX_PGF list("PGF", "PGFMC", "PGFN") +#define PREFIX_INDEPENDENT list("SV", "IMV", "ISV") diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index c889b5c9d495..b5ba5c815205 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -232,33 +232,3 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) . += "." else . += ", " - -#define FACTION_SYNDICATE "Syndicate" - #define FACTION_NGR "New Gorlex Republic" - #define FACTION_CYBERSUN "CyberSun" - #define FACTION_SUNS "Student-Union of Naturalistic Sciences" -#define FACTION_SOLGOV "SolGov" -#define FACTION_SRM "Saint-Roumain Militia" -#define FACTION_INTEQ "Inteq Risk Management Group" -#define FACTION_CLIP "CLIP Minutemen" -#define FACTION_NT "Nanotrasen" - #define FACTION_NS_LOGI "N+S Logistics" - #define FACTION_VIGILITAS "Vigilitas Interstellar" -#define FACTION_FRONTIER "Frontiersmen Fleet" -#define FACTION_PGF "Pan-Gezenan Federation" -#define FACTION_INDEPENDENT "Independent" - -#define PREFIX_SYNDICATE list("SEV", "SSV") - #define PREFIX_NGR list("NGRV") - #define PREFIX_CYBERSUN list("CSSV") - #define PREFIX_SUNS list("SUNS") -#define PREFIX_SOLGOV list("SCSV") -#define PREFIX_SRM list("SRSV") -#define PREFIX_INTEQ list("IRMV") -#define PREFIX_CLIP list("CMSV", "CMGSV") -#define PREFIX_NT list("NTSV") - #define PREFIX_NS_LOGI list("NSSV") - #define PREFIX_VIGILITAS list("VISV") -#define PREFIX_FRONTIER list("FFV") -#define PREFIX_PGF list("PGF", "PGFMC", "PGFN") -#define PREFIX_INDEPENDENT list("SV", "IMV", "ISV") diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 8098ff6b5130..f7763e847cb8 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -11,6 +11,10 @@ var/admin_spawned = FALSE var/small_item = FALSE //Small items can be grouped into a single crate. + var/faction + var/faction_discount = 15 + var/faction_locked = FALSE + /datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account) var/obj/structure/closet/crate/C if(paying_account) diff --git a/code/modules/cargo/packs/ammo.dm b/code/modules/cargo/packs/ammo.dm index 0b77a0f00afe..bfbaa50ea888 100644 --- a/code/modules/cargo/packs/ammo.dm +++ b/code/modules/cargo/packs/ammo.dm @@ -47,12 +47,14 @@ desc = "Contains a 5.56mm magazine for the Pistole C, containing twelve rounds." contains = list(/obj/item/ammo_box/magazine/pistol556mm) cost = 750 + faction = FACTION_SOLGOV /datum/supply_pack/ammo/fms_mag name = "Ferromagnetic Slug Magazine Crate" desc = "Contains a ferromagnetic slug magazine for the Model H pistol, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/modelh) cost = 750 + faction = FACTION_SOLGOV /* Shotgun ammo diff --git a/code/modules/cargo/packs/civilian.dm b/code/modules/cargo/packs/civilian.dm index 154dce436ee7..0b1d7303ca44 100644 --- a/code/modules/cargo/packs/civilian.dm +++ b/code/modules/cargo/packs/civilian.dm @@ -86,6 +86,7 @@ contains = list(/obj/item/storage/box/fountainpens) crate_name = "calligraphy crate" crate_type = /obj/structure/closet/crate/wooden + faction = FACTION_SOLGOV /datum/supply_pack/civilian/wrapping_paper name = "Festive Wrapping Paper Crate" diff --git a/code/modules/cargo/packs/costumes_toys.dm b/code/modules/cargo/packs/costumes_toys.dm index fa63529b7955..d07f50328079 100644 --- a/code/modules/cargo/packs/costumes_toys.dm +++ b/code/modules/cargo/packs/costumes_toys.dm @@ -127,17 +127,6 @@ crate_name = "mech pilot's suit crate" crate_type = /obj/structure/closet/crate/wooden -/datum/supply_pack/costumes_toys/wizard - name = "Wizard Costume Crate" - desc = "Pretend to join the Wizard Federation with this full wizard outfit! As required by interstellar law, the seller reminds potential buyers that the Wizard Federation is not real and cannot hurt you." - cost = 2000 - contains = list(/obj/item/staff, - /obj/item/clothing/suit/wizrobe/fake, - /obj/item/clothing/shoes/sandal, - /obj/item/clothing/head/wizard/fake) - crate_name = "wizard costume crate" - crate_type = /obj/structure/closet/crate/wooden - /datum/supply_pack/costumes_toys/formalwear name = "Formalwear Crate" desc = "You're gonna like the way you look, I guaranteed it. Contains an asston of fancy clothing." @@ -170,6 +159,7 @@ /obj/item/lipstick/random) crate_name = "formalwear crate" crate_type = /obj/structure/closet/crate/wooden + faction = FACTION_SOLGOV // this is technically armor but you aren't buying it for that. it's a joke pack so it goes here /datum/supply_pack/costumes_toys/justiceinbound diff --git a/code/modules/cargo/packs/food.dm b/code/modules/cargo/packs/food.dm index 7abc0188f9d9..af20dcacb6b0 100644 --- a/code/modules/cargo/packs/food.dm +++ b/code/modules/cargo/packs/food.dm @@ -16,6 +16,7 @@ /obj/item/storage/box/donkpockets/donkpockethonk) crate_name = "donk pocket crate" crate_type = /obj/structure/closet/crate/freezer + faction = FACTION_SYNDICATE /datum/supply_pack/food/donkpockets/fill(obj/structure/closet/crate/C) for(var/i in 1 to 3) @@ -316,4 +317,5 @@ /obj/effect/spawner/lootdrop/ration) crate_name = "ration crate" crate_type = /obj/structure/closet/crate + faction = FACTION_PGF diff --git a/code/modules/cargo/packs/gun.dm b/code/modules/cargo/packs/gun.dm index fba6c2107fcf..efa7cdbabdeb 100644 --- a/code/modules/cargo/packs/gun.dm +++ b/code/modules/cargo/packs/gun.dm @@ -12,6 +12,7 @@ cost = 300 contains = list(/obj/item/storage/pistolcase/disposable) crate_name = "disposable gun crate" + faction = FACTION_FRONTIER /datum/supply_pack/gun/derringer name = ".38 Derringer Crate" @@ -19,42 +20,49 @@ cost = 350 contains = list(/obj/item/storage/pistolcase/derringer) crate_name = "derringer crate" + faction = FACTION_SRM /datum/supply_pack/gun/commanders name = "Commander Pistol Crate" desc = "Contains a modified Candor 'Commander' pistol, produced by Nanotrasen and chambered in 9mm." cost = 750 contains = list(/obj/item/storage/pistolcase/commander) + faction = FACTION_NT /datum/supply_pack/gun/makarovs name = "Stechkin Pistol Crate" desc = "Contains a concealable stechkin pistol, produced by Scarborough Arms and chambered in 10mm." cost = 1000 contains = list(/obj/item/storage/pistolcase/stechkin) + faction = FACTION_SYNDICATE /datum/supply_pack/gun/candors name = "Candor Pistol Crate" desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." cost = 1000 contains = list(/obj/item/storage/pistolcase/candor) + faction = FACTION_SRM /datum/supply_pack/gun/pepperbox name = "HP Firebrand Pepperbox Revolver Crate" desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." cost = 1250 contains = list(/obj/item/storage/pistolcase/firebrand) + faction = FACTION_SRM /datum/supply_pack/gun/detrevolver name = "Hunter's Pride Detective Revolver Crate" desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." cost = 600 contains = list(/obj/item/storage/pistolcase/detective) + faction = FACTION_SRM /datum/supply_pack/gun/shadowrevolver name = "Shadow Revolver Crate" desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." cost = 1000 contains = list(/obj/item/storage/pistolcase/shadow) + faction = FACTION_SRM /* @@ -115,6 +123,7 @@ cost = 1000 contains = list(/obj/item/storage/guncase/doublebarrel) crate_name = "shotguns crate" + faction = FACTION_SRM /datum/supply_pack/gun/hellfire_shotgun name = "Hellfire Shotgun Crate" @@ -122,6 +131,7 @@ cost = 2000 contains = list(/obj/item/gun/ballistic/shotgun/hellfire) crate_name = "shotgun crate" + faction = FACTION_SRM /datum/supply_pack/gun/brimstone_shotgun name = "Brimstone Shotgun Crate" @@ -129,6 +139,7 @@ cost = 2000 contains = list(/obj/item/gun/ballistic/shotgun/brimstone) crate_name = "shotgun crate" + faction = FACTION_SRM /* Rifles @@ -140,6 +151,7 @@ cost = 750 contains = list(/obj/item/storage/guncase/winchester) crate_name = "rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/illestren name = "Illestren Rifle Crate" @@ -147,6 +159,7 @@ cost = 1250 contains = list(/obj/item/storage/guncase/illestren) crate_name = "rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/beacon name = "Contender Break Action Rifle Crate" @@ -154,6 +167,7 @@ cost = 2250 contains = list(/obj/item/storage/guncase/beacon) crate_name = "rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/scout name = "Scout Sniper Rifle Crate" @@ -161,6 +175,7 @@ cost = 5500 contains = list(/obj/item/gun/ballistic/rifle/scout) crate_name = "rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/cobra20 name = "Cobra-20 SMG Crate" @@ -168,6 +183,7 @@ cost = 3000 contains = list(/obj/item/storage/guncase/cobra) crate_name = "SMG crate" + faction = FACTION_SRM /datum/supply_pack/gun/wt550 name = "WT-550 Auto Rifle Crate" @@ -175,6 +191,7 @@ cost = 4000 contains = list(/obj/item/storage/guncase/wt550) crate_name = "auto rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/p16 name = "P16 Assault Rifle Crate" @@ -182,6 +199,7 @@ cost = 5000 contains = list(/obj/item/storage/guncase/p16) crate_name = "auto rifle crate" + faction = FACTION_SRM /datum/supply_pack/gun/skm name = "SKM-24 Rifle Crate" @@ -189,4 +207,5 @@ cost = 5000 contains = list(/obj/item/storage/guncase/skm) crate_name = "auto rifle crate" + faction = FACTION_SRM diff --git a/code/modules/cargo/packs/material.dm b/code/modules/cargo/packs/material.dm index ee0f00e42d96..dc01a4dfdc75 100644 --- a/code/modules/cargo/packs/material.dm +++ b/code/modules/cargo/packs/material.dm @@ -1,5 +1,6 @@ /datum/supply_pack/material group = "Materials & Sheets" + faction = FACTION_NS_LOGI /* Basic construction materials diff --git a/code/modules/cargo/packs/medical.dm b/code/modules/cargo/packs/medical.dm index 08b576937138..dcc7d466da75 100644 --- a/code/modules/cargo/packs/medical.dm +++ b/code/modules/cargo/packs/medical.dm @@ -123,6 +123,7 @@ /obj/item/reagent_containers/pill/neurine, /obj/item/vending_refill/medical) crate_name = "medical surplus crate" + faction = FACTION_SUNS /datum/supply_pack/medical/surplus/fill(obj/structure/closet/crate/C) for(var/i in 1 to 7) @@ -150,6 +151,7 @@ /obj/item/reagent_containers/glass/bottle/mutagen) crate_name = "virus crate" crate_type = /obj/structure/closet/crate/medical + faction = FACTION_SUNS /datum/supply_pack/medical/salglucanister name = "Heavy-Duty Saline Canister" diff --git a/code/modules/cargo/packs/sec_supply.dm b/code/modules/cargo/packs/sec_supply.dm index 8ff09a5dc38a..66faae6f688b 100644 --- a/code/modules/cargo/packs/sec_supply.dm +++ b/code/modules/cargo/packs/sec_supply.dm @@ -84,6 +84,7 @@ ) crate_name = "incendiary weapons crate" crate_type = /obj/structure/closet/crate/secure/plasma + faction = FACTION_NGR /* Stamina / PVP weapons (intentionally overpriced due to odd balance position of stamina weapons) diff --git a/code/modules/cargo/packs/spacesuit_armor.dm b/code/modules/cargo/packs/spacesuit_armor.dm index 8346ea00b06e..47a0fcbff239 100644 --- a/code/modules/cargo/packs/spacesuit_armor.dm +++ b/code/modules/cargo/packs/spacesuit_armor.dm @@ -29,6 +29,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/mining/independent) crate_name = "mining hardsuit crate" crate_type = /obj/structure/closet/crate/secure/plasma + faction = FACTION_INDEPENDENT /datum/supply_pack/spacesuit_armor/med_hardsuit name = "Medical Hardsuit Crate" @@ -37,6 +38,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/medical) crate_name = "medical hardsuit crate" crate_type = /obj/structure/closet/crate/medical + faction = FACTION_NT /datum/supply_pack/spacesuit_armor/mining_hardsuit_heavy name = "Heavy Mining Hardsuit Crate" @@ -46,6 +48,7 @@ /obj/item/clothing/shoes/bhop) crate_name = "heavy mining hardsuit crate" crate_type = /obj/structure/closet/crate/secure/plasma + faction = FACTION_NT /datum/supply_pack/spacesuit_armor/sec_hardsuit_bundle name = "Security Hardsuit Crate" @@ -54,6 +57,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/security/independent) crate_name = "security hardsuit crate" crate_type = /obj/structure/closet/crate/secure/gear + faction = FACTION_NT /datum/supply_pack/spacesuit_armor/sci_hardsuit name = "Science Hardsuit Crate" @@ -62,6 +66,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/rd) crate_name = "science hardsuit crate" crate_type = /obj/structure/closet/crate/secure/science + faction = FACTION_NT /datum/supply_pack/spacesuit_armor/engi_spacesuit_bundle name = "Engineering Space Suit Crate" @@ -79,6 +84,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/engine/atmos) crate_name = "atmospherics hardsuit crate" crate_type = /obj/structure/closet/crate/secure/engineering + faction = FACTION_NT /datum/supply_pack/spacesuit_armor/swat name = "SWAT Crate" From ef83692796a40fd0026ebf8d5dfc635b3d6343c4 Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 12:06:09 -0500 Subject: [PATCH 08/13] needs some improvments but protoype for storing faction datums in ships --- code/controllers/subsystem/faction.dm | 5 +++++ code/controllers/subsystem/mapping.dm | 2 ++ code/datums/shuttles.dm | 1 + code/modules/cargo/packs.dm | 1 - code/modules/overmap/ships/controlled_ship_datum.dm | 3 +++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm index 80c39852f95d..893d1fde4d7f 100644 --- a/code/controllers/subsystem/faction.dm +++ b/code/controllers/subsystem/faction.dm @@ -23,3 +23,8 @@ SUBSYSTEM_DEF(factions) if(faction) return faction.name return "?!ERR!?" + +/datum/controller/subsystem/factions/proc/faction_path_to_datum(path) + for(var/datum/faction/faction in factions) + if(ispath(faction, path)) + return faction diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index dc5d93159592..cfa2de526828 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -189,6 +189,8 @@ SUBSYSTEM_DEF(mapping) else S.faction_name = SSfactions.ship_prefix_to_name(S.prefix) + S.faction_path = data["faction"] + S.category = S.faction_name if(islist(data["namelists"])) diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index d7b60476d977..def1c897020f 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -21,6 +21,7 @@ var/prefix = "ISV" /// The full name of the ship's faction. var/faction_name = "Independent" + var/faction_path = /datum/faction/independent /// Whether or not players from other ships can open airlocks. var/unique_ship_access = TRUE /// Set by config JSON. If true, the template's ships' "default" spawn location (when bought by a player or loaded at roundstart) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index f7763e847cb8..d14e06b50e04 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -7,7 +7,6 @@ var/crate_name = "crate" var/desc = ""//no desc by default var/crate_type = /obj/structure/closet/crate - // var/DropPodOnly = FALSE//only usable by the Bluespace Drop Pod via the express cargo console var/admin_spawned = FALSE var/small_item = FALSE //Small items can be grouped into a single crate. diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index ec4b78629027..fb3058ff269e 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -70,6 +70,8 @@ ///Stations the ship has been blacklisted from landing at, associative station = reason var/list/blacklisted = list() + var/datum/faction/faction_datum + /datum/overmap/ship/controlled/Rename(new_name, force = FALSE) var/oldname = name if(!..() || (!COOLDOWN_FINISHED(src, rename_cooldown) && !force)) @@ -110,6 +112,7 @@ refresh_engines() ship_account = new(name, source_template.starting_funds) + faction_datum = SSfactions.faction_path_to_datum(source_template.faction_path) #ifdef UNIT_TESTS Rename("[source_template]", TRUE) From 238d3b1c2fcd83f2769e249f5f8067abef8fa0bd Mon Sep 17 00:00:00 2001 From: fallcon Date: Wed, 26 Jun 2024 14:27:31 -0500 Subject: [PATCH 09/13] small tweaks. factions has own init order --- _maps/ship_config_schema.json | 5 ----- code/__DEFINES/subsystems.dm | 1 + code/controllers/subsystem/faction.dm | 2 +- code/controllers/subsystem/mapping.dm | 5 +---- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/_maps/ship_config_schema.json b/_maps/ship_config_schema.json index b9fc39587e59..b0ce046e4c23 100644 --- a/_maps/ship_config_schema.json +++ b/_maps/ship_config_schema.json @@ -39,11 +39,6 @@ "description": "The prefix of the ship class, appended to randomly generated names when they're first purchased.", "maxLength": 5 }, - "faction_name": { - "title": "Faction Name", - "type": [ "null", "string" ], - "description": "A custom faction name for the ship class. If exluded or left blank, the ship will use the default faction name for the faction that matches the ship's prefix." - }, "namelists": { "title": "Namelists", "type": "array", diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 36aa57e48625..54874bc9e16b 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -121,6 +121,7 @@ #define INIT_ORDER_JOBS 65 #define INIT_ORDER_QUIRKS 60 #define INIT_ORDER_TICKER 55 +#define INIT_ORDER_FACTION 53 #define INIT_ORDER_MAPPING 50 #define INIT_ORDER_TIMETRACK 47 #define INIT_ORDER_NETWORKS 45 diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm index 893d1fde4d7f..7b5b05128702 100644 --- a/code/controllers/subsystem/faction.dm +++ b/code/controllers/subsystem/faction.dm @@ -1,6 +1,6 @@ SUBSYSTEM_DEF(factions) name = "Faction" - init_order = INIT_ORDER_EVENTS + init_order = INIT_ORDER_FACTION flags = SS_NO_FIRE var/list/datum/faction/factions = list() diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index cfa2de526828..400836065e7f 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -184,10 +184,7 @@ SUBSYSTEM_DEF(mapping) if(istext(data["prefix"])) S.prefix = data["prefix"] - if(istext(data["faction_name"])) - S.faction_name = data["faction_name"] - else - S.faction_name = SSfactions.ship_prefix_to_name(S.prefix) + S.faction_name = SSfactions.ship_prefix_to_name(S.prefix) S.faction_path = data["faction"] From a94c258b2aebcc1c6cb87744200dbefa3297cd19 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 16 Jul 2024 21:15:26 -0500 Subject: [PATCH 10/13] small improvments, ditch the faction path for a real datum as soon as you can --- _maps/configs/independent_beluga.json | 7 +++- _maps/configs/independent_box.json | 2 +- _maps/configs/independent_bubble.json | 2 +- _maps/configs/independent_dwayne.json | 2 +- _maps/configs/independent_junker.json | 2 +- _maps/configs/independent_kilo.json | 2 +- _maps/configs/independent_lagoon.json | 2 +- _maps/configs/independent_mudskipper.json | 2 +- _maps/configs/independent_rigger.json | 2 +- _maps/configs/independent_schmiedeberg.json | 2 +- _maps/configs/independent_shetland.json | 2 +- _maps/configs/independent_sunskipper.json | 2 +- _maps/configs/independent_tranquility.json | 2 +- _maps/configs/nanotrasen_delta.json | 2 +- _maps/configs/nanotrasen_heron.json | 19 ++++----- .../configs/syndicate_cybersun_kansatsu.json | 2 +- _maps/configs/syndicate_gorlex_hyena.json | 2 +- _maps/configs/syndicate_litieguai.json | 2 +- _maps/example_ship_config.json | 2 +- code/controllers/subsystem/faction.dm | 3 +- code/controllers/subsystem/mapping.dm | 7 +++- code/datums/shuttles.dm | 1 + .../crates_lockers/crates/wooden.dm | 39 ------------------- .../mob/dead/new_player/ship_select.dm | 2 +- .../overmap/ships/controlled_ship_datum.dm | 2 +- 25 files changed, 42 insertions(+), 72 deletions(-) diff --git a/_maps/configs/independent_beluga.json b/_maps/configs/independent_beluga.json index 2c10f249a582..e5da2a985491 100644 --- a/_maps/configs/independent_beluga.json +++ b/_maps/configs/independent_beluga.json @@ -1,9 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Beluga-class Transport", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", - "namelists": ["CRUISE", "NATURAL"], + "namelists": [ + "CRUISE", + "NATURAL" + ], "map_short_name": "Beluga-class", "map_path": "_maps/shuttles/independent/independent_beluga.dmm", "description": "The Beluga-Class is a transport vessel for those with especially rich blood. Featuring a modest kitchen, hired Inteq security, and luxurious decoration, the Beluga is a first choice pick for many wealthy spacers trying to get from point A to B. The independent ship features several rooms for its guests and a well furnished meeting room for any corporate occassion.", diff --git a/_maps/configs/independent_box.json b/_maps/configs/independent_box.json index 0a864166b37d..c944f29fc54b 100644 --- a/_maps/configs/independent_box.json +++ b/_maps/configs/independent_box.json @@ -12,7 +12,7 @@ "SPACE", "NATURAL" ], - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "IMV", "job_slots": { "Chief Medical Officer": { diff --git a/_maps/configs/independent_bubble.json b/_maps/configs/independent_bubble.json index 8e949450d9d6..33a8cf8c1815 100644 --- a/_maps/configs/independent_bubble.json +++ b/_maps/configs/independent_bubble.json @@ -12,7 +12,7 @@ "GENERAL", "SPACE" ], - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "ISV", "limit": 1, "job_slots": { diff --git a/_maps/configs/independent_dwayne.json b/_maps/configs/independent_dwayne.json index 61e6dc0314c9..2371262244b8 100644 --- a/_maps/configs/independent_dwayne.json +++ b/_maps/configs/independent_dwayne.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Mark.II Dwayne-class Long Range Mining Transport", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "ISV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_junker.json b/_maps/configs/independent_junker.json index df15ae77ad54..92edb754984a 100644 --- a/_maps/configs/independent_junker.json +++ b/_maps/configs/independent_junker.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Junker-class Salvaged Ship", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_kilo.json b/_maps/configs/independent_kilo.json index 5ca2ee32471d..481631e1661c 100644 --- a/_maps/configs/independent_kilo.json +++ b/_maps/configs/independent_kilo.json @@ -5,7 +5,7 @@ "tags": [ "Generalist" ], - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "ISV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_lagoon.json b/_maps/configs/independent_lagoon.json index 06b4de157caa..6a48dccd1e99 100644 --- a/_maps/configs/independent_lagoon.json +++ b/_maps/configs/independent_lagoon.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Lagoon-class Cruise Ship", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", "description": "An unusual sight in the relatively impoverished Frontier, the Lagoon-class is a large pleasure vessel dedicated to transporting its passengers to any number of exotic locales. Lagoons found on the Frontier tend to contain crews and passengers of a particularly daring – or foolhardy – character, willing to pay out the nose for a tour of some of the most dangerous regions in known space. Accordingly, Lagoons in these regions typically include a small but respectably equipped security contingent to protect (and, when necessary, rein in) the passengers, and come with a surprisingly powerful thermo-electric generator to move the ship’s prodigious bulk across vast expanses of space.", "tags": [ diff --git a/_maps/configs/independent_mudskipper.json b/_maps/configs/independent_mudskipper.json index b8d641410b75..381f94f203c6 100644 --- a/_maps/configs/independent_mudskipper.json +++ b/_maps/configs/independent_mudskipper.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Mudskipper-class Salvage Clipper", "map_short_name": "Mudskipper-class", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "ISV", "description": "One of the cheapest (and yet, inexplicably popular) offerings from Miskilamo Spacefaring, the Mudskipper-class is a vessel purpose-built for enterprising scrappers and looters looking to salvage bombed-out ruins and harvest boatloads of materials. Featuring a diverse set of multipurpose rooms, a charitable supply of EVA/ruin raiding equipment, and a set of anti-radiation gear for dealing with industrial accidents, the Mudskipper-class just keeps on chuggin’!", "tags": [ diff --git a/_maps/configs/independent_rigger.json b/_maps/configs/independent_rigger.json index a4f39e75a1ae..bd50d883d0b6 100644 --- a/_maps/configs/independent_rigger.json +++ b/_maps/configs/independent_rigger.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Riggs-class Sloop", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_schmiedeberg.json b/_maps/configs/independent_schmiedeberg.json index 4fb554e076b5..7ccc7fc34a88 100644 --- a/_maps/configs/independent_schmiedeberg.json +++ b/_maps/configs/independent_schmiedeberg.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Schmiedeberg-class Pharmacology Ship", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "IMV", "map_short_name": "Schmiedeberg-class", "description": "Interested in pharmacological science, but tired of sitting in front of a chemistry dispenser and pushing buttons all day? Eager to combine the culinary arts with the narcotic ones? Hoping to combine all of these qualities with the most important activity of all: making fat stacks of dosh? Then the Schmiedeberg-class is for you! Host to a robust ghetto chemistry lab, a high-efficiency botanical set-up and a complete kitchen-and-storefront, the Schmiedeberg is perfect for back-alley chemists and botanists everywhere.", diff --git a/_maps/configs/independent_shetland.json b/_maps/configs/independent_shetland.json index dea4e8d72c97..a44478e49c74 100644 --- a/_maps/configs/independent_shetland.json +++ b/_maps/configs/independent_shetland.json @@ -1,6 +1,6 @@ { "map_name": "Shetland-class Multipurpose Frigate", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/independent_sunskipper.json b/_maps/configs/independent_sunskipper.json index 3cbaee5a270b..91e8cfb43c1d 100644 --- a/_maps/configs/independent_sunskipper.json +++ b/_maps/configs/independent_sunskipper.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Sunskipper-class Culinary Vessel", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "ISV", "namelists": ["CRUISE", "NATURAL"], "map_short_name": "Sunskipper-class", diff --git a/_maps/configs/independent_tranquility.json b/_maps/configs/independent_tranquility.json index 7837df763fc0..37ba6bc8b813 100644 --- a/_maps/configs/independent_tranquility.json +++ b/_maps/configs/independent_tranquility.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Tranquility-class Flying Apartment Complex", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "SV", "namelists": [ "GENERAL", diff --git a/_maps/configs/nanotrasen_delta.json b/_maps/configs/nanotrasen_delta.json index cbc8c513446e..cf28abc50219 100644 --- a/_maps/configs/nanotrasen_delta.json +++ b/_maps/configs/nanotrasen_delta.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Delta-class Frigate", - "faction": "/datum/faction/nt", + "faction": "/datum/faction/nt/ns_logi", "prefix": "NSSV", "namelists": [ "GENERAL", diff --git a/_maps/configs/nanotrasen_heron.json b/_maps/configs/nanotrasen_heron.json index 72fccb1daffe..b5e6e5ffcf07 100644 --- a/_maps/configs/nanotrasen_heron.json +++ b/_maps/configs/nanotrasen_heron.json @@ -2,7 +2,9 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "faction": "/datum/faction/nt", "prefix": "NTSV", - "namelists": ["WEAPONS"], + "namelists": [ + "WEAPONS" + ], "map_name": "Heron-Class Dreadnaught", "map_short_name": "Heron-class", "map_path": "_maps/shuttles/nanotrasen/nanotrasen_heron.dmm", @@ -34,19 +36,19 @@ "outfit": "/datum/outfit/job/nanotrasen/security", "slots": 1 }, - "ERT Officer":{ + "ERT Officer": { "outfit": "/datum/outfit/job/nanotrasen/security/ert", "slots": 4 }, - "ERT Medical Officer":{ + "ERT Medical Officer": { "outfit": "/datum/outfit/job/nanotrasen/security/ert/med", "slots": 1 }, - "ERT Engineering Officer":{ + "ERT Engineering Officer": { "outfit": "/datum/outfit/job/nanotrasen/security/ert/engi", "slots": 1 }, - "Mech Pilot":{ + "Mech Pilot": { "outfit": "/datum/outfit/job/nanotrasen/security/mech_pilot", "slots": 1 }, @@ -54,20 +56,19 @@ "outfit": "/datum/outfit/job/nanotrasen/engineer", "slots": 1 }, - "Chief Engineer":{ + "Chief Engineer": { "outfit": "/datum/outfit/job/nanotrasen/ce", "officer": true, "slots": 1 }, "Roboticist": { - "outfit":"/datum/outfit/job/nanotrasen/roboticist", + "outfit": "/datum/outfit/job/nanotrasen/roboticist", "slots": 1 }, - "Medical Doctor":{ + "Medical Doctor": { "outfit": "/datum/outfit/job/nanotrasen/doctor", "slots": 1 }, - "Atmospheric Technician": 1, "Quartermaster": 1, "Cargo Technician": 1, diff --git a/_maps/configs/syndicate_cybersun_kansatsu.json b/_maps/configs/syndicate_cybersun_kansatsu.json index 9bcdd349693f..013be2455640 100644 --- a/_maps/configs/syndicate_cybersun_kansatsu.json +++ b/_maps/configs/syndicate_cybersun_kansatsu.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", - "faction": "/datum/faction/syndicate", + "faction": "/datum/faction/syndicate/cybersun", "prefix": "CSSV", "namelists": [ "CYBERSUN", diff --git a/_maps/configs/syndicate_gorlex_hyena.json b/_maps/configs/syndicate_gorlex_hyena.json index c17c651a4736..df4c6485bb0f 100644 --- a/_maps/configs/syndicate_gorlex_hyena.json +++ b/_maps/configs/syndicate_gorlex_hyena.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", - "faction": "/datum/faction/syndicate", + "faction": "/datum/faction/syndicate/ngr", "prefix": "NGRV", "namelists": [ "GORLEX", diff --git a/_maps/configs/syndicate_litieguai.json b/_maps/configs/syndicate_litieguai.json index 44f452e8fed2..4680ebe932d6 100644 --- a/_maps/configs/syndicate_litieguai.json +++ b/_maps/configs/syndicate_litieguai.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Li Tieguai-class Rescue Ship", - "faction": "/datum/faction/syndicate", + "faction": "/datum/faction/syndicate/cybersun", "prefix": "CSSV", "map_short_name": "Li Tieguai-class", "description": "A small, nimble, and exceptionally well-built medical response vessel, the Li Tieguai is a recent addition to Cybersun’s fleet, forming a critical component of their Frontier stabilization program. Li Tieguais come equipped with high-end medical equipment, including a selection of Cybersun augments and prosthetics, as well as weaponry and armor sufficient to protect its personnel in the often-dangerous Frontier sectors, so that they can offer premium healthcare (at premium prices) in even the most dangerous of scenarios.", diff --git a/_maps/example_ship_config.json b/_maps/example_ship_config.json index 2051e16fea06..9e9921a21a88 100644 --- a/_maps/example_ship_config.json +++ b/_maps/example_ship_config.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/shiptest-ss13/Shiptest/master/_maps/ship_config_schema.json", "map_name": "Example-class Experimental Ship", "map_short_name": "Test-class", - "faction": "/datum/faction/independant", + "faction": "/datum/faction/independent", "prefix": "STSV", "namelists": ["GENERAL", "SPACE", "MYTHOLOGICAL", "WEAPONS"], "map_path": "_maps/shuttles/shiptest/null.dmm", diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm index 7b5b05128702..a5eb5da00a48 100644 --- a/code/controllers/subsystem/faction.dm +++ b/code/controllers/subsystem/faction.dm @@ -26,5 +26,6 @@ SUBSYSTEM_DEF(factions) /datum/controller/subsystem/factions/proc/faction_path_to_datum(path) for(var/datum/faction/faction in factions) - if(ispath(faction, path)) + if(faction.type == path) return faction + stack_trace("we did not return any faction with path [path]") diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 400836065e7f..0e2ddba68fcc 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -184,9 +184,12 @@ SUBSYSTEM_DEF(mapping) if(istext(data["prefix"])) S.prefix = data["prefix"] - S.faction_name = SSfactions.ship_prefix_to_name(S.prefix) - S.faction_path = data["faction"] + if(istext(data["faction"])) + S.faction_path = text2path(data["faction"]) + if(S.faction_path) + S.faction_datum = SSfactions.faction_path_to_datum(S.faction_path) + S.faction_name = S.faction_datum.name S.category = S.faction_name diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index def1c897020f..c49334d0a1be 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -22,6 +22,7 @@ /// The full name of the ship's faction. var/faction_name = "Independent" var/faction_path = /datum/faction/independent + var/datum/faction/faction_datum /// Whether or not players from other ships can open airlocks. var/unique_ship_access = TRUE /// Set by config JSON. If true, the template's ships' "default" spawn location (when bought by a player or loaded at roundstart) diff --git a/code/game/objects/structures/crates_lockers/crates/wooden.dm b/code/game/objects/structures/crates_lockers/crates/wooden.dm index 223ae6ae8f35..d5f9de4deb86 100644 --- a/code/game/objects/structures/crates_lockers/crates/wooden.dm +++ b/code/game/objects/structures/crates_lockers/crates/wooden.dm @@ -20,42 +20,3 @@ new /obj/item/pneumatic_cannon/pie(src) new /obj/item/reagent_containers/food/snacks/pie/cream(src) new /obj/item/storage/crayons(src) - -/obj/structure/closet/crate/wooden/sealed - name = "sealed wooden crate" - desc= "crowbar it" - -/obj/structure/closet/crate/wooden/sealed/attack_hand(mob/user) - add_fingerprint(user) - if(manifest) - tear_manifest(user) - else - to_chat(user, "You need a crowbar to pry this open!") - -/obj/structure/closet/crate/wooden/sealed/attackby(obj/item/W, mob/user, params) - if(W.tool_behaviour == TOOL_CROWBAR) - if(manifest) - tear_manifest(user) - - user.visible_message( - "[user] pries \the [src] open.", \ - "You pry open \the [src].", \ - "You hear splitting wood.") - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 75, TRUE) - - var/turf/T = get_turf(src) - for(var/i in 1 to material_drop_amount) - new material_drop(src) - for(var/atom/movable/AM in contents) - AM.forceMove(T) - - qdel(src) - - else - if(user.a_intent == INTENT_HARM) //Only return ..() if intent is harm, otherwise return 0 or just end it. - return ..() //Stops it from opening and turning invisible when items are used on it. - - else - to_chat(user, "You need a crowbar to pry this open!") - return FALSE //Just stop. Do nothing. Don't turn into an invisible sprite. Don't open like a locker. - //The large crate has no non-attack interactions other than the crowbar, anyway. diff --git a/code/modules/mob/dead/new_player/ship_select.dm b/code/modules/mob/dead/new_player/ship_select.dm index c3ed554f196c..e130f6e404ce 100644 --- a/code/modules/mob/dead/new_player/ship_select.dm +++ b/code/modules/mob/dead/new_player/ship_select.dm @@ -166,7 +166,7 @@ continue var/list/ship_data = list( "name" = T.name, - "faction" = SSfactions.ship_prefix_to_name(T.prefix), + "faction" = T.faction_name, "desc" = T.description, "tags" = T.tags, "crewCount" = length(T.job_slots), diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index fb3058ff269e..5d851e52f4fd 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -112,7 +112,7 @@ refresh_engines() ship_account = new(name, source_template.starting_funds) - faction_datum = SSfactions.faction_path_to_datum(source_template.faction_path) + faction_datum = source_template.faction_datum #ifdef UNIT_TESTS Rename("[source_template]", TRUE) From fa65b0ae7a0bffa9e794eb925206ca71be341152 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Tue, 16 Jul 2024 21:28:09 -0500 Subject: [PATCH 11/13] make that init --- code/controllers/subsystem/faction.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/controllers/subsystem/faction.dm b/code/controllers/subsystem/faction.dm index a5eb5da00a48..106fb4687b83 100644 --- a/code/controllers/subsystem/faction.dm +++ b/code/controllers/subsystem/faction.dm @@ -7,6 +7,7 @@ SUBSYSTEM_DEF(factions) /datum/controller/subsystem/factions/Initialize(timeofday) for(var/path in subtypesof(/datum/faction)) factions += new path() + return ..() /datum/controller/subsystem/factions/proc/ship_prefix_to_faction(prefix) for(var/datum/faction/faction in factions) From 2d8bfb4a9c194b4e97d98f6624b35cbfc31eec13 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Sat, 10 Aug 2024 06:52:28 -0500 Subject: [PATCH 12/13] I added another text to path. --- check_regex.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_regex.yaml b/check_regex.yaml index 441f1e44d743..3b5e13a650e5 100644 --- a/check_regex.yaml +++ b/check_regex.yaml @@ -31,7 +31,7 @@ standards: - exactly: [4, "/mob text paths", '"/mob'] - exactly: [43, "/obj text paths", '"/obj'] - exactly: [0, "/turf text paths", '"/turf'] - - exactly: [116, "text2path uses", "text2path"] + - exactly: [117, "text2path uses", "text2path"] - exactly: [18, "world<< uses", 'world[ \t]*<<'] - exactly: [0, "world.log<< uses", 'world.log[ \t]*<<'] From 2bf68f4bd0afca71fa05b9adb4831801202a5519 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Fri, 30 Aug 2024 10:05:46 -0500 Subject: [PATCH 13/13] comment out the cargo price stuff --- code/modules/cargo/packs.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index d14e06b50e04..e6555fc58b6e 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -11,8 +11,10 @@ var/small_item = FALSE //Small items can be grouped into a single crate. var/faction + /* to be implmented var/faction_discount = 15 var/faction_locked = FALSE + */ /datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account) var/obj/structure/closet/crate/C