Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into cameraconsoleupdate

# Conflicts:
#	code/game/machinery/computer/camera.dm
This commit is contained in:
Markolie
2016-12-23 18:58:58 +01:00
361 changed files with 11091 additions and 10296 deletions
+51 -50
View File
@@ -778,63 +778,64 @@
if(!user)
return
var/list/data = list(
"locked" = is_locked(user),
"isOperating" = operating,
"externalPower" = main_status,
"powerCellStatus" = cell ? cell.percent() : null,
"chargeMode" = chargemode,
"chargingStatus" = charging,
"totalLoad" = round(lastused_equip + lastused_light + lastused_environ),
"coverLocked" = coverlocked,
"siliconUser" = istype(user, /mob/living/silicon),
"malfStatus" = get_malf_status(user),
"powerChannels" = list(
list(
"title" = "Equipment",
"powerLoad" = round(lastused_equip),
"status" = equipment,
"topicParams" = list(
"auto" = list("eqp" = 3),
"on" = list("eqp" = 2),
"off" = list("eqp" = 1)
)
),
list(
"title" = "Lighting",
"powerLoad" = round(lastused_light),
"status" = lighting,
"topicParams" = list(
"auto" = list("lgt" = 3),
"on" = list("lgt" = 2),
"off" = list("lgt" = 1)
)
),
list(
"title" = "Environment",
"powerLoad" = round(lastused_environ),
"status" = environ,
"topicParams" = list(
"auto" = list("env" = 3),
"on" = list("env" = 2),
"off" = list("env" = 1)
)
)
)
)
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new one
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, data["siliconUser"] ? 535 : 460)
// When the UI is first opened this is the data it will use
ui.set_initial_data(data)
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, issilicon(user) ? 535 : 460)
ui.open()
// Auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/apc/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["locked"] = is_locked(user)
data["isOperating"] = operating
data["externalPower"] = main_status
data["powerCellStatus"] = cell ? cell.percent() : null
data["chargeMode"] = chargemode
data["chargingStatus"] = charging
data["totalLoad"] = round(lastused_equip + lastused_light + lastused_environ)
data["coverLocked"] = coverlocked
data["siliconUser"] = istype(user, /mob/living/silicon)
data["malfStatus"] = get_malf_status(user)
var/powerChannels[0]
powerChannels[++powerChannels.len] = list(
"title" = "Equipment",
"powerLoad" = round(lastused_equip),
"status" = equipment,
"topicParams" = list(
"auto" = list("eqp" = 3),
"on" = list("eqp" = 2),
"off" = list("eqp" = 1)
)
)
powerChannels[++powerChannels.len] = list(
"title" = "Lighting",
"powerLoad" = round(lastused_light),
"status" = lighting,
"topicParams" = list(
"auto" = list("lgt" = 3),
"on" = list("lgt" = 2),
"off" = list("lgt" = 1)
)
)
powerChannels[++powerChannels.len] = list(
"title" = "Environment",
"powerLoad" = round(lastused_environ),
"status" = environ,
"topicParams" = list(
"auto" = list("env" = 3),
"on" = list("env" = 2),
"off" = list("env" = 1)
)
)
data["powerChannels"] = powerChannels
return data
/obj/machinery/power/apc/proc/report()
return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])"
+10 -6
View File
@@ -321,7 +321,15 @@
if(IsBroken())
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
ui.open()
ui.set_auto_update(1)
/obj/machinery/power/port_gen/pacman/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["active"] = active
if(istype(user, /mob/living/silicon/ai))
data["is_ai"] = 1
@@ -329,6 +337,7 @@
data["is_ai"] = 1
else
data["is_ai"] = 0
data["output_set"] = power_output
data["output_max"] = max_power_output
data["output_safe"] = max_safe_output
@@ -342,12 +351,7 @@
data["fuel_usage"] = active ? round((power_output / time_per_sheet) * 1000) : 0
data["fuel_type"] = sheet_name
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/power/port_gen/pacman/Topic(href, href_list)
if(..())
@@ -1,6 +1,6 @@
/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>."
desc_holder = "This part 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"
@@ -2,7 +2,7 @@
/obj/machinery/particle_accelerator/control_box
name = "Particle Accelerator Control Console"
desc = "This controls the density of the particles."
desc = "This part controls the density of the particles."
icon = 'icons/obj/machines/particle_accelerator.dmi'
icon_state = "control_box"
reference = "control_box"
@@ -2,7 +2,7 @@
/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."
desc_holder = "This part launches the 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
@@ -26,16 +26,16 @@
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(var/delay)
if(delay && delay >= 0)
src.fire_delay = delay
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
if((last_shot + fire_delay) <= world.time)
last_shot = world.time
var/obj/effect/accelerated_particle/A = null
var/turf/T = get_step(src,dir)
var/turf/T = get_step(src, dir)
switch(strength)
if(0)
A = new/obj/effect/accelerated_particle/weak(T, dir)
@@ -46,6 +46,6 @@
if(3)
A = new/obj/effect/accelerated_particle/powerful(T, dir)
if(A)
A.dir = src.dir
A.dir = dir
return 1
return 0
@@ -1,6 +1,6 @@
/obj/structure/particle_accelerator/power_box
name = "Particle Focusing EM Lens"
desc_holder = "This uses electromagnetic waves to focus the Alpha-Particles."
desc_holder = "This part uses electromagnetic waves to focus the Alpha particles."
icon = 'icons/obj/machines/particle_accelerator.dmi'
icon_state = "power_box"
reference = "power_box"
+15 -13
View File
@@ -363,8 +363,21 @@
if(stat & BROKEN)
return
// this is the data which will be sent to the ui
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/power/smes/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["nameTag"] = name_tag
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
data["charging"] = inputting
@@ -383,18 +396,7 @@
else
data["outputting"] = 0 // smes is not outputting
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
return data
/obj/machinery/power/smes/Topic(href, href_list)
if(..())
+9 -8
View File
@@ -389,8 +389,14 @@
ui_interact(user)
/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
ui.open()
ui.set_auto_update(1)
var/data = list()
/obj/machinery/power/solar_control/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["generated"] = round(lastgen)
data["angle"] = cdir
@@ -403,12 +409,7 @@
data["connected_panels"] = connected_panels.len
data["connected_tracker"] = (connected_tracker ? 1 : 0)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
@@ -535,4 +536,4 @@
/obj/item/weapon/paper/solar
name = "paper- 'Going green! Setup your own solar array instructions.'"
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
@@ -259,6 +259,13 @@
// This is purely informational UI that may be accessed by AIs or robots
/obj/machinery/power/supermatter_shard/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
ui.open()
ui.set_auto_update(1)
/obj/machinery/power/supermatter_shard/ui_data(mob/user, datum/topic_state/state = default_state)
var/data[0]
data["integrity_percentage"] = round(get_integrity())
@@ -277,12 +284,7 @@
else
data["detonating"] = 0
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
return data
/obj/machinery/power/supermatter_shard/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)