mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Icon changes (#1400)
changes: imageadd: "Telecomms machines now have open-panel sprites." imageadd: "Added a new particle accelerator sprite." Additional changes: NTNet relay now has its own sprite. NTNet relay now indicates its status on its sprite. Fixes the Select-Equipment admin verb's ERT loadouts not being listed.
This commit is contained in:
@@ -408,7 +408,11 @@
|
||||
"emergency response team",
|
||||
"nanotrasen representative",
|
||||
"nanotrasen officer",
|
||||
"nanotrasen captain"
|
||||
"nanotrasen captain",
|
||||
"protection detail",
|
||||
"leading trooper",
|
||||
"ert commander",
|
||||
"odin security"
|
||||
)
|
||||
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in dresspacks
|
||||
if (isnull(dresscode))
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#define NTR_NORMAL 0
|
||||
#define NTR_OVERLOAD 1
|
||||
#define NTR_DISABLE 2
|
||||
#define NTR_POWERLOSS 3
|
||||
|
||||
// Relays don't handle any actual communication. Global NTNet datum does that, relays only tell the datum if it should or shouldn't work.
|
||||
/obj/machinery/ntnet_relay
|
||||
name = "NTNet Quantum Relay"
|
||||
@@ -5,7 +10,8 @@
|
||||
use_power = 2
|
||||
active_power_usage = 20000 //20kW, apropriate for machine that keeps massive cross-Zlevel wireless network operational.
|
||||
idle_power_usage = 100
|
||||
icon_state = "bus"
|
||||
icon_state = "ntnet"
|
||||
icon = 'icons/obj/machines/telecomms.dmi'
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/ntnet/NTNet = null // This is mostly for backwards reference and to allow varedit modifications from ingame.
|
||||
@@ -18,6 +24,7 @@
|
||||
var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay
|
||||
var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time.
|
||||
|
||||
var/overlay_cache = list()
|
||||
|
||||
// TODO: Implement more logic here. For now it's only a placeholder.
|
||||
/obj/machinery/ntnet_relay/operable()
|
||||
@@ -29,11 +36,44 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/ntnet_relay/proc/get_state()
|
||||
if (!enabled)
|
||||
return NTR_DISABLE
|
||||
if (dos_failure)
|
||||
return NTR_OVERLOAD
|
||||
if (!operable())
|
||||
return NTR_POWERLOSS
|
||||
|
||||
return NTR_NORMAL
|
||||
|
||||
/obj/machinery/ntnet_relay/update_icon()
|
||||
if(operable())
|
||||
icon_state = "bus"
|
||||
else
|
||||
icon_state = "bus_off"
|
||||
var/state = get_state()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
if (panel_open)
|
||||
icon_state += "_o"
|
||||
|
||||
switch (state)
|
||||
if (NTR_NORMAL)
|
||||
overlays += overlay_cache["ok"]
|
||||
overlays -= overlay_cache["problem"]
|
||||
overlays -= overlay_cache["error"]
|
||||
|
||||
if (NTR_OVERLOAD)
|
||||
overlays -= overlay_cache["ok"]
|
||||
overlays += overlay_cache["problem"]
|
||||
overlays -= overlay_cache["error"]
|
||||
|
||||
if (NTR_DISABLE)
|
||||
overlays -= overlay_cache["ok"]
|
||||
overlays -= overlay_cache["problem"]
|
||||
overlays += overlay_cache["error"]
|
||||
|
||||
if (NTR_POWERLOSS)
|
||||
overlays -= overlay_cache["ok"]
|
||||
overlays -= overlay_cache["problem"]
|
||||
overlays -= overlay_cache["error"]
|
||||
icon_state += "_off"
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
if(operable())
|
||||
@@ -93,6 +133,13 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(src,15)
|
||||
component_parts += new /obj/item/weapon/circuitboard/ntnet_relay(src)
|
||||
|
||||
overlay_cache = list()
|
||||
overlay_cache["ok"] = image('icons/obj/machines/telecomms.dmi', "ntnet_o_ok")
|
||||
overlay_cache["problem"] = image('icons/obj/machines/telecomms.dmi', "ntnet_o_problem")
|
||||
overlay_cache["error"] = image('icons/obj/machines/telecomms.dmi', "ntnet_o_error")
|
||||
|
||||
update_icon()
|
||||
|
||||
if(ntnet_global)
|
||||
ntnet_global.relays.Add(src)
|
||||
NTNet = ntnet_global
|
||||
@@ -127,4 +174,8 @@
|
||||
new/obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
..()
|
||||
|
||||
#undef NTR_NORMAL
|
||||
#undef NTR_OVERLOAD
|
||||
#undef NTR_DISABLE
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/effect/accelerated_particle
|
||||
name = "Accelerated Particles"
|
||||
desc = "Small things moving very fast."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "particle"//Need a new icon for this
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
@@ -61,7 +61,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
/obj/structure/particle_accelerator
|
||||
name = "Particle Accelerator"
|
||||
desc = "Part of a Particle Accelerator."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "none"
|
||||
anchored = 0
|
||||
density = 1
|
||||
@@ -84,11 +84,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
icon_state = "end_cap"
|
||||
reference = "end_cap"
|
||||
|
||||
/obj/structure/particle_accelerator/update_icon()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/verb/rotate()
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
/obj/structure/particle_accelerator/fuel_chamber
|
||||
name = "EM Acceleration Chamber"
|
||||
desc_holder = "This is where the Alpha particles are accelerated to <b><i>radical speeds</i></b>."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon_state = "fuel_chamber"
|
||||
reference = "fuel_chamber"
|
||||
|
||||
/obj/structure/particle_accelerator/fuel_chamber/update_icon()
|
||||
..()
|
||||
return
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/machinery/particle_accelerator/control_box
|
||||
name = "Particle Accelerator Control Computer"
|
||||
desc = "This controls the density of the particles."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "control_box"
|
||||
reference = "control_box"
|
||||
anchored = 0
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter
|
||||
name = "EM Containment Grid"
|
||||
desc_holder = "This launchs the Alpha particles, might not want to stand near this end."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
desc_holder = "This emits alpha particles, you might not want to stand near this end."
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "none"
|
||||
var/fire_delay = 50
|
||||
var/last_shot = 0
|
||||
@@ -20,17 +20,12 @@
|
||||
icon_state = "emitter_right"
|
||||
reference = "emitter_right"
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/update_icon()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(var/delay)
|
||||
if(delay && delay >= 0)
|
||||
src.fire_delay = delay
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/emit_particle(var/strength = 0)
|
||||
if((src.last_shot + src.fire_delay) <= world.time)
|
||||
src.last_shot = world.time
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/structure/particle_accelerator/power_box
|
||||
name = "Particle Focusing EM Lens"
|
||||
desc_holder = "This uses electromagnetic waves to focus Alpha-Particles."
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "power_box"
|
||||
reference = "power_box"
|
||||
|
||||
/obj/structure/particle_accelerator/fuel_chamber
|
||||
name = "EM Acceleration Chamber"
|
||||
desc_holder = "This is where the Alpha particles are accelerated to <b><i>radical speeds</i></b>."
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "fuel_chamber"
|
||||
reference = "fuel_chamber"
|
||||
@@ -1,10 +0,0 @@
|
||||
/obj/structure/particle_accelerator/power_box
|
||||
name = "Particle Focusing EM Lens"
|
||||
desc_holder = "This uses electromagnetic waves to focus the Alpha-Particles."
|
||||
icon = 'icons/obj/machines/particle_accelerator2.dmi'
|
||||
icon_state = "power_box"
|
||||
reference = "power_box"
|
||||
|
||||
/obj/structure/particle_accelerator/power_box/update_icon()
|
||||
..()
|
||||
return
|
||||
Reference in New Issue
Block a user