mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
SM, Tesla, and general engineering adjustments [MDB IGNORE] [IDB IGNORE] (#19339)
* Update supermatter.dm * fix * clamps these * gwah * Stops tesla from zapping unwrenched coils * tesla upgrade * unglobals this * fix these * Update coil.dm * Update coil.dm * Descriptions * Update coil.dm * Update coil.dm * Update coil.dm * Update coil.dm * Update coil.dm * ranges * UGH * Update vorestation.dme * meth * monster math * Update coil.dm * Update coil.dm * Update coil.dm * THEY DID THE MATH * the monster math * egwah * desc * Update coil.dm * Returns * Update coil.dm * Lowers amount gained * this * im dumb * tesy * Update coil.dm * Update coil.dm * fixes initial density on blast doors * dot * fixes these * Mapper Tools * icon * these * Fixes the sound following people * recursive geigers * Make this a proc * Update supermatter.dm * less ear destroying * these * makes canisters not get softlocked * Hotkeys * proper return * Makes shield gen useful. Gets rid of a harddel Adds hydromagnetic trap * math * Makes buttons more clear. * lol * Fixes ancient runtime * Adds craftable mass driver buttons * button * fixes this * Makes misclicks not destroy solar panels * Update solar.dm * fix this * make them both numbers * upports reflectors * Update reflector.dm * Update reflectors.dm * solar panel and climbable * Gets rid of 'as X' * Adds account console * Update vorestation.dme * Craftable message server * Update message_server.dm * These * con struct * Update smartfridge.dm * whoop * edits
This commit is contained in:
@@ -42,24 +42,13 @@ SUBSYSTEM_DEF(radiation)
|
||||
continue
|
||||
|
||||
for(var/obj/item/geiger/geiger_counter in turf_to_irradiate)
|
||||
var/current_insulation = 1
|
||||
for(var/turf/turf_in_between in get_line(source, geiger_counter) - get_turf(source))
|
||||
var/insulation = cached_rad_insulations[turf_in_between]
|
||||
if(isnull(insulation))
|
||||
insulation = turf_in_between.rad_insulation
|
||||
for (var/atom/on_turf as anything in turf_in_between.contents)
|
||||
insulation *= on_turf.rad_insulation
|
||||
cached_rad_insulations[turf_in_between] = insulation
|
||||
|
||||
current_insulation *= insulation
|
||||
|
||||
if(current_insulation <= pulse_information.threshold)
|
||||
continue
|
||||
|
||||
SEND_SIGNAL(geiger_counter, COMSIG_IN_RANGE_OF_IRRADIATION, pulse_information, current_insulation)
|
||||
|
||||
geiger_check(source, pulse_information, geiger_counter, geiger_counter)
|
||||
|
||||
for(var/mob/living/target in turf_to_irradiate)
|
||||
var/list/contents_to_check = target.get_all_contents_type(/obj/item/geiger)
|
||||
for(var/obj/item/geiger/geiger_counter in contents_to_check)
|
||||
geiger_check(source, pulse_information, geiger_counter, target)
|
||||
|
||||
if(!can_irradiate_basic(target))
|
||||
continue
|
||||
|
||||
@@ -184,3 +173,25 @@ SUBSYSTEM_DEF(radiation)
|
||||
break
|
||||
|
||||
return (protected_limbs/limb_count)
|
||||
|
||||
///Proc for when geiger counter is checked. This is called twice: Once when the geiger counter is in range of a pulse itself and once when a geiger counter is on a mob that is in range of a pulse.
|
||||
/datum/controller/subsystem/radiation/proc/geiger_check(atom/source, datum/radiation_pulse_information/pulse_information, obj/item/geiger/geiger_counter, atom/target)
|
||||
if(!target)
|
||||
target = geiger_counter
|
||||
|
||||
var/current_insulation = 1
|
||||
var/list/cached_rad_insulations = list()
|
||||
for(var/turf/turf_in_between in get_line(source, target) - get_turf(source))
|
||||
var/insulation = cached_rad_insulations[turf_in_between]
|
||||
if(isnull(insulation))
|
||||
insulation = turf_in_between.rad_insulation
|
||||
for (var/atom/on_turf as anything in turf_in_between.contents)
|
||||
insulation *= on_turf.rad_insulation
|
||||
cached_rad_insulations[turf_in_between] = insulation
|
||||
|
||||
current_insulation *= insulation
|
||||
|
||||
if(current_insulation <= pulse_information.threshold)
|
||||
continue
|
||||
|
||||
SEND_SIGNAL(geiger_counter, COMSIG_IN_RANGE_OF_IRRADIATION, pulse_information, current_insulation)
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#define FIRE_PRIORITY_REFLECTOR 20
|
||||
|
||||
SUBSYSTEM_DEF(reflector)
|
||||
name = "Reflectors"
|
||||
priority = FIRE_PRIORITY_REFLECTOR
|
||||
flags = SS_BACKGROUND | SS_NO_INIT
|
||||
wait = 5
|
||||
|
||||
var/stat_tag = "R" //Used for logging
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
var/obj/structure/reflector/current_thing
|
||||
|
||||
/datum/controller/subsystem/reflector/Recover()
|
||||
log_runtime("[name] subsystem Recover().")
|
||||
if(SSreflector.current_thing)
|
||||
log_runtime("current_thing was: (\ref[SSreflector.current_thing])[SSreflector.current_thing]([SSreflector.current_thing.type]) - currentrun: [SSreflector.currentrun.len] vs total: [length(SSreflector.processing)]")
|
||||
var/list/old_processing = SSreflector.processing.Copy()
|
||||
for(var/datum/D in old_processing)
|
||||
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
|
||||
processing |= D
|
||||
|
||||
/datum/controller/subsystem/reflector/stat_entry(msg)
|
||||
msg = "[stat_tag]:[processing.len]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/reflector/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/current_run = currentrun
|
||||
|
||||
while(current_run.len)
|
||||
current_thing = current_run[current_run.len]
|
||||
current_run.len--
|
||||
if(QDELETED(current_thing))
|
||||
processing -= current_thing
|
||||
current_thing.Fire()
|
||||
if (MC_TICK_CHECK)
|
||||
current_thing = null
|
||||
return
|
||||
|
||||
current_thing = null
|
||||
|
||||
#undef FIRE_PRIORITY_REFLECTOR
|
||||
Reference in New Issue
Block a user