Skip to content

Commit

Permalink
Fireteam Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitsunemitsu committed Oct 18, 2023
1 parent 297584d commit a4e9293
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/game/jobs/job/marine/squad/tl.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/job/marine/tl
title = JOB_SQUAD_TEAM_LEADER
total_positions = 8
spawn_positions = 8
total_positions = 12
spawn_positions = 12
allow_additional = 1
flags_startup_parameters = ROLE_ADD_TO_DEFAULT|ROLE_ADD_TO_SQUAD
gear_preset = /datum/equipment_preset/uscm/tl
Expand Down
37 changes: 33 additions & 4 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/// maximum # of specs allowed in the squad
var/max_specialists = 1
/// maximum # of fireteam leaders allowed in the suqad
var/max_tl = 2
var/max_tl = 3
/// maximum # of smartgunners allowed in the squad
var/max_smartgun = 1
/// maximum # of squad leaders allowed in the squad
Expand Down Expand Up @@ -453,24 +453,53 @@
var/list/extra_access = list()

switch(GET_DEFAULT_ROLE(M.job))
if(JOB_SQUAD_MARINE) //Marines always get a random fireteam
var/rng_fireteam = pick("FT1", "FT2", "FT3")
assign_fireteam(rng_fireteam, M)
if(JOB_SQUAD_ENGI)
assignment = JOB_SQUAD_ENGI
num_engineers++
C.claimedgear = FALSE
switch(num_engineers)
if(1) //Every squad needs 1 engineer and one medic, but FT3 lacks spec/SG so they might get an extra.
assign_fireteam("FT1", M)
if(2)
assign_fireteam("FT2", M)
else
assign_fireteam("FT3", M)
if(JOB_SQUAD_MEDIC)
assignment = JOB_SQUAD_MEDIC
num_medics++
C.claimedgear = FALSE
switch(num_medics)
if(1)
assign_fireteam("FT1", M)
if(2)
assign_fireteam("FT2", M)
else
assign_fireteam("FT3", M)
if(JOB_SQUAD_SPECIALIST)
assignment = JOB_SQUAD_SPECIALIST
num_specialists++
assign_fireteam("FT1", M) //Specialists are always first Fireteam.
if(JOB_SQUAD_SMARTGUN)
assignment = JOB_SQUAD_SMARTGUN
num_smartgun++
assign_fireteam("FT2", M) //Smartgunners are always second Fireteam.
if(JOB_SQUAD_TEAM_LEADER)
assignment = JOB_SQUAD_TEAM_LEADER
num_tl++
M.important_radio_channels += radio_freq
if(JOB_SQUAD_SMARTGUN)
assignment = JOB_SQUAD_SMARTGUN
num_smartgun++
switch(num_tl)
if(1)
assign_fireteam("FT1", M) //Can't set FTL without adding to fireteam. I tried - Kitsunemitu
assign_ft_leader("FT1", M)
if(2)
assign_fireteam("FT2", M)
assign_ft_leader("FT2", M)
if(3)
assign_fireteam("FT3", M)
assign_ft_leader("FT3", M)
if(JOB_SQUAD_LEADER)
if(squad_leader && GET_DEFAULT_ROLE(squad_leader.job) != JOB_SQUAD_LEADER) //field promoted SL
var/old_lead = squad_leader
Expand Down
13 changes: 13 additions & 0 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@

/obj/item/device/radio/headset/almayer/marine
initial_keys = list(/obj/item/device/encryptionkey/public)
locate_setting = TRACKER_FTL //Tracks FTL by default; FTLs track SLs.

//############################## ALPHA ###############################
/obj/item/device/radio/headset/almayer/marine/alpha
Expand All @@ -580,12 +581,14 @@
desc = "This is used by the marine Alpha squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/alpha/tl
name = "marine alpha team leader radio headset"
desc = "This is used by the marine Alpha team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/alpha/engi
name = "marine alpha engineer radio headset"
Expand All @@ -609,12 +612,14 @@
desc = "This is used by the marine Bravo squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/bravo/tl
name = "marine bravo team leader radio headset"
desc = "This is used by the marine Bravo team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/bravo/engi
name = "marine bravo engineer radio headset"
Expand All @@ -638,12 +643,14 @@
desc = "This is used by the marine Charlie squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/charlie/tl
name = "marine charlie team leader radio headset"
desc = "This is used by the marine Charlie team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/charlie/engi
name = "marine charlie engineer radio headset"
Expand All @@ -667,12 +674,14 @@
desc = "This is used by the marine Delta squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/delta/tl
name = "marine delta team leader radio headset"
desc = "This is used by the marine Delta team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/delta/engi
name = "marine delta engineer radio headset"
Expand All @@ -696,12 +705,14 @@
desc = "This is used by the marine Echo squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/echo/tl
name = "marine echo team leader radio headset"
desc = "This is used by the marine Echo team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/echo/engi
name = "marine echo engineer radio headset"
Expand All @@ -726,12 +737,14 @@
desc = "This is used by the marine Foxtrot squad leader. Channels are as follows: :v - marine command, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/squadlead)
volume = RADIO_VOLUME_CRITICAL
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/cryo/tl
name = "marine foxtrot team leader radio headset"
desc = "This is used by the marine Foxtrot team leader. Channels are as follows: :u - requisitions, :j - JTAC. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
initial_keys = list(/obj/item/device/encryptionkey/public, /obj/item/device/encryptionkey/jtac)
volume = RADIO_VOLUME_RAISED
locate_setting = TRACKER_SL

/obj/item/device/radio/headset/almayer/marine/cryo/engi
name = "marine foxtrot engineer radio headset"
Expand Down

0 comments on commit a4e9293

Please sign in to comment.