mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Replaces lag with lag(lite) (#17319)
* a couple files * another quarter basically * awooga * so many changes * comma moment * oop and a zero * guggugugug * Update magic.dm * e * Update dcs.dm * e * finally * Update watertank.dm Fixwatertank Co-authored-by: Molti <gamingjoelouis@gmail.com>
This commit is contained in:
20
code/__DEFINES/acid.dm
Normal file
20
code/__DEFINES/acid.dm
Normal file
@@ -0,0 +1,20 @@
|
||||
/// The acid power required to destroy most closed turfs.
|
||||
#define ACID_POWER_MELT_TURF 200
|
||||
/// The maximum amount of damage (per tick) acid can deal to an [/obj].
|
||||
/// The maximum amount of damage (per second) acid can deal to an [/obj].
|
||||
#define OBJ_ACID_DAMAGE_MAX 300
|
||||
/// Maximum acid volume that can be applied to an [/obj].
|
||||
#define OBJ_ACID_VOLUME_MAX 300
|
||||
/// Maximum acid volume that can be applied to a [/mob/living].
|
||||
#define MOB_ACID_VOLUME_MAX 1000
|
||||
/// Maximum acid volume that can be applied to a [/turf].
|
||||
#define TURF_ACID_VOLUME_MAX 12000
|
||||
// Acid decay rate constants.
|
||||
/// The constant factor for the acid decay rate.
|
||||
#define ACID_DECAY_BASE 1
|
||||
/// The scaling factor for the acid decay rate.
|
||||
#define ACID_DECAY_SCALING 1
|
||||
/// The default icon state for the acid overlay. Not to be confused with the error icon state.
|
||||
#define ACID_OVERLAY_DEFAULT "default"
|
||||
/// The combined acid power and acid volume required to burn hands.
|
||||
#define ACID_LEVEL_HANDBURN 20
|
||||
@@ -200,9 +200,9 @@
|
||||
/// (kPa) What pressure pumps and powered equipment max out at.
|
||||
#define MAX_OUTPUT_PRESSURE 4500
|
||||
/// (L/s) Maximum speed powered equipment can work at.
|
||||
#define MAX_TRANSFER_RATE 200
|
||||
/// 10% of an overclocked volume pump leaks into the air
|
||||
#define VOLUME_PUMP_LEAK_AMOUNT 0.1
|
||||
#define MAX_TRANSFER_RATE 400
|
||||
/// How many percent of the contents that an overclocked volume pumps leak into the air
|
||||
#define VOLUME_PUMP_LEAK_AMOUNT 0.2
|
||||
//used for device_type vars
|
||||
#define UNARY 1
|
||||
#define BINARY 2
|
||||
|
||||
@@ -86,6 +86,11 @@
|
||||
// Returns the nth root of x.
|
||||
#define ROOT(n, x) ((x) ** (1 / (n)))
|
||||
|
||||
/// Low-pass filter a value to smooth out high frequent peaks. This can be thought of as a moving average filter as well.
|
||||
/// delta_time is how many seconds since we last ran this command. RC is the filter constant, high RC means more smoothing
|
||||
/// See https://en.wikipedia.org/wiki/Low-pass_filter#Simple_infinite_impulse_response_filter for the maths
|
||||
#define LPFILTER(memory, signal, delta_time, RC) (delta_time / (RC + delta_time)) * signal + (1 - delta_time / (RC + delta_time)) * memory
|
||||
|
||||
// The quadratic formula. Returns a list with the solutions, or an empty list
|
||||
// if they are imaginary.
|
||||
/proc/SolveQuadratic(a, b, c)
|
||||
@@ -208,4 +213,10 @@
|
||||
|
||||
#define RULE_OF_THREE(a, b, x) ((a*x)/b)
|
||||
|
||||
/// Converts a probability/second chance to probability/delta_time chance
|
||||
/// For example, if you want an event to happen with a 10% per second chance, but your proc only runs every 5 seconds, do `if(prob(100*DT_PROB_RATE(0.1, 5)))`
|
||||
#define DT_PROB_RATE(prob_per_second, delta_time) (1 - (1 - prob_per_second) ** delta_time)
|
||||
|
||||
/// Like DT_PROB_RATE but easier to use, simply put `if(DT_PROB(10, 5))`
|
||||
#define DT_PROB(prob_per_second_percent, delta_time) (prob(100*DT_PROB_RATE(prob_per_second_percent/100, delta_time)))
|
||||
// )
|
||||
|
||||
@@ -47,3 +47,6 @@ Ask ninjanomnom if they're around
|
||||
#define RAD_DISTANCE_COEFFICIENT 1 // Lower means further rad spread
|
||||
|
||||
#define RAD_HALF_LIFE 30 // The half-life of contaminated objects
|
||||
|
||||
#define RAD_GEIGER_RC 4 // RC-constant for the LP filter for geiger counters. See #define LPFILTER for more info.
|
||||
#define RAD_GEIGER_GRACE_PERIOD 4 // How many seconds after we last detect a radiation pulse until we stop blipping
|
||||
|
||||
@@ -267,6 +267,13 @@
|
||||
#define SSEXPLOSIONS_TURFS 2
|
||||
#define SSEXPLOSIONS_THROWS 3
|
||||
|
||||
// Subsystem delta times or tickrates, in seconds. I.e, how many seconds in between each process() call for objects being processed by that subsystem.
|
||||
// Only use these defines if you want to access some other objects processing delta_time, otherwise use the delta_time that is sent as a parameter to process()
|
||||
#define SSFLUIDS_DT (SSfluids.wait/10)
|
||||
#define SSMACHINES_DT (SSmachines.wait/10)
|
||||
#define SSMOBS_DT (SSmobs.wait/10)
|
||||
#define SSOBJ_DT (SSobj.wait/10)
|
||||
|
||||
/// The timer key used to know how long subsystem initialization takes
|
||||
#define SS_INIT_TIMER_KEY "ss_init"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(air)
|
||||
name = "Atmospherics"
|
||||
init_order = INIT_ORDER_AIR
|
||||
priority = FIRE_PRIORITY_AIR
|
||||
wait = 5
|
||||
wait = 0.5 SECONDS
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
@@ -40,6 +40,8 @@ SUBSYSTEM_DEF(air)
|
||||
var/map_loading = TRUE
|
||||
var/list/queued_for_activation
|
||||
|
||||
var/lasttick = 0
|
||||
|
||||
var/log_explosive_decompression = TRUE // If things get spammy, admemes can turn this off.
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
@@ -77,6 +79,8 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
/datum/controller/subsystem/air/fire(resumed = 0)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
var/delta_time = wait * 0.1
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
var/list/pipenet_rebuilds = pipenets_needing_rebuilt
|
||||
for(var/thing in pipenet_rebuilds)
|
||||
@@ -92,7 +96,7 @@ SUBSYSTEM_DEF(air)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_pipenets(resumed)
|
||||
process_pipenets(delta_time, resumed)
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -104,7 +108,7 @@ SUBSYSTEM_DEF(air)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_atmos_machinery(resumed)
|
||||
process_atmos_machinery(delta_time, resumed)
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -160,7 +164,7 @@ SUBSYSTEM_DEF(air)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_hotspots(resumed)
|
||||
process_hotspots(delta_time, resumed)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(cached_cost))
|
||||
@@ -180,7 +184,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(delta_time, resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = networks.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -189,7 +193,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/datum/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(thing)
|
||||
thing.process()
|
||||
thing.process(delta_time)
|
||||
else
|
||||
networks.Remove(thing)
|
||||
if(MC_TICK_CHECK)
|
||||
@@ -199,8 +203,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(istype(atmos_machine, /obj/machinery/atmospherics))
|
||||
pipenets_needing_rebuilt += atmos_machine
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(delta_time, resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = atmos_machinery.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -208,7 +211,7 @@ SUBSYSTEM_DEF(air)
|
||||
while(currentrun.len)
|
||||
var/obj/machinery/M = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!M || (M.process_atmos(seconds) == PROCESS_KILL))
|
||||
if(!M || (M.process_atmos(delta_time) == PROCESS_KILL))
|
||||
atmos_machinery.Remove(M)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
@@ -226,7 +229,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(delta_time, resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = hotspots.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -235,7 +238,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/obj/effect/hotspot/H = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if (H)
|
||||
H.process()
|
||||
H.process(delta_time)
|
||||
else
|
||||
hotspots -= H
|
||||
if(MC_TICK_CHECK)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
name = "Datum Component System"
|
||||
flags = SS_NO_INIT
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/list/elements_by_type = list()
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(thing)
|
||||
thing.process()
|
||||
thing.process(wait * 0.1)
|
||||
else
|
||||
running.Remove(thing)
|
||||
if (MC_TICK_CHECK)
|
||||
|
||||
@@ -19,6 +19,7 @@ SUBSYSTEM_DEF(fire_burning)
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
var/delta_time = wait * 0.1
|
||||
|
||||
while(currentrun.len)
|
||||
var/obj/O = currentrun[currentrun.len]
|
||||
@@ -32,7 +33,7 @@ SUBSYSTEM_DEF(fire_burning)
|
||||
|
||||
if(O.resistance_flags & ON_FIRE) //in case an object is extinguished while still in currentrun
|
||||
if(!(O.resistance_flags & FIRE_PROOF))
|
||||
O.take_damage(20, BURN, FIRE, 0)
|
||||
O.take_damage(10 * delta_time, BURN, FIRE, 0)
|
||||
else
|
||||
O.extinguish()
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(machines)
|
||||
name = "Machines"
|
||||
init_order = INIT_ORDER_MACHINES
|
||||
flags = SS_KEEP_TIMING
|
||||
wait = 2 SECONDS
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
var/list/powernets = list()
|
||||
@@ -36,11 +37,10 @@ SUBSYSTEM_DEF(machines)
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
var/seconds = wait * 0.1
|
||||
while(currentrun.len)
|
||||
var/obj/machinery/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
|
||||
if(!QDELETED(thing) && thing.process(wait * 0.1) != PROCESS_KILL)
|
||||
if(thing.use_power)
|
||||
thing.auto_use_power() //add back the power state
|
||||
else
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
priority = FIRE_PRIORITY_MOBS
|
||||
flags = SS_KEEP_TIMING | SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
wait = 2 SECONDS
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/static/list/clients_by_zlevel[][]
|
||||
@@ -25,7 +26,6 @@ SUBSYSTEM_DEF(mobs)
|
||||
dead_players_by_zlevel[dead_players_by_zlevel.len] = list()
|
||||
|
||||
/datum/controller/subsystem/mobs/fire(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
if (!resumed)
|
||||
src.currentrun = GLOB.mob_living_list.Copy()
|
||||
|
||||
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
var/mob/living/L = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(L)
|
||||
L.Life(seconds, times_fired)
|
||||
L.Life(times_fired)
|
||||
else
|
||||
GLOB.mob_living_list.Remove(L)
|
||||
if (MC_TICK_CHECK)
|
||||
|
||||
@@ -2,3 +2,4 @@ PROCESSING_SUBSYSTEM_DEF(mood)
|
||||
name = "Mood"
|
||||
flags = SS_NO_INIT | SS_BACKGROUND
|
||||
priority = 20
|
||||
wait = 1 SECONDS
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
PROCESSING_SUBSYSTEM_DEF(fastprocess)
|
||||
name = "Fast Processing"
|
||||
wait = 2
|
||||
wait = 0.2 SECONDS
|
||||
stat_tag = "FP"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(nanites)
|
||||
name = "Nanites"
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
|
||||
wait = 10
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/list/datum/nanite_cloud_backup/cloud_backups = list()
|
||||
var/list/mob/living/nanite_monitored_mobs = list()
|
||||
|
||||
@@ -2,4 +2,4 @@ PROCESSING_SUBSYSTEM_DEF(obj)
|
||||
name = "Objects"
|
||||
priority = FIRE_PRIORITY_OBJ
|
||||
flags = SS_NO_INIT
|
||||
wait = 20
|
||||
wait = 2 SECONDS
|
||||
|
||||
@@ -4,7 +4,7 @@ SUBSYSTEM_DEF(processing)
|
||||
name = "Processing"
|
||||
priority = FIRE_PRIORITY_PROCESS
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
|
||||
wait = 10
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/stat_tag = "P" //Used for logging
|
||||
var/list/processing = list()
|
||||
@@ -25,12 +25,26 @@ SUBSYSTEM_DEF(processing)
|
||||
current_run.len--
|
||||
if(QDELETED(thing))
|
||||
processing -= thing
|
||||
else if(thing.process(wait) == PROCESS_KILL)
|
||||
else if(thing.process(wait * 0.1) == PROCESS_KILL)
|
||||
// fully stop so that a future START_PROCESSING will work
|
||||
STOP_PROCESSING(src, thing)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/proc/process()
|
||||
/**
|
||||
* This proc is called on a datum on every "cycle" if it is being processed by a subsystem. The time between each cycle is determined by the subsystem's "wait" setting.
|
||||
* You can start and stop processing a datum using the START_PROCESSING and STOP_PROCESSING defines.
|
||||
*
|
||||
* Since the wait setting of a subsystem can be changed at any time, it is important that any rate-of-change that you implement in this proc is multiplied by the delta_time that is sent as a parameter,
|
||||
* Additionally, any "prob" you use in this proc should instead use the DT_PROB define to make sure that the final probability per second stays the same even if the subsystem's wait is altered.
|
||||
* Examples where this must be considered:
|
||||
* - Implementing a cooldown timer, use `mytimer -= delta_time`, not `mytimer -= 1`. This way, `mytimer` will always have the unit of seconds
|
||||
* - Damaging a mob, do `L.adjustFireLoss(20 * delta_time)`, not `L.adjustFireLoss(20)`. This way, the damage per second stays constant even if the wait of the subsystem is changed
|
||||
* - Probability of something happening, do `if(DT_PROB(25, delta_time))`, not `if(prob(25))`. This way, if the subsystem wait is e.g. lowered, there won't be a higher chance of this event happening per second
|
||||
*
|
||||
* If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
|
||||
*/
|
||||
|
||||
/datum/proc/process(delta_time)
|
||||
set waitfor = 0
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -5,7 +5,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
name = "Quirks"
|
||||
init_order = INIT_ORDER_QUIRKS
|
||||
flags = SS_BACKGROUND
|
||||
wait = 10
|
||||
wait = 1 SECONDS
|
||||
runlevels = RUNLEVEL_GAME
|
||||
|
||||
var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(radiation)
|
||||
name = "Radiation"
|
||||
flags = SS_NO_INIT | SS_BACKGROUND
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/list/warned_atoms = list()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
current_run.len--
|
||||
// TODO: Move user/src_object check to process()
|
||||
if(ui && ui.user && ui.src_object)
|
||||
ui.process()
|
||||
ui.process(wait * 0.1)
|
||||
else
|
||||
open_uis.Remove(ui)
|
||||
if(MC_TICK_CHECK)
|
||||
@@ -192,7 +192,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
for(var/datum/tgui/ui in open_uis_by_src[key])
|
||||
// Check if UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
|
||||
ui.process(force = 1)
|
||||
ui.process(wait * 0.1, force = 1)
|
||||
count++
|
||||
return count
|
||||
|
||||
@@ -251,7 +251,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
return count
|
||||
for(var/datum/tgui/ui in user.tgui_open_uis)
|
||||
if(isnull(src_object) || ui.src_object == src_object)
|
||||
ui.process(force = 1)
|
||||
ui.process(wait * 0.1, force = 1)
|
||||
count++
|
||||
return count
|
||||
|
||||
|
||||
192
code/datums/components/acid.dm
Normal file
192
code/datums/components/acid.dm
Normal file
@@ -0,0 +1,192 @@
|
||||
/** Component representing acid applied to an object.
|
||||
*
|
||||
* Must be attached to an atom.
|
||||
* Processes, repeatedly damaging whatever it is attached to.
|
||||
* If the parent atom is a turf it applies acid to the contents of the turf.
|
||||
*/
|
||||
/datum/component/acid
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
/// The strength of the acid on the parent [/atom].
|
||||
var/acid_power
|
||||
/// The volume of acid on the parent [/atom].
|
||||
var/acid_volume
|
||||
/// The maximum volume of acid on the parent [/atom].
|
||||
var/max_volume = INFINITY
|
||||
/// The ambiant sound of acid eating away at the parent [/atom].
|
||||
var/datum/looping_sound/acid/sizzle
|
||||
/// Used exclusively for melting turfs. TODO: Move integrity to the atom level so that this can be dealt with there.
|
||||
var/parent_integrity = 30
|
||||
/// How far the acid melting of turfs has progressed
|
||||
var/stage = 0
|
||||
/// The proc used to handle the parent [/atom] when processing. TODO: Unify damage and resistance flags so that this doesn't need to exist!
|
||||
var/datum/callback/process_effect
|
||||
|
||||
/datum/component/acid/Initialize(_acid_power, _acid_volume, _max_volume=null)
|
||||
if((_acid_power) <= 0 || (_acid_volume <= 0))
|
||||
stack_trace("Acid component added with insufficient acid power ([_acid_power]) or acid volume ([_acid_power]).")
|
||||
return COMPONENT_INCOMPATIBLE // Not enough acid or the acid's too weak, either one.
|
||||
if(!isatom(parent))
|
||||
stack_trace("Acid component added to [parent] ([parent?.type]) which is not a /atom subtype.")
|
||||
return COMPONENT_INCOMPATIBLE // Incompatible type. TODO: Rework take_damage to the atom level and move this there.
|
||||
if(isobj(parent))
|
||||
var/obj/parent_object = parent
|
||||
if(parent_object.resistance_flags & UNACIDABLE) // The parent object cannot have acid. Should never happen, will happen.
|
||||
stack_trace("Acid component added to unacidable object [parent].")
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
max_volume = OBJ_ACID_VOLUME_MAX
|
||||
process_effect = CALLBACK(src, .proc/process_obj, parent)
|
||||
else if(isliving(parent))
|
||||
max_volume = MOB_ACID_VOLUME_MAX
|
||||
process_effect = CALLBACK(src, .proc/process_mob, parent)
|
||||
else if(isturf(parent))
|
||||
max_volume = TURF_ACID_VOLUME_MAX
|
||||
process_effect = CALLBACK(src, .proc/process_turf, parent)
|
||||
acid_power = _acid_power
|
||||
set_volume(_acid_volume)
|
||||
var/atom/parent_atom = parent
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/on_update_overlays)
|
||||
parent_atom.update_icon()
|
||||
sizzle = new(list(parent), TRUE)
|
||||
START_PROCESSING(SSacid, src)
|
||||
/datum/component/acid/Destroy(force, silent)
|
||||
STOP_PROCESSING(SSacid, src)
|
||||
if(sizzle)
|
||||
QDEL_NULL(sizzle)
|
||||
if(process_effect)
|
||||
QDEL_NULL(process_effect)
|
||||
UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS)
|
||||
if(parent && !QDELING(parent))
|
||||
var/atom/parent_atom = parent
|
||||
parent_atom.update_icon()
|
||||
return ..()
|
||||
/datum/component/acid/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/on_clean)
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/on_attack_hand)
|
||||
RegisterSignal(parent, COMSIG_ATOM_EXPOSE_REAGENT, .proc/on_expose_reagent)
|
||||
if(isturf(parent))
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/on_crossed)
|
||||
/datum/component/acid/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(
|
||||
COMSIG_PARENT_EXAMINE,
|
||||
COMSIG_COMPONENT_CLEAN_ACT,
|
||||
COMSIG_ATOM_ATTACK_HAND,
|
||||
COMSIG_ATOM_EXPOSE_REAGENT))
|
||||
if(isturf(parent))
|
||||
UnregisterSignal(parent, COMSIG_MOVABLE_CROSSED)
|
||||
/// Averages corrosive power and sums volume.
|
||||
/datum/component/acid/InheritComponent(datum/component/C, i_am_original, _acid_power, _acid_volume)
|
||||
acid_power = ((acid_power * acid_volume) + (_acid_power * _acid_volume)) / (acid_volume + _acid_volume)
|
||||
set_volume(acid_volume + _acid_volume)
|
||||
/// Sets the acid volume to a new value. Limits the acid volume by the amount allowed to exist on the parent atom.
|
||||
/datum/component/acid/proc/set_volume(new_volume)
|
||||
acid_volume = clamp(new_volume, 0, max_volume)
|
||||
if(!acid_volume)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/// Handles the slow corrosion of the parent [/atom].
|
||||
/datum/component/acid/process(delta_time)
|
||||
process_effect?.InvokeAsync(delta_time)
|
||||
if(QDELING(src)) //The process effect deals damage, and on turfs diminishes the acid volume, potentially destroying the component. Let's not destroy it twice.
|
||||
return
|
||||
set_volume(acid_volume - (ACID_DECAY_BASE + (ACID_DECAY_SCALING*round(sqrt(acid_volume)))) * delta_time)
|
||||
|
||||
/// Handles processing on a [/obj].
|
||||
/datum/component/acid/proc/process_obj(obj/target, delta_time)
|
||||
if(target.resistance_flags & ACID_PROOF)
|
||||
return
|
||||
target.take_damage(min(1 + round(sqrt(acid_power * acid_volume)*0.3), OBJ_ACID_DAMAGE_MAX) * delta_time, BURN, ACID, 0)
|
||||
|
||||
/// Handles processing on a [/mob/living].
|
||||
/datum/component/acid/proc/process_mob(mob/living/target, delta_time)
|
||||
target.acid_act(acid_power, acid_volume * delta_time)
|
||||
|
||||
/// Handles processing on a [/turf].
|
||||
/datum/component/acid/proc/process_turf(turf/target_turf, delta_time)
|
||||
var/acid_used = min(acid_volume * 0.05, 20) * delta_time
|
||||
var/applied_targets = 0
|
||||
for(var/am in target_turf)
|
||||
var/atom/movable/target_movable = am
|
||||
if(target_movable.acid_act(acid_power, acid_used))
|
||||
applied_targets++
|
||||
if(applied_targets)
|
||||
set_volume(acid_volume - (acid_used * applied_targets))
|
||||
// Snowflake code for handling acid melting walls. TODO: Move integrity handling to the atom level so this can be desnowflaked.
|
||||
if(acid_power < ACID_POWER_MELT_TURF)
|
||||
return
|
||||
|
||||
parent_integrity -= delta_time
|
||||
if(parent_integrity <= 0)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] collapses under its own weight into a puddle of goop and undigested debris!</span>")
|
||||
target_turf.acid_melt()
|
||||
else if(parent_integrity <= 4 && stage <= 3)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] begins to crumble under the acid!</span>")
|
||||
stage = 4
|
||||
else if(parent_integrity <= 8 && stage <= 2)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is struggling to withstand the acid!</span>")
|
||||
stage = 3
|
||||
else if(parent_integrity <= 16 && stage <= 1)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is being melted by the acid!</span>")
|
||||
stage = 2
|
||||
else if(parent_integrity <= 24 && stage == 0)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is holding up against the acid!</span>")
|
||||
stage = 1
|
||||
|
||||
/// Used to maintain the acid overlay on the parent [/atom].
|
||||
/datum/component/acid/proc/on_update_overlays(atom/parent_atom, list/overlays)
|
||||
SIGNAL_HANDLER
|
||||
overlays += mutable_appearance('icons/effects/acid.dmi', parent_atom.custom_acid_overlay || ACID_OVERLAY_DEFAULT)
|
||||
/// Alerts any examiners to the acid on the parent atom.
|
||||
/datum/component/acid/proc/on_examine(atom/A, mob/user, list/examine_list)
|
||||
SIGNAL_HANDLER
|
||||
examine_list += "<span class='danger'>[A.p_theyre()] covered in corrosive liquid!</span>"
|
||||
/// Makes it possible to clean acid off of objects.
|
||||
/datum/component/acid/proc/on_clean(atom/A, clean_types)
|
||||
SIGNAL_HANDLER
|
||||
if(!(clean_types & CLEAN_TYPE_ACID))
|
||||
return NONE
|
||||
qdel(src)
|
||||
return COMPONENT_CLEANED
|
||||
/// Handles water diluting the acid on the object.
|
||||
/datum/component/acid/proc/on_expose_reagent(atom/parent_atom, datum/reagent/exposing_reagent, reac_volume)
|
||||
SIGNAL_HANDLER
|
||||
if(!istype(exposing_reagent, /datum/reagent/water))
|
||||
return NONE
|
||||
acid_power /= (acid_volume / (acid_volume + reac_volume))
|
||||
set_volume(acid_volume + reac_volume)
|
||||
return NONE
|
||||
/// Handles searing the hand of anyone who tries to touch this without protection.
|
||||
/datum/component/acid/proc/on_attack_hand(atom/parent_atom, mob/living/carbon/user)
|
||||
SIGNAL_HANDLER
|
||||
if(!istype(user))
|
||||
return NONE
|
||||
if((parent_atom == user) || (parent_atom.loc == user))
|
||||
return NONE // So people can take their own clothes off.
|
||||
if((acid_power * acid_volume) < ACID_LEVEL_HANDBURN)
|
||||
return NONE
|
||||
if(user.gloves?.resistance_flags & (UNACIDABLE|ACID_PROOF))
|
||||
return NONE
|
||||
var/obj/item/bodypart/affecting = user.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
|
||||
if(!affecting?.receive_damage(0, 5))
|
||||
return NONE
|
||||
to_chat(user, "<span class='warning'>The acid on \the [parent_atom] burns your hand!</span>")
|
||||
playsound(parent_atom, 'sound/weapons/sear.ogg', 50, TRUE)
|
||||
user.update_damage_overlays()
|
||||
return COMPONENT_NO_ATTACK_HAND
|
||||
/// Handles searing the feet of whoever walks over this without protection. Only active if the parent is a turf.
|
||||
/datum/component/acid/proc/on_crossed(atom/parent_atom, mob/living/crosser)
|
||||
SIGNAL_HANDLER
|
||||
if(!isliving(crosser))
|
||||
return
|
||||
if(crosser.movement_type & FLYING)
|
||||
return
|
||||
if(crosser.m_intent & MOVE_INTENT_WALK)
|
||||
return
|
||||
if(prob(60))
|
||||
return
|
||||
var/acid_used = min(acid_volume * 0.05, 20)
|
||||
if(crosser.acid_act(acid_power, acid_used, FEET))
|
||||
playsound(crosser, 'sound/weapons/sear.ogg', 50, TRUE)
|
||||
to_chat(crosser, "<span class='userdanger'>The acid on the [parent] burns you!</span>")
|
||||
set_volume(max(acid_volume - acid_used, 10))
|
||||
@@ -171,7 +171,7 @@
|
||||
screen_obj.color = "#2eeb9a"
|
||||
break
|
||||
|
||||
/datum/component/mood/process() //Called on SSmood process
|
||||
/datum/component/mood/process(delta_time) //Called on SSmood process
|
||||
var/mob/living/owner = parent
|
||||
if(!owner)
|
||||
qdel(src)
|
||||
@@ -179,23 +179,23 @@
|
||||
|
||||
switch(mood_level)
|
||||
if(1)
|
||||
setSanity(sanity-0.2)
|
||||
setSanity(sanity-0.2*delta_time)
|
||||
if(2)
|
||||
setSanity(sanity-0.125, minimum=SANITY_CRAZY)
|
||||
setSanity(sanity-0.125*delta_time, minimum=SANITY_CRAZY)
|
||||
if(3)
|
||||
setSanity(sanity-0.075, minimum=SANITY_UNSTABLE)
|
||||
setSanity(sanity-0.075*delta_time, minimum=SANITY_UNSTABLE)
|
||||
if(4)
|
||||
setSanity(sanity-0.025, minimum=SANITY_DISTURBED)
|
||||
setSanity(sanity-0.025*delta_time, minimum=SANITY_DISTURBED)
|
||||
if(5)
|
||||
setSanity(sanity+0.1)
|
||||
if(6)
|
||||
setSanity(sanity+0.15)
|
||||
setSanity(sanity+0.15*delta_time)
|
||||
if(7)
|
||||
setSanity(sanity+0.2)
|
||||
setSanity(sanity+0.2*delta_time)
|
||||
if(8)
|
||||
setSanity(sanity+0.25, maximum=SANITY_GREAT)
|
||||
setSanity(sanity+0.25*delta_time, maximum=SANITY_GREAT)
|
||||
if(9)
|
||||
setSanity(sanity+0.4, maximum=INFINITY)
|
||||
setSanity(sanity+0.4*delta_time, maximum=INFINITY)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
|
||||
if(prob(0.05))
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
else
|
||||
adjust_nanites(null, _amount) //just add to the nanite volume
|
||||
|
||||
/datum/component/nanites/process()
|
||||
adjust_nanites(null, regen_rate)
|
||||
/datum/component/nanites/process(delta_time)
|
||||
adjust_nanites(null, regen_rate * delta_time)
|
||||
add_research()
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
master.remove_filter("rad_glow")
|
||||
return ..()
|
||||
|
||||
/datum/component/radioactive/process()
|
||||
if(!prob(50))
|
||||
/datum/component/radioactive/process(delta_time)
|
||||
if(!DT_PROB(50, delta_time))
|
||||
return
|
||||
radiation_pulse(parent, strength, RAD_DISTANCE_COEFFICIENT*2, FALSE, can_contaminate)
|
||||
if(!hl3_release_date)
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
STOP_PROCESSING(SSradiation, src)
|
||||
..()
|
||||
|
||||
/datum/radiation_wave/process()
|
||||
/datum/radiation_wave/process(delta_time)
|
||||
master_turf = get_step(master_turf, move_dir)
|
||||
if(!master_turf)
|
||||
qdel(src)
|
||||
return
|
||||
steps++
|
||||
steps += delta_time
|
||||
var/list/atoms = get_rad_atoms()
|
||||
|
||||
var/strength
|
||||
|
||||
@@ -69,14 +69,14 @@
|
||||
/datum/quirk/proc/check_quirk(datum/preferences/prefs) // Yogs -- allows quirks to check the preferences of the user who may acquire it
|
||||
return FALSE
|
||||
|
||||
/datum/quirk/process()
|
||||
/datum/quirk/process(delta_time)
|
||||
if(QDELETED(quirk_holder))
|
||||
quirk_holder = null
|
||||
qdel(src)
|
||||
return
|
||||
if(quirk_holder.stat == DEAD)
|
||||
return
|
||||
on_process()
|
||||
on_process(delta_time)
|
||||
|
||||
/mob/living/proc/get_trait_string(medical) //helper string. gets a string of all the traits the mob has
|
||||
var/list/dat = list()
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
lose_text = span_notice("You feel vigorous again.")
|
||||
medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood."
|
||||
|
||||
/datum/quirk/blooddeficiency/on_process()
|
||||
/datum/quirk/blooddeficiency/on_process(delta_time)
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
if(NOBLOOD in H.dna.species.species_traits) //can't lose blood if your species doesn't have any
|
||||
return
|
||||
else
|
||||
if (H.blood_volume > (BLOOD_VOLUME_SAFE(H) - 25)) // just barely survivable without treatment
|
||||
H.blood_volume -= 0.275
|
||||
H.blood_volume -= 0.275 * delta_time
|
||||
|
||||
/datum/quirk/blindness
|
||||
name = "Blind"
|
||||
@@ -59,8 +59,8 @@
|
||||
medical_record_text = "Patient has a tumor in their brain that is slowly driving them to brain death."
|
||||
var/where = "at your feet"
|
||||
|
||||
/datum/quirk/brainproblems/on_process()
|
||||
quirk_holder.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2)
|
||||
/datum/quirk/brainproblems/on_process(delta_time)
|
||||
quirk_holder.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * delta_time)
|
||||
|
||||
/datum/quirk/brainproblems/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
permeability_coefficient = 0.05
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
|
||||
|
||||
/// Recharging rate in PPS (peels per second)
|
||||
#define BANANA_SHOES_RECHARGE_RATE 17
|
||||
#define BANANA_SHOES_MAX_CHARGE 3000
|
||||
|
||||
//The super annoying version
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat
|
||||
name = "mk-honk combat shoes"
|
||||
@@ -34,24 +38,26 @@
|
||||
permeability_coefficient = 0.05
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
|
||||
always_noslip = TRUE
|
||||
var/max_recharge = 3000 //30 peels worth
|
||||
var/recharge_rate = 34 //about 1/3 of a peel per tick
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
|
||||
bananium.insert_amount_mat(max_recharge, /datum/material/bananium)
|
||||
bananium.insert_amount_mat(BANANA_SHOES_MAX_CHARGE, /datum/material/bananium)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process(delta_time)
|
||||
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
|
||||
var/bananium_amount = bananium.get_material_amount(/datum/material/bananium)
|
||||
if(bananium_amount < max_recharge)
|
||||
bananium.insert_amount_mat(min(recharge_rate, max_recharge - bananium_amount), /datum/material/bananium)
|
||||
if(bananium_amount < BANANA_SHOES_MAX_CHARGE)
|
||||
bananium.insert_amount_mat(min(BANANA_SHOES_RECHARGE_RATE * delta_time, BANANA_SHOES_MAX_CHARGE - bananium_amount), /datum/material/bananium)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/attack_self(mob/user)
|
||||
ui_action_click(user)
|
||||
|
||||
#undef BANANA_SHOES_RECHARGE_RATE
|
||||
#undef BANANA_SHOES_MAX_CHARGE
|
||||
|
||||
|
||||
//BANANIUM SWORD
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium
|
||||
|
||||
@@ -39,21 +39,22 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/bank_machine/process()
|
||||
/obj/machinery/computer/bank_machine/process(delta_time)
|
||||
..()
|
||||
if(siphoning)
|
||||
if (stat & (BROKEN|NOPOWER))
|
||||
say("Insufficient power. Halting siphon.")
|
||||
end_syphon()
|
||||
var/siphon_am = 100 * delta_time
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(!D.has_money(200))
|
||||
if(!D.has_money(siphon_am))
|
||||
say("Cargo budget depleted. Halting siphon.")
|
||||
end_syphon()
|
||||
return
|
||||
|
||||
playsound(src, 'sound/items/poster_being_created.ogg', 100, 1)
|
||||
syphoning_credits += 200
|
||||
D.adjust_money(-200)
|
||||
syphoning_credits += siphon_am
|
||||
D.adjust_money(-siphon_am)
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
var/charge_rate = 500
|
||||
var/charge_rate = 250
|
||||
|
||||
/obj/machinery/cell_charger/update_icon()
|
||||
cut_overlays()
|
||||
@@ -29,7 +29,7 @@
|
||||
if(charging)
|
||||
. += "Current charge: [round(charging.percent(), 1)]%."
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Charge rate at <b>[charge_rate]J</b> per cycle.<span>"
|
||||
. += "<span class='notice'>The status display reads: Charging power: <b>[charge_rate]W</b>.<span>"
|
||||
|
||||
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/crowbar) && !panel_open)
|
||||
@@ -132,13 +132,13 @@
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
charge_rate *= C.rating
|
||||
|
||||
/obj/machinery/cell_charger/process()
|
||||
/obj/machinery/cell_charger/process(delta_time)
|
||||
if(!charging || !anchored || (stat & (BROKEN|NOPOWER)))
|
||||
return
|
||||
|
||||
if(charging.percent() >= 100)
|
||||
return
|
||||
use_power(charge_rate)
|
||||
charging.give(charge_rate) //this is 2558, efficient batteries exist
|
||||
use_power(charge_rate * delta_time)
|
||||
charging.give(charge_rate * delta_time) //this is 2558, efficient batteries exist
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -54,9 +54,9 @@
|
||||
usr.set_machine(src)
|
||||
addtimer(CALLBACK(src, .proc/updateDialog), 5)
|
||||
|
||||
/obj/machinery/embedded_controller/process()
|
||||
/obj/machinery/embedded_controller/process(delta_time)
|
||||
if(program)
|
||||
program.process()
|
||||
program.process(delta_time)
|
||||
|
||||
update_icon()
|
||||
src.updateDialog()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/start_at = NUTRITION_LEVEL_WELL_FED
|
||||
var/stop_at = NUTRITION_LEVEL_STARVING
|
||||
var/free_exit = TRUE //set to false to prevent people from exiting before being completely stripped of fat
|
||||
var/bite_size = 15 //amount of nutrients we take per process
|
||||
var/bite_size = 7.5 //amount of nutrients we take per second
|
||||
var/nutrients //amount of nutrients we got build up
|
||||
var/nutrient_to_meat = 90 //one slab of meat gives about 52 nutrition
|
||||
var/datum/looping_sound/microwave/soundloop //100% stolen from microwaves
|
||||
@@ -37,7 +37,7 @@
|
||||
var/rating = 0
|
||||
for(var/obj/item/stock_parts/micro_laser/L in component_parts)
|
||||
rating += L.rating
|
||||
bite_size = initial(bite_size) + rating * 5
|
||||
bite_size = initial(bite_size) + rating * 2.5
|
||||
nutrient_to_meat = initial(nutrient_to_meat) - rating * 5
|
||||
|
||||
/obj/machinery/fat_sucker/examine(mob/user)
|
||||
@@ -127,7 +127,7 @@
|
||||
if(panel_open)
|
||||
overlays += "[icon_state]_panel"
|
||||
|
||||
/obj/machinery/fat_sucker/process()
|
||||
/obj/machinery/fat_sucker/process(delta_time)
|
||||
if(!processing)
|
||||
return
|
||||
if(!powered(EQUIP) || !occupant || !iscarbon(occupant))
|
||||
@@ -139,8 +139,8 @@
|
||||
open_machine()
|
||||
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
|
||||
return
|
||||
C.adjust_nutrition(-bite_size)
|
||||
nutrients += bite_size
|
||||
C.adjust_nutrition(-bite_size * delta_time)
|
||||
nutrients += bite_size * delta_time
|
||||
|
||||
if(next_fact <= 0)
|
||||
next_fact = initial(next_fact)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/iv_drip/process()
|
||||
/obj/machinery/iv_drip/process(delta_time)
|
||||
if(!attached)
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -138,13 +138,13 @@
|
||||
transfer_amount = 10
|
||||
var/fraction = min(transfer_amount/beaker.reagents.total_volume, 1) //the fraction that is transfered of the total volume
|
||||
beaker.reagents.reaction(attached, INJECT, fraction, FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(attached, transfer_amount)
|
||||
beaker.reagents.trans_to(attached, transfer_amount * delta_time * 0.5)
|
||||
update_icon()
|
||||
|
||||
// Take blood
|
||||
else
|
||||
var/amount = beaker.reagents.maximum_volume - beaker.reagents.total_volume
|
||||
amount = min(amount, 4)
|
||||
amount = min(amount, 4) * delta_time * 0.5
|
||||
// If the beaker is full, ping
|
||||
if(!amount)
|
||||
if(prob(5))
|
||||
|
||||
10
code/game/machinery/recharger.dm
Executable file → Normal file
10
code/game/machinery/recharger.dm
Executable file → Normal file
@@ -122,7 +122,7 @@
|
||||
charging.forceMove(drop_location())
|
||||
setCharging(null)
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
/obj/machinery/recharger/process(delta_time)
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
var/obj/item/stock_parts/cell/C = charging.get_cell()
|
||||
if(C)
|
||||
if(C.charge < C.maxcharge)
|
||||
C.give(C.chargerate * recharge_coeff)
|
||||
use_power(250 * recharge_coeff)
|
||||
C.give(C.chargerate * recharge_coeff * delta_time / 2)
|
||||
use_power(125 * recharge_coeff * delta_time)
|
||||
update_icon()
|
||||
|
||||
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
|
||||
@@ -141,7 +141,7 @@
|
||||
R.stored_ammo += new R.ammo_type(R)
|
||||
if(R.stored_ammo.len <= R.max_ammo)
|
||||
break
|
||||
use_power(200 * recharge_coeff)
|
||||
use_power(100 * recharge_coeff)
|
||||
update_icon()
|
||||
return
|
||||
if(istype(charging, /obj/item/ammo_box/magazine/m308/laser))
|
||||
@@ -149,7 +149,7 @@
|
||||
if(R.stored_ammo.len < R.max_ammo)
|
||||
for(var/i in 1 to recharge_coeff) //See above
|
||||
R.stored_ammo += new R.ammo_type(R)
|
||||
use_power(200 * recharge_coeff)
|
||||
use_power(100 * recharge_coeff)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
if(repairs)
|
||||
. += "<span class='notice'>[src] has been upgraded to support automatic repairs.<span>"
|
||||
|
||||
/obj/machinery/recharge_station/process()
|
||||
/obj/machinery/recharge_station/process(delta_time)
|
||||
if(!is_operational())
|
||||
return
|
||||
|
||||
if(occupant)
|
||||
process_occupant()
|
||||
process_occupant(delta_time)
|
||||
return 1
|
||||
|
||||
/obj/machinery/recharge_station/relaymove(mob/user)
|
||||
@@ -97,10 +97,10 @@
|
||||
else
|
||||
icon_state = (state_open ? "borgcharger-u0" : "borgcharger-u1")
|
||||
|
||||
/obj/machinery/recharge_station/proc/process_occupant()
|
||||
/obj/machinery/recharge_station/proc/process_occupant(delta_time)
|
||||
if(!occupant)
|
||||
return
|
||||
SEND_SIGNAL(occupant, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, recharge_speed, repairs)
|
||||
SEND_SIGNAL(occupant, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, recharge_speed * delta_time / 2, repairs)
|
||||
|
||||
/obj/machinery/recharge_station/fullupgrade
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
@@ -107,9 +107,9 @@
|
||||
update_icon()
|
||||
QDEL_LIST(deployed_shields)
|
||||
|
||||
/obj/machinery/shieldgen/process()
|
||||
/obj/machinery/shieldgen/process(delta_time)
|
||||
if((stat & BROKEN) && active)
|
||||
if(deployed_shields.len && prob(5))
|
||||
if(deployed_shields.len && DT_PROB(2.5, delta_time))
|
||||
qdel(pick(deployed_shields))
|
||||
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
give_payout(balance)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/slot_machine/process()
|
||||
/obj/machinery/computer/slot_machine/process(delta_time)
|
||||
. = ..() //Sanity checks.
|
||||
if(!.)
|
||||
return .
|
||||
|
||||
money++ //SPESSH MAJICKS
|
||||
money += round(delta_time / 2) //SPESSH MAJICKS
|
||||
|
||||
/obj/machinery/computer/slot_machine/update_icon()
|
||||
if(stat & NOPOWER)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/mode = HEATER_MODE_STANDBY
|
||||
var/setMode = "auto" // Anything other than "heat" or "cool" is considered auto.
|
||||
var/targetTemperature = T20C
|
||||
var/heatingPower = 40000
|
||||
var/heatingPower = 20000
|
||||
var/efficiency = 20000
|
||||
var/temperatureTolerance = 1
|
||||
var/settableTemperatureMedian = 30 + T0C
|
||||
@@ -64,7 +64,7 @@
|
||||
if(panel_open)
|
||||
add_overlay("sheater-open")
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
/obj/machinery/space_heater/process(delta_time)
|
||||
if(!on || stat & (BROKEN|MAINT))
|
||||
if (on) // If it's broken, turn it off too
|
||||
on = FALSE
|
||||
@@ -100,13 +100,13 @@
|
||||
return
|
||||
|
||||
var/heat_capacity = env.heat_capacity()
|
||||
var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity
|
||||
requiredPower = min(requiredPower, heatingPower)
|
||||
var/requiredEnergy = abs(env.return_temperature() - targetTemperature) * heat_capacity
|
||||
requiredEnergy = min(requiredEnergy, heatingPower * delta_time)
|
||||
|
||||
if(requiredPower < 1)
|
||||
if(requiredEnergy < 1)
|
||||
return
|
||||
|
||||
var/deltaTemperature = requiredPower / heat_capacity
|
||||
var/deltaTemperature = requiredEnergy / heat_capacity
|
||||
if(mode == HEATER_MODE_COOL)
|
||||
deltaTemperature *= -1
|
||||
if(deltaTemperature)
|
||||
@@ -116,13 +116,13 @@
|
||||
var/working = TRUE
|
||||
|
||||
if(stat & NOPOWER)
|
||||
if (!cell.use(requiredPower / efficiency))
|
||||
if (!cell.use(requiredEnergy / efficiency))
|
||||
//automatically turn off machine when cell depletes
|
||||
on = FALSE
|
||||
update_icon()
|
||||
working = FALSE
|
||||
else
|
||||
active_power_usage = requiredPower / efficiency
|
||||
active_power_usage = requiredEnergy / efficiency
|
||||
cell.give(charge_rate)
|
||||
|
||||
if(!working)
|
||||
@@ -145,7 +145,7 @@
|
||||
cap += M.rating
|
||||
charge_rate = initial(charge_rate)*M.rating
|
||||
|
||||
heatingPower = laser * 40000
|
||||
heatingPower = laser * 20000
|
||||
|
||||
settableTemperatureRange = cap * 30
|
||||
efficiency = (cap + 1) * 10000
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/// Update the display and, if necessary, re-enable processing.
|
||||
/obj/machinery/status_display/proc/update()
|
||||
if (process() != PROCESS_KILL)
|
||||
if (process(SSMACHINES_DT) != PROCESS_KILL)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
|
||||
/obj/machinery/status_display/power_change()
|
||||
|
||||
@@ -19,7 +19,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
critical_machine = TRUE
|
||||
var/list/links = list() // list of machines this machine is linked to
|
||||
var/traffic = 0 // value increases as traffic increases
|
||||
var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
|
||||
var/netspeed = 2.5 // how much traffic to lose per second (50 gigabytes/second * netspeed)
|
||||
var/net_efective = 100 //yogs percentage of netspeed aplied
|
||||
var/list/autolinkers = list() // list of text/number values to link with
|
||||
var/id = "NULL" // identification string
|
||||
@@ -173,7 +173,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
if(generates_heat && env.heat_capacity())
|
||||
env.set_temperature(env.return_temperature() + deltaT * heatoutput / env.heat_capacity()) //yogs end
|
||||
|
||||
/obj/machinery/telecomms/process()
|
||||
/obj/machinery/telecomms/process(delta_time)
|
||||
update_power()
|
||||
|
||||
// Update the icon
|
||||
|
||||
@@ -137,18 +137,18 @@ GLOBAL_LIST_INIT(dye_registry, list(
|
||||
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/machinery/washing_machine/process()
|
||||
/obj/machinery/washing_machine/process(delta_time)
|
||||
if(!busy)
|
||||
animate(src, transform=matrix(), time=0.2 SECONDS)
|
||||
return PROCESS_KILL
|
||||
if(anchored)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
var/matrix/M = new
|
||||
M.Translate(rand(-1, 1), rand(0, 1))
|
||||
animate(src, transform=M, time=0.1 SECONDS)
|
||||
animate(transform=matrix(), time=0.1 SECONDS)
|
||||
else
|
||||
if(prob(1))
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
step(src, pick(GLOB.cardinals))
|
||||
var/matrix/M = new
|
||||
M.Translate(rand(-3, 3), rand(-1, 3))
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
//Anomalies, used for events. Note that these DO NOT work by themselves; their procs are called by the event datum.
|
||||
/// Chance of taking a step per second
|
||||
#define ANOMALY_MOVECHANCE 45
|
||||
|
||||
/obj/effect/anomaly
|
||||
name = "anomaly"
|
||||
@@ -7,7 +9,6 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
light_range = 3
|
||||
var/movechance = 70
|
||||
var/obj/item/assembly/signaler/anomaly/aSignal
|
||||
var/area/impact_area
|
||||
|
||||
@@ -41,8 +42,8 @@
|
||||
countdown.color = countdown_colour
|
||||
countdown.start()
|
||||
|
||||
/obj/effect/anomaly/process()
|
||||
anomalyEffect()
|
||||
/obj/effect/anomaly/process(delta_time)
|
||||
anomalyEffect(delta_time)
|
||||
if(death_time < world.time)
|
||||
if(loc)
|
||||
detonate()
|
||||
@@ -54,8 +55,8 @@
|
||||
qdel(countdown)
|
||||
return ..()
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyEffect()
|
||||
if(prob(movechance))
|
||||
/obj/effect/anomaly/proc/anomalyEffect(delta_time)
|
||||
if(DT_PROB(ANOMALY_MOVECHANCE, delta_time))
|
||||
step(src,pick(GLOB.alldirs))
|
||||
|
||||
/obj/effect/anomaly/proc/detonate()
|
||||
@@ -261,14 +262,16 @@
|
||||
name = "pyroclastic anomaly"
|
||||
icon_state = "mustard"
|
||||
var/ticks = 0
|
||||
/// How many seconds between each gas release
|
||||
var/releasedelay = 10
|
||||
|
||||
/obj/effect/anomaly/pyro/anomalyEffect()
|
||||
/obj/effect/anomaly/pyro/anomalyEffect(delta_time)
|
||||
..()
|
||||
ticks++
|
||||
if(ticks < 5)
|
||||
ticks += delta_time
|
||||
if(ticks < releasedelay)
|
||||
return
|
||||
else
|
||||
ticks = 0
|
||||
ticks -= releasedelay
|
||||
var/turf/open/T = get_turf(src)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air("o2=5;plasma=5;TEMP=1000")
|
||||
@@ -358,3 +361,5 @@
|
||||
SSexplosions.lowturf += T
|
||||
|
||||
/////////////////////////
|
||||
|
||||
#undef ANOMALY_MOVECHANCE
|
||||
|
||||
@@ -65,10 +65,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
/obj/structure/spider/eggcluster/process(delta_time)
|
||||
amount_grown += rand(0,2) * delta_time
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
var/num = round(rand(1.5, 6) * delta_time)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.faction = faction.Copy()
|
||||
|
||||
@@ -201,8 +201,8 @@ RSF
|
||||
to_dispense = /obj/item/reagent_containers/food/snacks/cookie
|
||||
to_chat(user, "Cookie Synthesizer Reset")
|
||||
|
||||
/obj/item/rsf/cookiesynth/process()
|
||||
matter = min(matter + 1, max_matter) //We add 1 up to a point
|
||||
/obj/item/rsf/cookiesynth/process(delta_time)
|
||||
matter = min(matter += delta_time, max_matter) //We add 1 up to a point
|
||||
if(matter >= max_matter)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
heat = 1000
|
||||
var/wax = 1000
|
||||
var/wax = 2000
|
||||
var/lit = FALSE
|
||||
var/infinite = FALSE
|
||||
var/start_lit = FALSE
|
||||
@@ -21,7 +21,7 @@
|
||||
light()
|
||||
|
||||
/obj/item/candle/update_icon()
|
||||
icon_state = "candle[(wax > 400) ? ((wax > 750) ? 1 : 2) : 3][lit ? "_lit" : ""]"
|
||||
icon_state = "candle[(wax > 800) ? ((wax > 1500) ? 1 : 2) : 3][lit ? "_lit" : ""]"
|
||||
|
||||
/obj/item/candle/attackby(obj/item/W, mob/user, params)
|
||||
var/msg = W.ignition_effect(src, user)
|
||||
@@ -59,12 +59,12 @@
|
||||
put_out_candle()
|
||||
return ..()
|
||||
|
||||
/obj/item/candle/process()
|
||||
/obj/item/candle/process(delta_time)
|
||||
if(!lit)
|
||||
return PROCESS_KILL
|
||||
if(!infinite)
|
||||
wax--
|
||||
if(!wax)
|
||||
wax -= delta_time
|
||||
if(wax <= 0)
|
||||
if(candle_type == "resin")
|
||||
new /obj/item/trash/candle/resin(loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
interaction_flags_atom = NONE
|
||||
var/mob/living/captured = null
|
||||
var/obj/item/gun/energy/chrono_gun/gun = null
|
||||
var/tickstokill = 15
|
||||
var/timetokill = 30
|
||||
var/mutable_appearance/mob_underlay
|
||||
var/preloaded = 0
|
||||
var/RPpos = null
|
||||
@@ -198,7 +198,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/chrono_field/update_icon()
|
||||
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
|
||||
var/ttk_frame = 1 - (timetokill / initial(timetokill))
|
||||
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
RPpos = ttk_frame
|
||||
@@ -206,13 +206,13 @@
|
||||
underlays = list() //hack: BYOND refuses to update the underlay to match the icon_state otherwise
|
||||
underlays += mob_underlay
|
||||
|
||||
/obj/structure/chrono_field/process()
|
||||
/obj/structure/chrono_field/process(delta_time)
|
||||
if(captured)
|
||||
if(tickstokill > initial(tickstokill))
|
||||
if(timetokill > initial(timetokill))
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(drop_location())
|
||||
qdel(src)
|
||||
else if(tickstokill <= 0)
|
||||
else if(timetokill <= 0)
|
||||
to_chat(captured, span_boldnotice("As the last essence of your being is erased from time, you are taken back to your most enjoyable memory. You feel happy..."))
|
||||
var/mob/dead/observer/ghost = captured.ghostize(1)
|
||||
if(captured.mind)
|
||||
@@ -229,12 +229,12 @@
|
||||
update_icon()
|
||||
if(gun)
|
||||
if(gun.field_check(src))
|
||||
tickstokill--
|
||||
timetokill -= delta_time
|
||||
else
|
||||
gun = null
|
||||
return .()
|
||||
else
|
||||
tickstokill++
|
||||
timetokill += delta_time
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "match_unlit"
|
||||
var/lit = FALSE
|
||||
var/burnt = FALSE
|
||||
var/smoketime = 5 // 10 seconds
|
||||
var/smoketime = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
heat = 1000
|
||||
grind_results = list(/datum/reagent/phosphorus = 2)
|
||||
|
||||
/obj/item/match/process()
|
||||
smoketime--
|
||||
if(smoketime < 1)
|
||||
/obj/item/match/process(delta_time)
|
||||
smoketime -= delta_time
|
||||
if(smoketime <= 0)
|
||||
matchburnout()
|
||||
else
|
||||
open_flame(heat)
|
||||
@@ -101,7 +101,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/match/firebrand
|
||||
name = "firebrand"
|
||||
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
|
||||
smoketime = 20 //40 seconds
|
||||
smoketime = 40
|
||||
grind_results = list(/datum/reagent/carbon = 2)
|
||||
|
||||
/obj/item/match/firebrand/Initialize()
|
||||
@@ -121,7 +121,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
body_parts_covered = null
|
||||
grind_results = list()
|
||||
heat = 1000
|
||||
var/dragtime = 100
|
||||
var/dragtime = 10
|
||||
var/nextdragtime = 0
|
||||
var/lit = FALSE
|
||||
var/starts_lit = FALSE
|
||||
@@ -129,7 +129,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/icon_off = "cigoff"
|
||||
var/type_butt = /obj/item/cigbutt
|
||||
var/lastHolder = null
|
||||
var/smoketime = 180 // 1 is 2 seconds, so a single cigarette will last 6 minutes.
|
||||
var/smoketime = 360 // how long a smoke lasts in seconds.
|
||||
var/chem_volume = 30
|
||||
var/list/list_reagents = list(/datum/reagent/drug/nicotine = 15)
|
||||
|
||||
@@ -251,13 +251,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/process()
|
||||
/obj/item/clothing/mask/cigarette/process(delta_time)
|
||||
var/turf/location = get_turf(src)
|
||||
var/mob/living/M = loc
|
||||
if(isliving(loc))
|
||||
M.IgniteMob()
|
||||
smoketime--
|
||||
if(smoketime < 1)
|
||||
smoketime -= delta_time
|
||||
if(smoketime <= 0)
|
||||
new type_butt(location)
|
||||
if(ismob(loc))
|
||||
to_chat(M, span_notice("Your [name] goes out."))
|
||||
@@ -265,7 +265,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
open_flame()
|
||||
if((reagents && reagents.total_volume) && (nextdragtime <= world.time))
|
||||
nextdragtime = world.time + dragtime
|
||||
nextdragtime = world.time + dragtime SECONDS
|
||||
handle_reagents()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attack_self(mob/user)
|
||||
@@ -349,7 +349,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
type_butt = /obj/item/cigbutt/roach
|
||||
throw_speed = 0.5
|
||||
item_state = "spliffoff"
|
||||
smoketime = 120 // four minutes
|
||||
smoketime = 4 * 60
|
||||
chem_volume = 50
|
||||
list_reagents = null
|
||||
|
||||
@@ -394,7 +394,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
type_butt = /obj/item/cigbutt/cigarbutt
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 300 // 11 minutes
|
||||
smoketime = 11 * 60 // 11 minutes
|
||||
chem_volume = 40
|
||||
list_reagents = list(/datum/reagent/drug/nicotine = 25)
|
||||
|
||||
@@ -404,7 +404,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 600 // 20 minutes
|
||||
smoketime = 20 * 60 // 20 minutes
|
||||
chem_volume = 80
|
||||
list_reagents =list(/datum/reagent/drug/nicotine = 40)
|
||||
|
||||
@@ -414,7 +414,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 900 // 30 minutes
|
||||
smoketime = 30 * 60 // 30 minutes
|
||||
chem_volume = 50
|
||||
list_reagents =list(/datum/reagent/drug/nicotine = 15)
|
||||
|
||||
@@ -455,10 +455,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/process()
|
||||
/obj/item/clothing/mask/cigarette/pipe/process(delta_time)
|
||||
var/turf/location = get_turf(src)
|
||||
smoketime--
|
||||
if(smoketime < 1)
|
||||
smoketime -= delta_time
|
||||
if(smoketime <= 0)
|
||||
new /obj/effect/decal/cleanable/ash(location)
|
||||
if(ismob(loc))
|
||||
var/mob/living/M = loc
|
||||
@@ -482,7 +482,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!packeditem)
|
||||
if(G.dry == 1)
|
||||
to_chat(user, span_notice("You stuff [O] into [src]."))
|
||||
smoketime = 400
|
||||
smoketime = 13 * 60
|
||||
packeditem = 1
|
||||
name = "[O.name]-packed [initial(name)]"
|
||||
if(O.reagents)
|
||||
@@ -779,6 +779,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/chem_volume = 100
|
||||
var/vapetime = 0 //this so it won't puff out clouds every tick
|
||||
/// How often we take a drag in seconds
|
||||
var/vapedelay = 8
|
||||
var/screw = 0 // kinky
|
||||
var/super = 0 //for the fattest vapes dude.
|
||||
|
||||
@@ -904,13 +906,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
|
||||
/obj/item/clothing/mask/vape/process()
|
||||
/obj/item/clothing/mask/vape/process(delta_time)
|
||||
var/mob/living/M = loc
|
||||
|
||||
if(isliving(loc))
|
||||
M.IgniteMob()
|
||||
|
||||
vapetime++
|
||||
vapetime += delta_time
|
||||
|
||||
if(!reagents.total_volume)
|
||||
if(ismob(loc))
|
||||
@@ -920,17 +922,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
//open flame removed because vapes are a closed system, they wont light anything on fire
|
||||
|
||||
if(super && vapetime > 3)//Time to start puffing those fat vapes, yo.
|
||||
if(super && vapetime >= vapedelay)//Time to start puffing those fat vapes, yo.
|
||||
var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new
|
||||
s.set_up(reagents, 1, 24, loc)
|
||||
s.start()
|
||||
vapetime = 0
|
||||
vapetime -= vapedelay
|
||||
|
||||
if((obj_flags & EMAGGED) && vapetime > 3)
|
||||
if((obj_flags & EMAGGED) && vapetime >= vapedelay)
|
||||
var/datum/effect_system/smoke_spread/chem/smoke_machine/s = new
|
||||
s.set_up(reagents, 4, 24, loc)
|
||||
s.start()
|
||||
vapetime = 0
|
||||
vapetime -= vapedelay
|
||||
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
/obj/item/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
to_chat(user, span_warning("[src] is out of fuel!"))
|
||||
return
|
||||
if(on)
|
||||
@@ -429,7 +429,9 @@
|
||||
/obj/item/flashlight/emp
|
||||
var/emp_max_charges = 4
|
||||
var/emp_cur_charges = 4
|
||||
var/charge_tick = 0
|
||||
var/charge_timer = 0
|
||||
/// How many seconds between each recharge
|
||||
var/charge_delay = 20
|
||||
|
||||
/obj/item/flashlight/emp/New()
|
||||
..()
|
||||
@@ -439,11 +441,11 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/flashlight/emp/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
/obj/item/flashlight/emp/process(delta_time)
|
||||
charge_timer += delta_time
|
||||
if(charge_timer < charge_delay)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
charge_timer -= charge_delay
|
||||
emp_cur_charges = min(emp_cur_charges+1, emp_max_charges)
|
||||
return TRUE
|
||||
|
||||
@@ -498,7 +500,7 @@
|
||||
var/fuel = 0
|
||||
|
||||
/obj/item/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
fuel = rand(3200, 4000)
|
||||
light_color = color
|
||||
. = ..()
|
||||
|
||||
@@ -506,9 +508,9 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/flashlight/glowstick/process()
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel)
|
||||
/obj/item/flashlight/glowstick/process(delta_time)
|
||||
fuel = max(fuel -= delta_time, 0)
|
||||
if(fuel <= 0)
|
||||
turn_off()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
@@ -520,7 +522,7 @@
|
||||
/obj/item/flashlight/glowstick/update_icon()
|
||||
item_state = "glowstick"
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light(0)
|
||||
@@ -535,7 +537,7 @@
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
to_chat(user, span_notice("[src] is spent."))
|
||||
return
|
||||
if(on)
|
||||
|
||||
@@ -67,11 +67,11 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/forcefield_projector/process()
|
||||
/obj/item/forcefield_projector/process(delta_time)
|
||||
if(!LAZYLEN(current_fields))
|
||||
shield_integrity = min(shield_integrity + 4, max_shield_integrity)
|
||||
shield_integrity = min(shield_integrity + delta_time * 2, max_shield_integrity)
|
||||
else
|
||||
shield_integrity = max(shield_integrity - LAZYLEN(current_fields), 0) //fields degrade slowly over time
|
||||
shield_integrity = max(shield_integrity - LAZYLEN(current_fields) * delta_time * 0.5, 0) //fields degrade slowly over time
|
||||
for(var/obj/structure/projected_forcefield/F in current_fields)
|
||||
if(shield_integrity <= 0 || get_dist(F,src) > field_distance_limit)
|
||||
qdel(F)
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
#define RAD_LEVEL_VERY_HIGH 800
|
||||
#define RAD_LEVEL_CRITICAL 1500
|
||||
|
||||
#define RAD_MEASURE_SMOOTHING 5
|
||||
|
||||
#define RAD_GRACE_PERIOD 2
|
||||
|
||||
/obj/item/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis
|
||||
name = "\improper Geiger counter"
|
||||
desc = "A handheld device used for detecting and measuring radiation pulses."
|
||||
@@ -21,7 +17,7 @@
|
||||
item_flags = NOBLUDGEON
|
||||
materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
|
||||
|
||||
var/grace = RAD_GRACE_PERIOD
|
||||
var/grace = RAD_GEIGER_GRACE_PERIOD
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
|
||||
var/scanning = FALSE
|
||||
@@ -40,29 +36,24 @@
|
||||
/obj/item/geiger_counter/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/process()
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
if(!scanning)
|
||||
current_tick_amount = 0
|
||||
return
|
||||
|
||||
radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING
|
||||
radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING
|
||||
/obj/item/geiger_counter/process(delta_time)
|
||||
if(scanning)
|
||||
radiation_count = LPFILTER(radiation_count, current_tick_amount, delta_time, RAD_GEIGER_RC)
|
||||
|
||||
if(current_tick_amount)
|
||||
grace = RAD_GRACE_PERIOD
|
||||
grace = RAD_GEIGER_GRACE_PERIOD
|
||||
last_tick_amount = current_tick_amount
|
||||
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
grace--
|
||||
grace -= delta_time
|
||||
if(grace <= 0)
|
||||
radiation_count = 0
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
. = ..()
|
||||
if(!scanning)
|
||||
|
||||
@@ -195,8 +195,8 @@
|
||||
flick_overlay_view(I, targloc, 10)
|
||||
icon_state = "pointer"
|
||||
|
||||
/obj/item/laser_pointer/process()
|
||||
if(prob(20 - recharge_locked*5))
|
||||
/obj/item/laser_pointer/process(delta_time)
|
||||
if(DT_PROB(10 - recharge_locked*5, delta_time))
|
||||
energy += 1
|
||||
if(energy >= max_energy)
|
||||
energy = max_energy
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reverse_bear_trap/process()
|
||||
/obj/item/reverse_bear_trap/process(delta_time)
|
||||
if(!ticking)
|
||||
return
|
||||
time_left--
|
||||
time_left -= delta_time
|
||||
soundloop2.mid_length = max(0.5, time_left - 5) //beepbeepbeepbeepbeep
|
||||
if(!time_left || !isliving(loc))
|
||||
if(time_left <= 0 || !isliving(loc))
|
||||
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
|
||||
soundloop.stop()
|
||||
soundloop2.stop()
|
||||
|
||||
@@ -248,7 +248,7 @@ effective or pretty fucking useless.
|
||||
if(user && user.get_item_by_slot(SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
|
||||
/obj/item/shadowcloak/process()
|
||||
/obj/item/shadowcloak/process(delta_time)
|
||||
if(user.get_item_by_slot(SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
return
|
||||
@@ -256,9 +256,9 @@ effective or pretty fucking useless.
|
||||
if(on)
|
||||
var/lumcount = T.get_lumcount()
|
||||
if(lumcount > 0.3)
|
||||
charge = max(0,charge - 25)//Quick decrease in light
|
||||
charge = max(0,charge - 12.5 * delta_time)//Quick decrease in light
|
||||
else
|
||||
charge = min(max_charge,charge + 50) //Charge in the dark
|
||||
charge = min(max_charge,charge + 25 * delta_time) //Charge in the dark
|
||||
animate(user,alpha = clamp(255 - charge,0,255),time = 1 SECONDS)
|
||||
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
..()
|
||||
to_chat(user,span_warning("You suddenly feel very solid!"))
|
||||
user.Stun(40, ignore_canstun = TRUE)
|
||||
user.petrify(30)
|
||||
user.petrify(60)
|
||||
|
||||
/obj/item/book/granter/spell/knock
|
||||
spell = /obj/effect/proc_holder/spell/aoe_turf/knock
|
||||
|
||||
@@ -74,14 +74,14 @@
|
||||
user.forceMove(get_turf(src))
|
||||
user.visible_message(span_warning("[user] scrambles out of [src]!"), span_notice("You climb out of [src]!"))
|
||||
|
||||
/obj/item/his_grace/process()
|
||||
/obj/item/his_grace/process(delta_time)
|
||||
if(!bloodthirst)
|
||||
drowse()
|
||||
return
|
||||
if(bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
|
||||
adjust_bloodthirst(1 + FLOOR(LAZYLEN(contents) * 0.5, 1)) //Maybe adjust this?
|
||||
adjust_bloodthirst((1 + FLOOR(LAZYLEN(contents) * 0.5, 1)) * delta_time) //Maybe adjust this?
|
||||
else
|
||||
adjust_bloodthirst(1) //don't cool off rapidly once we're at the point where His Grace consumes all.
|
||||
adjust_bloodthirst(1 * delta_time) //don't cool off rapidly once we're at the point where His Grace consumes all.
|
||||
var/mob/living/master = get_atom_on_turf(src, /mob/living)
|
||||
if(istype(master) && (src in master.held_items))
|
||||
switch(bloodthirst)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
throw_range = 4
|
||||
mopspeed = 8
|
||||
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
|
||||
var/refill_rate = 1 //Rate per process() tick mop refills itself
|
||||
var/refill_rate = 0.5 //Rate per process() tick mop refills itself
|
||||
var/refill_reagent = /datum/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
|
||||
|
||||
/obj/item/mop/advanced/New()
|
||||
@@ -105,10 +105,10 @@
|
||||
to_chat(user, span_notice("You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position."))
|
||||
playsound(user, 'sound/machines/click.ogg', 30, 1)
|
||||
|
||||
/obj/item/mop/advanced/process()
|
||||
|
||||
if(reagents.total_volume < mopcap)
|
||||
reagents.add_reagent(refill_reagent, refill_rate)
|
||||
/obj/item/mop/advanced/process(delta_time)
|
||||
var/amadd = min(mopcap - reagents.total_volume, refill_rate * delta_time)
|
||||
if(amadd > 0)
|
||||
reagents.add_reagent(refill_reagent, amadd)
|
||||
|
||||
/obj/item/mop/advanced/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -572,15 +572,15 @@
|
||||
icon_state = "shield"
|
||||
var/maxenergy = 1500
|
||||
var/energy = 1500
|
||||
var/energy_recharge = 7.5
|
||||
var/energy_recharge = 37.5
|
||||
var/energy_recharge_cyborg_drain_coefficient = 0.4
|
||||
var/cyborg_cell_critical_percentage = 0.05
|
||||
var/mob/living/silicon/robot/host = null
|
||||
var/datum/proximity_monitor/advanced/dampening_field
|
||||
var/projectile_damage_coefficient = 0.5
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_damage_tick_ecost_coefficient = 10 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/projectile_tick_speed_ecost = 75
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
@@ -662,38 +662,38 @@
|
||||
deactivate_field()
|
||||
. = ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/process()
|
||||
process_recharge()
|
||||
process_usage()
|
||||
/obj/item/borg/projectile_dampen/process(delta_time)
|
||||
process_recharge(delta_time)
|
||||
process_usage(delta_time)
|
||||
update_location()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/update_location()
|
||||
if(dampening_field)
|
||||
dampening_field.HandleMove()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage(delta_time)
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
var/obj/item/projectile/P = I
|
||||
if(!P.stun && P.nodamage) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
|
||||
usage += projectile_tick_speed_ecost * delta_time
|
||||
usage += tracked[I] * projectile_damage_tick_ecost_coefficient * delta_time
|
||||
energy = clamp(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
visible_message(span_warning("[src] blinks \"ENERGY DEPLETED\"."))
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge()
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge(delta_time)
|
||||
if(!istype(host))
|
||||
if(iscyborg(host.loc))
|
||||
host = host.loc
|
||||
else
|
||||
energy = clamp(energy + energy_recharge, 0, maxenergy)
|
||||
energy = clamp(energy + (energy_recharge * delta_time), 0, maxenergy)
|
||||
return
|
||||
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
host.cell.use(energy_recharge * delta_time * energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge * delta_time
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/dampen_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
if(tracked[P])
|
||||
|
||||
@@ -402,7 +402,10 @@
|
||||
icon_state = "cyborg_upgrade5"
|
||||
require_module = 1
|
||||
var/repair_amount = -1
|
||||
var/repair_tick = 1
|
||||
/// world.time of next repair
|
||||
var/next_repair = 0
|
||||
/// Minimum time between repairs in seconds
|
||||
var/repair_cooldown = 4
|
||||
var/msg_cooldown = 0
|
||||
var/on = FALSE
|
||||
var/powercost = 10
|
||||
@@ -466,8 +469,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
if(world.time < next_repair)
|
||||
return
|
||||
|
||||
if(cyborg && (cyborg.stat != DEAD) && on)
|
||||
@@ -494,7 +496,7 @@
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
next_repair = world.time + repair_cooldown * 10 // Multiply by 10 since world.time is in deciseconds
|
||||
|
||||
if((world.time - 2000) > msg_cooldown )
|
||||
var/msgmode = "standby"
|
||||
|
||||
@@ -336,7 +336,8 @@
|
||||
var/on = FALSE
|
||||
volume = 300
|
||||
var/usage_ratio = 5 //5 unit added per 1 removed
|
||||
var/injection_amount = 1
|
||||
/// How much to inject per second
|
||||
var/injection_amount = 0.5
|
||||
amount_per_transfer_from_this = 5
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = FALSE
|
||||
@@ -410,7 +411,7 @@
|
||||
if(ismob(loc))
|
||||
to_chat(loc, span_notice("[src] turns off."))
|
||||
|
||||
/obj/item/reagent_containers/chemtank/process()
|
||||
/obj/item/reagent_containers/chemtank/process(delta_time)
|
||||
if(!ishuman(loc))
|
||||
turn_off()
|
||||
return
|
||||
@@ -422,9 +423,10 @@
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/used_amount = injection_amount/usage_ratio
|
||||
reagents.reaction(user, INJECT,injection_amount,0)
|
||||
reagents.trans_to(user,used_amount,multiplier=usage_ratio)
|
||||
var/inj_am = injection_amount * delta_time
|
||||
var/used_amount = inj_am / usage_ratio
|
||||
reagents.reaction(user, INJECT, used_amount, 0)
|
||||
reagents.trans_to(user, used_amount, multiplier=usage_ratio)
|
||||
update_filling()
|
||||
user.update_inv_back() //for overlays update
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
#define WELDER_FUEL_BURN_INTERVAL 26
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
@@ -63,7 +63,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
/obj/item/weldingtool/process(delta_time)
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
@@ -76,7 +76,7 @@
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = BURN
|
||||
++burned_fuel_for
|
||||
burned_fuel_for += delta_time
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
use(1)
|
||||
update_icon()
|
||||
@@ -170,7 +170,7 @@
|
||||
if(!isOn() || !check_fuel())
|
||||
return FALSE
|
||||
|
||||
if(used)
|
||||
if(used > 0)
|
||||
burned_fuel_for = 0
|
||||
if(get_fuel() >= used)
|
||||
reagents.remove_reagent(/datum/reagent/fuel, used)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(2000 to MAXIMUM_BURN_TIMER)
|
||||
set_light(6)
|
||||
|
||||
/obj/structure/fireplace/process()
|
||||
/obj/structure/fireplace/process(delta_time)
|
||||
if(!lit)
|
||||
return
|
||||
if(world.time > flame_expiry_timer)
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
playsound(src, 'sound/effects/comfyfire.ogg',50,0, 0, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.hotspot_expose(700, 5)
|
||||
T.hotspot_expose(700, 2.5 * delta_time)
|
||||
update_icon()
|
||||
adjust_light()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
max_integrity = 200
|
||||
var/timer = 240 //eventually the person will be freed
|
||||
var/timer = 480 //eventually the person will be freed
|
||||
var/mob/living/petrified_mob
|
||||
|
||||
/obj/structure/statue/petrified/New(loc, mob/living/L, statue_timer, pan) // Yogs -- pan
|
||||
@@ -30,10 +30,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/structure/statue/petrified/process()
|
||||
/obj/structure/statue/petrified/process(delta_time)
|
||||
if(!petrified_mob)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
timer--
|
||||
timer -= delta_time
|
||||
petrified_mob.Stun(40) //So they can't do anything while petrified
|
||||
if(timer <= 0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
add_fingerprint(M)
|
||||
if(on)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
process()
|
||||
process(SSMACHINES_DT)
|
||||
soundloop.start()
|
||||
else
|
||||
soundloop.stop()
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
if(burn_stuff(AM))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/turf/open/lava/process()
|
||||
if(!burn_stuff())
|
||||
/turf/open/lava/process(delta_time)
|
||||
if(!burn_stuff(null, delta_time))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/turf/open/lava/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
@@ -95,7 +95,7 @@
|
||||
return LAZYLEN(found_safeties)
|
||||
|
||||
|
||||
/turf/open/lava/proc/burn_stuff(AM)
|
||||
/turf/open/lava/proc/burn_stuff(AM, delta_time = 1)
|
||||
. = 0
|
||||
|
||||
if(is_safe())
|
||||
@@ -118,7 +118,7 @@
|
||||
O.resistance_flags &= ~FIRE_PROOF
|
||||
if(O.armor.fire > 50) //obj with 100% fire armor still get slowly burned away.
|
||||
O.armor = O.armor.setRating(fire = 50)
|
||||
O.fire_act(10000, 1000)
|
||||
O.fire_act(10000, 1000 * delta_time)
|
||||
|
||||
else if (isliving(thing))
|
||||
. = 1
|
||||
@@ -151,9 +151,9 @@
|
||||
if("lava" in L.weather_immunities)
|
||||
continue
|
||||
|
||||
L.adjustFireLoss(20)
|
||||
L.adjustFireLoss(20 * delta_time)
|
||||
if(L) //mobs turning into object corpses could get deleted here.
|
||||
L.adjust_fire_stacks(20)
|
||||
L.adjust_fire_stacks(20 * delta_time)
|
||||
L.IgniteMob()
|
||||
|
||||
/turf/open/lava/smooth
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// Denial of Service attack variables
|
||||
var/dos_overload = 0 // Amount of DoS "packets" in this relay's buffer
|
||||
var/dos_capacity = 500 // Amount of DoS "packets" in buffer required to crash the relay
|
||||
var/dos_dissipate = 1 // Amount of DoS "packets" dissipated over time.
|
||||
var/dos_dissipate = 0.5 // Amount of DoS "packets" dissipated over time.
|
||||
|
||||
|
||||
// TODO: Implement more logic here. For now it's only a placeholder.
|
||||
@@ -43,7 +43,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
icon_state = "bus"
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
/obj/machinery/ntnet_relay/process(delta_time)
|
||||
if(is_operational())
|
||||
use_power = ACTIVE_POWER_USE
|
||||
else
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
update_icon()
|
||||
|
||||
if(dos_overload)
|
||||
dos_overload = max(0, dos_overload - dos_dissipate)
|
||||
if(dos_overload > 0)
|
||||
dos_overload = max(0, dos_overload - dos_dissipate * delta_time)
|
||||
|
||||
// If DoS traffic exceeded capacity, crash.
|
||||
if((dos_overload > dos_capacity) && !dos_failure)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
)
|
||||
var/mode = VEST_STEALTH
|
||||
var/stealth_active = 0
|
||||
var/combat_cooldown = 10
|
||||
var/combat_cooldown = 20
|
||||
var/datum/icon_snapshot/disguise
|
||||
var/stealth_armor = list(MELEE = 15, BULLET = 15, LASER = 15, ENERGY = 15, BOMB = 15, BIO = 15, RAD = 15, FIRE = 70, ACID = 70)
|
||||
var/combat_armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 50, BIO = 50, RAD = 50, FIRE = 90, ACID = 90)
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/proc/Adrenaline()
|
||||
if(ishuman(loc))
|
||||
if(combat_cooldown != initial(combat_cooldown))
|
||||
if(combat_cooldown < initial(combat_cooldown))
|
||||
to_chat(loc, span_warning("Combat injection is still recharging."))
|
||||
return
|
||||
var/mob/living/carbon/human/M = loc
|
||||
@@ -118,9 +118,9 @@
|
||||
combat_cooldown = 0
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/process()
|
||||
combat_cooldown++
|
||||
if(combat_cooldown==initial(combat_cooldown))
|
||||
/obj/item/clothing/suit/armor/abductor/vest/process(delta_time)
|
||||
combat_cooldown += delta_time
|
||||
if(combat_cooldown >= initial(combat_cooldown))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/Destroy()
|
||||
@@ -791,6 +791,8 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "bed"
|
||||
can_buckle = 1
|
||||
/// Amount to inject per second
|
||||
var/inject_am = 0.5
|
||||
|
||||
var/static/list/injected_reagents = list(/datum/reagent/medicine/corazone)
|
||||
|
||||
@@ -800,13 +802,13 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
START_PROCESSING(SSobj, src)
|
||||
to_chat(AM, span_danger("You feel a series of tiny pricks!"))
|
||||
|
||||
/obj/structure/table/optable/abductor/process()
|
||||
/obj/structure/table/optable/abductor/process(delta_time)
|
||||
. = PROCESS_KILL
|
||||
for(var/mob/living/carbon/C in get_turf(src))
|
||||
. = TRUE
|
||||
for(var/chemical in injected_reagents)
|
||||
if(C.reagents.get_reagent_amount(chemical) < 1)
|
||||
C.reagents.add_reagent(chemical, 1)
|
||||
if(C.reagents.get_reagent_amount(chemical) < inject_am * delta_time)
|
||||
C.reagents.add_reagent(chemical, inject_am * delta_time)
|
||||
|
||||
/obj/structure/table/optable/abductor/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(overmind) //we should have an overmind, but...
|
||||
overmind.update_health_hud()
|
||||
|
||||
/obj/structure/blob/core/process()
|
||||
/obj/structure/blob/core/process(delta_time)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(!overmind)
|
||||
@@ -64,7 +64,7 @@
|
||||
overmind.update_health_hud()
|
||||
Pulse_Area(overmind, 12, 4, 3)
|
||||
for(var/obj/structure/blob/normal/B in range(1, src))
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
B.change_to(/obj/structure/blob/shield/core, overmind)
|
||||
..()
|
||||
|
||||
|
||||
@@ -492,10 +492,10 @@
|
||||
loc.visible_message(span_warning("[loc.name]\'s flesh rapidly inflates, forming a bloated mass around [loc.p_their()] body!"), span_warning("We inflate our flesh, creating a spaceproof suit!"), span_italics("You hear organic matter ripping and tearing!"))
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/suit/space/changeling/process()
|
||||
/obj/item/clothing/suit/space/changeling/process(delta_time)
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.reagents.add_reagent(/datum/reagent/medicine/salbutamol, REAGENTS_METABOLISM)
|
||||
H.reagents.add_reagent(/datum/reagent/medicine/salbutamol, REAGENTS_METABOLISM * (delta_time / SSMOBS_DT))
|
||||
|
||||
/obj/item/clothing/head/helmet/space/changeling
|
||||
name = "flesh mass"
|
||||
|
||||
@@ -450,15 +450,15 @@
|
||||
/obj/effect/proc_holder/spell/targeted/fire_sworn/proc/remove()
|
||||
has_fire_ring = FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/fire_sworn/process()
|
||||
/obj/effect/proc_holder/spell/targeted/fire_sworn/process(delta_time)
|
||||
. = ..()
|
||||
if(!has_fire_ring)
|
||||
return
|
||||
for(var/turf/T in range(1,current_user))
|
||||
new /obj/effect/hotspot(T)
|
||||
T.hotspot_expose(700,50,1)
|
||||
T.hotspot_expose(700,250 * delta_time,1)
|
||||
for(var/mob/living/L in T.contents - current_user)
|
||||
L.adjustFireLoss(2.5)
|
||||
L.adjustFireLoss(25 * delta_time)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/worm_contract
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
attachable = TRUE
|
||||
var/scanning = FALSE
|
||||
var/timing = FALSE
|
||||
var/time = 10
|
||||
var/time = 20
|
||||
var/sensitivity = 1
|
||||
var/hearing_range = 3
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
next_activate = world.time + 30
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/prox_sensor/process()
|
||||
/obj/item/assembly/prox_sensor/process(delta_time)
|
||||
if(!timing)
|
||||
return
|
||||
time--
|
||||
time -= delta_time
|
||||
if(time <= 0)
|
||||
timing = FALSE
|
||||
toggle_scan(TRUE)
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
materials = list(/datum/material/iron=500, /datum/material/glass=50)
|
||||
attachable = TRUE
|
||||
var/timing = FALSE
|
||||
var/time = 5
|
||||
var/saved_time = 5
|
||||
var/time = 10
|
||||
var/saved_time = 10
|
||||
var/loop = FALSE
|
||||
var/hearing_range = 3
|
||||
|
||||
/obj/item/assembly/timer/suicide_act(mob/living/user)
|
||||
user.visible_message(span_suicide("[user] looks at the timer and decides [user.p_their()] fate! It looks like [user.p_theyre()] going to commit suicide!"))
|
||||
activate()//doesnt rely on timer_end to prevent weird metas where one person can control the timer and therefore someone's life. (maybe that should be how it works...)
|
||||
addtimer(CALLBACK(src, .proc/manual_suicide, user), time*10)//kill yourself once the time runs out
|
||||
addtimer(CALLBACK(src, .proc/manual_suicide, user), time SECONDS)//kill yourself once the time runs out
|
||||
return MANUAL_SUICIDE
|
||||
|
||||
/obj/item/assembly/timer/proc/manual_suicide(mob/living/user)
|
||||
@@ -66,10 +66,10 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/assembly/timer/process()
|
||||
/obj/item/assembly/timer/process(delta_time)
|
||||
if(!timing)
|
||||
return
|
||||
time--
|
||||
time -= delta_time
|
||||
if(time <= 0)
|
||||
timing = FALSE
|
||||
timer_end()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/update_icon_nopipes()
|
||||
icon_state = on && is_operational() ? "volpump_on-[set_overlay_offset(piping_layer)]" : "volpump_off-[set_overlay_offset(piping_layer)]"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos()
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos(delta_time)
|
||||
// ..()
|
||||
if(!on || !is_operational())
|
||||
return
|
||||
@@ -74,14 +74,14 @@
|
||||
return
|
||||
|
||||
|
||||
var/transfer_ratio = transfer_rate/air1.return_volume()
|
||||
var/transfer_ratio = (transfer_rate * delta_time) / air1.return_volume()
|
||||
|
||||
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
|
||||
|
||||
if(overclocked)//Some of the gas from the mixture leaks to the environment when overclocked
|
||||
var/turf/open/T = loc
|
||||
if(istype(T))
|
||||
var/datum/gas_mixture/leaked = removed.remove_ratio(VOLUME_PUMP_LEAK_AMOUNT)
|
||||
var/datum/gas_mixture/leaked = removed.remove_ratio(DT_PROB_RATE(VOLUME_PUMP_LEAK_AMOUNT, delta_time))
|
||||
T.assume_air(leaked)
|
||||
T.air_update_turf()
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
var/on_state = on && nodes[1] && nodes[2] && nodes[3] && is_operational()
|
||||
icon_state = "filter_[on_state ? "on" : "off"]-[set_overlay_offset(piping_layer)][flipped ? "_f" : ""]"
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
|
||||
/obj/machinery/atmospherics/components/trinary/filter/process_atmos(delta_time)
|
||||
..()
|
||||
if(!on || !(nodes[1] && nodes[2] && nodes[3]) || !is_operational())
|
||||
return
|
||||
@@ -78,7 +78,7 @@
|
||||
var/datum/gas_mixture/air2 = airs[2]
|
||||
var/datum/gas_mixture/air3 = airs[3]
|
||||
|
||||
var/transfer_ratio = transfer_rate/air1.return_volume()
|
||||
var/transfer_ratio = (transfer_rate * delta_time) / air1.return_volume()
|
||||
|
||||
if(transfer_ratio <= 0)
|
||||
return
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/nap_violation(mob/violator)
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process()
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process(delta_time)
|
||||
..()
|
||||
|
||||
if(state_open)
|
||||
@@ -236,8 +236,8 @@
|
||||
|
||||
if(air1.total_moles())
|
||||
if(mob_occupant.bodytemperature < T0C) // Sleepytime. Why? More cryo magic.
|
||||
mob_occupant.Sleeping((mob_occupant.bodytemperature * sleep_factor) * 2000)
|
||||
mob_occupant.Unconscious((mob_occupant.bodytemperature * unconscious_factor) * 2000)
|
||||
mob_occupant.Sleeping((mob_occupant.bodytemperature * sleep_factor) * 1000 * delta_time)
|
||||
mob_occupant.Unconscious((mob_occupant.bodytemperature * unconscious_factor) * 1000 * delta_time)
|
||||
if(beaker)
|
||||
if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic.
|
||||
beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents.
|
||||
@@ -249,7 +249,8 @@
|
||||
if(occupant.reagents.get_reagent_amount(/datum/reagent/medicine/cryoxadone) >= 100) //prevent cryoxadone overdose
|
||||
occupant.reagents.del_reagent(/datum/reagent/medicine/cryoxadone)
|
||||
occupant.reagents.add_reagent(/datum/reagent/medicine/cryoxadone, 99)
|
||||
if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
|
||||
reagent_transfer += 0.5 * delta_time
|
||||
if(reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
|
||||
reagent_transfer = 0
|
||||
if(air1.get_moles(/datum/gas/healium) > 5) //healium check, if theres enough we get some extra healing from our favorite pink gas.
|
||||
mob_occupant.adjustBruteLoss(-5) //healium healing factor from lungs, occupant should be asleep.
|
||||
@@ -259,7 +260,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos()
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos(delta_time)
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
@@ -286,8 +287,8 @@
|
||||
|
||||
var/heat = ((1 - cold_protection) * 0.1 + conduction_coefficient) * temperature_delta * (air_heat_capacity * heat_capacity / (air_heat_capacity + heat_capacity))
|
||||
|
||||
air1.set_temperature(max(air1.return_temperature() - heat / air_heat_capacity, TCMB))
|
||||
mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB)
|
||||
air1.set_temperature(max(air1.return_temperature() - heat * delta_time / air_heat_capacity, TCMB))
|
||||
mob_occupant.adjust_bodytemperature(heat * delta_time / heat_capacity, TCMB)
|
||||
|
||||
if(air1.get_moles(/datum/gas/pluoxium) > 5) //use pluoxium over oxygen
|
||||
air1.set_moles(/datum/gas/pluoxium, max(0,air1.get_moles(/datum/gas/pluoxium) - 0.125 / efficiency))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var/injecting = 0
|
||||
|
||||
var/volume_rate = 50
|
||||
var/volume_rate = 100
|
||||
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
@@ -54,7 +54,7 @@
|
||||
else
|
||||
icon_state = "inje_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/process_atmos()
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/process_atmos(delta_time)
|
||||
..()
|
||||
|
||||
injecting = 0
|
||||
@@ -65,7 +65,7 @@
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
|
||||
if(air_contents.return_temperature() > 0)
|
||||
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = (air_contents.return_pressure()) * volume_rate * delta_time / (air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
|
||||
|
||||
var/filter_types = list(/datum/gas/carbon_dioxide)
|
||||
var/volume_rate = 200
|
||||
var/volume_rate = 400
|
||||
var/widenet = 0 //is this scrubber acting on the 3x3 area around it.
|
||||
var/list/turf/adjacent_turfs = list()
|
||||
|
||||
@@ -136,30 +136,30 @@
|
||||
check_turfs()
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos()
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos(delta_time)
|
||||
..()
|
||||
if(welded || !is_operational())
|
||||
return FALSE
|
||||
if(!nodes[1] || !on)
|
||||
on = FALSE
|
||||
return FALSE
|
||||
scrub(loc)
|
||||
scrub(loc, delta_time)
|
||||
if(widenet)
|
||||
for(var/turf/tile in adjacent_turfs)
|
||||
scrub(tile)
|
||||
scrub(tile, delta_time)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile)
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile, delta_time = 0.5)
|
||||
if(!istype(tile))
|
||||
return FALSE
|
||||
var/datum/gas_mixture/environment = tile.return_air()
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
|
||||
if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
|
||||
if(air_contents.return_pressure() >= 50 * ONE_ATMOSPHERE)
|
||||
return FALSE
|
||||
|
||||
if(scrubbing & SCRUBBING)
|
||||
var/transfer_moles = min(1, volume_rate/environment.return_volume())*environment.total_moles()
|
||||
var/transfer_moles = min(1, volume_rate * delta_time / environment.return_volume())*environment.total_moles()
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
else //Just siphoning all air
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.return_volume())
|
||||
var/transfer_moles = environment.total_moles() * (volume_rate * delta_time / environment.return_volume())
|
||||
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
resistance_flags = INDESTRUCTIBLE|ACID_PROOF|FIRE_PROOF
|
||||
var/spawn_id = null
|
||||
var/spawn_temp = T20C
|
||||
var/spawn_mol = MOLES_CELLSTANDARD * 10
|
||||
var/spawn_mol = MOLES_CELLSTANDARD * 5
|
||||
var/max_ext_mol = INFINITY
|
||||
var/max_ext_kpa = 6500
|
||||
var/overlay_color = "#FFFFFF"
|
||||
@@ -117,21 +117,21 @@
|
||||
on_overlay.color = overlay_color
|
||||
add_overlay(on_overlay)
|
||||
|
||||
/obj/machinery/atmospherics/miner/process()
|
||||
/obj/machinery/atmospherics/miner/process(delta_time)
|
||||
update_power()
|
||||
check_operation()
|
||||
if(active && !broken)
|
||||
if(isnull(spawn_id))
|
||||
return FALSE
|
||||
if(do_use_power(active_power_usage))
|
||||
mine_gas()
|
||||
mine_gas(delta_time)
|
||||
|
||||
/obj/machinery/atmospherics/miner/proc/mine_gas()
|
||||
/obj/machinery/atmospherics/miner/proc/mine_gas(delta_time = 2)
|
||||
var/turf/open/O = get_turf(src)
|
||||
if(!isopenturf(O))
|
||||
return FALSE
|
||||
var/datum/gas_mixture/merger = new
|
||||
merger.set_moles(spawn_id, spawn_mol)
|
||||
merger.set_moles(spawn_id, (spawn_mol * delta_time))
|
||||
merger.set_temperature(spawn_temp)
|
||||
O.assume_air(merger)
|
||||
O.air_update_turf(TRUE)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
L.bodytemperature = avg_temp
|
||||
pipe_air.set_temperature(avg_temp)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/process()
|
||||
/obj/machinery/atmospherics/pipe/heat_exchanging/process(delta_time)
|
||||
if(!parent)
|
||||
return //machines subsystem fires before atmos is initialized so this prevents race condition runtimes
|
||||
|
||||
@@ -79,4 +79,4 @@
|
||||
if(pipe_air.return_temperature() > heat_limit + 1)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.apply_damage(4 * log(pipe_air.return_temperature() - heat_limit), BURN, BODY_ZONE_CHEST)
|
||||
buckled_mob.apply_damage(delta_time * 2 * log(pipe_air.return_temperature() - heat_limit), BURN, BODY_ZONE_CHEST)
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
else if(valve_open && holding)
|
||||
investigate_log("[key_name(user)] started a transfer into [holding].<br>", INVESTIGATE_ATMOS)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos(delta_time)
|
||||
..()
|
||||
if(stat & BROKEN)
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(connected_port)
|
||||
add_overlay("siphon-connector")
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/pump/process_atmos(delta_time)
|
||||
..()
|
||||
if(!on)
|
||||
pump.airs[1] = null
|
||||
|
||||
@@ -41,22 +41,22 @@
|
||||
if(connected_port)
|
||||
add_overlay("scrubber-connector")
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/scrubber/process_atmos(delta_time)
|
||||
..()
|
||||
if(!on)
|
||||
return
|
||||
|
||||
if(holding)
|
||||
scrub(holding.air_contents)
|
||||
scrub(holding.air_contents, delta_time)
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
scrub(T.return_air())
|
||||
scrub(T.return_air(), delta_time)
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture)
|
||||
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture, delta_time = 2)
|
||||
if(air_contents.return_pressure() >= overpressure_m * ONE_ATMOSPHERE)
|
||||
return
|
||||
|
||||
var/transfer_moles = min(1, volume_rate / mixture.return_volume()) * mixture.total_moles()
|
||||
var/transfer_moles = min(1, volume_rate * delta_time / mixture.return_volume()) * mixture.total_moles()
|
||||
|
||||
var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter.
|
||||
if(!filtering)
|
||||
@@ -148,7 +148,7 @@
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/update_icon()
|
||||
icon_state = "scrubber:[on]"
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/process_atmos(delta_time)
|
||||
if((!anchored && !movable) || !is_operational())
|
||||
on = FALSE
|
||||
update_icon()
|
||||
@@ -160,7 +160,7 @@
|
||||
if(!holding)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/turf/AT in T.GetAtmosAdjacentTurfs(alldir = TRUE))
|
||||
scrub(AT.return_air())
|
||||
scrub(AT.return_air(), delta_time)
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/attackby(obj/item/W, mob/user)
|
||||
if(default_unfasten_wrench(user, W))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
|
||||
/obj/machinery/artillerycontrol
|
||||
var/reload = 60
|
||||
var/reload_cooldown = 60
|
||||
var/reload = 120
|
||||
var/reload_cooldown = 120
|
||||
var/explosiondev = 3
|
||||
var/explosionmed = 6
|
||||
var/explosionlight = 12
|
||||
@@ -11,9 +11,9 @@
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
density = TRUE
|
||||
|
||||
/obj/machinery/artillerycontrol/process()
|
||||
/obj/machinery/artillerycontrol/process(delta_time)
|
||||
if(reload < reload_cooldown)
|
||||
reload++
|
||||
reload += delta_time
|
||||
|
||||
/obj/structure/artilleryplaceholder
|
||||
name = "artillery"
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
GLOB.poi_list.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/capture_the_flag/process()
|
||||
/obj/machinery/capture_the_flag/process(delta_time)
|
||||
for(var/i in spawned_mobs)
|
||||
if(!i)
|
||||
spawned_mobs -= i
|
||||
@@ -183,8 +183,8 @@
|
||||
else
|
||||
// The changes that you've been hit with no shield but not
|
||||
// instantly critted are low, but have some healing.
|
||||
M.adjustBruteLoss(-5)
|
||||
M.adjustFireLoss(-5)
|
||||
M.adjustBruteLoss(-2.5 * delta_time)
|
||||
M.adjustFireLoss(-2.5 * delta_time)
|
||||
|
||||
/obj/machinery/capture_the_flag/red
|
||||
name = "Red CTF Controller"
|
||||
@@ -660,11 +660,11 @@
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/obj/machinery/capture_the_flag/controlling
|
||||
var/team = "none"
|
||||
var/point_rate = 1
|
||||
var/point_rate = 0.5
|
||||
|
||||
/obj/machinery/control_point/process()
|
||||
/obj/machinery/control_point/process(delta_time)
|
||||
if(controlling)
|
||||
controlling.control_points += point_rate
|
||||
controlling.control_points += point_rate * delta_time
|
||||
if(controlling.control_points >= controlling.control_points_to_win)
|
||||
controlling.victory()
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
/obj/singularity/academy/admin_investigate_setup()
|
||||
return
|
||||
|
||||
/obj/singularity/academy/process()
|
||||
/obj/singularity/academy/process(delta_time)
|
||||
eat()
|
||||
if(prob(1))
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
mezzer()
|
||||
|
||||
|
||||
|
||||
@@ -148,9 +148,9 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
|
||||
/obj/singularity/narsie/mini/admin_investigate_setup()
|
||||
return
|
||||
|
||||
/obj/singularity/narsie/mini/process()
|
||||
/obj/singularity/narsie/mini/process(delta_time)
|
||||
eat()
|
||||
if(prob(25))
|
||||
if(DT_PROB(13, delta_time))
|
||||
mezzer()
|
||||
|
||||
/obj/singularity/narsie/mini/ex_act()
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
//Determines used sprites: hardsuit[on]-[hardsuit_type]
|
||||
var/hardsuit_type = "engineering"
|
||||
actions_types = list(/datum/action/item_action/toggle_helmet_light)
|
||||
var/rad_count = 0
|
||||
var/rad_record = 0
|
||||
var/grace_count = 0
|
||||
var/current_tick_amount = 0
|
||||
var/radiation_count = 0
|
||||
var/grace = RAD_GEIGER_GRACE_PERIOD
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/Initialize()
|
||||
@@ -67,23 +67,25 @@
|
||||
if(msg && ishuman(wearer))
|
||||
wearer.show_message("[icon2html(src, wearer)]<b>[span_robot("[msg]")]</b>", MSG_VISUAL)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(amount)
|
||||
. = ..()
|
||||
rad_count += severity
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/process()
|
||||
if(!rad_count)
|
||||
grace_count++
|
||||
if(grace_count == 2)
|
||||
soundloop.last_radiation = 0
|
||||
if(amount <= RAD_BACKGROUND_RADIATION)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
|
||||
grace_count = 0
|
||||
rad_record -= rad_record/5
|
||||
rad_record += rad_count/5
|
||||
rad_count = 0
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/process(delta_time)
|
||||
radiation_count = LPFILTER(radiation_count, current_tick_amount, delta_time, RAD_GEIGER_RC)
|
||||
|
||||
soundloop.last_radiation = rad_record
|
||||
if(current_tick_amount)
|
||||
grace = RAD_GEIGER_GRACE_PERIOD
|
||||
else
|
||||
grace -= delta_time
|
||||
if(grace <= 0)
|
||||
radiation_count = 0
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
soundloop.last_radiation = radiation_count
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
KZ.set_production((spread_cap / initial(spread_cap)) * 5)
|
||||
qdel(src)
|
||||
|
||||
/datum/spacevine_controller/process()
|
||||
/datum/spacevine_controller/process(delta_time)
|
||||
if(!LAZYLEN(vines))
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
@@ -448,9 +448,7 @@
|
||||
qdel(src) //Sanity check
|
||||
return
|
||||
|
||||
var/length = 0
|
||||
|
||||
length = min( spread_cap , max( 1 , vines.len / spread_multiplier ) )
|
||||
var/length = round(clamp(delta_time * 0.5 * vines.len / spread_multiplier, 1, spread_cap))
|
||||
var/i = 0
|
||||
var/list/obj/structure/spacevine/queue_end = list()
|
||||
|
||||
@@ -463,7 +461,7 @@
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.process_mutation(SV)
|
||||
if(SV.energy < 2) //If tile isn't fully grown
|
||||
if(prob(20))
|
||||
if(DT_PROB(10, delta_time))
|
||||
SV.grow()
|
||||
else //If tile is fully grown
|
||||
SV.entangle_mob()
|
||||
|
||||
@@ -1132,8 +1132,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/hallucination/danger/anomaly/process()
|
||||
if(prob(70))
|
||||
/obj/effect/hallucination/danger/anomaly/process(delta_time)
|
||||
if(DT_PROB(45, delta_time))
|
||||
step(src,pick(GLOB.alldirs))
|
||||
|
||||
/obj/effect/hallucination/danger/anomaly/Destroy()
|
||||
|
||||
@@ -20,6 +20,9 @@ God bless America.
|
||||
-
|
||||
*/
|
||||
|
||||
#define DEEPFRYER_COOKTIME 60
|
||||
#define DEEPFRYER_BURNTIME 120
|
||||
|
||||
/obj/machinery/deepfryer
|
||||
name = "deep fryer"
|
||||
desc = "Deep fried <i>everything</i>."
|
||||
@@ -31,7 +34,7 @@ God bless America.
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/obj/item/reagent_containers/food/snacks/deepfryholder/frying //What's being fried RIGHT NOW?
|
||||
var/cook_time = 0
|
||||
var/oil_use = 0.05 //How much cooking oil is used per tick
|
||||
var/oil_use = 0.025 //How much cooking oil is used per second
|
||||
var/fry_speed = 1 //How quickly we fry food
|
||||
var/superfry = 0
|
||||
var/frying_fried //If the object has been fried; used for messages
|
||||
@@ -67,7 +70,7 @@ God bless America.
|
||||
var/oil_efficiency
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
oil_efficiency += M.rating
|
||||
oil_use = initial(oil_use) - (oil_efficiency * 0.0095)
|
||||
oil_use = initial(oil_use) - (oil_efficiency * 0.00475)
|
||||
fry_speed = oil_efficiency
|
||||
|
||||
/obj/machinery/deepfryer/examine(mob/user)
|
||||
@@ -75,7 +78,7 @@ God bless America.
|
||||
if(frying)
|
||||
. += "You can make out \a [frying] in the oil."
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use*10]</b> units of oil per second.<span>"
|
||||
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use]</b> units of oil per second.<span>"
|
||||
|
||||
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/reagent_containers/pill))
|
||||
@@ -133,20 +136,20 @@ God bless America.
|
||||
icon_state = "syndie_fryer_on"
|
||||
fry_loop.start()
|
||||
|
||||
/obj/machinery/deepfryer/process()
|
||||
/obj/machinery/deepfryer/process(delta_time)
|
||||
..()
|
||||
var/datum/reagent/consumable/cooking_oil/C = reagents.has_reagent(/datum/reagent/consumable/cooking_oil)
|
||||
if(!C)
|
||||
return
|
||||
reagents.chem_temp = C.fry_temperature
|
||||
if(frying)
|
||||
reagents.trans_to(frying, oil_use, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
|
||||
cook_time += fry_speed
|
||||
if(cook_time >= 30 && !frying_fried)
|
||||
reagents.trans_to(frying, oil_use * delta_time, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
|
||||
cook_time += fry_speed * delta_time
|
||||
if(cook_time >= DEEPFRYER_COOKTIME && !frying_fried)
|
||||
frying_fried = TRUE //frying... frying... fried
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
audible_message(span_notice("[src] dings!"))
|
||||
else if (cook_time >= 60 && !frying_burnt)
|
||||
else if (cook_time >= DEEPFRYER_BURNTIME && !frying_burnt)
|
||||
frying_burnt = TRUE
|
||||
visible_message(span_warning("[src] emits an acrid smell!"))
|
||||
|
||||
@@ -224,3 +227,7 @@ God bless America.
|
||||
icon_state = "syndicate_basket"
|
||||
item_state = "syndicate_basket"
|
||||
desc = "It looks like it could be attached to a deep fryer."
|
||||
|
||||
|
||||
#undef DEEPFRYER_COOKTIME
|
||||
#undef DEEPFRYER_BURNTIME
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/grill/process()
|
||||
/obj/machinery/grill/process(delta_time)
|
||||
..()
|
||||
update_icon()
|
||||
if(grill_fuel <= 0)
|
||||
@@ -79,15 +79,15 @@
|
||||
else
|
||||
if(!grilled_item)
|
||||
grill_fuel -= GRILL_FUELUSAGE_IDLE
|
||||
if(prob(0.5))
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
var/datum/effect_system/smoke_spread/bad/smoke = new
|
||||
smoke.set_up(1, loc)
|
||||
smoke.start()
|
||||
if(grilled_item)
|
||||
SEND_SIGNAL(grilled_item, COMSIG_ITEM_GRILLED, src, 1)
|
||||
grill_time++
|
||||
grilled_item.reagents.add_reagent(/datum/reagent/consumable/char, 0.2)
|
||||
grill_fuel -= GRILL_FUELUSAGE_ACTIVE
|
||||
grill_time += delta_time
|
||||
grilled_item.reagents.add_reagent(/datum/reagent/consumable/char, 0.1 * delta_time)
|
||||
grill_fuel -= GRILL_FUELUSAGE_ACTIVE * delta_time
|
||||
grilled_item.AddComponent(/datum/component/sizzle)
|
||||
|
||||
/obj/machinery/grill/Exited(atom/movable/AM)
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
/obj/machinery/grill/proc/finish_grill()
|
||||
switch(grill_time)
|
||||
if(0 to 30)
|
||||
if(20 to 30) //no 0-20 to prevent spam
|
||||
grilled_item.name = "lightly-grilled [grilled_item.name]"
|
||||
grilled_item.desc = "[grilled_item.desc] It's been lightly grilled."
|
||||
if(30 to 80)
|
||||
|
||||
@@ -615,7 +615,7 @@
|
||||
/obj/machinery/smartfridge/organ/RefreshParts()
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
max_n_of_items = 20 * B.rating
|
||||
repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1))
|
||||
repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1) * 0.5)
|
||||
|
||||
/obj/machinery/smartfridge/organ/Destroy()
|
||||
for(var/organ in src)
|
||||
@@ -624,11 +624,11 @@
|
||||
O.organ_flags &= ~ORGAN_FROZEN
|
||||
..()
|
||||
|
||||
/obj/machinery/smartfridge/organ/process()
|
||||
/obj/machinery/smartfridge/organ/process(delta_time)
|
||||
for(var/organ in src)
|
||||
var/obj/item/organ/O = organ
|
||||
if(O)
|
||||
O.damage = max(0, O.damage - (O.maxHealth * repair_rate))
|
||||
O.damage = max(0, O.damage - (O.maxHealth * (repair_rate * delta_time)))
|
||||
..()
|
||||
|
||||
/obj/machinery/smartfridge/organ/Exited(atom/movable/AM, atom/newLoc)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
var/bomb_defused = TRUE // If the bomb is inert.
|
||||
var/bomb_timer = 1 // How long before blowing the bomb.
|
||||
var/const/BOMB_TIMER_MIN = 1
|
||||
var/const/BOMB_TIMER_MAX = 10
|
||||
var/const/BOMB_TIMER_MAX = 20
|
||||
|
||||
/obj/item/pizzabox/Initialize()
|
||||
. = ..()
|
||||
@@ -129,10 +129,10 @@
|
||||
if (isnull(bomb_timer))
|
||||
return
|
||||
|
||||
bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_timer = clamp(CEILING(bomb_timer, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_defused = FALSE
|
||||
|
||||
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer * 2] seconds")
|
||||
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer] seconds")
|
||||
bomb.adminlog = "The [bomb.name] in [src.name] that [key_name(user)] activated has detonated!"
|
||||
|
||||
to_chat(user, span_warning("You trap [src] with [bomb]."))
|
||||
@@ -215,10 +215,10 @@
|
||||
to_chat(user, span_warning("That's not a pizza!"))
|
||||
..()
|
||||
|
||||
/obj/item/pizzabox/process()
|
||||
/obj/item/pizzabox/process(delta_time)
|
||||
if(bomb_active && !bomb_defused && (bomb_timer > 0))
|
||||
playsound(loc, 'sound/items/timer.ogg', 50, 0)
|
||||
bomb_timer--
|
||||
bomb_timer -= delta_time
|
||||
if(bomb_active && !bomb_defused && (bomb_timer <= 0))
|
||||
if(bomb in src)
|
||||
bomb.detonate()
|
||||
|
||||
@@ -131,10 +131,10 @@
|
||||
emergency_shutdown()
|
||||
nerf(obj_flags & EMAGGED)
|
||||
|
||||
/obj/machinery/computer/holodeck/process()
|
||||
if(damaged && prob(10))
|
||||
/obj/machinery/computer/holodeck/process(delta_time)
|
||||
if(damaged && DT_PROB(5, delta_time))
|
||||
for(var/turf/T in linked)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
do_sparks(2, 1, T)
|
||||
return
|
||||
|
||||
|
||||
@@ -88,13 +88,13 @@
|
||||
held_mob = loc
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process()
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process(delta_time)
|
||||
if(held_mob && loc == held_mob)
|
||||
if(held_mob.is_holding(src))
|
||||
if(istype(held_mob) && held_mob.gloves)
|
||||
return
|
||||
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
if(prob(10))
|
||||
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time)
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(held_mob, span_warning("Your hand holding [src] burns!"))
|
||||
else
|
||||
held_mob = null
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/seeds/starthistle/corpse_flower/process()
|
||||
/obj/item/seeds/starthistle/corpse_flower/process(delta_time)
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
if(parent.age < maturation) // Start a little before it blooms
|
||||
return
|
||||
@@ -57,7 +57,7 @@
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/stank = new
|
||||
stank.set_moles(/datum/gas/miasma, (yield + 6)*7*MIASMA_CORPSE_MOLES) // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.set_moles(/datum/gas/miasma, (yield + 6) * 3.5 * MIASMA_CORPSE_MOLES * delta_time) // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.set_temperature(T20C) // without this the room would eventually freeze and miasma mining would be easier
|
||||
T.assume_air(stank)
|
||||
T.air_update_turf()
|
||||
|
||||
@@ -251,21 +251,21 @@
|
||||
if(burning & !grill)
|
||||
Burn()
|
||||
|
||||
/obj/structure/bonfire/proc/Burn()
|
||||
/obj/structure/bonfire/proc/Burn(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000,500,1)
|
||||
current_location.hotspot_expose(1000,250 * delta_time,1)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(1000, 500)
|
||||
O.fire_act(1000, 250 * delta_time)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/proc/Cook()
|
||||
/obj/structure/bonfire/proc/Cook(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
for(var/A in current_location)
|
||||
var/obj/G = A
|
||||
@@ -273,26 +273,26 @@
|
||||
continue
|
||||
else if(isliving(A)) //It's still a fire, idiot.
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
else if(G.GetComponent(/datum/component/grillable))
|
||||
if(SEND_SIGNAL(G, COMSIG_ITEM_GRILLED, src) & COMPONENT_HANDLED_GRILLING)
|
||||
continue
|
||||
G.fire_act(1000) //Hot hot hot!
|
||||
if(prob(10))
|
||||
if(DT_PROB(5, delta_time))
|
||||
visible_message("<span class='danger'>[G] doesn't seem to be doing too great on [src]!</span>")
|
||||
else if(istype(A, /obj/item) && prob(20))
|
||||
else if(istype(A, /obj/item) && DT_PROB(10, delta_time))
|
||||
var/obj/item/O = A
|
||||
O.microwave_act()
|
||||
|
||||
/obj/structure/bonfire/process()
|
||||
/obj/structure/bonfire/process(delta_time)
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
if(!grill)
|
||||
Burn()
|
||||
Burn(delta_time)
|
||||
else
|
||||
Cook()
|
||||
Cook(delta_time)
|
||||
|
||||
/obj/structure/bonfire/extinguish()
|
||||
if(burning)
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/process()
|
||||
/obj/machinery/hydroponics/process(delta_time)
|
||||
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
|
||||
|
||||
if(myseed && (myseed.loc != src))
|
||||
@@ -109,9 +109,9 @@
|
||||
|
||||
if(self_sustaining)
|
||||
adjustNutri(1)
|
||||
adjustWater(rand(3,5))
|
||||
adjustWeeds(-2)
|
||||
adjustPests(-2)
|
||||
adjustWater(rand(1,2) * delta_time * 0.5)
|
||||
adjustWeeds(-0.5 * delta_time)
|
||||
adjustPests(-0.5 * delta_time)
|
||||
adjustToxic(-2)
|
||||
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
|
||||
@@ -99,10 +99,10 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hostile_environment/process()
|
||||
/obj/item/clothing/suit/space/hostile_environment/process(delta_time)
|
||||
var/mob/living/carbon/C = loc
|
||||
if(istype(C) && prob(2)) //cursed by bubblegum
|
||||
if(prob(15))
|
||||
if(istype(C) && DT_PROB(1, delta_time)) //cursed by bubblegum
|
||||
if(DT_PROB(7.5, delta_time))
|
||||
new /datum/hallucination/oh_yeah(C)
|
||||
to_chat(C, span_colossus("<b>[pick("I AM IMMORTAL.","I SHALL TAKE BACK WHAT'S MINE.","I SEE YOU.","YOU CANNOT ESCAPE ME FOREVER.","DEATH CANNOT HOLD ME.")]</b>"))
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define SMELT_AMOUNT 10
|
||||
#define SMELT_AMOUNT 5
|
||||
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
@@ -143,23 +143,23 @@
|
||||
|
||||
return dat
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
/obj/machinery/mineral/processing_unit/process(delta_time)
|
||||
if (on)
|
||||
if(selected_material)
|
||||
smelt_ore()
|
||||
smelt_ore(delta_time)
|
||||
|
||||
else if(selected_alloy)
|
||||
smelt_alloy()
|
||||
smelt_alloy(delta_time)
|
||||
|
||||
|
||||
if(CONSOLE)
|
||||
CONSOLE.updateUsrDialog()
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore(delta_time)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/datum/material/mat = selected_material
|
||||
if(mat)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT * delta_time) ) ? SMELT_AMOUNT * delta_time : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
if(!sheets_to_remove)
|
||||
on = FALSE
|
||||
else
|
||||
@@ -167,13 +167,13 @@
|
||||
materials.retrieve_sheets(sheets_to_remove, mat, out)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy()
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy(delta_time = 2)
|
||||
var/datum/design/alloy = stored_research.isDesignResearchedID(selected_alloy) //check if it's a valid design
|
||||
if(!alloy)
|
||||
on = FALSE
|
||||
return
|
||||
|
||||
var/amount = can_smelt(alloy)
|
||||
var/amount = can_smelt(alloy, delta_time)
|
||||
|
||||
if(!amount)
|
||||
on = FALSE
|
||||
@@ -184,11 +184,11 @@
|
||||
|
||||
generate_mineral(alloy.build_path)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D)
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D, delta_time = 2)
|
||||
if(D.make_reagents.len)
|
||||
return FALSE
|
||||
|
||||
var/build_amount = SMELT_AMOUNT
|
||||
var/build_amount = SMELT_AMOUNT * delta_time
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
var/emitterhealth = 20
|
||||
var/emittermaxhealth = 20
|
||||
var/emitterregen = 0.25
|
||||
var/emitterregen = 0.125
|
||||
var/emittercd = 50
|
||||
var/emitteroverloadcd = 100
|
||||
var/emittersemicd = FALSE
|
||||
@@ -284,8 +284,8 @@
|
||||
health = maxHealth - getBruteLoss() - getFireLoss()
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
/mob/living/silicon/pai/process(delta_time)
|
||||
emitterhealth = clamp((emitterhealth + emitterregen * delta_time), -50, emittermaxhealth)
|
||||
|
||||
/obj/item/paicard/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
T.cell.give(S.e_cost * coeff)
|
||||
T.update_icon()
|
||||
else
|
||||
T.charge_tick = 0
|
||||
T.charge_timer = 0
|
||||
|
||||
/obj/item/robot_module/peacekeeper
|
||||
name = "Peacekeeper"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user