mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
addresses comments
This commit is contained in:
@@ -336,13 +336,15 @@
|
|||||||
/obj/machinery/computer/bsa_control/tgui_act(action, params)
|
/obj/machinery/computer/bsa_control/tgui_act(action, params)
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
if(action == "build")
|
switch(action)
|
||||||
cannon = deploy()
|
if("build")
|
||||||
if(action == "fire")
|
cannon = deploy()
|
||||||
fire(usr)
|
if("fire")
|
||||||
if(action == "recalibrate")
|
fire(usr)
|
||||||
calibrate(usr)
|
if("recalibrate")
|
||||||
|
calibrate(usr)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
/obj/machinery/computer/bsa_control/proc/calibrate(mob/user)
|
/obj/machinery/computer/bsa_control/proc/calibrate(mob/user)
|
||||||
var/list/gps_locators = list()
|
var/list/gps_locators = list()
|
||||||
|
|||||||
@@ -4,6 +4,26 @@ import { Window } from "../layouts";
|
|||||||
|
|
||||||
export const BlueSpaceArtilleryControl = (props, context) => {
|
export const BlueSpaceArtilleryControl = (props, context) => {
|
||||||
const { act, data } = useBackend(context);
|
const { act, data } = useBackend(context);
|
||||||
|
let alertStatus;
|
||||||
|
if (data.ready) {
|
||||||
|
alertStatus = (
|
||||||
|
<LabeledList.Item label="Status" color="green">
|
||||||
|
Ready
|
||||||
|
</LabeledList.Item>
|
||||||
|
);
|
||||||
|
} else if (data.reloadtime_text) {
|
||||||
|
alertStatus = (
|
||||||
|
<LabeledList.Item label="Reloading In" color="red">
|
||||||
|
{data.reloadtime_text}
|
||||||
|
</LabeledList.Item>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
alertStatus = (
|
||||||
|
<LabeledList.Item label="Status" color="red">
|
||||||
|
No cannon connected!
|
||||||
|
</LabeledList.Item>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Window>
|
<Window>
|
||||||
<Window.Content>
|
<Window.Content>
|
||||||
@@ -23,27 +43,18 @@ export const BlueSpaceArtilleryControl = (props, context) => {
|
|||||||
{data.ready === 1 && !!data.target && (
|
{data.ready === 1 && !!data.target && (
|
||||||
<LabeledList.Item label="Firing">
|
<LabeledList.Item label="Firing">
|
||||||
<Button
|
<Button
|
||||||
icon="burn"
|
icon="skull"
|
||||||
content={"FIRE!"}
|
content="FIRE!"
|
||||||
color={"red"}
|
color="red"
|
||||||
onClick={() => act("fire")} />
|
onClick={() => act("fire")} />
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
)}
|
)}
|
||||||
{!data.ready && data.reloadtime_text && (
|
{alertStatus}
|
||||||
<LabeledList.Item label="Reloading In">
|
|
||||||
{data.reloadtime_text}
|
|
||||||
</LabeledList.Item>
|
|
||||||
)}
|
|
||||||
{!data.ready && !data.reloadtime_text && (
|
|
||||||
<LabeledList.Item label="Status" color="red">
|
|
||||||
No cannon connected!
|
|
||||||
</LabeledList.Item>
|
|
||||||
)}
|
|
||||||
{!data.connected && (
|
{!data.connected && (
|
||||||
<LabeledList.Item label="Status">
|
<LabeledList.Item label="Maintenance">
|
||||||
<Button
|
<Button
|
||||||
icon="wrench"
|
icon="wrench"
|
||||||
content={"Complete Deployment"}
|
content="Complete Deployment"
|
||||||
onClick={() => act("build")} />
|
onClick={() => act("build")} />
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
)}
|
)}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user