Skip to content

Commit

Permalink
Merge branch 'master' into SG-Adaptable-ammunition-overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
BonniePandora committed Nov 4, 2024
2 parents dc3deca + d774c35 commit dbc3029
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 31 deletions.
6 changes: 6 additions & 0 deletions code/datums/ammo/bullet/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@
to_chat(living_mob, SPAN_HIGHDANGER("The impact knocks you off-balance!"))
living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET)

/datum/ammo/bullet/rifle/heavy/iff/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))

//====== 10x31 Type 71

/datum/ammo/bullet/rifle/heavy/upp
Expand Down
8 changes: 4 additions & 4 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@
id.access.Remove(squad_one_access, squad_two_access)

for(var/obj/item/device/radio/headset/cycled_headset in H)
if(!("Platoon Sergeant" in cycled_headset.tracking_options))
if(!("Section Sergeant" in cycled_headset.tracking_options))
continue

cycled_headset.locate_setting = cycled_headset.tracking_options["Platoon Sergeant"]
cycled_headset.locate_setting = cycled_headset.tracking_options["Section Sergeant"]

/datum/squad/proc/assign_ft_leader(fireteam, mob/living/carbon/human/H, upd_ui = TRUE)
if(fireteam_leaders[fireteam])
Expand All @@ -843,10 +843,10 @@
to_chat(H, FONT_SIZE_HUGE(SPAN_BLUE("You were assigned as [fireteam] Team Leader.")))

for(var/obj/item/device/radio/headset/cycled_headset in H)
if(!("Platoon Sergeant" in cycled_headset.tracking_options))
if(!("Section Sergeant" in cycled_headset.tracking_options))
continue

cycled_headset.locate_setting = cycled_headset.tracking_options["Platoon Sergeant"]
cycled_headset.locate_setting = cycled_headset.tracking_options["Section Sergeant"]

/datum/squad/proc/unassign_ft_leader(fireteam, clear_group_id, upd_ui = TRUE)
if(!fireteam_leaders[fireteam])
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

var/list/inbuilt_tracking_options = list(
"Platoon Commander" = TRACKER_PLTCO,
"Platoon Sergeant" = TRACKER_SL,
"Section Sergeant" = TRACKER_SL,
"Squad Sergeant" = TRACKER_FTL,
"Landing Zone" = TRACKER_LZ
)
Expand Down Expand Up @@ -410,8 +410,8 @@
/obj/item/device/radio/headset/almayer/equipped(mob/living/carbon/human/user, slot)
. = ..()

if((user == user.assigned_squad?.fireteam_leaders["SQ1"] || user == user.assigned_squad?.fireteam_leaders["SQ2"]) && ("Platoon Sergeant" in tracking_options))
locate_setting = tracking_options["Platoon Sergeant"]
if((user == user.assigned_squad?.fireteam_leaders["SQ1"] || user == user.assigned_squad?.fireteam_leaders["SQ2"]) && ("Section Sergeant" in tracking_options))
locate_setting = tracking_options["Section Sergeant"]
return

if(((user in user.assigned_squad?.fireteams["SQ1"]) || (user in user.assigned_squad?.fireteams["SQ2"])) && ("Squad Sergeant" in tracking_options))
Expand Down Expand Up @@ -614,7 +614,7 @@

inbuilt_tracking_options = list(
"Platoon Commander" = TRACKER_PLTCO,
"Platoon Sergeant" = TRACKER_ASL,
"Section Sergeant" = TRACKER_ASL,
"Landing Zone" = TRACKER_LZ
)

Expand Down
18 changes: 9 additions & 9 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@
if(!current_squad)
return TRUE

var/input = tgui_input_text(user, "Please write a message to announce to the squad:", "Squad Message")
var/input = tgui_input_text(user, "Please write a message to announce to the section:", "Section Message")
if(!input)
return TRUE

current_squad.send_message(input, 1) //message, adds username
current_squad.send_maptext(input, "Platoon Message:")
current_squad.send_maptext(input, "Section Message:")
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("Message '[input]' sent to all Marines of platoon '[current_squad]'.")]")
log_overwatch("[key_name(user)] sent '[input]' to platoon [current_squad].")

Expand All @@ -405,14 +405,14 @@
if(!current_squad)
return TRUE

var/input = tgui_input_text(user, "Please write a message to announce to the Platoon leader:", "SL Message")
var/input = tgui_input_text(user, "Please write a message to announce to the Section Leader:", "SL Message")
if(!input)
return TRUE

current_squad.send_message(input, 1, 1) //message, adds username, only to leader
current_squad.send_maptext(input, "Platoon Sergeant Message:", 1)
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("Message '[input]' sent to Platoon Sergeant [current_squad.squad_leader] of platoon '[current_squad]'.")]")
log_overwatch("[key_name(user)] sent '[input]' to Platoon Sergeant [current_squad.squad_leader] of squad [current_squad].")
current_squad.send_maptext(input, "Section Sergeant Message:", 1)
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("Message '[input]' sent to Section Sergeant [current_squad.squad_leader] of platoon '[current_squad]'.")]")
log_overwatch("[key_name(user)] sent '[input]' to Section Sergeant [current_squad.squad_leader] of squad [current_squad].")

var/comm_paygrade = user.get_paygrade()

Expand All @@ -438,7 +438,7 @@
current_squad.send_maptext(current_squad.secondary_objective, "Secondary Objective:")

if("set_primary")
var/input = sanitize_control_chars(stripped_input(usr, "What will be the squad's primary objective?", "Primary Objective"))
var/input = sanitize_control_chars(stripped_input(usr, "What will be the section's primary objective?", "Primary Objective"))
if(current_squad && input)
current_squad.primary_objective = "[input] ([worldtime2text()])"
current_squad.send_message("Your primary objective has been changed to '[input]'. See Status pane for details.")
Expand All @@ -448,7 +448,7 @@
return TRUE

if("set_secondary")
var/input = sanitize_control_chars(stripped_input(usr, "What will be the squad's secondary objective?", "Secondary Objective"))
var/input = sanitize_control_chars(stripped_input(usr, "What will be the section's secondary objective?", "Secondary Objective"))
if(input)
current_squad.secondary_objective = input + " ([worldtime2text()])"
current_squad.send_message("Your secondary objective has been changed to '[input]'. See Status pane for details.")
Expand Down Expand Up @@ -477,7 +477,7 @@
switch(z_hidden)
if(HIDE_NONE)
z_hidden = HIDE_ALMAYER
to_chat(user, "[icon2html(src, usr)] [SPAN_NOTICE("Marines on the Almayer are now hidden.")]")
to_chat(user, "[icon2html(src, usr)] [SPAN_NOTICE("Marines on the deployed vessel are now hidden.")]")
if(HIDE_ALMAYER)
z_hidden = HIDE_GROUND
to_chat(user, "[icon2html(src, usr)] [SPAN_NOTICE("Marines on the ground are now hidden.")]")
Expand Down
3 changes: 1 addition & 2 deletions code/modules/cm_marines/smartgun_mount.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
desc = "A box of 700, 10x28mm caseless tungsten rounds for the M56D heavy machine gun system. Just click the M56D with this to reload it."
w_class = SIZE_MEDIUM
icon_state = "m56d_drum"
flags_magazine = NO_FLAGS //can't be refilled or emptied by hand
caliber = "10x28mm"
max_rounds = 700
default_ammo = /datum/ammo/bullet/rifle/heavy
Expand Down Expand Up @@ -442,7 +441,7 @@
health = 200
var/health_max = 200 //Why not just give it sentry-tier health for now.
var/atom/target = null // required for shooting at things.
var/datum/ammo/bullet/rifle/heavy/ammo = /datum/ammo/bullet/rifle/heavy
var/datum/ammo/bullet/rifle/heavy/iff/ammo = /datum/ammo/bullet/rifle/heavy/iff
var/obj/projectile/in_chamber = null
var/locked = 0 //1 means its locked inplace (this will be for sandbag MGs)
var/muzzle_flash_lum = 4
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/m41aMK1(new_human.back), WEAR_IN_BACK)

/datum/equipment_preset/uscm/leader_equipped/random
name = "USCM Platoon Sergeant (Equipped Random)"
name = "USCM Section Sergeant (Equipped Random)"

/datum/equipment_preset/uscm/leader_equipped/random/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine(new_human), WEAR_BODY)
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/archive/2024-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
Max-023:
- bugfix: section sergeant lockers now listing the appropriate job titles
- spellcheck: addressed some outdated descriptions with the section sergeant locker.
2024-11-03:
BonniePandora:
- bugfix: Section sergeants can once more use their squad info window to swap people
between squads or assign acting SL's to the two teams
- ui: Overwatch console properly references sections and section leaders in the
buttons now instead of squads or platoons
8 changes: 4 additions & 4 deletions tgui/packages/tgui/interfaces/OverwatchConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ const MainDashboard = (props) => {
icon="envelope"
onClick={() => act('message')}
>
MESSAGE SQUAD
MESSAGE SECTION
</Button>
<Button
inline
width="45%"
icon="person"
onClick={() => act('sl_message')}
>
MESSAGE SQUAD LEADER
MESSAGE SECTION LEADER
</Button>
</Box>
</Section>
Expand Down Expand Up @@ -244,7 +244,7 @@ const RoleTable = (props) => {
<Table m="1px" fontSize="12px" bold>
<Table.Row>
<Table.Cell textAlign="center" p="4px">
Platoon Sergeant
Section Sergeant
</Table.Cell>
<Table.Cell collapsing p="4px">
Squad Sergeants
Expand Down Expand Up @@ -322,7 +322,7 @@ const SquadMonitor = (props) => {
a = a.role;
b = b.role;
const roleValues = {
'Platoon Sergeant': 10,
'Section Sergeant': 10,
'Squad Sergeant': 9,
'Weapons Specialist': 8,
Smartgunner: 7,
Expand Down
14 changes: 7 additions & 7 deletions tgui/packages/tgui/interfaces/SquadInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface FireTeams {
}

interface SquadProps {
pltsgt?: SquadLeadEntry;
sctsgt?: SquadLeadEntry;
fireteams: FireTeams;
mar_free: SquadMarineEntry[];
total_mar: number;
Expand All @@ -44,7 +44,7 @@ interface SquadProps {
squad: string;
partial_squad_ref: string;
squad_color: string;
is_lead: 'pltsgt' | 'SQ1' | 'SQ2' | 0;
is_lead: 'sctsgt' | 'SQ1' | 'SQ2' | 0;
objective: { primary?: string; secondary?: string };
}

Expand Down Expand Up @@ -101,7 +101,7 @@ const FireTeamLead = (props: {
</Flex.Item>
<Flex.Item>
{assignedFireteamLead.name !== 'Not assigned' &&
data.is_lead === 'pltsgt' && <Button icon="xmark" onClick={demote} />}
data.is_lead === 'sctsgt' && <Button icon="xmark" onClick={demote} />}
</Flex.Item>
</Flex>
);
Expand Down Expand Up @@ -166,7 +166,7 @@ const FireTeam = (props: { readonly sqsgt: string }) => {
<TableCell className="RoleCell">Role</TableCell>
<TableCell className="RankCell">Rank</TableCell>
<TableCell className="MemberCell">Member</TableCell>
{data.is_lead === 'pltsgt' && (
{data.is_lead === 'sctsgt' && (
<TableCell className="ActionCell">
{props.sqsgt === 'Unassigned' ? 'Assign FT' : 'Actions'}
</TableCell>
Expand Down Expand Up @@ -234,7 +234,7 @@ const FireTeamMember = (props: {
<TableCell>{props.member.paygrade}</TableCell>
<TableCell>{props.member.name}</TableCell>

{data.is_lead === 'pltsgt' && (
{data.is_lead === 'sctsgt' && (
<TableCell>
<Stack fill justify="center">
{props.team === 'Unassigned' && (
Expand Down Expand Up @@ -290,8 +290,8 @@ export const SquadInfo = () => {
<Flex fill={1} justify="space-around" direction="column">
<Flex.Item>
<Section
title={`${data.squad} Platoon Sergeant: ${
data.pltsgt?.name ?? 'None'
title={`${data.squad} Section Sergeant: ${
data.sctsgt?.name ?? 'None'
}`}
>
<SquadObjectives />
Expand Down

0 comments on commit dbc3029

Please sign in to comment.