Merge branch 'master' into upstream-merge-31601

This commit is contained in:
LetterJay
2017-10-14 10:17:16 -04:00
committed by GitHub
101 changed files with 4200 additions and 11173 deletions
+1 -1
View File
@@ -363,7 +363,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/proc/pulse_radiation()
radiation_pulse(get_turf(src), 3, 7, 20)
radiation_pulse(get_turf(src), 200)
// Shake everyone on the z level to let them know that gravity was enagaged/disenagaged.
/obj/machinery/gravity_generator/main/proc/shake_everyone()
+1 -1
View File
@@ -28,7 +28,7 @@
..()
add_avail(power_gen)
if(panel_open && irradiate)
radiation_pulse(get_turf(src), 2, 3, 6) // Weak but noticeable.
radiation_pulse(get_turf(src), 60)
/obj/machinery/power/rtg/RefreshParts()
var/part_level = 0
+16 -15
View File
@@ -1,5 +1,7 @@
GLOBAL_LIST_EMPTY(rad_collectors)
// last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT
#define RAD_COLLECTOR_EFFICIENCY 80 // radiation needs to be over this amount to get power
#define RAD_COLLECTOR_COEFFICIENT 100
#define RAD_COLLECTOR_STORED_OUT 0.04 // (this*100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source
/obj/machinery/power/rad_collector
name = "Radiation Collector Array"
@@ -21,12 +23,11 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/anchored
anchored = TRUE
/obj/machinery/power/rad_collector/Initialize()
/obj/machinery/power/rad_collector/ComponentInitialize()
. = ..()
GLOB.rad_collectors += src
AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION, FALSE, FALSE)
/obj/machinery/power/rad_collector/Destroy()
GLOB.rad_collectors -= src
return ..()
/obj/machinery/power/rad_collector/process()
@@ -37,8 +38,10 @@ GLOBAL_LIST_EMPTY(rad_collectors)
else
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= 0.001*drainratio
loaded_tank.air_contents.garbage_collect()
return
var/power_produced = min(last_power, (last_power*RAD_COLLECTOR_STORED_OUT)+1000) //Produces at least 1000 watts if it has more than that stored
add_avail(power_produced)
last_power-=power_produced
/obj/machinery/power/rad_collector/attack_hand(mob/user)
if(..())
@@ -137,15 +140,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
else
update_icons()
/obj/machinery/power/rad_collector/proc/receive_pulse(pulse_strength)
if(loaded_tank && active)
var/power_produced = loaded_tank.air_contents.gases[/datum/gas/plasma] ? loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] : 0
power_produced *= pulse_strength*10
add_avail(power_produced)
last_power = power_produced
return
return
/obj/machinery/power/rad_collector/rad_act(pulse_strength)
if(loaded_tank && active && pulse_strength > RAD_COLLECTOR_EFFICIENCY)
last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT
/obj/machinery/power/rad_collector/proc/update_icons()
cut_overlays()
@@ -167,3 +164,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
flick("ca_deactive", src)
update_icons()
return
#undef RAD_COLLECTOR_EFFICIENCY
#undef RAD_COLLECTOR_COEFFICIENT
#undef RAD_COLLECTOR_STORED_OUT
+2 -12
View File
@@ -114,7 +114,7 @@
/obj/singularity/process()
if(current_size >= STAGE_TWO)
move()
pulse()
radiation_pulse(get_turf(src), energy, 0.5)
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
event()
eat()
@@ -385,14 +385,10 @@
/obj/singularity/proc/toxmob()
var/toxrange = 10
var/radiation = 15
var/radiationmin = 3
if (energy>200)
radiation += round((energy-150)/10,1)
radiationmin = round((radiation/5),1)
for(var/mob/living/M in view(toxrange, src.loc))
M.rad_act(rand(radiationmin,radiation))
radiation_pulse(get_turf(src), radiation)
/obj/singularity/proc/combust_mobs()
@@ -428,12 +424,6 @@
empulse(src, 8, 10)
return
/obj/singularity/proc/pulse()
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)
if(R.z == z && get_dist(R, src) <= 15) // Better than using orange() every process
R.receive_pulse(energy)
/obj/singularity/singularity_act()
var/gain = (energy/2)
var/dist = max((current_size - 2),1)
@@ -331,8 +331,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
if(prob(50))
radiation_pulse(get_turf(src), power * (1 + power_transmission_bonus/10 * freon_transmit_modifier))
var/device_energy = power * REACTION_POWER_MODIFIER
@@ -527,11 +527,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
Consume(nom)
/obj/machinery/power/supermatter_shard/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)
if(R.z == z && get_dist(R, src) <= 15) //Better than using orange() every process
R.receive_pulse(power * (1 + power_transmission_bonus)/10 * freon_transmit_modifier)
/obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params)
if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
return
@@ -550,7 +545,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
Consume(W)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
radiation_pulse(get_turf(src), 1, 1, 150, 1)
radiation_pulse(get_turf(src), 150, 4)
/obj/machinery/power/supermatter_shard/CollidedWith(atom/movable/AM)
@@ -584,7 +579,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
matter_power += 200
//Some poor sod got eaten, go ahead and irradiate people nearby.
radiation_pulse(get_turf(src), 4, 10, 500, 1)
radiation_pulse(get_turf(src), 3000, 2, TRUE)
for(var/mob/living/L in range(10))
investigate_log("has irradiated [L] after consuming [AM].", INVESTIGATE_SUPERMATTER)
if(L in view())