Skip to content

Commit

Permalink
fixy
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGamerdk committed Sep 24, 2023
1 parent ab44c0d commit f102a35
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@
roundstart = FALSE
prepend_squad_name_to_assignment = FALSE

locked = TRUE

max_engineers = 0
max_medics = 0
max_specialists = 0
Expand Down
4 changes: 4 additions & 0 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
data["primary_objective"] = current_squad.primary_objective
data["secondary_objective"] = current_squad.secondary_objective

data["squad_locked"] = current_squad.locked

data["marines"] = list()

var/leader_count = 0
Expand Down Expand Up @@ -684,6 +686,8 @@
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("No squad selected!")]")
return
var/datum/squad/S = current_squad
if(current_squad.locked)
return
var/mob/living/carbon/human/transfer_marine = tgui_input_list(usr, "Choose marine to transfer", "Transfer Marine", current_squad.marines_list)
if(!transfer_marine || S != current_squad) //don't change overwatched squad, idiot.
return
Expand Down
14 changes: 8 additions & 6 deletions tgui/packages/tgui/interfaces/OverwatchConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,14 @@ const SquadMonitor = (props, context) => {
Show hidden
</Button>
)}
<Button
color="yellow"
icon="arrow-right"
onClick={() => act('transfer_marine')}>
Transfer Marine
</Button>
{!data.squad_locked && (
<Button
color="yellow"
icon="arrow-right"
onClick={() => act('transfer_marine')}>
Transfer Marine
</Button>
)}
<Button
color="red"
icon="running"
Expand Down

0 comments on commit f102a35

Please sign in to comment.