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)