Skip to content

Commit

Permalink
Polish, Additional Fixes, Faction Refactor
Browse files Browse the repository at this point in the history
Lots of changes to access, factions, and so forth. Makes it possible to use the ID changer machine regardless of mode, and it is no longer hard coded to marine access. Factions are far more robust and can be used for determine subfactions. That functionality is only surface level at the moment but can be developed more.

Additional fixes for RoleAuthority and squads, as well as map fixes and code fixes for the map. CM Specialist vendor works as desired now. Also makes sure that synths and yautja can be customized by players.

Outside of vehicle changes, the map and associated code is almost entirely feature complete and polished.
  • Loading branch information
FslashN committed Mar 29, 2024
1 parent a904032 commit 2429cea
Show file tree
Hide file tree
Showing 46 changed files with 1,630 additions and 921 deletions.
8 changes: 7 additions & 1 deletion code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ block( \
#define MAP_FAKE_Z_BLACKSTONE_BASEMENT 8
#define MAP_FAKE_Z_BLACKSTONE_BUNKER 9

/*
It took me a minute to realize that all sanity needed is for the map object reference to return something.
If it does not, that means there is no reference map to begin with and we don't need to continue checking.
*/
#define PATH_TO_GROUND_MAP_OBJ GLOB.map_type_list[SSmapping.configs[GROUND_MAP].map_name]

#define MAP_ICE_COLONY "Ice Colony" // Highpop only
#define MAP_LV_624 "LV-624"
#define MAP_LV_624_REPAIRED "LV-624 Repaired"
#define MAP_BIG_RED "Solaris Ridge"
#define MAP_PRISON_STATION "Fiorina Cellblocks"
#define MAP_PRISON_STATION_V3 "Fiorina Science Annex"
#define MAP_WHISKEY_OUTPOST "Whiskey Outpost" // Unused
#define MAP_BLACKSTONE_BRIDGE "Blackstone Bridge"
#define MAP_BLACKSTONE_BRIDGE "Blackstone Bridge" //Whiskey Outpost re-imagined.
#define MAP_DESERT_DAM "Trijent Dam" // Highpop only
#define MAP_SOROKYNE_STRATA "Sorokyne Strata"
#define MAP_CORSAT "CORSAT" // Highpop only
Expand Down
20 changes: 20 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ Blackstone Bridge.
#define ACCESS_LIST_MARINE_MAIN "Almayer (Main)"
///All USCM Access levels used on the USS Almayer
#define ACCESS_LIST_MARINE_ALL "Almayer (ALL)"
///Pulls up a list of mapped Almayer access regions for the ID changer. A few similar defines in here as well. Works with the faction datums.
#define ACCESS_LIST_MARINE_REGIONS "Almayer Access Regions"

///Most access outside of certain officer access.
#define ACCESS_LIST_USCM_GROUND_MAIN "USCM Ground (Main)"
///All of the ground access for USCM.
#define ACCESS_LIST_USCM_GROUND_ALL "USCM Ground (ALL)"
///Regions for the outpost.
#define ACCESS_LIST_USCM_GROUND_REGIONS "USCM Ground Access Regions"

///Used by the Wey-Yu - USCM Liaison
#define ACCESS_LIST_MARINE_LIAISON "Wey-Yu (Liaison)"

Expand All @@ -224,9 +234,13 @@ Blackstone Bridge.
#define ACCESS_LIST_WY_SENIOR "Wey-Yu (Senior Lead)"
///All access levels associated with Weyland Yutani
#define ACCESS_LIST_WY_ALL "Wey-Yu (ALL)"
#define ACCESS_LIST_PMC_REGIONS "PMC Access Regions"
#define ACCESS_LIST_WY_REGIONS "Weyland-Yutani Access Regions"

///All the access levels in the civillian category, excluding Press.
#define ACCESS_LIST_COLONIAL_ALL "Colonial (ALL)"
///Colony access.
#define ACCESS_LIST_COLONIAL_REGIONS "Colonial Access Regions"
///Used by the Wey-Yu - Civil Authority Liaison
#define ACCESS_LIST_CIVIL_LIAISON "Colonial (Liaison)"
///The access used by delivery ERT (Pizza/Souto)
Expand All @@ -235,8 +249,14 @@ Blackstone Bridge.
///All access levels associated with UPP
#define ACCESS_LIST_UPP_ALL "UPP (ALL)"
#define ACCESS_LIST_UPP_PLATOON "UPP (Platoon)"
#define ACCESS_LIST_UPP_REGIONS "UPP Access Regions"

///Generic/basic access to CLF stuff
#define ACCESS_LIST_CLF_BASE "CLF (Basic)"
///All access levels associated with CLF
#define ACCESS_LIST_CLF_ALL "CLF (ALL)"
#define ACCESS_LIST_CLF_REGIONS "CLF Access Regions"

//For the Brits.
#define ACCESS_LIST_TWE_ALL "TWE (ALL)"
#define ACCESS_LIST_TWE_REGIONS "TWE Access Regions"
52 changes: 42 additions & 10 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
#define JOB_SQUAD_ROLES /datum/timelock/squad
#define JOB_SQUAD_ROLES_LIST list(JOB_SQUAD_MARINE, JOB_SQUAD_LEADER, JOB_SQUAD_ENGI, JOB_SQUAD_MEDIC, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_TEAM_LEADER)

#define JOB_SQUAD_MARINE_UPP "UPP Rifleman"
#define JOB_SQUAD_LEADER_UPP "UPP Platoon Sergeant"
#define JOB_SQUAD_MEDIC_UPP "UPP Sanitar"
#define JOB_SQUAD_TEAM_LEADER_UPP "UPP Squad Sergeant"
#define JOB_SQUAD_SMARTGUN_UPP "UPP Machinegunner"
#define JOB_SO_UPP "UPP Platoon Commander"

#define JOB_SQUAD_TEAM_LEADER_FORECON "FORECON Assistant Squad Leader"
#define JOB_SQUAD_LEADER_FORECON "FORECON Squad Leader"
#define JOB_SQUAD_MEDIC_FORECON "FORECON Squad Corpsman"
Expand Down Expand Up @@ -161,14 +154,19 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_USCM_GROUND_AO "Outpost Adjunct Officer"
#define JOB_USCM_GROUND_SYNTH "Outpost Maint. Synthetic"

#define JOB_USCM_GROUND_SQUAD_LEADER "Outpost Plt. Lead"
#define JOB_USCM_GROUND_SQUAD_TEAM_LEADER "Outpost Sq. Lead"
#define JOB_USCM_GROUND_SQUAD_LEADER "Outpost Plt. Sergeant"
#define JOB_USCM_GROUND_SQUAD_TEAM_LEADER "Outpost Sqd. Sergeant"
#define JOB_USCM_GROUND_SQUAD_MEDIC "Outpost Corpsman"
#define JOB_USCM_GROUND_SQUAD_SPECIALIST "Outpost Specialist"
#define JOB_USCM_GROUND_SQUAD_SMARTGUNNER "Outpost Smartgunner"
#define JOB_USCM_GROUND_SQUAD_MARINE "Outpost Rifleman"

#define JOB_USCM_GROUND_CIVILIAN "Civilian Researcher"

#define DEPARTMENT_USCM_GROUND_COMMAND "Outpost Command" = list(JOB_USCM_GROUND_CO, JOB_USCM_GROUND_AO)
#define DEPARTMENT_USCM_GROUND_SUPPORT "Outpost Support" = list(JOB_USCM_GROUND_SYNTH)
#define DEPARTMENT_USCM_GROUND_MARINE "Outpost Marine" = list(JOB_USCM_GROUND_SQUAD_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_MEDIC, JOB_USCM_GROUND_SQUAD_SPECIALIST, JOB_USCM_GROUND_SQUAD_SMARTGUNNER, JOB_USCM_GROUND_SQUAD_MARINE)
#define DEPARTMENT_USCM_GROUND_ALL list(DEPARTMENT_USCM_GROUND_COMMAND, DEPARTMENT_USCM_GROUND_SUPPORT, DEPARTMENT_USCM_GROUND_MARINE)
//------------------------------------

//-------------WO roles---------------
Expand Down Expand Up @@ -211,7 +209,7 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_PMC_INVESTIGATOR "PMC Medical Investigator"
#define JOB_PMC_DETAINER "Weyland-Yutani PMC (Detainer)"
#define JOB_PMC_ELITE "PMC Elite"
#define JOB_PMC_GUNNER "PMC Support Weapons Specialist" //Renamed from Specialist to Support Specialist as it only has SG skills.
#define JOB_PMC_GUNNER "PMC Smartgunner" //Renamed to Smartgunner.
#define JOB_PMC_SNIPER "PMC Weapons Specialist" //Renamed from Sharpshooter to specialist as it uses specialist skills.
#define JOB_PMC_CREWMAN "Weyland-Yutani PMC (Crewman)"
#define JOB_PMC_NINJA "PMC Ninja"
Expand All @@ -224,6 +222,12 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST

#define JOB_PMC_GRUNT_LIST list(JOB_PMC_STANDARD, JOB_PMC_ENGINEER, JOB_PMC_MEDIC, JOB_PMC_INVESTIGATOR, JOB_PMC_DETAINER, JOB_PMC_ELITE, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_CREWMAN, JOB_PMC_NINJA, JOB_PMC_XENO_HANDLER, JOB_PMC_COMMANDO, JOB_PMC_LEADER, JOB_PMC_LEAD_INVEST)

#define DEPARTMENT_PMC_COMMAND "PMC Command" = list(JOB_PMC_DIRECTOR, JOB_PMC_LEAD_INVEST, JOB_PMC_LEADER)
#define DEPARTMENT_PMC_ELITE "PMC Elite" = list(JOB_PMC_COMMANDO, JOB_PMC_ELITE)
#define DEPARTMENT_PMC_SUPPORT "PMC Support" = list(JOB_PMC_DOCTOR, JOB_PMC_MEDIC, JOB_PMC_ENGINEER, JOB_PMC_INVESTIGATOR, JOB_PMC_CREWMAN, JOB_PMC_XENO_HANDLER, JOB_PMC_SYNTH)
#define DEPARTMENT_PMC_COMBAT "PMC Combat" = list(JOB_PMC_STANDARD, JOB_PMC_GUNNER, JOB_PMC_SNIPER, JOB_PMC_NINJA)
#define DEPARTMENT_PMC_ALL list(DEPARTMENT_PMC_COMMAND, DEPARTMENT_PMC_ELITE, DEPARTMENT_PMC_SUPPORT, DEPARTMENT_PMC_COMBAT)

//-------- WY --------//

#define JOB_TRAINEE "Corporate Trainee"
Expand All @@ -237,12 +241,20 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_CHIEF_EXECUTIVE "Corporate Chief Executive"
#define JOB_DIRECTOR "W-Y Director"

#define DEPARTMENT_WY_SENIOR "WY Senior Management" = list(JOB_DIRECTOR, JOB_CHIEF_EXECUTIVE, JOB_DIVISION_MANAGER)
#define DEPARTMENT_WY_MIDDLE "WY Middle Management" = list(JOB_ASSISTANT_MANAGER, JOB_EXECUTIVE_SUPERVISOR, JOB_EXECUTIVE_SPECIALIST, JOB_SENIOR_EXECUTIVE)
#define DEPARTMENT_WY_JUNIOR "WY Junior Management" = list(JOB_EXECUTIVE, JOB_JUNIOR_EXECUTIVE, JOB_TRAINEE)


//-------- WY Goons --------//
#define JOB_WY_GOON "WY Corporate Security"
#define JOB_WY_GOON_LEAD "WY Corporate Security Lead"
#define JOB_WY_GOON_RESEARCHER "WY Research Consultant"

#define JOB_WY_GOON_LIST list(JOB_WY_GOON, JOB_WY_GOON_LEAD)
#define DEPARTMENT_WY_SECURITY "WY Security Team" = JOB_WY_GOON_LIST
#define DEPARTMENT_WY_ALL list(DEPARTMENT_WY_SENIOR, DEPARTMENT_WY_MIDDLE, DEPARTMENT_WY_JUNIOR, DEPARTMENT_WY_SECURITY)
#define DEPARTMENT_WY_PMC_ALL DEPARTMENT_WY_ALL + DEPARTMENT_PMC_ALL

//---- Contractors ----//
#define JOB_CONTRACTOR "VAIPO Mercenary"
Expand Down Expand Up @@ -283,6 +295,16 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_FORECON_SMARTGUNNER "Reconnaissance Smartgunner"

//-------- UPP --------//

//Platoon version
#define JOB_SQUAD_MARINE_UPP "UPP Rifleman"
#define JOB_SQUAD_LEADER_UPP "UPP Platoon Sergeant"
#define JOB_SQUAD_MEDIC_UPP "UPP Sanitar"
#define JOB_SQUAD_TEAM_LEADER_UPP "UPP Squad Sergeant"
#define JOB_SQUAD_SMARTGUN_UPP "UPP Machinegunner"
#define JOB_SO_UPP "UPP Platoon Commander"

//Regular faction version
#define JOB_UPP "UPP Private"
#define JOB_UPP_CONSCRIPT "UPP Conscript"
#define JOB_UPP_ENGI "UPP Korporal Sapper"
Expand Down Expand Up @@ -317,6 +339,16 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST

#define JOB_UPP_CREWMAN "UPP Tank Crewman"

#define DEPARTMENT_UPP_SENR_COMMAND "UPP Senior Kommand" = list(JOB_UPP_GENERAL, JOB_UPP_LT_GENERAL, JOB_UPP_MAY_GENERAL, JOB_UPP_KOL_OFFICER, JOB_UPP_LTKOL_OFFICER, JOB_UPP_MAY_OFFICER)
#define DEPARTMENT_UPP_COMMAND "UPP Kommand" = list(JOB_UPP_KPT_OFFICER, JOB_UPP_SRLT_OFFICER, JOB_UPP_LT_OFFICER)
#define DEPARTMENT_UPP_ELITE "UPP Elite" = UPP_COMMANDO_JOB_LIST + JOB_UPP_COMBAT_SYNTH
#define DEPARTMENT_UPP_SUPPORT "UPP Support" = list(JOB_UPP_CREWMAN, JOB_UPP_SUPPORT_SYNTH, JOB_UPP_POLICE, JOB_UPP_LT_DOKTOR)
#define DEPARTMENT_UPP_COMBAT "UPP Kombat" = list(JOB_UPP_LEADER, JOB_UPP_SPECIALIST, JOB_UPP_MEDIC, JOB_UPP_ENGI, JOB_UPP)
#define DEPARTMENT_UPP_PLATOON "UPP Platoon" = list(JOB_SQUAD_MARINE_UPP, JOB_SQUAD_LEADER_UPP, JOB_SQUAD_MEDIC_UPP, JOB_SQUAD_TEAM_LEADER_UPP, JOB_SQUAD_SMARTGUN_UPP, JOB_SO_UPP)
#define DEPARTMENT_UPP_NONCOMBAT "UPP Diplomatic" = list(JOB_UPP_REPRESENTATIVE)

#define DEPARTMENT_UPP_ALL list(DEPARTMENT_UPP_COMMAND, DEPARTMENT_UPP_ELITE, DEPARTMENT_UPP_SUPPORT, DEPARTMENT_UPP_COMBAT, DEPARTMENT_UPP_PLATOON, DEPARTMENT_UPP_NONCOMBAT)

//-------- CLF --------//
#define JOB_CLF "CLF Guerilla"
#define JOB_CLF_ENGI "CLF Field Technician"
Expand Down
5 changes: 4 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@
#define ABOVE_XENO_LAYER 4.12
/// For facehuggers
#define FACEHUGGER_LAYER 4.13
///Above other stuff, below weather effects.
#define BELOW_WEATHER_LAYER 4.14
/// For WEATHER
#define WEATHER_LAYER 4.14
#define WEATHER_LAYER 4.15


//#define FLY_LAYER 5

Expand Down
9 changes: 4 additions & 5 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ var/global/list/ROLES_COMMAND = list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFIC

//Marine roles
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
var/global/list/ROLES_CIC = list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO, JOB_USCM_GROUND_CO)
var/global/list/ROLES_AUXIL_SUPPORT = list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT, JOB_USCM_GROUND_AO)
var/global/list/ROLES_MISC = list(JOB_SYNTH, JOB_WORKING_JOE, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH, JOB_USCM_GROUND_SYNTH, JOB_USCM_GROUND_CIVILIAN)
var/global/list/ROLES_CIC = list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO)
var/global/list/ROLES_AUXIL_SUPPORT = list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT)
var/global/list/ROLES_MISC = list(JOB_SYNTH, JOB_WORKING_JOE, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH)
var/global/list/ROLES_POLICE = list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
var/global/list/ROLES_ENGINEERING = list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH)
var/global/list/ROLES_REQUISITION = list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION)
var/global/list/ROLES_MEDICAL = list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR)
var/global/list/ROLES_MARINES = list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE, JOB_SQUAD_RTO, JOB_USCM_GROUND_SQUAD_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_TEAM_LEADER, JOB_USCM_GROUND_SQUAD_MEDIC, JOB_USCM_GROUND_SQUAD_SPECIALIST, JOB_USCM_GROUND_SQUAD_SMARTGUNNER, JOB_USCM_GROUND_SQUAD_MARINE)
var/global/list/ROLES_MARINES = list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE, JOB_SQUAD_RTO)
var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL, SQUAD_UPP, SQUAD_LRRP)

//Groundside roles
Expand Down Expand Up @@ -254,7 +254,6 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define FACTION_LIST_MARINE list(FACTION_MARINE, FACTION_USCM_GROUND)
#define FACTION_LIST_MARSHAL list(FACTION_MARSHAL, FACTION_MARINE, FACTION_USCM_GROUND)
#define FACTION_LIST_TWE list(FACTION_TWE, FACTION_MARINE, FACTION_USCM_GROUND)

#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_USCM_GROUND, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL, FACTION_TWE)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@
//Whether or not to load ammo boxes depending on ammo loaded into the vendor
//Only relevant in big vendors, like Requisitions or Squad Prep
#define VEND_LOAD_AMMO_BOXES (1<<9)
//If the vendor has some specialized behavior that needs to override other behavior. Crutch, best to refactor appropriate code.
#define VEND_SPECIALIZED_STOCK (1<<10)
21 changes: 14 additions & 7 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,20 @@ SUBSYSTEM_DEF(minimaps)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
if(!wiki_map_fallback)
var/wiki_url = CONFIG_GET(string/wikiurl)
var/obj/item/map/current_map/new_map = new
if(wiki_url && new_map.html_link)
wiki_map_fallback ="[wiki_url]/[new_map.html_link]"
else
debug_log("Failed to determine fallback wiki map! Attempted '[wiki_url]/[new_map.html_link]'")
qdel(new_map)
//I had to refactor some other code to make this less atrocious. Spawning in a map item to reference one compile-time variable is very silly. Behold!
var/obj/item/map/ground_map = PATH_TO_GROUND_MAP_OBJ
if(ground_map)
var/html_override = initial(ground_map.html_override) //This is a hack, should not be relied on in the future.
var/html_link = initial(ground_map.html_link)

if(html_override) //Hack, but a necessary one since there is no reliable wiki.
wiki_map_fallback = html_link //This should always work, as the address should point to functional image.
else
var/wiki_url = CONFIG_GET(string/wikiurl)
if(wiki_url && html_link)
wiki_map_fallback ="[wiki_url]/[html_link]"
else
debug_log("Failed to determine fallback wiki map! Attempted '[wiki_url]/[html_link]'")

// Ensure we actually have the map image sent
resend_current_map_png(user)
Expand Down
5 changes: 5 additions & 0 deletions code/datums/factions/clf.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/datum/faction/clf
name = "Colonial Liberation Front"
faction_tag = FACTION_CLF
access_all = ACCESS_LIST_CLF_ALL
access_main = ACCESS_LIST_CLF_BASE
access_regions = ACCESS_LIST_CLF_REGIONS

//CLF does not currently have a unique department map.

/datum/faction/clf/modify_hud_holder(image/holder, mob/living/carbon/human/human)
var/hud_icon_state
Expand Down
2 changes: 2 additions & 0 deletions code/datums/factions/contractor.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/datum/faction/contractor
name = "Vanguard's Arrow Incorporated"
faction_tag = FACTION_CONTRACTOR

//Stub faction. Nothing interesting here.
40 changes: 39 additions & 1 deletion code/datums/factions/faction.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/datum/faction
var/name = "Neutral Faction"
var/faction_tag = FACTION_NEUTRAL
var/list/faction_tag_group //Should be generated on New(), if it needs one. Set faction_tag to null in that case. Factions that use the same hud/procs.
var/list/faction_tag_group //Should be generated on New(), if it needs one. Set faction_tag to null in that case. Factions that use the same hud/procs, or sub-factions of one main faction.
var/hud_type = FACTION_HUD
var/skip_init = FALSE //In case we don't want initialize the subtype.
var/access_all = ACCESS_LIST_COLONIAL_ALL //All of the access for that faction. These should be properly configured for new factions.
var/access_main = ACCESS_LIST_COLONIAL_ALL //Main access, but not all access. Not strictly necessary, can be the same as access_all.
var/access_regions = ACCESS_LIST_COLONIAL_REGIONS //Region map for the ID changer.

/datum/faction/proc/modify_hud_holder(image/holder, mob/living/carbon/human/H)
return
Expand All @@ -13,3 +16,38 @@

/datum/faction/proc/get_antag_guns_sorted_equipment()
return list()

//Overwrite this if the check needs to account for something special, like sub-factions. uscm.dm for an example.
/datum/faction/proc/get_faction_access(faction_to_check, all_access = TRUE)
return get_access(all_access ? access_all : access_main)

//Pretty straightforward. Override if you need it to return a variant list.
/datum/faction/proc/get_faction_regions(faction_to_check)
return get_access(access_regions)
/*
Ovewrite this for individual factions if they get their own ID changing consoles. Might be useful elsewhere. Grabs a list of roles mapped to various departments. Check job.dm defines.
Since there are no proper colonist jobs, instead having survivors, this is defaulted to the marine role list. Update as needed.
*/
/datum/faction/proc/get_faction_departments(faction_to_check)
if(Check_WO())
return list(
"Command" = ROLES_CIC & ROLES_WO,
"Auxiliary Command" = ROLES_AUXIL_SUPPORT & ROLES_WO,
"Miscellaneous" = ROLES_MISC & ROLES_WO,
"Security" = ROLES_POLICE & ROLES_WO,
"Engineering" = ROLES_ENGINEERING & ROLES_WO,
"Supply" = ROLES_REQUISITION & ROLES_WO,
"Medical and Science" = ROLES_MEDICAL & ROLES_WO,
"Marines" = ROLES_MARINES
)
else
return list(
"Command" = ROLES_CIC - ROLES_WO,
"Auxiliary Command" = ROLES_AUXIL_SUPPORT - ROLES_WO,
"Miscellaneous" = ROLES_MISC - ROLES_WO,
"Security" = ROLES_POLICE - ROLES_WO,
"Engineering" = ROLES_ENGINEERING - ROLES_WO,
"Supply" = ROLES_REQUISITION - ROLES_WO,
"Medical and Science" = ROLES_MEDICAL - ROLES_WO,
"Marines" = ROLES_MARINES
)
23 changes: 21 additions & 2 deletions code/datums/factions/pmc.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
/datum/faction/pmc
name = "Private Military Company"
faction_tag = FACTION_PMC
name = "Weyland-Yutani Corporation"
faction_tag = FACTION_WY
access_all = ACCESS_LIST_WY_ALL
access_main = ACCESS_LIST_WY_PMC

//So all of the WY people share the same base faction in the code.
/datum/faction/pmc/New()
. = ..()
faction_tag_group = FACTION_LIST_WY

/datum/faction/pmc/get_faction_regions(faction_to_check)
switch(faction_to_check)
if(FACTION_PMC, FACTION_WY_DEATHSQUAD) return get_access(ACCESS_LIST_PMC_REGIONS)
if(FACTION_WY) return get_access(ACCESS_LIST_WY_REGIONS)
return ..()

/datum/faction/pmc/get_faction_departments(faction_to_check)
switch(faction_to_check)
if(FACTION_PMC, FACTION_WY_DEATHSQUAD) return DEPARTMENT_PMC_ALL
if(FACTION_WY) return DEPARTMENT_WY_PMC_ALL
return ..()

/datum/faction/pmc/modify_hud_holder(image/holder, mob/living/carbon/human/H)
var/hud_icon_state
Expand Down
7 changes: 6 additions & 1 deletion code/datums/factions/royalmarinescommando.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
/datum/faction/royal_marines_commando
name = "Royal Marines Commando"
name = "Three World Empire"
faction_tag = FACTION_TWE
access_all = ACCESS_LIST_TWE_ALL
access_main = ACCESS_LIST_TWE_ALL
access_regions = ACCESS_LIST_TWE_REGIONS

//TWE does not currently have a unique department map.

/datum/faction/royal_marines_commando/modify_hud_holder(image/holder, mob/living/carbon/human/H)
var/hud_icon_state
Expand Down
Loading

0 comments on commit 2429cea

Please sign in to comment.