Skip to content

Commit

Permalink
Removes the ability to disable NTNet wireless.
Browse files Browse the repository at this point in the history
Fixes #10327
  • Loading branch information
Arrow768 committed Jan 6, 2021
1 parent 4e8d120 commit f1bbde7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
required_access_download = access_heads
usage_flags = PROGRAM_CONSOLE | PROGRAM_SILICON_AI
color = LIGHT_COLOR_GREEN

available_on_ntnet = TRUE
nanomodule_path = /datum/nano_module/computer_ntnetmonitor

Expand Down Expand Up @@ -59,24 +59,6 @@
if(ntnet_global)
ntnet_global.toggleIDS()
return TRUE
if(href_list["toggleWireless"])
. = TRUE
if(!ntnet_global)
return TRUE

// NTNet is disabled. Enabling can be done without user prompt
if(ntnet_global.setting_disabled)
ntnet_global.setting_disabled = FALSE
return TRUE

// NTNet is enabled and user is about to shut it down. Let's ask them if they really want to do it, as wirelessly connected computers won't connect without NTNet being enabled (which may prevent people from turning it back on)
var/mob/user = usr
if(!user)
return TRUE
var/response = alert(user, "Really disable NTNet wireless? If your computer is connected wirelessly you won't be able to turn it back on! This will affect all connected wireless devices.", "NTNet shutdown", "Yes", "No")
if(response == "Yes")
ntnet_global.setting_disabled = TRUE
return TRUE
if(href_list["purgelogs"])
. = TRUE
if(ntnet_global)
Expand All @@ -91,4 +73,4 @@
. = TRUE
if(!ntnet_global)
return TRUE
ntnet_global.toggle_function(href_list["toggle_function"])
ntnet_global.toggle_function(href_list["toggle_function"])
43 changes: 18 additions & 25 deletions nano/templates/ntnet_monitor.tmpl
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
<h1>WIRELESS CONNECTIVITY</h1>
<div class="item">
<div class="itemLabelWide">
Active NTNet Relays:
Active NTNet Relays:
</div>
<div class="itemContentNarrow">
<b>{{:data.ntnetrelays}}</b>
<b>{{:data.ntnetrelays}}</b>
</div>
{{if data.ntnetrelays}}
<div class="itemLabelWide">
System status:
System status:
</div>
<div class="itemContentNarrow">
<b>{{:data.ntnetstatus ? "ENABLED" : "DISABLED"}}</b>
</div>
<div class="itemLabelWide">
Control:
<b>{{:data.ntnetstatus ? "ENABLED" : "DISABLED"}}</b>
</div>
<div class="itemContentNarrow">
{{:helper.link('TOGGLE', null, {'toggleWireless' : 1})}}
</div><br><br>
<i>Caution - Disabling wireless transmitters when using wireless device may prevent you from re-enabling them again!</i>
{{else}}
<br><p>Wireless coverage unavailable, no relays are connected.</p>
{{/if}}
</div>
</div>

<h1>FIREWALL CONFIGURATION</h1>
<table>
Expand Down Expand Up @@ -51,34 +44,34 @@

<h1>SECURITY SYSTEMS</h1>
{{if data.idsalarm}}
<div class="statusDisplay" style="overflow: auto;">
<div class="statusDisplay" style="overflow: auto;">
<div class="item">
<div class="itemContent" style="width: 100%;">
<h1>NETWORK INCURSION DETECTED</h1>
<i>An abnormal activity has been detected in the network. Please verify system logs for more information</i>
</div>
</div>
</div>
</div>
{{/if}}
<div class="item">
<div class="itemLabelWide">
Intrusion Detection System:
Intrusion Detection System:
</div>
<div class="itemContentNarrow">
<b>{{:data.idsstatus ? 'ENABLED' : 'DISABLED'}}</b>
<b>{{:data.idsstatus ? 'ENABLED' : 'DISABLED'}}</b>
</div>
</div>
<div class="item">
<div class="itemLabelWide">
Maximal Log Count:
Maximal Log Count:
</div>
<div class="itemContentNarrow">
<b>{{:data.ntnetmaxlogs}}</b>
<b>{{:data.ntnetmaxlogs}}</b>
</div>
</div>
</div>
<div class="item">
<div class="itemLabelWide">
Controls:
Controls:
</div>
<div class="itemContentNarrow">
<table>
Expand All @@ -88,24 +81,24 @@
<tr><td>{{:helper.link('PURGE LOGS', null, {'purgelogs' : 1})}}
</table>
</div>
</div>
</div>
<b>System Logs</b>
<div class="statusDisplay" style="overflow: auto;">
<div class="statusDisplay" style="overflow: auto;">
<div class="item">
<div class="itemContent" style="width: 100%;">
{{for data.ntnetlogs}}
{{:value}}<br>
{{/for}}
</div>
</div>
</div>
</div>
<b>Message Logs</b>
<div class="statusDisplay" style="overflow: auto;">
<div class="statusDisplay" style="overflow: auto;">
<div class="item">
<div class="itemContent" style="width: 100%;">
{{for data.ntnetmessages}}
{{:value}}<br>
{{/for}}
</div>
</div>
</div>
</div>

0 comments on commit f1bbde7

Please sign in to comment.