Removes telecomm and RD server temperature cap

This commit is contained in:
mwerezak
2014-07-28 20:24:17 -04:00
parent bf0a17dcb0
commit 0345024f04
5 changed files with 53 additions and 50 deletions

View File

@@ -20,7 +20,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
use_power = 1
idle_power_usage = 25
machinetype = 5
operating_temperature = null
produces_heat = 0
delay = 7
circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
@@ -120,7 +120,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
use_power = 0
idle_power_usage = 0
machinetype = 6
operating_temperature = null
produces_heat = 0
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)

View File

@@ -31,7 +31,7 @@
//anchored = 1
//use_power = 0
//idle_power_usage = 0
operating_temperature = null
produces_heat = 0
autolinkers = list("c_relay")
//HUB
@@ -46,7 +46,7 @@
/obj/machinery/telecomms/hub/preset_cent
id = "CentComm Hub"
network = "tcommsat"
operating_temperature = null
produces_heat = 0
autolinkers = list("hub_cent", "c_relay", "s_relay", "m_relay", "r_relay",
"centcomm", "receiverCent", "broadcasterCent")
@@ -78,7 +78,7 @@
/obj/machinery/telecomms/receiver/preset_cent
id = "CentComm Receiver"
network = "tcommsat"
operating_temperature = null
produces_heat = 0
autolinkers = list("receiverCent")
freq_listening = list(1345, 1341)
@@ -118,7 +118,7 @@
id = "CentComm Bus"
network = "tcommsat"
freq_listening = list(1345, 1341)
operating_temperature = null
produces_heat = 0
autolinkers = list("processorCent", "centcomm")
//Processors
@@ -146,7 +146,7 @@
/obj/machinery/telecomms/processor/preset_cent
id = "CentComm Processor"
network = "tcommsat"
operating_temperature = null
produces_heat = 0
autolinkers = list("processorCent")
//Servers
@@ -200,7 +200,7 @@
/obj/machinery/telecomms/server/presets/centcomm
id = "CentComm Server"
freq_listening = list(1345, 1341)
operating_temperature = null
produces_heat = 0
autolinkers = list("centcomm")
@@ -223,5 +223,5 @@
/obj/machinery/telecomms/broadcaster/preset_cent
id = "CentComm Broadcaster"
network = "tcommsat"
operating_temperature = null
produces_heat = 0
autolinkers = list("broadcasterCent")

View File

@@ -29,7 +29,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/toggled = 1 // Is it toggled on
var/on = 1
var/integrity = 100 // basically HP, loses integrity by heat
var/operating_temperature = 20 + T0C // the temperature that the machine will raise the environment to, or null for no heat production
var/produces_heat = 1 //whether the machine will produce heat when on.
var/delay = 10 // how many process() ticks to delay per heat
var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub)
var/circuitboard = null // string pointing to a circuitboard type
@@ -227,35 +227,39 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
integrity = between(0, integrity - 1, 100)
if(delay)
if(delay > 0)
delay--
else
// If the machine is on, ready to produce heat, and has positive traffic, genn some heat
if(on && traffic > 0)
produce_heat(operating_temperature)
delay = initial(delay)
else if(on)
produce_heat()
delay = initial(delay)
/obj/machinery/telecomms/proc/produce_heat(new_temperature)
if(isnull(new_temperature))
/obj/machinery/telecomms/proc/produce_heat()
if (!produces_heat)
return
if (!use_power)
return
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
if(!(stat & (NOPOWER|BROKEN)))
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature < new_temperature)
var/transfer_moles = 0.25 * env.total_moles
var/transfer_moles = 0.25 * env.total_moles
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/datum/gas_mixture/removed = env.remove(transfer_moles)
if(removed)
var/heat_produced = min(removed.get_thermal_energy_change(new_temperature), idle_power_usage) //obviously can't produce more heat than the machine draws from it's power source
removed.add_thermal_energy(heat_produced)
if(removed)
var/heat_produced = idle_power_usage //obviously can't produce more heat than the machine draws from it's power source
if (traffic <= 0)
heat_produced *= 0.30 //if idle, produce less heat.
removed.add_thermal_energy(heat_produced)
env.merge(removed)
env.merge(removed)
/*
The receiver idles and receives messages from subspace-compatible radio equipment;
primarily headsets. They then just relay this information to all linked devices,
@@ -274,7 +278,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 600
machinetype = 1
operating_temperature = null
produces_heat = 0
circuitboard = "/obj/item/weapon/circuitboard/telecomms/receiver"
/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
@@ -331,7 +335,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 1600
machinetype = 7
operating_temperature = 40 + T0C
circuitboard = "/obj/item/weapon/circuitboard/telecomms/hub"
long_range_link = 1
netspeed = 40
@@ -366,7 +369,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 600
machinetype = 8
operating_temperature = null
produces_heat = 0
circuitboard = "/obj/item/weapon/circuitboard/telecomms/relay"
netspeed = 5
long_range_link = 1
@@ -418,7 +421,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 1000
machinetype = 2
operating_temperature = 20 + T0C
circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus"
netspeed = 40
var/change_frequency = 0
@@ -471,7 +473,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 600
machinetype = 3
operating_temperature = 100 + T0C
delay = 5
circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor"
var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals
@@ -510,7 +511,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
use_power = 1
idle_power_usage = 300
machinetype = 4
operating_temperature = 50 + T0C
circuitboard = "/obj/item/weapon/circuitboard/telecomms/server"
var/list/log_entries = list()
var/list/stored_names = list()

View File

@@ -317,7 +317,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
files.RefreshResearch()
server_processed = 1
if(!istype(S, /obj/machinery/r_n_d/server/centcom) && server_processed)
S.produce_heat(100)
S.produce_heat()
screen = 1.6
updateUsrDialog()

View File

@@ -9,8 +9,8 @@
var/id_with_upload_string = "" //String versions for easy editing in map editor.
var/id_with_download_string = ""
var/server_id = 0
var/operating_temperature = 100 + T0C
idle_power_usage = 600
var/produces_heat = 1
idle_power_usage = 800
var/delay = 10
req_access = list(access_rd) //Only the R&D can change server settings.
@@ -32,7 +32,6 @@
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/SP in src)
tot_rating += SP.rating
operating_temperature /= max(1, tot_rating)
idle_power_usage /= max(1, tot_rating)
/obj/machinery/r_n_d/server/initialize()
@@ -68,7 +67,7 @@
if(delay)
delay--
else
produce_heat(operating_temperature)
produce_heat()
delay = initial(delay)
/obj/machinery/r_n_d/server/meteorhit(var/obj/O as obj)
@@ -101,24 +100,28 @@
C.files.AddDesign2Known(D)
C.files.RefreshResearch()
/obj/machinery/r_n_d/server/proc/produce_heat(new_temperature)
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
/obj/machinery/r_n_d/server/proc/produce_heat()
if (!produces_heat)
return
if (!use_power)
return
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from telecoms
var/turf/simulated/L = loc
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
if(env.temperature < new_temperature)
var/transfer_moles = 0.25 * env.total_moles
var/transfer_moles = 0.25 * env.total_moles
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/datum/gas_mixture/removed = env.remove(transfer_moles)
if(removed)
if(removed)
var/heat_produced = idle_power_usage //obviously can't produce more heat than the machine draws from it's power source
removed.add_thermal_energy(heat_produced)
var/heat_produced = min(removed.get_thermal_energy_change(new_temperature), idle_power_usage) //obviously can't produce more heat than the machine draws from it's power source
removed.add_thermal_energy(heat_produced)
env.merge(removed)
env.merge(removed)
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (disabled)