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
+2 -3
View File
@@ -1,6 +1,5 @@
/datum/wires/airalarm
holder_type = /obj/machinery/airalarm
proper_name = "Air Alarm"
/datum/wires/airalarm/New(atom/holder)
wires = list(
@@ -31,13 +30,13 @@
if(!A.shorted)
A.shorted = TRUE
A.update_icon()
addtimer(A, "reset", 1200, TIMER_NORMAL, wire)
addtimer(A, "reset", 1200, FALSE, wire)
if(WIRE_IDSCAN) // Toggle lock.
A.locked = !A.locked
if(WIRE_AI) // Disable AI control for a while.
if(!A.aidisabled)
A.aidisabled = TRUE
addtimer(A, "reset", 100, TIMER_NORMAL, wire)
addtimer(A, "reset", 100, FALSE, wire)
if(WIRE_PANIC) // Toggle panic siphon.
if(!A.shorted)
if(A.mode == 1) // AALARM_MODE_SCRUB
+6 -12
View File
@@ -1,6 +1,5 @@
/datum/wires/airlock
holder_type = /obj/machinery/door/airlock
proper_name = "Airlock"
/datum/wires/airlock/secure
randomize = TRUE
@@ -18,7 +17,7 @@
/datum/wires/airlock/interactable(mob/user)
var/obj/machinery/door/airlock/A = holder
if(!issilicon(user) && A.isElectrified() && A.shock(user, 100))
if(!istype(user, /mob/living/silicon) && A.isElectrified() && A.shock(user, 100))
return FALSE
if(A.panel_open)
return TRUE
@@ -104,21 +103,17 @@
if(WIRE_POWER1, WIRE_POWER2) // Cut to loose power, repair all to gain power.
if(mend && !is_cut(WIRE_POWER1) && !is_cut(WIRE_POWER2))
A.regainMainPower()
if(usr)
A.shock(usr, 50)
A.shock(usr, 50)
else
A.loseMainPower()
if(usr)
A.shock(usr, 50)
A.shock(usr, 50)
if(WIRE_BACKUP1, WIRE_BACKUP2) // Cut to loose backup power, repair all to gain backup power.
if(mend && !is_cut(WIRE_BACKUP1) && !is_cut(WIRE_BACKUP2))
A.regainBackupPower()
if(usr)
A.shock(usr, 50)
A.shock(usr, 50)
else
A.loseBackupPower()
if(usr)
A.shock(usr, 50)
A.shock(usr, 50)
if(WIRE_BOLTS) // Cut to drop bolts, mend does nothing.
if(!mend)
A.bolt()
@@ -140,8 +135,7 @@
else
if(A.secondsElectrified != -1)
A.secondsElectrified = -1
if(usr)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, A, "electrified")
if(WIRE_SAFETY) // Cut to disable safeties, mend to re-enable.
A.safe = mend
+3 -4
View File
@@ -1,6 +1,5 @@
/datum/wires/apc
holder_type = /obj/machinery/power/apc
proper_name = "APC"
/datum/wires/apc/New(atom/holder)
wires = list(
@@ -29,14 +28,14 @@
if(WIRE_POWER1, WIRE_POWER2) // Short for a long while.
if(!A.shorted)
A.shorted = TRUE
addtimer(A, "reset", 1200, TIMER_NORMAL, wire)
addtimer(A, "reset", 1200, FALSE, wire)
if(WIRE_IDSCAN) // Unlock for a little while.
A.locked = FALSE
addtimer(A, "reset", 300, TIMER_NORMAL, wire)
addtimer(A, "reset", 300, FALSE, wire)
if(WIRE_AI) // Disable AI control for a very short time.
if(!A.aidisabled)
A.aidisabled = TRUE
addtimer(A, "reset", 10, TIMER_NORMAL, wire)
addtimer(A, "reset", 10, FALSE, wire)
/datum/wires/apc/on_cut(index, mend)
var/obj/machinery/power/apc/A = holder
+3 -4
View File
@@ -1,6 +1,5 @@
/datum/wires/autolathe
holder_type = /obj/machinery/autolathe
proper_name = "Autolathe"
/datum/wires/autolathe/New(atom/holder)
wires = list(
@@ -27,13 +26,13 @@
switch(wire)
if(WIRE_HACK)
A.adjust_hacked(!A.hacked)
addtimer(A, "reset", 60, TIMER_NORMAL, wire)
addtimer(A, "reset", 60, FALSE, wire)
if(WIRE_SHOCK)
A.shocked = !A.shocked
addtimer(A, "reset", 60, TIMER_NORMAL, wire)
addtimer(A, "reset", 60, FALSE, wire)
if(WIRE_DISABLE)
A.disabled = !A.disabled
addtimer(A, "reset", 60, TIMER_NORMAL, wire)
addtimer(A, "reset", 60, FALSE, wire)
/datum/wires/autolathe/on_cut(wire, mend)
var/obj/machinery/autolathe/A = holder
-1
View File
@@ -14,7 +14,6 @@
/datum/wires/explosive/c4
holder_type = /obj/item/weapon/c4
randomize = TRUE //Same behaviour since no wire actually disarms it
/datum/wires/explosive/c4/interactable(mob/user)
var/obj/item/weapon/c4/P = holder
@@ -1,6 +1,5 @@
/datum/wires/particle_accelerator/control_box
holder_type = /obj/machinery/particle_accelerator/control_box
proper_name = "Particle Accelerator"
/datum/wires/particle_accelerator/control_box/New(atom/holder)
wires = list(
-1
View File
@@ -1,6 +1,5 @@
/datum/wires/radio
holder_type = /obj/item/device/radio
proper_name = "Radio"
/datum/wires/radio/New(atom/holder)
wires = list(
+1 -6
View File
@@ -5,8 +5,7 @@
/datum/wires/robot/New(atom/holder)
wires = list(
WIRE_AI, WIRE_CAMERA,
WIRE_LAWSYNC, WIRE_LOCKDOWN,
WIRE_RESET_MODULE
WIRE_LAWSYNC, WIRE_LOCKDOWN
)
add_duds(2)
..()
@@ -23,7 +22,6 @@
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
status += "The camera light is [!isnull(R.camera) && R.camera.status ? "on" : "off"]."
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
return status
/datum/wires/robot/on_pulse(wire)
@@ -46,9 +44,6 @@
R.show_laws()
if(WIRE_LOCKDOWN)
R.SetLockdown(!R.lockcharge) // Toggle
if(WIRE_RESET_MODULE)
if(R.has_module())
R.ResetModule()
/datum/wires/robot/on_cut(wire, mend)
var/mob/living/silicon/robot/R = holder
-1
View File
@@ -1,6 +1,5 @@
/datum/wires/suit_storage_unit
holder_type = /obj/machinery/suit_storage_unit
proper_name = "Suit Storage Unit"
/datum/wires/suit_storage_unit/New(atom/holder)
wires = list(
+16 -17
View File
@@ -20,7 +20,7 @@
if(WIRE_BOOM)
if(B.active)
holder.visible_message("<span class='danger'>\icon[B] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
B.timer = 0
tell_admins(B)
if(WIRE_UNBOLT)
holder.visible_message("<span class='notice'>\icon[B] The bolts spin in place for a moment.</span>")
@@ -30,28 +30,28 @@
else
holder.visible_message("<span class='notice'>\icon[B] The bomb chirps.</span>")
playsound(B, 'sound/machines/chime.ogg', 30, 1)
B.detonation_timer += 300
B.timer += 30
B.delayedbig = TRUE
if(WIRE_PROCEED)
holder.visible_message("<span class='danger'>\icon[B] The bomb buzzes ominously!</span>")
playsound(B, 'sound/machines/buzz-sigh.ogg', 30, 1)
var/seconds = B.seconds_remaining()
if(seconds >= 61) // Long fuse bombs can suddenly become more dangerous if you tinker with them.
B.detonation_timer = world.time + 600
else if(seconds >= 21)
B.detonation_timer -= 100
else if(seconds >= 11) // Both to prevent negative timers and to have a little mercy.
B.detonation_timer = world.time + 100
if(B.timer >= 61) // Long fuse bombs can suddenly become more dangerous if you tinker with them.
B.timer = 60
else if(B.timer >= 21)
B.timer -= 10
else if(B.timer >= 11) // Both to prevent negative timers and to have a little mercy.
B.timer = 10
if(WIRE_ACTIVATE)
if(!B.active && !B.defused)
holder.visible_message("<span class='danger'>\icon[B] You hear the bomb start ticking!</span>")
B.activate()
playsound(B, 'sound/machines/click.ogg', 30, 1)
B.active = TRUE
B.update_icon()
else if(B.delayedlittle)
holder.visible_message("<span class='notice'>\icon[B] Nothing happens.</span>")
else
holder.visible_message("<span class='notice'>\icon[B] The bomb seems to hesitate for a moment.</span>")
B.detonation_timer += 100
B.timer += 10
B.delayedlittle = TRUE
/datum/wires/syndicatebomb/on_cut(wire, mend)
@@ -63,7 +63,7 @@
else
if(B.active)
holder.visible_message("<span class='danger'>\icon[B] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
B.timer = 0
tell_admins(B)
else
B.defused = TRUE
@@ -71,11 +71,11 @@
if(!mend && B.anchored)
holder.visible_message("<span class='notice'>\icon[B] The bolts lift out of the ground!</span>")
playsound(B, 'sound/effects/stealthoff.ogg', 30, 1)
B.anchored = FALSE
B.anchored = 0
if(WIRE_PROCEED)
if(!mend && B.active)
holder.visible_message("<span class='danger'>\icon[B] An alarm sounds! It's go-</span>")
B.explode_now = TRUE
B.timer = 0
tell_admins(B)
if(WIRE_ACTIVATE)
if(!mend && B.active)
@@ -87,6 +87,5 @@
/datum/wires/syndicatebomb/proc/tell_admins(obj/machinery/syndicatebomb/B)
if(istype(B, /obj/machinery/syndicatebomb/training))
return
var/turf/T = get_turf(B)
log_game("\A [B] was detonated via boom wire at [COORD(T)].")
message_admins("A [B.name] was detonated via boom wire at [ADMIN_COORDJMP(T)].")
log_game("A [B.name] was detonated via boom wire at X=[B.x], Y=[B.y], Z=[B.z].")
message_admins("A [B.name] was detonated via boom wire at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[B.x];Y=[B.y];Z=[B.z]'> (JMP)</a>.")
+4 -5
View File
@@ -1,10 +1,9 @@
/datum/wires/vending
holder_type = /obj/machinery/vending
proper_name = "Vending Unit"
/datum/wires/vending/New(atom/holder)
wires = list(
WIRE_THROW, WIRE_SHOCK, WIRE_SPEAKER,
WIRE_THROW, WIRE_ELECTRIFY, WIRE_SPEAKER,
WIRE_CONTRABAND, WIRE_IDSCAN
)
add_duds(1)
@@ -12,7 +11,7 @@
/datum/wires/vending/interactable(mob/user)
var/obj/machinery/vending/V = holder
if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100))
if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100))
return FALSE
if(V.panel_open)
return TRUE
@@ -34,7 +33,7 @@
V.shoot_inventory = !V.shoot_inventory
if(WIRE_CONTRABAND)
V.extended_inventory = !V.extended_inventory
if(WIRE_SHOCK)
if(WIRE_ELECTRIFY)
V.seconds_electrified = 30
if(WIRE_IDSCAN)
V.scan_id = !V.scan_id
@@ -48,7 +47,7 @@
V.shoot_inventory = !mend
if(WIRE_CONTRABAND)
V.extended_inventory = FALSE
if(WIRE_SHOCK)
if(WIRE_ELECTRIFY)
if(mend)
V.seconds_electrified = FALSE
else
+107 -10
View File
@@ -1,23 +1,123 @@
var/list/wire_colors = list(
var/list/wire_colors = list( // http://www.crockford.com/wrrrld/color.html
"aliceblue",
"antiquewhite",
"aqua",
"aquamarine",
"beige",
"blanchedalmond",
"blue",
"blueviolet",
"brown",
"burlywood",
"cadetblue",
"chartreuse",
"chocolate",
"coral",
"cornflowerblue",
"cornsilk",
"crimson",
"cyan",
"deeppink",
"deepskyblue",
"dimgray",
"dodgerblue",
"firebrick",
"floralwhite",
"forestgreen",
"fuchsia",
"gainsboro",
"ghostwhite",
"gold",
"grey",
"goldenrod",
"gray",
"green",
"greenyellow",
"honeydew",
"hotpink",
"indianred",
"ivory",
"khaki",
"lavender",
"lavenderblush",
"lawngreen",
"lemonchiffon",
"lightblue",
"lightcoral",
"lightcyan",
"lightgoldenrodyellow",
"lightgray",
"lightgreen",
"lightpink",
"lightsalmon",
"lightseagreen",
"lightskyblue",
"lightslategray",
"lightsteelblue",
"lightyellow",
"lime",
"limegreen",
"linen",
"magenta",
"maroon",
"mediumaquamarine",
"mediumblue",
"mediumorchid",
"mediumpurple",
"mediumseagreen",
"mediumslateblue",
"mediumspringgreen",
"mediumturquoise",
"mediumvioletred",
"mintcream",
"mistyrose",
"moccasin",
"navajowhite",
"oldlace",
"olive",
"olivedrab",
"orange",
"orangered",
"orchid",
"palegoldenrod",
"palegreen",
"paleturquoise",
"palevioletred",
"papayawhip",
"peachpuff",
"peru",
"pink",
"plum",
"powderblue",
"purple",
"red",
"rosybrown",
"royalblue",
"saddlebrown",
"salmon",
"sandybrown",
"seagreen",
"seashell",
"sienna",
"silver",
"skyblue",
"slateblue",
"slategray",
"snow",
"springgreen",
"steelblue",
"tan",
"teal",
"thistle",
"tomato",
"turquoise",
"violet",
"wheat",
"white",
"whitesmoke",
"yellow",
"yellowgreen",
)
var/list/wire_color_directory = list()
var/list/wire_name_directory = list()
/proc/is_wire_tool(obj/item/I)
if(istype(I, /obj/item/device/multitool))
@@ -36,14 +136,12 @@ var/list/wire_name_directory = list()
/datum/wires
var/atom/holder = null // The holder (atom that contains these wires).
var/holder_type = null // The holder's typepath (used to make wire colors common to all holders).
var/proper_name = "Unknown" // The display name for the wire set shown in station blueprints. Not used if randomize is true or it's an item NT wouldn't know about (Explosives/Nuke)
var/list/wires = list() // List of wires.
var/list/cut_wires = list() // List of wires that have been cut.
var/list/colors = list() // Dictionary of colors to wire.
var/list/assemblies = list() // List of attached assemblies.
var/randomize = 0 // If every instance of these wires should be random.
// Prevents wires from showing up in station blueprints
/datum/wires/New(atom/holder)
..()
@@ -58,7 +156,6 @@ var/list/wire_name_directory = list()
if(!wire_color_directory[holder_type])
randomize()
wire_color_directory[holder_type] = colors
wire_name_directory[holder_type] = proper_name
else
colors = wire_color_directory[holder_type]
@@ -69,7 +166,7 @@ var/list/wire_name_directory = list()
/datum/wires/proc/add_duds(duds)
while(duds)
var/dud = WIRE_DUD_PREFIX + "[--duds]"
var/dud = "dud[--duds]"
if(dud in wires)
continue
wires += dud
@@ -200,7 +297,7 @@ var/list/wire_name_directory = list()
for(var/color in colors)
payload.Add(list(list(
"color" = color,
"wire" = (IsAdminGhost(user) || (user.is_holding_item_of_type(/obj/item/device/multitool/abductor)) ? get_wire(color) : null),
"wire" = (IsAdminGhost(user) ? get_wire(color) : null),
"cut" = is_color_cut(color),
"attached" = is_attached(color)
)))
@@ -213,11 +310,11 @@ var/list/wire_name_directory = list()
return
var/target_wire = params["wire"]
var/mob/living/L = usr
var/obj/item/I = L.get_active_held_item()
var/obj/item/I = L.get_active_hand()
switch(action)
if("cut")
if(istype(I, /obj/item/weapon/wirecutters) || IsAdminGhost(usr))
playsound(holder, I.usesound, 20, 1)
playsound(holder, 'sound/items/Wirecutter.ogg', 20, 1)
cut_color(target_wire)
. = TRUE
else