Skip to content

Commit

Permalink
styling improvements for the MFD
Browse files Browse the repository at this point in the history
  • Loading branch information
mullenpaul committed Nov 14, 2023
1 parent 37c926b commit 1596785
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
10 changes: 5 additions & 5 deletions code/game/machinery/computer/dropship_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -824,12 +824,12 @@
var/obj/docking_port/mobile/marine_dropship/dropship = SSshuttle.getShuttle(shuttle_tag)
if (!istype(dropship))
return
if (dropship.timer && dropship.timeLeft(1) < firemission_envelope.get_total_duration())
to_chat(user, SPAN_WARNING("Not enough time to complete the Fire Mission"))
return
if (!dropship.in_flyby || dropship.mode != SHUTTLE_CALL)
to_chat(user, SPAN_WARNING("Has to be in Fly By mode"))
return
if (dropship.timer && dropship.timeLeft(1) < firemission_envelope.get_total_duration())
to_chat(user, SPAN_WARNING("Not enough time to complete the Fire Mission"))
return

var/result = firemission_envelope.execute_firemission(firemission_envelope.recorded_loc, offset, direction, fmId)
if(result<1)
Expand Down Expand Up @@ -884,8 +884,8 @@
return
var/area/laser_area = get_area(shootloc)
if(!istype(laser_area) || CEILING_IS_PROTECTED(laser_area.ceiling, CEILING_PROTECTION_TIER_1))
if(firemission_envelope.user_is_guided(usr))
to_chat(usr, SPAN_WARNING("Vision Obstructed. You have to go in blind."))
if(firemission_envelope.user_is_guided(user))
to_chat(user, SPAN_WARNING("Vision Obstructed. You have to go in blind."))
firemission_envelope.change_current_loc()
else
firemission_envelope.change_current_loc(shootloc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CreateFiremissionPanel = (props, context) => {
<h3>Create Fire Mission</h3>
</Stack.Item>
<Stack.Item>
Firemission Name
Firemission Name{' '}
<Input
value={fmName}
onInput={(e, value) => setFmName(value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CrtPanel } from '../CrtPanel';
import { Table, TableCell, TableRow } from '../../components/Table';
import { InfernoNode } from 'inferno';
import { ButtonProps } from './types';
import { classes } from 'common/react';

export interface MfdProps {
panelStateId: string;
Expand All @@ -24,7 +25,10 @@ export const MfdButton = (props: ButtonProps, context) => {
props.onClick();
}
}}
className="mfd_button">
className={classes([
props.children && 'mfd_button_active',
!props.children && 'mfd_button',
])}>
{props.children}
</Button>
);
Expand Down
43 changes: 30 additions & 13 deletions tgui/packages/tgui/styles/interfaces/DropshipWeapons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@
}

.WeaponsConsole {
.primarypanel {
width: fit-content;
height: 512px;
width: 512px;
background-color: #121212;
border-collapse: separate;
border-radius: 16px;
border: 4px solid #080808;
padding: 4px;
}

.displaypanel {
background-color: #000000;
}

.NavigationMenu {
height: 512px;
width: 512px;
Expand Down Expand Up @@ -126,16 +141,28 @@
}

.mfd_button {
background-color: black;
background-color: #121212;
width: 50px;
height: 50px;
font-size: smaller;
font-size: normal;
font-family: monospace;
line-height: 45px;
border-style: outset;
border-color: #00e94e;
border-color: #121212;
box-shadow: 0px 0px 0px 4px black;
overflow: hidden;
padding: 0;

.Icon {
font-size: large;
padding-left: 8px;
padding-top: 12px;
}
}

.mfd_button_active {
@extend .mfd_button;
border-color: #00e94e;
}

.ButtonPanel {
Expand Down Expand Up @@ -177,16 +204,6 @@
}
}

.primarypanel {
width: fit-content;
height: 512px;
width: 512px;
}

.Table {
background-color: black;
}

.Table__cell {
vertical-align: middle;
padding: 2px;
Expand Down

0 comments on commit 1596785

Please sign in to comment.