Skip to content

Commit

Permalink
Funny button
Browse files Browse the repository at this point in the history
  • Loading branch information
Bokkiewokkie committed Oct 29, 2023
1 parent 421f17b commit 1d29f22
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion nsv13/code/datums/starsystem_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
sys_inf["visited"] = 0
sys_inf["hidden"] = (SS.sector != current_sector)
var/label = ""
if(SS.hidden)
label += " HIDDEN"
if(SS.is_hypergate)
label += " HYPERGATE"
if(SS.is_capital && !label)
label = "CAPITAL"
label = " CAPITAL"
if(SS.trader && SS.sector != 3) //Use shortnames in brazil for readability
label = " [SS.trader.name]"
if(SS.trader && SS.sector == 3) //Use shortnames in brazil for readability
Expand Down Expand Up @@ -220,6 +222,11 @@
usr.client.debug_variables(target)
if(command == "Delete")
usr.client.cmd_admin_delete(target)
if("hideSystem")
var/datum/star_system/target = locate(params["sys_id"])
if(!istype(target))
return
target.hidden = !target.hidden
if("systemVV")
var/datum/star_system/target = locate(params["sys_id"])
if(!istype(target))
Expand Down
6 changes: 5 additions & 1 deletion tgui/packages/tgui/interfaces/StarsystemManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ export const StarsystemManager = (props, context) => {
return (
<Section title={`${system.name}`}>
<Button
content={"Send Fleet"}
content={"Send fleet"}
icon={"hammer"}
onClick={() => act('createFleet', { sys_id: system.sys_id })} />
<Button
content={"Create object"}
icon={"sun"}
onClick={() => act('createObject', { sys_id: system.sys_id })} />
<Button
content={"Hide/Unhide system"}
icon={"eye-slash"}
onClick={() => act('hideSystem', { sys_id: system.sys_id })} />
<Button
content={"Variables"}
icon={"eye"}
Expand Down

0 comments on commit 1d29f22

Please sign in to comment.