Merge remote-tracking branch 'upstream/dev' into StatusDisplay

conflicts:
	maps/tgstation2.dmm
This commit is contained in:
PsiOmega
2014-08-26 14:21:29 +02:00
73 changed files with 501 additions and 451 deletions
@@ -81,7 +81,7 @@ datum/design/rust_fuel_compressor
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
"/obj/item/stack/cable_coil" = 5)
datum/design/rust_core
name = "Internal circuitry (RUST tokamak core)"
@@ -107,7 +107,7 @@ datum/design/rust_core
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
"/obj/item/weapon/stock_parts/matter_bin/super" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 5)
"/obj/item/stack/cable_coil" = 5)
datum/design/rust_injector
name = "Internal circuitry (RUST tokamak core)"
@@ -78,8 +78,8 @@
icon_state = "port2"
return
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/weapon/cable_coil/C = W
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/stack/cable_coil/C = W
if(C.amount < 10)
user << "\red You need more wires."
return
@@ -97,7 +97,7 @@
user << "You begin to cut the cables..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
new /obj/item/weapon/cable_coil(loc,10)
new /obj/item/stack/cable_coil(loc,10)
user.visible_message(\
"\red [user.name] cut the cabling inside the port.",\
"You cut the cabling inside the port.")
@@ -105,8 +105,8 @@
user << "You fail to [ locked ? "unlock" : "lock"] the compressor interface."
return
else if (istype(W, /obj/item/weapon/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/weapon/cable_coil/C = W
else if (istype(W, /obj/item/stack/cable_coil) && opened && !(has_electronics & 2))
var/obj/item/stack/cable_coil/C = W
if(C.amount < 10)
user << "\red You need more wires."
return
@@ -124,7 +124,7 @@
user << "You begin to cut the cables..."
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50))
new /obj/item/weapon/cable_coil(loc,10)
new /obj/item/stack/cable_coil(loc,10)
user.visible_message(\
"\red [user.name] cut the cabling inside the compressor.",\
"You cut the cabling inside the port.")
+21 -2
View File
@@ -11,8 +11,25 @@
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
var/obj/machinery/alarm/current
var/overridden = 0 //not set yet, can't think of a good way to do it
req_access = list(access_atmospherics)
req_access = list(access_ce)
var/list/monitored_alarm_ids = null
var/list/monitored_alarms = null
/obj/machinery/computer/atmoscontrol/laptop
name = "Atmospherics Laptop"
desc = "Cheap Nanotrasen Laptop."
icon_state = "medlaptop"
density = 0
/obj/machinery/computer/atmoscontrol/initialize()
..()
if(!monitored_alarms && monitored_alarm_ids)
monitored_alarms = new
for(var/obj/machinery/alarm/alarm in machines)
if(alarm.alarm_id && alarm.alarm_id in monitored_alarm_ids)
monitored_alarms += alarm
// machines may not yet be ordered at this point
monitored_alarms = dd_sortedObjectList(monitored_alarms)
/obj/machinery/computer/atmoscontrol/attack_ai(var/mob/user as mob)
return interact(user)
@@ -32,10 +49,12 @@
else if(!emagged)
overridden = 0
var/dat = "<a href='?src=\ref[src]&reset=1'>Main Menu</a><hr>"
if(monitored_alarms && monitored_alarms.len == 1)
current = monitored_alarms[1]
if(current)
dat += specific()
else
for(var/obj/machinery/alarm/alarm in dd_sortedObjectList(machines))
for(var/obj/machinery/alarm/alarm in monitored_alarms ? monitored_alarms : machines)
dat += "<a href='?src=\ref[src]&alarm=\ref[alarm]'>"
switch(max(alarm.danger_level, alarm.alarm_area.atmosalm))
if (0)
@@ -33,7 +33,7 @@
return
switch(state)
if(1)
if(istype(P, /obj/item/weapon/cable_coil))
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "\blue You start to add cables to the frame."
@@ -80,7 +80,7 @@
user << "\blue You remove the cables."
state = 1
icon_state = "wm_0"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
A.amount = 5
if(3)
@@ -136,11 +136,11 @@
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/CP = P
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CP = P
if(CP.amount > 1)
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src)
CC.amount = camt
CC.update_icon()
CP.use(camt)
@@ -155,7 +155,7 @@
update_desc()
break
user << desc
if(P.loc != src && !istype(P, /obj/item/weapon/cable_coil))
if(P.loc != src && !istype(P, /obj/item/stack/cable_coil))
user << "\red You cannot add that component to the machine!"
/obj/item/weapon/circuitboard/firealarm
@@ -168,7 +168,7 @@
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/weapon/cable_coil" = 2)
"/obj/item/stack/cable_coil" = 2)
/obj/item/weapon/circuitboard/alarm
name = "Circuit board (Atmospheric Alarm)"
@@ -180,7 +180,7 @@
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 2)
"/obj/item/stack/cable_coil" = 2)
/* oh right, not a machine :(
/obj/item/weapon/circuitboard/intercom
@@ -192,7 +192,7 @@
contain_parts = 0
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/cable_coil" = 2)
"/obj/item/stack/cable_coil" = 2)
*/
/* too complex to set up the dept for an RC in a way intuitive for the user
@@ -206,7 +206,7 @@
req_components = list(
"/obj/item/device/radio" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1
"/obj/item/weapon/cable_coil" = 1)
"/obj/item/stack/cable_coil" = 1)
*/
/obj/item/weapon/circuitboard/status_display
@@ -218,7 +218,7 @@
contain_parts = 0
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 2,
"/obj/item/weapon/cable_coil" = 1)
"/obj/item/stack/cable_coil" = 1)
/obj/item/weapon/circuitboard/light_switch
name = "Circuit board (Light Switch)"
@@ -228,4 +228,4 @@
frame_desc = "Requires 2 pieces of cable."
contain_parts = 0
req_components = list(
"/obj/item/weapon/cable_coil" = 2)
"/obj/item/stack/cable_coil" = 2)
@@ -154,7 +154,7 @@
user << "\red There's already \an [battery] in [src]!"
if(istype(P, /obj/item/weapon/cable_coil))
if(istype(P, /obj/item/stack/cable_coil))
if(P:amount >= 5)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
@@ -173,7 +173,7 @@
user << "\blue You remove the cables."
src.state = 2
src.icon_state = "2"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
A.amount = 5
if(istype(P, /obj/item/weapon/crowbar)) // complicated check