Skip to content

Commit

Permalink
TGS Test Merge (#6966)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Nov 7, 2024
2 parents 0300d0e + dec0711 commit a3d76ef
Show file tree
Hide file tree
Showing 25 changed files with 1,437 additions and 672 deletions.
7 changes: 6 additions & 1 deletion code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,16 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_UPP_MAY_GENERAL "UPP General Leytenant"
#define JOB_UPP_LT_GENERAL "UPP General Polkovnik"
#define JOB_UPP_GENERAL "UPP General Armii"
#define SQUAD_UPP_1 "Akula"
#define SQUAD_UPP_2 "Bizon"
#define SQUAD_UPP_3 "Chayka"
#define SQUAD_UPP_4 "Delfin"
#define SQUAD_UPP_5 "UPPKdo"

#define JOB_UPP_COMBAT_SYNTH "UPP Combat Synthetic"
#define JOB_UPP_SUPPORT_SYNTH "UPP Support Synthetic"

#define UPP_JOB_LIST list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER, JOB_UPP_POLICE, JOB_UPP_LT_OFFICER, JOB_UPP_LT_DOKTOR, JOB_UPP_SRLT_OFFICER, JOB_UPP_KPT_OFFICER, JOB_UPP_KOL_OFFICER, JOB_UPP_COMBAT_SYNTH)
#define UPP_JOB_LIST list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER, JOB_UPP_POLICE, JOB_UPP_LT_OFFICER, JOB_UPP_LT_DOKTOR, JOB_UPP_SUPPLY, JOB_UPP_SRLT_OFFICER, JOB_UPP_KPT_OFFICER, JOB_UPP_KOL_OFFICER, JOB_UPP_SUPPORT_SYNTH,JOB_UPP_COMMISSAR)
#define UPP_JOB_GRUNT_LIST list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER, JOB_UPP_POLICE, JOB_UPP_CREWMAN)

#define JOB_UPP_COMMANDO "UPP Junior Kommando"
Expand Down
14 changes: 13 additions & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,26 @@ GLOBAL_LIST_INIT(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_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_TANK_CREW, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
GLOBAL_LIST_INIT(ROLES_CIC, list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO))
GLOBAL_LIST_INIT(ROLES_CIC_ANTAG, list(JOB_UPP_SRLT_OFFICER, JOB_UPP_KPT_OFFICER, JOB_UPP_KOL_OFFICER, JOB_UPP_COMMISSAR))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT, list(JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_TANK_CREW, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT_ANTAG, list(JOB_UPP_CREWMAN))
GLOBAL_LIST_INIT(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))
GLOBAL_LIST_INIT(ROLES_MISC_ANTAG, list(JOB_UPP_COMBAT_SYNTH, JOB_UPP_SUPPORT_SYNTH))
GLOBAL_LIST_INIT(ROLES_POLICE, list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE))
GLOBAL_LIST_INIT(ROLES_POLICE_ANTAG, list(JOB_UPP_POLICE))
GLOBAL_LIST_INIT(ROLES_ENGINEERING, list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH, JOB_MAINT_TECH, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH))
GLOBAL_LIST_INIT(ROLES_ENGINEERING_ANTAG, list())
GLOBAL_LIST_INIT(ROLES_REQUISITION, list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION))
GLOBAL_LIST_INIT(ROLES_REQUISITION_ANTAG, list(JOB_UPP_SUPPLY))
GLOBAL_LIST_INIT(ROLES_MEDICAL, list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR))
GLOBAL_LIST_INIT(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))
GLOBAL_LIST_INIT(ROLES_MEDICAL_ANTAG, list(JOB_UPP_LT_DOKTOR))
GLOBAL_LIST_INIT(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))
GLOBAL_LIST_INIT(ROLES_MARINES_ANTAG, list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER))
GLOBAL_LIST_INIT(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))
GLOBAL_LIST_INIT(ROLES_WO, list(JOB_WO_CO, JOB_WO_XO, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT, JOB_WO_CHIEF_ENGINEER, JOB_WO_ORDNANCE_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION, JOB_WO_CMO, JOB_WO_DOCTOR, JOB_WO_RESEARCHER, JOB_WO_SQUAD_MARINE, JOB_WO_SQUAD_MEDIC, JOB_WO_SQUAD_ENGINEER, JOB_WO_SQUAD_SMARTGUNNER, JOB_WO_SQUAD_SPECIALIST, JOB_WO_SQUAD_LEADER))



//Groundside roles
GLOBAL_LIST_INIT(ROLES_XENO, list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH))
GLOBAL_LIST_INIT(ROLES_WHITELISTED, list(JOB_SYNTH_SURVIVOR, JOB_CO_SURVIVOR, JOB_PREDATOR, JOB_FAX_RESPONDER))
Expand All @@ -150,6 +160,8 @@ GLOBAL_LIST_INIT(ROLES_GROUND, GLOB.ROLES_XENO + ROLES_SPECIAL + ROLES_WHITELIST
GLOBAL_LIST_INIT(ROLES_DISTRESS_SIGNAL, GLOB.ROLES_USCM + GLOB.ROLES_GROUND)
GLOBAL_LIST_INIT(ROLES_FACTION_CLASH, ROLES_USCM + JOB_PREDATOR)

GLOBAL_LIST_INIT(ROLES_CM_VS_UPP, ROLES_USCM + UPP_JOB_LIST)


GLOBAL_LIST_INIT(ROLES_UNASSIGNED, list(JOB_SQUAD_MARINE))
//Role lists used for switch() checks in show_blurb_uscm(). Cosmetic, determines ex. "Engineering, USS Almayer", "2nd Bat. 'Falling Falcons'" etc.
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ SUBSYSTEM_DEF(minimaps)
minimap_flags = MINIMAP_FLAG_USCM
marker_flags = MINIMAP_FLAG_USCM

/datum/action/minimap/upp
minimap_flags = MINIMAP_FLAG_UPP
marker_flags = MINIMAP_FLAG_UPP

/datum/action/minimap/observer
minimap_flags = MINIMAP_FLAG_ALL
marker_flags = NONE
Expand Down
43 changes: 25 additions & 18 deletions code/datums/factions/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/datum/faction/upp/modify_hud_holder(image/holder, mob/living/carbon/human/H)
var/hud_icon_state
var/obj/item/card/id/ID = H.get_idcard()
var/datum/squad/squad = H.assigned_squad
var/_role
if(H.mind)
_role = H.job
Expand Down Expand Up @@ -63,14 +64,17 @@
/datum/faction/upp/get_antag_guns_snowflake_equipment()
return list(
list("PRIMARY FIREARMS", 0, null, null, null),
list("Type 71 Pulse Rifle", 20, /obj/item/weapon/gun/rifle/type71, null, VENDOR_ITEM_RECOMMENDED),
list("Type 71 Pulse Rifle Carbine", 20, /obj/item/weapon/gun/rifle/type71/carbine, null, VENDOR_ITEM_REGULAR),
list("Type 64 Submachinegun", 20, /obj/item/weapon/gun/smg/bizon/upp, null, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle", 30, /obj/item/weapon/gun/rifle/type71, null, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle Carbine", 30, /obj/item/weapon/gun/rifle/type71/carbine, null, VENDOR_ITEM_REGULAR),
list("Type 23 Riot Shotgun", 20, /obj/item/weapon/gun/shotgun/type23, null, VENDOR_ITEM_REGULAR),


list("PRIMARY AMMUNITION", 0, null, null, null),
list("Type 64 Helical Magazine (7.62x19mm)", 5, /obj/item/ammo_magazine/smg/bizon, null, VENDOR_ITEM_REGULAR),
list("Type 71 AP Magazine (5.45x39mm)", 15, /obj/item/ammo_magazine/rifle/type71/ap, null, VENDOR_ITEM_REGULAR),
list("Type 71 Magazine (5.45x39mm)", 5, /obj/item/ammo_magazine/rifle/type71, null, VENDOR_ITEM_REGULAR),
list("Type 64 Helical Magazine (7.62x19mm)", 5, /obj/item/ammo_magazine/smg/bizon, null, VENDOR_ITEM_REGULAR),
list("Handful of Heavy Buckshot Shells (8g)", 5, /obj/item/ammo_magazine/handful/shotgun/heavy/buckshot, null, VENDOR_ITEM_REGULAR),

list("SIDEARMS", 0, null, null, null),
list("Type 73 Pistol", 15, /obj/item/weapon/gun/pistol/t73, null, VENDOR_ITEM_REGULAR),
Expand All @@ -86,6 +90,7 @@
list("Angled Grip", 15, /obj/item/attachable/angledgrip, null, VENDOR_ITEM_REGULAR),
list("Burst Fire Assembly", 15, /obj/item/attachable/burstfire_assembly, null, VENDOR_ITEM_REGULAR),
list("Extended Barrel", 15, /obj/item/attachable/extended_barrel, null, VENDOR_ITEM_REGULAR),
list("Magnetic Harness", 20, /obj/item/attachable/magnetic_harness, null, VENDOR_ITEM_REGULAR),
list("Laser Sight", 15, /obj/item/attachable/lasersight, null, VENDOR_ITEM_REGULAR),
list("Rail Flashlight", 5, /obj/item/attachable/flashlight, null, VENDOR_ITEM_REGULAR),
list("Red-Dot Sight", 15, /obj/item/attachable/reddot, null, VENDOR_ITEM_REGULAR),
Expand All @@ -102,27 +107,29 @@
/datum/faction/upp/get_antag_guns_sorted_equipment()
return list(
list("PRIMARY FIREARMS", -1, null, null),
list("Type 64 Submachinegun", 20, /obj/item/weapon/gun/smg/bizon/upp, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle", 20, /obj/item/weapon/gun/rifle/type71, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle Carbine", 20, /obj/item/weapon/gun/rifle/type71/carbine, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle", 20, /obj/item/weapon/gun/rifle/type71, null, VENDOR_ITEM_REGULAR),
list("Type 71 Pulse Rifle Carbine", 20, /obj/item/weapon/gun/rifle/type71/carbine, null, VENDOR_ITEM_REGULAR),
list("Type 64 Submachinegun", 20, /obj/item/weapon/gun/smg/bizon/upp, null, VENDOR_ITEM_REGULAR),
list("Type 23 Riot Shotgun", 20, /obj/item/weapon/gun/shotgun/type23, null, VENDOR_ITEM_REGULAR),

list("PRIMARY AMMUNITION", -1, null, null),
list("Type 64 Helical Magazine (7.62x19mm)", 60, /obj/item/ammo_magazine/smg/bizon, VENDOR_ITEM_REGULAR),
list("Type 71 AP Magazine (5.45x39mm)", 60, /obj/item/ammo_magazine/rifle/type71/ap, VENDOR_ITEM_REGULAR),
list("Type 71 Magazine (5.45x39mm)", 60, /obj/item/ammo_magazine/rifle/type71, VENDOR_ITEM_REGULAR),
list("Type 71 AP Magazine (5.45x39mm)", 60, /obj/item/ammo_magazine/rifle/type71/ap, null, VENDOR_ITEM_REGULAR),
list("Type 71 Magazine (5.45x39mm)", 60, /obj/item/ammo_magazine/rifle/type71, null, VENDOR_ITEM_RECOMMENDED),
list("Type 64 Helical Magazine (7.62x19mm)", 60, /obj/item/ammo_magazine/smg/bizon, null, VENDOR_ITEM_REGULAR),
list("Handful of Heavy Buckshot Shells (8g)", 60, /obj/item/ammo_magazine/handful/shotgun/heavy/buckshot, null, VENDOR_ITEM_REGULAR),

list("SIDEARMS", -1, null, null),
list("Type 73 Pistol", 20, /obj/item/weapon/gun/pistol/t73, VENDOR_ITEM_REGULAR),
list("NP02 Pistol", 20, /obj/item/weapon/gun/pistol/np92, VENDOR_ITEM_REGULAR),
list("ZHNK-72 Revolver", 20, /obj/item/weapon/gun/revolver/upp, VENDOR_ITEM_REGULAR),
list("Type 73 Pistol", 20, /obj/item/weapon/gun/pistol/t73, null, VENDOR_ITEM_REGULAR),
list("NP02 Pistol", 20, /obj/item/weapon/gun/pistol/np92, null, VENDOR_ITEM_REGULAR),
list("ZHNK-72 Revolver", 20, /obj/item/weapon/gun/revolver/upp, null, VENDOR_ITEM_REGULAR),

list("SIDEARM AMMUNITION", -1, null, null),
list("Type 73 Magazine (7.62x25mm Tokarev)", 40, /obj/item/ammo_magazine/pistol/t73, VENDOR_ITEM_REGULAR),
list("ZHNK-72 Speed Loader (7.62x38mmR)", 40, /obj/item/ammo_magazine/revolver/upp, VENDOR_ITEM_REGULAR),
list("NP92 Magazine (9x18mm Makarov)", 40, /obj/item/ammo_magazine/pistol/np92, VENDOR_ITEM_REGULAR),
list("Type 73 Magazine (7.62x25mm Tokarev)", 40, /obj/item/ammo_magazine/pistol/t73, null, VENDOR_ITEM_REGULAR),
list("NP92 Magazine (9x18mm Makarov)", 40, /obj/item/ammo_magazine/pistol/np92, null, VENDOR_ITEM_REGULAR),
list("ZHNK-72 Speed Loader (7.62x38mmR)", 40, /obj/item/ammo_magazine/revolver/upp, null, VENDOR_ITEM_REGULAR),

list("UTILITIES", -1, null, null),
list("M94 Marking Flare Pack", 20, /obj/item/storage/box/m94, VENDOR_ITEM_RECOMMENDED),
list("Smoke Grenade", 5, /obj/item/explosive/grenade/smokebomb, VENDOR_ITEM_REGULAR),
list("Type 80 Bayonet", 40, /obj/item/attachable/bayonet/upp, VENDOR_ITEM_REGULAR),
list("M94 Marking Flare Pack", 20, /obj/item/storage/box/m94, null, VENDOR_ITEM_REGULAR),
list("Smoke Grenade", 5, /obj/item/explosive/grenade/smokebomb, null, VENDOR_ITEM_REGULAR),
list("Type 80 Bayonet", 40, /obj/item/attachable/bayonet/upp, null, VENDOR_ITEM_REGULAR),
)
16 changes: 16 additions & 0 deletions code/game/gamemodes/extended/cm_vs_upp.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/datum/game_mode/extended/faction_clash/cm_vs_upp
name = "Faction Clash UPP CM"
config_tag = "Faction Clash UPP CM"
flags_round_type = MODE_THUNDERSTORM|MODE_FACTION_CLASH
toggleable_flags = MODE_NO_SNIPER_SENTRY|MODE_NO_ATTACK_DEAD|MODE_NO_STRIPDRAG_ENEMY|MODE_STRONG_DEFIBS|MODE_BLOOD_OPTIMIZATION|MODE_NO_COMBAT_CAS|MODE_INDESTRUCTIBLE_SPLINTS|MODE_NO_INTERNAL_BLEEDING
taskbar_icon = 'icons/taskbar/gml_hvh.png'

/datum/game_mode/extended/faction_clash/cm_vs_upp/get_roles_list()
return GLOB.ROLES_CM_VS_UPP

/datum/game_mode/extended/faction_clash/cm_vs_upp/post_setup()
. = ..()
SSweather.force_weather_holder(/datum/weather_ss_map_holder/faction_clash)
for(var/area/area in GLOB.all_areas)
area.base_lighting_alpha = 150
area.update_base_lighting()
4 changes: 3 additions & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

var/minimum_playtime_as_job = 3 HOURS

var/gear_preset //Gear preset name used for this job
var/datum/equipment_preset/gear_preset //Gear preset name used for this job
var/list/gear_preset_whitelist = list()//Gear preset name used for council snowflakes ;)

//For generating entry messages
Expand All @@ -39,6 +39,8 @@
var/job_options
/// If TRUE, this job will spawn w/ a cryo emergency kit during evac/red alert
var/gets_emergency_kit = TRUE
/// Under what faction menu the job gets displayed in lobby
var/faction_menu = FACTION_NEUTRAL //neutral to cover uscm jobs for now as loads of them are under civil and stuff mainly ment for other faction

/datum/job/New()
. = ..()
Expand Down
131 changes: 90 additions & 41 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
// Whether the squad is available for squad management
var/locked = FALSE
/// Whether it is visible in overwatch
var/active = FALSE
var/active = TRUE //this var in fact looks COMPLEATLY useless as visibility in overwatch is also determined by faction
/// Which faction the squad is in
var/faction = FACTION_MARINE

Expand Down Expand Up @@ -261,33 +261,41 @@
usable = TRUE
omni_squad_vendor = TRUE
faction = FACTION_UPP
radio_freq = UPP_FREQ
roles_cap = list(
JOB_UPP_ENGI = 3,
JOB_UPP_MEDIC = 4,
JOB_UPP_SPECIALIST = 1,
JOB_UPP_LEADER = 1,
)

/datum/squad/upp/one
name = "UPPS1"
name = SQUAD_UPP_1
equipment_color = "#e61919"
chat_color = "#e67d7d"

/datum/squad/upp/twp
name = "UPPS2"
name = SQUAD_UPP_2
equipment_color = "#ffc32d"
chat_color = "#ffe650"

/datum/squad/upp/three
name = "UPPS3"
name = SQUAD_UPP_3
equipment_color = "#c864c8"
chat_color = "#ff96ff"

/datum/squad/upp/four
name = "UPPS4"
name = SQUAD_UPP_4
equipment_color = "#4148c8"
chat_color = "#828cff"

/datum/squad/upp/kdo
name = "UPPKdo"
name = SQUAD_UPP_5
equipment_color = "#c47a50"
chat_color = "#c47a50"
squad_type = "Team"
locked = TRUE
usable = FALSE

//###############################
/datum/squad/pmc
Expand Down Expand Up @@ -522,6 +530,25 @@
squad_leader = target_mob
SStracking.set_leader(tracking_id, target_mob)
SStracking.start_tracking("marine_sl", target_mob)

if(JOB_UPP_ENGI)
assignment = JOB_SQUAD_ENGI
id_card.claimedgear = FALSE
if(JOB_UPP_MEDIC)
assignment = JOB_SQUAD_MEDIC
id_card.claimedgear = FALSE
if(JOB_UPP_SPECIALIST)
assignment = JOB_SQUAD_SPECIALIST
if(JOB_UPP_LEADER)
if(squad_leader && GET_DEFAULT_ROLE(squad_leader.job) != JOB_UPP_LEADER) //field promoted SL
var/old_lead = squad_leader
demote_squad_leader() //replaced by the real one
SStracking.start_tracking(tracking_id, old_lead)
assignment = squad_type + " Leader"
squad_leader = target_mob
SStracking.set_leader(tracking_id, target_mob)
SStracking.start_tracking("marine_sl", target_mob)

if(JOB_MARINE_RAIDER)
assignment = JOB_MARINE_RAIDER
if(name == JOB_MARINE_RAIDER)
Expand Down Expand Up @@ -595,7 +622,7 @@
//gracefully remove a marine from squad system, alive, dead or otherwise
/datum/squad/proc/forget_marine_in_squad(mob/living/carbon/human/target_mob)
if(target_mob.assigned_squad.squad_leader == target_mob)
if(GET_DEFAULT_ROLE(target_mob.job) != JOB_SQUAD_LEADER) //a field promoted SL, not a real one
if(GET_DEFAULT_ROLE(target_mob.job) != JOB_SQUAD_LEADER || GET_DEFAULT_ROLE(target_mob.job) != JOB_UPP_LEADER) //a field promoted SL, not a real one
demote_squad_leader()
else
target_mob.assigned_squad.squad_leader = null
Expand Down Expand Up @@ -625,39 +652,60 @@
SStracking.stop_tracking("marine_sl", old_lead)

squad_leader = null
switch(GET_DEFAULT_ROLE(old_lead.job))
if(JOB_SQUAD_SPECIALIST)
old_lead.comm_title = "Spc"
if(JOB_SQUAD_ENGI)
old_lead.comm_title = "ComTech"
if(JOB_SQUAD_MEDIC)
old_lead.comm_title = "HM"
if(JOB_SQUAD_TEAM_LEADER)
old_lead.comm_title = "FTL"
if(JOB_SQUAD_SMARTGUN)
old_lead.comm_title = "SG"
if(JOB_SQUAD_LEADER)
if(!leader_killed)
old_lead.comm_title = "Sgt"
if(JOB_MARINE_RAIDER)
old_lead.comm_title = "Op."
if(JOB_MARINE_RAIDER_SL)
old_lead.comm_title = "TL."
if(JOB_MARINE_RAIDER_CMD)
old_lead.comm_title = "CMD."
else
old_lead.comm_title = "RFN"

if(GET_DEFAULT_ROLE(old_lead.job) != JOB_SQUAD_LEADER || !leader_killed)
var/obj/item/device/radio/headset/almayer/marine/R = old_lead.get_type_in_ears(/obj/item/device/radio/headset/almayer/marine)
if(R)
for(var/obj/item/device/encryptionkey/squadlead/acting/key in R.keys)
R.keys -= key
qdel(key)
R.recalculateChannels()
var/obj/item/card/id/card = old_lead.get_idcard()
if(card)
card.access -= ACCESS_MARINE_LEADER
switch(faction)
if (FACTION_UPP)
switch(GET_DEFAULT_ROLE(old_lead.job))
if(JOB_UPP_SPECIALIST)
old_lead.comm_title = "Spec"
if(JOB_UPP_ENGI)
old_lead.comm_title = "Sapper"
if(JOB_UPP_MEDIC)
old_lead.comm_title = "Med"
if(JOB_UPP_LEADER)
if(!leader_killed)
old_lead.comm_title = "MSzh"
else
old_lead.comm_title = "Sld"
if(GET_DEFAULT_ROLE(old_lead.job) != JOB_UPP_LEADER || !leader_killed)
var/obj/item/device/radio/headset/headset = old_lead.get_type_in_ears(/obj/item/device/radio/headset/distress/UPP)
if(headset)
for(var/obj/item/device/encryptionkey/upp/command/acting/key in headset.keys)
headset.keys -= key
qdel(key)
headset.recalculateChannels()
if (FACTION_MARINE)
switch(GET_DEFAULT_ROLE(old_lead.job))
if(JOB_SQUAD_SPECIALIST)
old_lead.comm_title = "Spc"
if(JOB_SQUAD_ENGI)
old_lead.comm_title = "ComTech"
if(JOB_SQUAD_MEDIC)
old_lead.comm_title = "HM"
if(JOB_SQUAD_TEAM_LEADER)
old_lead.comm_title = "FTL"
if(JOB_SQUAD_SMARTGUN)
old_lead.comm_title = "SG"
if(JOB_SQUAD_LEADER)
if(!leader_killed)
old_lead.comm_title = "Sgt"
if(JOB_MARINE_RAIDER)
old_lead.comm_title = "Op."
if(JOB_MARINE_RAIDER_SL)
old_lead.comm_title = "TL."
if(JOB_MARINE_RAIDER_CMD)
old_lead.comm_title = "CMD."
else
old_lead.comm_title = "RFN"
if(GET_DEFAULT_ROLE(old_lead.job) != JOB_SQUAD_LEADER || !leader_killed)
var/obj/item/device/radio/headset/almayer/marine/headset = old_lead.get_type_in_ears(/obj/item/device/radio/headset/almayer/marine)
if(headset)
for(var/obj/item/device/encryptionkey/squadlead/acting/key in headset.keys)
headset.keys -= key
qdel(key)
headset.recalculateChannels()
var/obj/item/card/id/card = old_lead.get_idcard()
if(card)
card.access -= ACCESS_MARINE_LEADER
REMOVE_TRAITS_IN(old_lead, TRAIT_SOURCE_SQUAD_LEADER)
old_lead.hud_set_squad()
old_lead.update_inv_head() //updating marine helmet leader overlays
Expand Down Expand Up @@ -778,7 +826,8 @@
//moved the main proc for ft management from human.dm here to make it support both examine and squad info way to edit fts
/datum/squad/proc/manage_fireteams(mob/living/carbon/human/target_mob)
var/obj/item/card/id/ID = target_mob.get_idcard()
if(!ID || !(ID.rank in GLOB.ROLES_MARINES))

if(!ID || ((!(ID.rank in GLOB.ROLES_MARINES) && faction == FACTION_MARINE) || (!(ID.rank in GLOB.ROLES_MARINES_ANTAG) && faction == FACTION_UPP)))
return
if(ID.rank == JOB_SQUAD_LEADER || squad_leader == target_mob) //if SL/aSL are chosen
var/choice = tgui_input_list(squad_leader, "Manage Fireteams and Team leaders.", "Fireteams Management", list("Cancel", "Unassign Fireteam 1 Leader", "Unassign Fireteam 2 Leader", "Unassign Fireteam 3 Leader", "Unassign all Team Leaders"))
Expand Down
Loading

0 comments on commit a3d76ef

Please sign in to comment.