Merge remote-tracking branch 'upstream/master' into night_shift

# Conflicts:
#	paradise.dme
This commit is contained in:
tigercat2000
2018-03-30 10:20:21 -07:00
142 changed files with 537 additions and 873 deletions
+2 -2
View File
@@ -756,7 +756,7 @@
return
// 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)
ui = SSnanoui.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, issilicon(user) ? 535 : 460)
@@ -955,7 +955,7 @@
update_icon()
update()
else if( href_list["close"] )
nanomanager.close_user_uis(usr, src)
SSnanoui.close_user_uis(usr, src)
return 0
else if(href_list["close2"])
+4 -4
View File
@@ -239,7 +239,7 @@
var/temp_loss = (temperature - cooling_temperature)/TEMPERATURE_DIVISOR
temp_loss = between(2, round(temp_loss, 1), TEMPERATURE_CHANGE_MAX)
temperature = max(temperature - temp_loss, cooling_temperature)
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
if(overheating)
overheating--
@@ -280,7 +280,7 @@
to_chat(user, "<span class='notice'>You add [amount] sheet\s to the [src.name].</span>")
sheets += amount
addstack.use(amount)
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
return
else if(!active)
if(istype(O, /obj/item/weapon/wrench))
@@ -325,7 +325,7 @@
if(IsBroken())
return
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
ui = SSnanoui.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()
@@ -381,7 +381,7 @@
if(power_output < max_power_output || (emagged && power_output < round(max_power_output*2.5)))
power_output++
nanomanager.update_uis(src)
SSnanoui.update_uis(src)
/obj/machinery/power/port_gen/pacman/super
name = "S.U.P.E.R.P.A.C.M.A.N.-type Portable Generator"
+1 -1
View File
@@ -365,7 +365,7 @@
// 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)
ui = SSnanoui.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
+11 -12
View File
@@ -111,7 +111,7 @@
return
//find the smaller angle between the direction the panel is facing and the direction of the sun (the sign is not important here)
var/p_angle = min(abs(adir - sun.angle), 360 - abs(adir - sun.angle))
var/p_angle = min(abs(adir - SSsun.angle), 360 - abs(adir - SSsun.angle))
if(p_angle > 90) // if facing more than 90deg from sun, zero output
sunfrac = 0
@@ -174,8 +174,8 @@
var/ax = x // start at the solar panel
var/ay = y
var/turf/T = null
var/dx = sun.dx
var/dy = sun.dy
var/dx = SSsun.dx
var/dy = SSsun.dy
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
@@ -309,7 +309,7 @@
if(autostart)
src.search_for_connected()
if(connected_tracker && track == 2)
connected_tracker.set_angle(sun.angle)
connected_tracker.set_angle(SSsun.angle)
set_panels(cdir)
/obj/machinery/power/solar_control/Destroy()
@@ -321,13 +321,12 @@
/obj/machinery/power/solar_control/disconnect_from_network()
..()
if(sun)
sun.solars.Remove(src)
SSsun.solars.Remove(src)
/obj/machinery/power/solar_control/connect_to_network()
var/to_return = ..()
if(powernet && sun) //if connected and not already in solar list...
sun.solars |= src //... add it
if(powernet) //if connected and not already in solar list...
SSsun.solars |= src //... add it
return to_return
//search for unconnected panels and trackers in the computer powernet and connect them
@@ -355,7 +354,7 @@
cdir = targetdir //...the current direction is the targetted one (and rotates panels to it)
if(2) // auto-tracking
if(connected_tracker)
connected_tracker.set_angle(sun.angle)
connected_tracker.set_angle(SSsun.angle)
set_panels(cdir)
updateDialog()
@@ -390,7 +389,7 @@
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)
ui = SSnanoui.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()
@@ -479,7 +478,7 @@
track = text2num(href_list["track"])
if(track == 2)
if(connected_tracker)
connected_tracker.set_angle(sun.angle)
connected_tracker.set_angle(SSsun.angle)
set_panels(cdir)
else if(track == 1) //begin manual tracking
src.targetdir = src.cdir
@@ -489,7 +488,7 @@
if(href_list["search_connected"])
search_for_connected()
if(connected_tracker && track == 2)
connected_tracker.set_angle(sun.angle)
connected_tracker.set_angle(SSsun.angle)
set_panels(cdir)
return
@@ -260,7 +260,7 @@
// 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)
ui = SSnanoui.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()