Improvements to NTNet and file mechanics

- Small adjustments to NTNet behaviour.
- Adds "undeletable" and "unmovable" flags for computer files. Intended to use for ROM-style programs that are necessary for PC to work.
- Programs now know NTNet status and can act differently depending on this.
This commit is contained in:
Atlantis
2015-07-03 06:10:47 +02:00
parent 566c1d0963
commit 1987b9f0f1
8 changed files with 22 additions and 7 deletions
@@ -16,6 +16,7 @@ var/global/datum/ntnet/ntnet_global = new()
ntnet_global = src // There can be only one.
for(var/obj/machinery/ntnet_relay/R in machines)
relays.Add(R)
R.NTNet = src
/datum/ntnet/proc/check_function(var/specific_action = 0)
if(!relays || !relays.len) // No relays found. NTNet is down
@@ -5,6 +5,9 @@
use_power = 1
idle_power_usage = 20000 //20kW, apropriate for machine that keeps massive cross-Zlevel wireless network operational.
icon_state = "bus"
anchored = 1
density = 1
var/NTNet = null // This is mostly for backwards reference and to allow varedit modifications from ingame.
// TODO: Implement more logic here. For now it's only a placeholder.
/obj/machinery/ntnet_relay/proc/is_operational()
@@ -15,7 +18,11 @@
/obj/machinery/ntnet_relay/New()
if(ntnet_global)
ntnet_global.relays.Add(src)
NTNet = ntnet_global
..()
/obj/machinery/ntnet_relay/Destroy()
if(ntnet_global)
ntnet_global.relays.Remove(src)
ntnet_global.relays.Remove(src)
NTNet = null
..()