mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
NTMonitor and Revelation Virus.
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
/datum/computer_file/program/revelation
|
||||
filename = "revelation"
|
||||
filedesc = "Revelation"
|
||||
program_icon_state = "hostile"
|
||||
extended_desc = "This virus can destroy hard drive of system it is executed on. It may be obfuscated to look like another non-malicious program. Once armed, it will destroy the system upon next execution."
|
||||
size = 13
|
||||
requires_ntnet = 0
|
||||
available_on_ntnet = 0
|
||||
available_on_syndinet = 1
|
||||
var/armed = 0
|
||||
|
||||
/datum/computer_file/program/revelation/run_program(var/mob/living/user)
|
||||
. = ..(user)
|
||||
if(armed)
|
||||
activate()
|
||||
|
||||
/datum/computer_file/program/revelation/proc/activate()
|
||||
if(computer)
|
||||
computer.visible_message("<span class='notice'>\The [computer]'s screen brightly flashes and loud electrical buzzing is heard.</span>")
|
||||
computer.enabled = 0
|
||||
computer.update_icon()
|
||||
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
|
||||
var/obj/item/weapon/computer_hardware/battery/battery_module = computer.all_components[MC_CELL]
|
||||
var/obj/item/weapon/computer_hardware/recharger/recharger = computer.all_components[MC_CHARGE]
|
||||
qdel(hard_drive)
|
||||
computer.take_damage(25, BRUTE, 0, 0)
|
||||
if(battery_module && prob(25))
|
||||
qdel(battery_module)
|
||||
computer.visible_message("<span class='notice'>\The [computer]'s battery explodes in rain of sparks.</span>")
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, computer.loc)
|
||||
spark_system.start()
|
||||
|
||||
if(recharger && prob(50))
|
||||
qdel(recharger)
|
||||
computer.visible_message("<span class='notice'>\The [computer]'s recharger explodes in rain of sparks.</span>")
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, computer.loc)
|
||||
spark_system.start()
|
||||
|
||||
|
||||
/datum/computer_file/program/revelation/Topic(href, list/href_list)
|
||||
if(..())
|
||||
return 1
|
||||
switch(href_list["action"])
|
||||
if("PRG_arm")
|
||||
armed = !armed
|
||||
if("PRG_activate")
|
||||
activate()
|
||||
if("PRG_obfuscate")
|
||||
var/mob/living/user = usr
|
||||
var/newname = sanitize(input(user, "Enter new program name: "))
|
||||
if(!newname)
|
||||
return
|
||||
filedesc = newname
|
||||
|
||||
|
||||
/datum/computer_file/program/revelation/clone()
|
||||
var/datum/computer_file/program/revelation/temp = ..()
|
||||
temp.armed = armed
|
||||
return temp
|
||||
|
||||
/datum/computer_file/program/revelation/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "revelation.tmpl", "Revelation Virus", 575, 250)
|
||||
ui.set_auto_update(1)
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/revelation/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
|
||||
data["armed"] = armed
|
||||
|
||||
return data
|
||||
@@ -0,0 +1,90 @@
|
||||
/datum/computer_file/program/ntnetmonitor
|
||||
filename = "ntmonitor"
|
||||
filedesc = "NTNet Diagnostics and Monitoring"
|
||||
program_icon_state = "comm_monitor"
|
||||
extended_desc = "This program monitors stationwide NTNet network, provides access to logging systems, and allows for configuration changes"
|
||||
size = 12
|
||||
requires_ntnet = 1
|
||||
required_access = access_network //Network control is a more secure program.
|
||||
available_on_ntnet = 1
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "ntnet_monitor.tmpl", "NTNet Diagnostics and Monitoring Tool", 575, 700)
|
||||
ui.set_auto_update(1)
|
||||
ui.open()
|
||||
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/Topic(href, list/href_list)
|
||||
if(..())
|
||||
return 1
|
||||
switch(href_list["action"])
|
||||
if("resetIDS")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.resetIDS()
|
||||
return 1
|
||||
if("toggleIDS")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.toggleIDS()
|
||||
return 1
|
||||
if("toggleWireless")
|
||||
. = 1
|
||||
if(!ntnet_global)
|
||||
return 1
|
||||
|
||||
// NTNet is disabled. Enabling can be done without user prompt
|
||||
if(ntnet_global.setting_disabled)
|
||||
ntnet_global.setting_disabled = 0
|
||||
return 1
|
||||
|
||||
// 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 1
|
||||
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 = 1
|
||||
return 1
|
||||
if("purgelogs")
|
||||
. = 1
|
||||
if(ntnet_global)
|
||||
ntnet_global.purge_logs()
|
||||
if("updatemaxlogs")
|
||||
. = 1
|
||||
var/mob/user = usr
|
||||
var/logcount = text2num(input(user,"Enter amount of logs to keep in memory ([MIN_NTNET_LOGS]-[MAX_NTNET_LOGS]):"))
|
||||
if(ntnet_global)
|
||||
ntnet_global.update_max_log_count(logcount)
|
||||
if("toggle_function")
|
||||
. = 1
|
||||
if(!ntnet_global)
|
||||
return 1
|
||||
ntnet_global.toggle_function(text2num(href_list["id"]))
|
||||
|
||||
/datum/computer_file/program/ntnetmonitor/ui_data(mob/user)
|
||||
if(!ntnet_global)
|
||||
return
|
||||
var/list/data = get_header_data()
|
||||
|
||||
data["ntnetstatus"] = ntnet_global.check_function()
|
||||
data["ntnetrelays"] = ntnet_global.relays.len
|
||||
data["idsstatus"] = ntnet_global.intrusion_detection_enabled
|
||||
data["idsalarm"] = ntnet_global.intrusion_detection_alarm
|
||||
|
||||
data["config_softwaredownload"] = ntnet_global.setting_softwaredownload
|
||||
data["config_peertopeer"] = ntnet_global.setting_peertopeer
|
||||
data["config_communication"] = ntnet_global.setting_communication
|
||||
data["config_systemcontrol"] = ntnet_global.setting_systemcontrol
|
||||
|
||||
data["ntnetlogs"] = list()
|
||||
|
||||
for(var/i in ntnet_global.logs)
|
||||
data["ntnetlogs"] += list(list("entry" = i))
|
||||
data["ntnetmaxlogs"] = ntnet_global.setting_maxlogcount
|
||||
|
||||
return data
|
||||
@@ -3,7 +3,7 @@
|
||||
<table>
|
||||
{{for data.programs}}
|
||||
<tr><td>{{:helper.link(value.desc, null, {'action' : 'PC_runprogram', 'name' : value.name})}}
|
||||
<td>{{:helper.link('', 'times', {'action' : 'PC_killprogram', 'name' : value.name}, value.running ? null : 'disabled')}}
|
||||
<td>{{:helper.link('<icon class="fa fa-times"></icon>', null, {'action' : 'PC_killprogram', 'name' : value.name}, value.running ? null : 'disabled')}}
|
||||
{{/for}}
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,98 @@
|
||||
<h1>WIRELESS CONNECTIVITY</h1>
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">
|
||||
Active NTNet Relays:
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
<b>{{:data.ntnetrelays}}</b>
|
||||
</div>
|
||||
{{if data.ntnetrelays}}
|
||||
<div class="itemLabelWide">
|
||||
System status:
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
<b>{{:data.ntnetstatus ? "ENABLED" : "DISABLED"}}</b>
|
||||
</div>
|
||||
<div class="itemLabelWide">
|
||||
Control:
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{:helper.link('TOGGLE', null, {'action' : 'toggleWireless'})}}
|
||||
</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>
|
||||
|
||||
<h1>FIREWALL CONFIGURATION</h1>
|
||||
<div class="statusDisplay" style="overflow: auto;">
|
||||
<table>
|
||||
<tr>
|
||||
<th>PROTOCOL</th>
|
||||
<th>STATUS</th>
|
||||
<th>CONTROL</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Software Downloads</td>
|
||||
<td>{{:data.config_softwaredownload ? 'ENABLED' : 'DISABLED'}}</td>
|
||||
<td>{{:helper.link('TOGGLE', null, {'action' : 'toggle_function', 'id' : 1})}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Peer to Peer Traffic</td>
|
||||
<td>{{:data.config_peertopeer ? 'ENABLED' : 'DISABLED'}}</td>
|
||||
<td>{{:helper.link('TOGGLE', null, {'action' : 'toggle_function', 'id' : 2})}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Communication Systems</td>
|
||||
<td>{{:data.config_communication ? 'ENABLED' : 'DISABLED'}}</td>
|
||||
<td>{{:helper.link('TOGGLE', null, {'action' : 'toggle_function', 'id' : 3})}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Remote System Control</td>
|
||||
<td>{{:data.config_systemcontrol ? 'ENABLED' : 'DISABLED'}}</td>
|
||||
<td>{{:helper.link('TOGGLE', null, {'action' : 'toggle_function', 'id' : 4})}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h1>SECURITY SYSTEMS</h1>
|
||||
{{if data.idsalarm}}
|
||||
<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>
|
||||
{{/if}}
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">Intrusion Detection System:</div>
|
||||
<div class="itemContentNarrow"><b>{{:data.idsstatus ? 'ENABLED' : 'DISABLED'}}</b></div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">Maximal Log Count:</div>
|
||||
<div class="itemContentNarrow"><b>{{:data.ntnetmaxlogs}}</b></div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">Controls:</div>
|
||||
<div class="itemContentNarrow">
|
||||
<table>
|
||||
<tr><td>{{:helper.link('RESET IDS', null, {'action' : 'resetIDS'})}}
|
||||
<tr><td>{{:helper.link('TOGGLE IDS', null, {'action' : 'toggleIDS'})}}
|
||||
<tr><td>{{:helper.link('SET LOG LIMIT', null, {'action' : 'updatemaxlogs'})}}
|
||||
<tr><td>{{:helper.link('PURGE LOGS', null, {'action' : 'purgelogs'})}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<b>System Logs</b>
|
||||
<div class="statusDisplay" style="overflow: auto;">
|
||||
<div class="item">
|
||||
<div class="itemContent" style="width: 100%;">
|
||||
{{for data.ntnetlogs}}
|
||||
{{:value.entry}}<br>
|
||||
{{/for}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
{{:helper.syndicateMode()}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Payload status:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{if data.armed}}
|
||||
ARMED
|
||||
{{else}}
|
||||
DISARMED
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='itemLabel'>
|
||||
Controls:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
<table>
|
||||
<tr><td>{{:helper.link('OBFUSCATE PROGRAM NAME', 'eye-slash', {'action' : 'PRG_obfuscate'})}}
|
||||
<tr><td>{{:helper.link(data.armed ? 'DISARM' : 'ARM', data.armed ? 'crosshairs' : 'info', {'action' : 'PRG_arm'})}}
|
||||
{{:helper.link('ACTIVATE', 'exclamation-triangle', {'action' : 'PRG_activate'}, data.armed ? null : 'disabled', data.armed ? 'redButton' : null)}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1772,9 +1772,11 @@
|
||||
#include "code\modules\modular_computers\file_system\programs\configurator.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\file_browser.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\ntdownloader.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\ntmonitor.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\ntnrc_client.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\nttransfer.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\antagonist\dos.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\antagonist\revelation.dm"
|
||||
#include "code\modules\modular_computers\hardware\_hardware.dm"
|
||||
#include "code\modules\modular_computers\hardware\ai_slot.dm"
|
||||
#include "code\modules\modular_computers\hardware\battery_module.dm"
|
||||
|
||||
Reference in New Issue
Block a user