Merge pull request #1530 from caelaislinn/master

tgstation.dmm mapfixes, antiqua.dmm engine updates, R-UST updates
This commit is contained in:
Mloc
2012-07-28 04:42:03 -07:00
16 changed files with 10347 additions and 10342 deletions
+15 -5
View File
@@ -1,8 +1,6 @@
// thermo electric generator powered by twinned gas turbines
// more realistic than type 2, and also cooler
#define ENERGY_TRANSFER_FACTOR 10
#define POWER_PRODUCTION_FACTOR 1.25
/*/obj/machinery/power/generator/verb/set_amount(var/g as num)
set src in view(1)
@@ -31,7 +29,8 @@
if(lastgenlev != 0)
overlays += image('power.dmi', "teg-op[lastgenlev]")
#define GENRATE 800 // generator output coefficient from Q
#define GENRATE 0.05 // generator output coefficient from Q
#define MAX_SAFE_OUTPUT 500000
/obj/machinery/power/generator/process()
@@ -62,7 +61,7 @@
var/energy_transfer = delta_temperature*hot_air_heat_capacity*cold_air_heat_capacity/(hot_air_heat_capacity+cold_air_heat_capacity)
var/heat = energy_transfer*(1-efficiency)
lastgen = POWER_PRODUCTION_FACTOR * energy_transfer*efficiency
lastgen = energy_transfer * efficiency * GENRATE
//ENERGY_TRANSFER_FACTOR to beef up the amount of heat passed over
hot_air.temperature -= energy_transfer/hot_air_heat_capacity
@@ -71,7 +70,18 @@
//world << "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]"
//if producing more than 1 million watts, emit sparks and waste a little power
var/runoff = 0
if(lastgen > MAX_SAFE_OUTPUT)
runoff = lastgen - MAX_SAFE_OUTPUT
if( prob(max( 100, (100 * runoff / MAX_SAFE_OUTPUT) )) )
lastgen -= rand(1, 10) * (runoff / 100)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
//
add_avail(lastgen)
// update icon overlays only if displayed level has changed
if(air1)
@@ -80,7 +90,7 @@
if(air2)
circ2.air2.merge(air2)
var/genlev = max(0, min( round(11*lastgen / 250000), 11))
var/genlev = max(0, min( round(11*lastgen / MAX_SAFE_OUTPUT), 11))
if(genlev != lastgenlev)
lastgenlev = genlev
updateicon()
@@ -39,16 +39,16 @@
if (A)
if(ismob(A))
toxmob(A)
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
else if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
A:energy += energy
// energy = 0 //This breaks the current singularity
if( istype(A,/obj/machinery/rust/particle_catcher) )
else if( istype(A,/obj/machinery/rust/particle_catcher) )
var/obj/machinery/rust/particle_catcher/collided_catcher = A
if(particle_type && particle_type != "neutron")
if(collided_catcher.AddParticles(particle_type, 1 + additional_particles))
collided_catcher.parent.AddEnergy(energy,mega_energy)
del (src)
if( istype(A,/obj/machinery/rust/core) )
else if( istype(A,/obj/machinery/rust/core) )
var/obj/machinery/rust/core/collided_core = A
if(particle_type && particle_type != "neutron")
if(collided_core.AddParticles(particle_type, 1 + additional_particles))
@@ -73,6 +73,7 @@
proc
toxmob(var/mob/living/M)
var/radiation = (energy*2)
M.adjustToxLoss(radiation)
/* if(istype(M,/mob/living/carbon/human))
if(M:wear_suit) //TODO: check for radiation protection
radiation = round(radiation/2,1)
@@ -80,10 +81,10 @@
if(M:wear_suit) //TODO: check for radiation protection
radiation = round(radiation/2,1)*/
if(ionizing)
M.apply_effects((radiation*3),IRRADIATE,0)
M.apply_effect((radiation*3),IRRADIATE,0)
M.updatehealth()
else
M.apply_effects((radiation*2),IRRADIATE,0)
M.apply_effect((radiation*2),IRRADIATE,0)
M.updatehealth()
//M << "\red You feel odd."
return