Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+15 -25
View File
@@ -3,7 +3,7 @@
desc = "This device injects antimatter into connected shielding units, the more antimatter injected the more power produced. Wrench the device to set it up."
icon = 'icons/obj/machines/antimatter.dmi'
icon_state = "control"
anchored = 0
anchored = 1
density = 1
use_power = 1
idle_power_usage = 100
@@ -37,10 +37,7 @@
/obj/machinery/power/am_control_unit/Destroy()//Perhaps damage and run stability checks rather than just del on the others
for(var/obj/machinery/am_shielding/AMS in linked_shielding)
AMS.control_unit = null
qdel(AMS)
qdel(fueljar)
fueljar = null
return ..()
@@ -59,7 +56,7 @@
if(!fueljar)//No fuel but we are on, shutdown
toggle_power()
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
//Angry buzz or such here
return
add_avail(stored_power)
@@ -138,15 +135,8 @@
/obj/machinery/power/am_control_unit/power_change()
..()
if(stat & NOPOWER)
if(active)
toggle_power(1)
else
use_power = 0
else if(!stat && anchored)
use_power = 1
if(stat & NOPOWER && active)
toggle_power()
return
@@ -160,14 +150,14 @@
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(!anchored)
playsound(src.loc, W.usesound, 75, 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] secures the [src.name] to the floor.", \
"<span class='notice'>You secure the anchor bolts to the floor.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
src.anchored = 1
connect_to_network()
else if(!linked_shielding.len > 0)
playsound(src.loc, W.usesound, 75, 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user.visible_message("[user.name] unsecures the [src.name].", \
"<span class='notice'>You remove the anchor bolts.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
@@ -180,18 +170,18 @@
if(fueljar)
user << "<span class='warning'>There is already a [fueljar] inside!</span>"
return
if(!user.unEquip(W))
return
fueljar = W
W.forceMove(src)
W.loc = src
if(user.client)
user.client.screen -= W
user.unEquip(W)
user.update_icons()
user.visible_message("[user.name] loads an [W.name] into the [src.name].", \
"<span class='notice'>You load an [W.name].</span>", \
"<span class='italics'>You hear a thunk.</span>")
else
return ..()
/obj/machinery/power/am_control_unit/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BRUTE)
@@ -241,13 +231,13 @@
return
/obj/machinery/power/am_control_unit/proc/toggle_power(powerfail = 0)
/obj/machinery/power/am_control_unit/proc/toggle_power()
active = !active
if(active)
use_power = 2
visible_message("The [src.name] starts up.")
else
use_power = !powerfail
use_power = 1
visible_message("The [src.name] shuts down.")
update_icon()
return
@@ -289,7 +279,7 @@
/obj/machinery/power/am_control_unit/interact(mob/user)
if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER)))
if(!isAI(user))
if(!istype(user, /mob/living/silicon/ai))
user.unset_machine()
user << browse(null, "window=AMcontrol")
return
@@ -360,4 +350,4 @@
check_core_stability()
updateDialog()
return
return