diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index aa4473babd..fd933bf94d 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -205,9 +205,15 @@ datum/pipeline var/gas_density = air.total_moles/air.volume thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*T20C) ), 1) - //if the h/e pipes radiate less than the AVERAGE_SOLAR_RADIATION, then they will heat up, otherwise they will cool down. It turns out the critical temperature is -26 C - var/heat_gain = surface*(AVERAGE_SOLAR_RADIATION - STEFAN_BOLTZMANN_CONSTANT*thermal_conductivity*(air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4) + // We only get heat from the star on the exposed surface area. + // If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase. + var/heat_gain = AVERAGE_SOLAR_RADIATION * RADIATOR_EXPOSED_SURFACE_AREA * thermal_conductivity + + // Previously, the temperature would enter equilibrium at 26C or 294K. + // Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on. + // It currently should stabilise at 85K or -183C. + heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4 air.add_thermal_energy(heat_gain) if(network) - network.update = 1 \ No newline at end of file + network.update = 1 diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index f274a1d07e..4e64b9a660 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -236,7 +236,11 @@ return 1 /proc/trackable(var/mob/living/M) - return near_camera(M) || (M.loc.z in config.station_levels && hassensorlevel(M, SUIT_SENSOR_TRACKING)) + var/turf/T = get_turf(M) + if(T && (T.z in config.station_levels) && hassensorlevel(M, SUIT_SENSOR_TRACKING)) + return 1 + + return near_camera(M) /obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob) if (!istype(user)) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 603fc9fe98..7497edd695 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -154,6 +154,12 @@ user << "There seems to be a firewall preventing you from accessing this device." return 0 + if (get_dist(src, user) > 0 && !issilicon(user)) + user << "You are too far away." + user.unset_machine() + user << browse(null, "window=turretid") + return 0 + if(locked && !issilicon(user)) user << "Access denied." return 0 @@ -175,7 +181,6 @@ Automatic Portable Turret Installation

Status: []
Behaviour controls are [locked ? "locked" : "unlocked"]"}, - "[on ? "On" : "Off"]" ) if(!locked || issilicon(user)) diff --git a/code/game/machinery/status_display_ai.dm b/code/game/machinery/status_display_ai.dm index 4077c6d56d..0b7371c1b0 100644 --- a/code/game/machinery/status_display_ai.dm +++ b/code/game/machinery/status_display_ai.dm @@ -43,6 +43,7 @@ var/list/ai_status_emotions = list( if(istype(M, /obj/machinery/ai_status_display)) var/obj/machinery/ai_status_display/AISD = M AISD.emotion = emote + AISD.update() //if Friend Computer, change ALL displays else if(istype(M, /obj/machinery/status_display)) @@ -72,6 +73,9 @@ var/list/ai_status_emotions = list( var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions src.emotion = emote +/obj/machinery/ai_status_display/process() + return + /obj/machinery/ai_status_display/proc/update() if(mode==0) //Blank overlays.Cut() @@ -91,3 +95,11 @@ var/list/ai_status_emotions = list( if(overlays.len) overlays.Cut() overlays += image('icons/obj/status_display.dmi', icon_state=picture_state) + +/obj/machinery/ai_status_display/power_change() + ..() + if(stat & NOPOWER) + if(overlays.len) + overlays.Cut() + else + update() diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 04b8c5644a..23389f507a 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -119,6 +119,9 @@ L[tmpname] = I var/desc = input("Please select a location to lock in.", "Locking Computer") in L + if(get_dist(src, usr) > 1) + return + src.locked = L[desc] for(var/mob/O in hearers(src, null)) O.show_message("\blue Locked In", 2) diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index ce2a3b73ad..41a98103be 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -66,15 +66,20 @@ return /obj/machinery/turretid/proc/can_use(mob/user) + if(ailock && issilicon(user)) + user << "There seems to be a firewall preventing you from accessing this device." + return 0 + if (get_dist(src, user) > 0 && !issilicon(user)) user << "You are too far away." user.unset_machine() user << browse(null, "window=turretid") return 0 - if(ailock && issilicon(user)) - user << "There seems to be a firewall preventing you from accessing this device." + if(locked && !issilicon(user)) + user << "Access denied." return 0 + return 1 /obj/machinery/turretid/attackby(obj/item/weapon/W, mob/user) @@ -124,7 +129,9 @@ if (!istype(loc, /area)) return var/area/area = loc - var/dat = "" + var/dat = text({"Status: []
+ Behaviour controls are [locked ? "locked" : "unlocked"]"}, + "[enabled ? "On" : "Off"]" ) if(!locked || issilicon(user)) dat += text({"

diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index c928cdd3a5..b72e822e57 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1295,4 +1295,5 @@ var/list/robot_verbs_default = list( if(2) //New Module connected_ai << "

NOTICE - [braintype] module change detected: [name] has loaded the [module.name].
" if(3) //New Name - connected_ai << "

NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].
" + if(oldname != newname) + connected_ai << "

NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].
" diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 401cb41af7..791b69e949 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -16,9 +16,11 @@ /datum/powernet/New() powernets += src + ..() /datum/powernet/Del() powernets -= src + ..() //Returns the amount of excess power (before refunding to SMESs) from last tick. //This is for machines that might adjust their power consumption using this data. @@ -110,8 +112,7 @@ S.restore() // and restore some of the power that was used //updates the viewed load (as seen on power computers) - viewload = 0.8*viewload + 0.2*load - viewload = round(viewload) + viewload = round(load) //reset the powernet load = 0 diff --git a/code/setup.dm b/code/setup.dm index 4332480676..338181e50e 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -11,8 +11,9 @@ //radiation constants #define STEFAN_BOLTZMANN_CONSTANT 5.6704e-8 //W/(m^2*K^4) #define COSMIC_RADIATION_TEMPERATURE 3.15 //K -#define AVERAGE_SOLAR_RADIATION 200 //W/m^2. Kind of arbitrary. Really this should depend on the sun position much like solars. +#define AVERAGE_SOLAR_RADIATION 200 //W/m^2. Kind of arbitrary. Really this should depend on the sun position much like solars. From the numbers on Erebus, this'd be an orbit of 23.3 lightseconds. #define RADIATOR_OPTIMUM_PRESSURE 110 //kPa at 20 C +#define RADIATOR_EXPOSED_SURFACE_AREA 0.03 //The pipe looks to be thin vertically and wide horizontally, so we'll assume that it's three centimeters thick and only explosed to the sun edge-on. #define CELL_VOLUME 2500 //liters in a cell #define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC