mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts: code/modules/mob/living/silicon/robot/robot.dm
This commit is contained in:
@@ -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
|
||||
network.update = 1
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -154,6 +154,12 @@
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
return 0
|
||||
|
||||
if (get_dist(src, user) > 0 && !issilicon(user))
|
||||
user << "<span class='notice'>You are too far away.</span>"
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
return 0
|
||||
|
||||
if(locked && !issilicon(user))
|
||||
user << "<span class='notice'>Access denied.</span>"
|
||||
return 0
|
||||
@@ -175,7 +181,6 @@
|
||||
<TT><B>Automatic Portable Turret Installation</B></TT><BR><BR>
|
||||
Status: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]"},
|
||||
|
||||
"<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!locked || issilicon(user))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -66,15 +66,20 @@
|
||||
return
|
||||
|
||||
/obj/machinery/turretid/proc/can_use(mob/user)
|
||||
if(ailock && issilicon(user))
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
return 0
|
||||
|
||||
if (get_dist(src, user) > 0 && !issilicon(user))
|
||||
user << "<span class='notice'>You are too far away.</span>"
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=turretid")
|
||||
return 0
|
||||
|
||||
if(ailock && issilicon(user))
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
if(locked && !issilicon(user))
|
||||
user << "<span class='notice'>Access denied.</span>"
|
||||
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: []<BR>
|
||||
Behaviour controls are [locked ? "locked" : "unlocked"]"},
|
||||
"<A href='?src=\ref[src];operation=toggleon'>[enabled ? "On" : "Off"]</A>" )
|
||||
|
||||
if(!locked || issilicon(user))
|
||||
dat += text({"<BR><BR>
|
||||
|
||||
@@ -1295,4 +1295,5 @@ var/list/robot_verbs_default = list(
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] module change detected: [name] has loaded the [module.name].</span><br>"
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
if(oldname != newname)
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - [braintype] reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user