Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes overwatch consoles on WO #5443

Merged
merged 5 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,12 @@
has_supply_pad = TRUE
data["can_launch_crates"] = has_supply_pad
data["has_crate_loaded"] = supply_crate
data["supply_cooldown"] = COOLDOWN_TIMELEFT(current_squad, next_supplydrop)
data["ob_cooldown"] = COOLDOWN_TIMELEFT(GLOB.almayer_orbital_cannon, ob_firing_cooldown)
data["ob_loaded"] = GLOB.almayer_orbital_cannon.chambered_tray
data["can_launch_obs"] = GLOB.almayer_orbital_cannon
if(GLOB.almayer_orbital_cannon)
data["ob_cooldown"] = COOLDOWN_TIMELEFT(GLOB.almayer_orbital_cannon, ob_firing_cooldown)
data["ob_loaded"] = GLOB.almayer_orbital_cannon.chambered_tray

data["supply_cooldown"] = COOLDOWN_TIMELEFT(current_squad, next_supplydrop)
data["operator"] = operator.name

return data
Expand Down
16 changes: 9 additions & 7 deletions tgui/packages/tgui/interfaces/OverwatchConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,21 @@ const SquadPanel = (props, context) => {
Supply Drop
</Tabs.Tab>
)}
<Tabs.Tab
selected={category === 'ob'}
icon="bomb"
onClick={() => setCategory('ob')}>
Orbital Bombardment
</Tabs.Tab>
{!!data.can_launch_obs && (
<Tabs.Tab
selected={category === 'ob'}
icon="bomb"
onClick={() => setCategory('ob')}>
Orbital Bombardment
</Tabs.Tab>
)}
<Tabs.Tab icon="map" onClick={() => act('tacmap_unpin')}>
Tactical Map
</Tabs.Tab>
</Tabs>
{category === 'monitor' && <SquadMonitor />}
{category === 'supply' && data.can_launch_crates && <SupplyDrop />}
{category === 'ob' && <OrbitalBombardment />}
{category === 'ob' && data.can_launch_obs && <OrbitalBombardment />}
</>
);
};
Expand Down