Particle Accelerators are easier to hack + PA wire tidying (#10027)

This commit is contained in:
Hockaa
2020-09-23 11:28:13 +01:00
committed by GitHub
parent 86d0645d71
commit 683eb244d0
3 changed files with 18 additions and 16 deletions
+10 -15
View File
@@ -1,12 +1,18 @@
/datum/wires/particle_acc/control_box
wire_count = 5
wire_count = 4
holder_type = /obj/machinery/particle_accelerator/control_box
var/const/PARTICLE_TOGGLE_WIRE = 1 // Toggles whether the PA is on or not.
var/const/PARTICLE_STRENGTH_WIRE = 2 // Determines the strength of the PA.
var/const/PARTICLE_INTERFACE_WIRE = 4 // Determines the interface showing up.
var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be.
//var/const/PARTICLE_NOTHING_WIRE = 16 // Blank wire
var/const/PARTICLE_LIMIT_POWER_WIRE = 4 // Determines how strong the PA can be.
/datum/wires/particle_acc/control_box/GetInteractWindow()
var/obj/machinery/particle_accelerator/control_box/C = holder
. += ..()
. += text("<br>\n[]<br>\n[]<br>\n[]",
((C.active && C.assembled) ? "The firing light is on." : "The firing light is off."),
(C.strength ? "The strength light is blinking." : "The strength light is off."),
(C.strength_upper_limit == 2 ? "The strength limiter light is on." : "The strength limiter light is off."))
/datum/wires/particle_acc/control_box/CanUse(var/mob/living/L)
var/obj/machinery/particle_accelerator/control_box/C = holder
@@ -24,9 +30,6 @@ var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be.
if(PARTICLE_STRENGTH_WIRE)
C.add_strength()
if(PARTICLE_INTERFACE_WIRE)
C.interface_control = !C.interface_control
if(PARTICLE_LIMIT_POWER_WIRE)
C.visible_message("\icon[C]<b>[C]</b> makes a large whirring noise.")
@@ -38,14 +41,6 @@ var/const/PARTICLE_LIMIT_POWER_WIRE = 8 // Determines how strong the PA can be.
if(C.active == !mended)
C.toggle_power(usr)
if(PARTICLE_STRENGTH_WIRE)
for(var/i = 1; i < 3; i++)
C.remove_strength()
if(PARTICLE_INTERFACE_WIRE)
C.interface_control = mended
if(PARTICLE_LIMIT_POWER_WIRE)
C.strength_upper_limit = (mended ? 2 : 3)
if(C.strength_upper_limit < C.strength)