Skip to content

Commit

Permalink
squad picker/name shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
silencer-pl committed Aug 30, 2024
1 parent 0f77dcf commit 77cf240
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 65 deletions.
6 changes: 5 additions & 1 deletion code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define GET_DEFAULT_ROLE(title) (RoleAuthority?.default_roles[title] ? RoleAuthority.default_roles[title] : title)

// Squad name defines
#define SQUAD_MARINE_1 "Sun Riders"
#define SQUAD_MARINE_1 "Alpha"
#define SQUAD_MARINE_2 "Bravo"
#define SQUAD_MARINE_3 "Charlie"
#define SQUAD_MARINE_4 "Delta"
Expand Down Expand Up @@ -40,6 +40,10 @@
#define JOB_SQUAD_MARINE_FORECON "FORECON Rifleman"
#define JOB_SQUAD_SMARTGUN_FORECON "FORECON Smartgunner"

#define JOB_UER_MARINE "UER Marine Operator"
#define JOB_UER_MARINE_POINT "UER Marine Point"
#define JOB_UER_MARINE_LEAD "UER Marine Team Lead"

var/global/list/job_squad_roles = JOB_SQUAD_ROLES_LIST

#define JOB_COLONIST "Colonist"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GLOBAL_LIST_INIT(all_minimap_flags, bitfield2list(MINIMAP_FLAG_ALL))
#define MINIMAP_AREA_CONTESTED_ZONE "#0603c4ee"

#define MINIMAP_SQUAD_UNKNOWN "#d8d8d8"
#define MINIMAP_SQUAD_ALPHA "#4148c8"
#define MINIMAP_SQUAD_ALPHA "#ed1c24"
#define MINIMAP_SQUAD_BRAVO "#fbc70e"
#define MINIMAP_SQUAD_CHARLIE "#76418a"
#define MINIMAP_SQUAD_DELTA "#0c0cae"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ var/global/list/ROLES_GROUND = ROLES_XENO + ROLES_SPECIAL + ROLES_WHITELISTED
var/global/list/ROLES_DISTRESS_SIGNAL = ROLES_USCM + ROLES_GROUND
var/global/list/ROLES_FACTION_CLASH = ROLES_USCM + JOB_PREDATOR

var/global/list/ROLES_PVE = list(JOB_UER_MARINE,JOB_UER_MARINE_POINT,JOB_UER_MARINE_LEAD)


var/global/list/ROLES_UNASSIGNED = list(JOB_SQUAD_MARINE)
var/global/list/ROLES_AI = list(JOB_SO, JOB_SQUAD_LEADER, JOB_SQUAD_MEDIC, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MARINE)
Expand Down
1 change: 0 additions & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ SUBSYSTEM_DEF(mapping)

/datum/controller/subsystem/mapping/proc/Loadship(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, override_map_path = "maps/")
LoadGroup(errorList, name, path, files, traits, default_traits, silent, override_map_path = override_map_path)
GLOB.gamemode_roles["Xenosurge"] = GLOB.platoon_to_role_list[MAIN_SHIP_PLATOON]

/datum/controller/subsystem/mapping/proc/Loadground(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, override_map_path = "maps/")
LoadGroup(errorList, name, path, files, traits, default_traits, silent, override_map_path = override_map_path)
Expand Down
3 changes: 3 additions & 0 deletions code/datums/factions/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
if(JOB_SQUAD_ENGI) marine_rk = "engi"
if(JOB_SQUAD_SPECIALIST) marine_rk = "spec"
if(JOB_SQUAD_TEAM_LEADER) marine_rk = "tl"
if(JOB_UER_MARINE_POINT) marine_rk = "spec"
if(JOB_UER_MARINE_LEAD) marine_rk = "tl"
if(JOB_SQUAD_MEDIC) marine_rk = "med"
if(JOB_UER_MARINE) marine_rk = "gun"
if(JOB_SQUAD_SMARTGUN) marine_rk = "gun"
if(JOB_XO) marine_rk = "xo"
if(JOB_CO) marine_rk = "co"
Expand Down
47 changes: 3 additions & 44 deletions code/game/gamemodes/colonialmarines/ai/colonialmarines_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,15 @@
flags_round_type = MODE_INFESTATION|MODE_NEW_SPAWN|MODE_NO_XENO_EVOLVE

var/list/squad_limit = list(
/datum/squad/marine/alpha
/datum/squad/marine/alpha,
/datum/squad/marine/delta,
)

var/list/objectives = list()
var/initial_objectives = 0

var/game_started = FALSE

role_mappings = list(
/datum/job/command/bridge/ai = JOB_SO,
/datum/job/marine/leader/ai = JOB_SQUAD_LEADER,
/datum/job/marine/medic/ai = JOB_SQUAD_MEDIC,
/datum/job/marine/tl/ai = JOB_SQUAD_TEAM_LEADER,
/datum/job/marine/smartgunner/ai = JOB_SQUAD_SMARTGUN,
/datum/job/marine/standard/ai = JOB_SQUAD_MARINE,
)

static_comms_amount = 0
requires_comms = FALSE
toggleable_flags = MODE_NO_JOIN_AS_XENO|MODE_HARDCORE_PERMA
Expand All @@ -33,16 +25,6 @@

/datum/game_mode/colonialmarines/ai/pre_setup()
RegisterSignal(SSdcs, COMSIG_GLOB_XENO_SPAWN, PROC_REF(handle_xeno_spawn))
squad_limit.Cut()
squad_limit += MAIN_SHIP_PLATOON
for(var/i in squad_limit)
role_mappings = GLOB.platoon_to_jobs[i]
RoleAuthority.reset_roles()
for(var/datum/squad/sq in RoleAuthority.squads)
if(sq.type in squad_limit)
GLOB.main_platoon_name = sq.name
GLOB.main_platoon_initial_name = sq.name


for(var/datum/squad/squad in RoleAuthority.squads)
if(squad.type in squad_limit)
Expand Down Expand Up @@ -75,30 +57,7 @@
return

/datum/game_mode/colonialmarines/ai/get_roles_list()
return GLOB.platoon_to_role_list[MAIN_SHIP_PLATOON]
return ROLES_PVE

/datum/game_mode/colonialmarines/ai/check_queen_status()
return

GLOBAL_LIST_INIT(platoon_to_jobs, list(/datum/squad/marine/alpha = list(/datum/job/command/bridge/ai = JOB_SO,\
/datum/job/marine/leader/ai = JOB_SQUAD_LEADER,\
/datum/job/marine/medic/ai = JOB_SQUAD_MEDIC,\
/datum/job/marine/tl/ai = JOB_SQUAD_TEAM_LEADER,
/datum/job/marine/smartgunner/ai = JOB_SQUAD_SMARTGUN,\
/datum/job/marine/standard/ai = JOB_SQUAD_MARINE), \
/datum/squad/marine/upp = list(/datum/job/command/bridge/ai/upp = JOB_SO,\
/datum/job/marine/leader/ai/upp = JOB_SQUAD_LEADER,\
/datum/job/marine/medic/ai/upp = JOB_SQUAD_MEDIC,\
/datum/job/marine/tl/ai/upp = JOB_SQUAD_TEAM_LEADER,
/datum/job/marine/smartgunner/ai/upp = JOB_SQUAD_SMARTGUN,\
/datum/job/marine/standard/ai/upp = JOB_SQUAD_MARINE),\
/datum/squad/marine/forecon = list(/datum/job/marine/standard/ai/forecon = JOB_SQUAD_MARINE,\
/datum/job/marine/standard/ai/rto = JOB_SQUAD_RTO,\
/datum/job/marine/leader/ai/forecon = JOB_SQUAD_LEADER,\
/datum/job/marine/medic/ai/forecon = JOB_SQUAD_MEDIC,\
/datum/job/marine/tl/ai/forecon = JOB_SQUAD_TEAM_LEADER,\
/datum/job/marine/smartgunner/ai/forecon = JOB_SQUAD_SMARTGUN)))

GLOBAL_LIST_INIT(platoon_to_role_list, list(/datum/squad/marine/alpha = ROLES_AI,\
/datum/squad/marine/upp = ROLES_AI_UPP,\
/datum/squad/marine/forecon = ROLES_AI_FORECON))
36 changes: 19 additions & 17 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,24 @@

/datum/squad/marine/alpha
name = SQUAD_MARINE_1
equipment_color = "#4148c8"
chat_color = "#828cff"
equipment_color = "#e61919"
chat_color = "#e67d7d"
access = list(ACCESS_MARINE_ALPHA)
radio_freq = ALPHA_FREQ
minimap_color = MINIMAP_SQUAD_ALPHA
use_stripe_overlay = FALSE
usable = TRUE

/datum/squad/marine/delta
name = SQUAD_MARINE_4
equipment_color = "#4148c8"
chat_color = "#828cff"
access = list(ACCESS_MARINE_DELTA)
radio_freq = DELTA_FREQ
minimap_color = MINIMAP_SQUAD_DELTA
use_stripe_overlay = FALSE
usable = TRUE

/datum/squad/marine/upp
name = SQUAD_UPP
equipment_color = "#8B0000"
Expand Down Expand Up @@ -159,14 +169,6 @@
minimap_color = "#32CD32"
usable = TRUE

/datum/squad/marine/bravo
name = SQUAD_MARINE_2
equipment_color = "#ffc32d"
chat_color = "#ffe650"
access = list(ACCESS_MARINE_BRAVO)
radio_freq = BRAVO_FREQ
minimap_color = MINIMAP_SQUAD_BRAVO

/datum/squad/marine/charlie
name = SQUAD_MARINE_3
equipment_color = "#c864c8"
Expand All @@ -175,13 +177,13 @@
radio_freq = CHARLIE_FREQ
minimap_color = MINIMAP_SQUAD_CHARLIE

/datum/squad/marine/delta
name = SQUAD_MARINE_4
equipment_color = "#4148c8"
chat_color = "#828cff"
access = list(ACCESS_MARINE_DELTA)
radio_freq = DELTA_FREQ
minimap_color = MINIMAP_SQUAD_DELTA
/datum/squad/marine/bravo
name = SQUAD_MARINE_2
equipment_color = "#ffc32d"
chat_color = "#ffe650"
access = list(ACCESS_MARINE_BRAVO)
radio_freq = BRAVO_FREQ
minimap_color = MINIMAP_SQUAD_BRAVO

/datum/squad/marine/echo
name = SQUAD_MARINE_5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

GLOBAL_VAR_INIT(main_platoon_name, SQUAD_MARINE_1)
GLOBAL_VAR_INIT(main_platoon_name, "UER-1")
GLOBAL_VAR_INIT(main_platoon_initial_name, GLOB.main_platoon_name)

/// Ability to rename the platoon
Expand Down
104 changes: 104 additions & 0 deletions code/modules/gear_presets/xenosurge.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/datum/skills/pve/standard
name = "UER Marine Operator"
skills = list(
SKILL_CQC = SKILL_CQC_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_ENGI,
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI,
SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR,
SKILL_SURGERY = SKILL_SURGERY_TRAINED,
SKILL_POLICE = SKILL_POLICE_SKILLED,
SKILL_FIREMAN = SKILL_FIREMAN_SKILLED,
SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER,
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL,
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
)

/datum/job/marine/pve/base
title = JOB_UER_MARINE
total_positions = 6
spawn_positions = 6
supervisors = "Mission Control"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/pve/base
entry_message_body = "haha"



/datum/equipment_preset/pve/base
name = "UER Marine Operator"
flags = EQUIPMENT_PRESET_START_OF_ROUND|EQUIPMENT_PRESET_MARINE

access = list(ACCESS_MARINE_PREP)
assignment = JOB_UER_MARINE
rank = JOB_UER_MARINE
paygrade = "ME3"
role_comm_title = "OPR"
skills = /datum/skills/pve/standard
minimap_icon = "smartgunner"

/datum/equipment_preset/pve/base/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/marine/satchel
if (new_human.client && new_human.client.prefs && (new_human.client.prefs.backbag == 1))
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)


/datum/job/marine/pve/point
title = JOB_UER_MARINE_POINT
total_positions = 2
spawn_positions = 2
supervisors = "Mission Control"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/pve/point
entry_message_body = "haha"

/datum/equipment_preset/pve/point
name = "UER Marine Point"
flags = EQUIPMENT_PRESET_START_OF_ROUND|EQUIPMENT_PRESET_MARINE

access = list(ACCESS_MARINE_PREP)
assignment = JOB_UER_MARINE_POINT
rank = JOB_UER_MARINE_POINT
paygrade = "ME4"
role_comm_title = "PNT"
skills = /datum/skills/pve/standard
minimap_icon = "spec"

/datum/equipment_preset/pve/point/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/marine/satchel
if (new_human.client && new_human.client.prefs && (new_human.client.prefs.backbag == 1))
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)

/datum/job/marine/pve/lead
title = JOB_UER_MARINE_LEAD
total_positions = 2
spawn_positions = 2
supervisors = "Mission Control"
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/pve/lead
entry_message_body = "haha"

/datum/equipment_preset/pve/lead
name = "UER Marine Operator"
flags = EQUIPMENT_PRESET_START_OF_ROUND|EQUIPMENT_PRESET_MARINE

access = list(ACCESS_MARINE_PREP)
assignment = JOB_UER_MARINE_LEAD
rank = JOB_UER_MARINE_LEAD
paygrade = "ME5"
role_comm_title = "TML"
skills = /datum/skills/pve/standard
minimap_icon = "leader"

/datum/equipment_preset/pve/lead/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/marine/satchel
if (new_human.client && new_human.client.prefs && (new_human.client.prefs.backbag == 1))
back_item = /obj/item/storage/backpack/marine

new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK)
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@
#include "code\modules\gear_presets\wo.dm"
#include "code\modules\gear_presets\wy.dm"
#include "code\modules\gear_presets\wy_goons.dm"
#include "code\modules\gear_presets\xenosurge.dm"
#include "code\modules\gear_presets\yautja.dm"
#include "code\modules\gear_presets\survivors\misc.dm"
#include "code\modules\gear_presets\survivors\survivors.dm"
Expand Down

0 comments on commit 77cf240

Please sign in to comment.