mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities * Review fixes * Geiger counters cleanup Made hardsuit geiger code more similar to geiger counter code Geiger counters are more responsive now * Moved SS*_DT defines to subsystems.dm * Rebase fix * Redefined the SS*_DT defines to use the subsystem wait vars * Implemented suggested changes by @AnturK * Commented /datum/proc/process about the deltatime stuff * Send delta_time as a process parameter instead of the defines Also DTfied acid_processing * Dtfied new acid component
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/// 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
|
||||
|
||||
@@ -208,9 +208,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
|
||||
|
||||
@@ -84,6 +84,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)
|
||||
@@ -206,4 +211,11 @@
|
||||
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
|
||||
|
||||
#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)))
|
||||
// )
|
||||
|
||||
@@ -50,3 +50,6 @@ Ask ninjanomnom if they're around
|
||||
#define RAD_DISTANCE_COEFFICIENT 1 // Lower means further rad spread
|
||||
|
||||
#define RAD_HALF_LIFE 90 // 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
|
||||
|
||||
@@ -238,3 +238,9 @@
|
||||
#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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -39,6 +39,8 @@ SUBSYSTEM_DEF(air)
|
||||
var/list/queued_for_activation
|
||||
var/display_all_groups = FALSE
|
||||
|
||||
var/lasttick = 0
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg += "C:{"
|
||||
msg += "AT:[round(cost_turfs,1)]|"
|
||||
@@ -72,6 +74,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
/datum/controller/subsystem/air/fire(resumed = FALSE)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
var/delta_time = wait * 0.1
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
var/list/pipenet_rebuilds = pipenets_needing_rebuilt
|
||||
@@ -86,7 +89,7 @@ SUBSYSTEM_DEF(air)
|
||||
currentpart = SSAIR_PIPENETS
|
||||
|
||||
if(currentpart == SSAIR_PIPENETS || !resumed)
|
||||
process_pipenets(resumed)
|
||||
process_pipenets(delta_time, resumed)
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -95,7 +98,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_atmos_machinery(resumed)
|
||||
process_atmos_machinery(delta_time, resumed)
|
||||
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -131,7 +134,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
if(currentpart == SSAIR_HOTSPOTS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_hotspots(resumed)
|
||||
process_hotspots(delta_time, resumed)
|
||||
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
@@ -150,7 +153,7 @@ SUBSYSTEM_DEF(air)
|
||||
SStgui.update_uis(SSair) //Lightning fast debugging motherfucker
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = FALSE)
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(delta_time, resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = networks.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -159,7 +162,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)
|
||||
@@ -169,8 +172,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 = FALSE)
|
||||
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)
|
||||
@@ -178,7 +180,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
|
||||
@@ -196,7 +198,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = FALSE)
|
||||
/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)
|
||||
@@ -205,7 +207,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)
|
||||
|
||||
@@ -18,6 +18,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]
|
||||
@@ -31,7 +32,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 = FALSE)
|
||||
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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
//Fires five times every second.
|
||||
|
||||
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
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//Used to process objects. Fires once every second.
|
||||
//Used to process objects.
|
||||
|
||||
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,14 +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
|
||||
|
||||
|
||||
///This proc is called on a datum if it is being processed in a subsystem. 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()
|
||||
/**
|
||||
* 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 = FALSE
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -6,15 +6,15 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
name = "Quirks"
|
||||
init_order = INIT_ORDER_QUIRKS
|
||||
flags = SS_BACKGROUND
|
||||
wait = 10
|
||||
runlevels = RUNLEVEL_GAME
|
||||
wait = 1 SECONDS
|
||||
|
||||
var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/
|
||||
var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad
|
||||
var/list/quirk_objects = list() //A list of all quirk objects in the game, since some may process
|
||||
var/list/quirk_blacklist = list() //A list of quirks that can not be used with each other. Format: list(quirk1,quirk2),list(quirk3,quirk4)
|
||||
///An assoc list of quirks that can be obtained as a hardcore character, and their hardcore value.
|
||||
var/list/hardcore_quirks = list()
|
||||
var/list/hardcore_quirks = list()
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/Initialize(timeofday)
|
||||
if(!quirks.len)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
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
|
||||
|
||||
@@ -94,25 +96,25 @@
|
||||
|
||||
|
||||
/// Handles the slow corrosion of the parent [/atom].
|
||||
/datum/component/acid/process()
|
||||
process_effect?.InvokeAsync()
|
||||
/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)))))
|
||||
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)
|
||||
/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), BURN, ACID, 0)
|
||||
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)
|
||||
target.acid_act(acid_power, acid_volume)
|
||||
/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)
|
||||
var/acid_used = min(acid_volume * 0.05, 20)
|
||||
/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
|
||||
@@ -126,19 +128,22 @@
|
||||
if(acid_power < ACID_POWER_MELT_TURF)
|
||||
return
|
||||
|
||||
switch(parent_integrity--)
|
||||
if(-INFINITY to 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()
|
||||
if(0 to 4)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] begins to crumble under the acid!</span>")
|
||||
if(4 to 8)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is struggling to withstand the acid!</span>")
|
||||
if(8 to 16)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is being melted by the acid!</span>")
|
||||
if(16 to 24)
|
||||
target_turf.visible_message("<span class='warning'>[target_turf] is holding up against the acid!</span>")
|
||||
|
||||
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)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
/datum/component/embedded/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_CARBON_EMBED_RIP, COMSIG_CARBON_EMBED_REMOVAL))
|
||||
|
||||
/datum/component/embedded/process()
|
||||
/datum/component/embedded/process(delta_time)
|
||||
var/mob/living/carbon/victim = parent
|
||||
|
||||
if(!victim || !limb) // in case the victim and/or their limbs exploded (say, due to a sticky bomb)
|
||||
@@ -132,7 +132,7 @@
|
||||
return
|
||||
|
||||
var/damage = weapon.w_class * pain_mult
|
||||
var/pain_chance_current = pain_chance
|
||||
var/pain_chance_current = DT_PROB_RATE(pain_chance / 100, delta_time) * 100
|
||||
if(pain_stam_pct && HAS_TRAIT_FROM(victim, TRAIT_INCAPACITATED, STAMINA)) //if it's a less-lethal embed, give them a break if they're already stamcritted
|
||||
pain_chance_current *= 0.2
|
||||
damage *= 0.5
|
||||
@@ -143,7 +143,7 @@
|
||||
limb.receive_damage(brute=(1-pain_stam_pct) * damage, stamina=pain_stam_pct * damage, wound_bonus = CANT_WOUND)
|
||||
to_chat(victim, "<span class='userdanger'>[weapon] embedded in your [limb.name] hurts!</span>")
|
||||
|
||||
var/fall_chance_current = fall_chance
|
||||
var/fall_chance_current = DT_PROB_RATE(fall_chance / 100, delta_time) * 100
|
||||
if(victim.mobility_flags & ~MOBILITY_STAND)
|
||||
fall_chance_current *= 0.2
|
||||
|
||||
|
||||
@@ -170,26 +170,26 @@
|
||||
break
|
||||
|
||||
///Called on SSmood process
|
||||
/datum/component/mood/process()
|
||||
/datum/component/mood/process(delta_time)
|
||||
switch(mood_level)
|
||||
if(1)
|
||||
setSanity(sanity-0.3, SANITY_INSANE)
|
||||
setSanity(sanity-0.3*delta_time, SANITY_INSANE)
|
||||
if(2)
|
||||
setSanity(sanity-0.15, SANITY_INSANE)
|
||||
setSanity(sanity-0.15*delta_time, SANITY_INSANE)
|
||||
if(3)
|
||||
setSanity(sanity-0.1, SANITY_CRAZY)
|
||||
setSanity(sanity-0.1*delta_time, SANITY_CRAZY)
|
||||
if(4)
|
||||
setSanity(sanity-0.05, SANITY_UNSTABLE)
|
||||
setSanity(sanity-0.05*delta_time, SANITY_UNSTABLE)
|
||||
if(5)
|
||||
setSanity(sanity, SANITY_UNSTABLE) //This makes sure that mood gets increased should you be below the minimum.
|
||||
if(6)
|
||||
setSanity(sanity+0.2, SANITY_UNSTABLE)
|
||||
setSanity(sanity+0.2*delta_time, SANITY_UNSTABLE)
|
||||
if(7)
|
||||
setSanity(sanity+0.3, SANITY_UNSTABLE)
|
||||
setSanity(sanity+0.3*delta_time, SANITY_UNSTABLE)
|
||||
if(8)
|
||||
setSanity(sanity+0.4, SANITY_NEUTRAL, SANITY_MAXIMUM)
|
||||
setSanity(sanity+0.4*delta_time, SANITY_NEUTRAL, SANITY_MAXIMUM)
|
||||
if(9)
|
||||
setSanity(sanity+0.6, SANITY_NEUTRAL, SANITY_MAXIMUM)
|
||||
setSanity(sanity+0.6*delta_time, SANITY_NEUTRAL, SANITY_MAXIMUM)
|
||||
HandleNutrition()
|
||||
|
||||
///Sets sanity to the specified amount and applies effects.
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
else
|
||||
adjust_nanites(null, amount) //just add to the nanite volume
|
||||
|
||||
/datum/component/nanites/process()
|
||||
/datum/component/nanites/process(delta_time)
|
||||
if(!IS_IN_STASIS(host_mob))
|
||||
adjust_nanites(null, regen_rate + (SSresearch.science_tech.researched_nodes["nanite_harmonic"] ? HARMONIC_REGEN_BOOST : 0))
|
||||
adjust_nanites(null, (regen_rate + (SSresearch.science_tech.researched_nodes["nanite_harmonic"] ? HARMONIC_REGEN_BOOST : 0)) * 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)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/component/rot/process()
|
||||
/datum/component/rot/process(delta_time)
|
||||
var/atom/A = parent
|
||||
|
||||
var/turf/open/T = get_turf(A)
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
var/datum/gas_mixture/stank = new
|
||||
ADD_GAS(/datum/gas/miasma, stank.gases)
|
||||
stank.gases[/datum/gas/miasma][MOLES] = amount
|
||||
stank.gases[/datum/gas/miasma][MOLES] = amount * delta_time
|
||||
stank.temperature = BODYTEMP_NORMAL // otherwise we have gas below 2.7K which will break our lag generator
|
||||
T.assume_air(stank)
|
||||
T.air_update_turf()
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
else
|
||||
user_by_item -= source
|
||||
|
||||
/datum/element/earhealing/process()
|
||||
/datum/element/earhealing/process(delta_time)
|
||||
for(var/i in user_by_item)
|
||||
var/mob/living/carbon/user = user_by_item[i]
|
||||
var/obj/item/organ/ears/ears = user.getorganslot(ORGAN_SLOT_EARS)
|
||||
if(!ears || HAS_TRAIT_NOT_FROM(user, TRAIT_DEAF, EAR_DAMAGE))
|
||||
continue
|
||||
ears.deaf = max(ears.deaf - 0.25, (ears.damage < ears.maxHealth ? 0 : 1)) // Do not clear deafness if our ears are too damaged
|
||||
ears.damage = max(ears.damage - 0.025, 0)
|
||||
ears.deaf = max(ears.deaf - 0.25 * delta_time, (ears.damage < ears.maxHealth ? 0 : 1)) // Do not clear deafness if our ears are too damaged
|
||||
ears.damage = max(ears.damage - 0.025 * delta_time, 0)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -41,12 +41,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
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
/datum/quirk/proc/post_add() //for text, disclaimers etc. given after you spawn in with the trait
|
||||
/datum/quirk/proc/on_transfer() //code called when the trait is transferred to a new mob
|
||||
|
||||
/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)
|
||||
|
||||
/**
|
||||
* get_quirk_string() is used to get a printable string of all the quirk traits someone has for certain criteria
|
||||
|
||||
@@ -37,18 +37,18 @@
|
||||
lose_text = "<span class='danger'>You no longer feel like drinking would ease your pain.</span>"
|
||||
medical_record_text = "Patient has unusually efficient liver metabolism and can slowly regenerate wounds by drinking alcoholic beverages."
|
||||
|
||||
/datum/quirk/drunkhealing/on_process()
|
||||
/datum/quirk/drunkhealing/on_process(delta_time)
|
||||
var/mob/living/carbon/C = quirk_holder
|
||||
switch(C.drunkenness)
|
||||
if (6 to 40)
|
||||
C.adjustBruteLoss(-0.1, FALSE)
|
||||
C.adjustFireLoss(-0.05, FALSE)
|
||||
C.adjustBruteLoss(-0.1*delta_time, FALSE)
|
||||
C.adjustFireLoss(-0.05*delta_time, FALSE)
|
||||
if (41 to 60)
|
||||
C.adjustBruteLoss(-0.4, FALSE)
|
||||
C.adjustFireLoss(-0.2, FALSE)
|
||||
C.adjustBruteLoss(-0.4*delta_time, FALSE)
|
||||
C.adjustFireLoss(-0.2*delta_time, FALSE)
|
||||
if (61 to INFINITY)
|
||||
C.adjustBruteLoss(-0.8, FALSE)
|
||||
C.adjustFireLoss(-0.4, FALSE)
|
||||
C.adjustBruteLoss(-0.8*delta_time, FALSE)
|
||||
C.adjustFireLoss(-0.4*delta_time, FALSE)
|
||||
|
||||
/datum/quirk/empath
|
||||
name = "Empath"
|
||||
@@ -126,8 +126,8 @@
|
||||
mood_quirk = TRUE
|
||||
medical_record_text = "Patient demonstrates constant euthymia irregular for environment. It's a bit much, to be honest."
|
||||
|
||||
/datum/quirk/jolly/on_process()
|
||||
if(prob(0.05))
|
||||
/datum/quirk/jolly/on_process(delta_time)
|
||||
if(DT_PROB(0.05, delta_time))
|
||||
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "jolly", /datum/mood_event/jolly)
|
||||
|
||||
/datum/quirk/light_step
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood."
|
||||
hardcore_value = 8
|
||||
|
||||
/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 - 25)) // just barely survivable without treatment
|
||||
H.blood_volume -= 0.275
|
||||
H.blood_volume -= 0.275 * delta_time
|
||||
|
||||
/datum/quirk/blindness
|
||||
name = "Blind"
|
||||
@@ -93,10 +93,10 @@
|
||||
|
||||
to_chat(quirk_holder, "<span class='boldnotice'>There is a bottle of mannitol pills [where] to keep you alive until you can secure a supply of medication. Don't rely on it too much!</span>")
|
||||
|
||||
/datum/quirk/brainproblems/on_process()
|
||||
/datum/quirk/brainproblems/on_process(delta_time)
|
||||
if(HAS_TRAIT(quirk_holder, TRAIT_TUMOR_SUPPRESSED))
|
||||
return
|
||||
quirk_holder.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2)
|
||||
quirk_holder.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2 * delta_time)
|
||||
|
||||
/datum/quirk/deafness
|
||||
name = "Deaf"
|
||||
@@ -119,8 +119,8 @@
|
||||
mood_quirk = TRUE
|
||||
hardcore_value = 1
|
||||
|
||||
/datum/quirk/depression/on_process()
|
||||
if(prob(0.05))
|
||||
/datum/quirk/depression/on_process(delta_time)
|
||||
if(DT_PROB(0.05, delta_time))
|
||||
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "depression_mild", /datum/mood_event/depression_mild)
|
||||
|
||||
/datum/quirk/family_heirloom
|
||||
@@ -462,11 +462,11 @@
|
||||
medical_record_text = "Patient suffers from acute Reality Dissociation Syndrome and experiences vivid hallucinations."
|
||||
hardcore_value = 6
|
||||
|
||||
/datum/quirk/insanity/on_process()
|
||||
/datum/quirk/insanity/on_process(delta_time)
|
||||
if(quirk_holder.has_reagent(/datum/reagent/toxin/mindbreaker, needs_metabolizing = TRUE))
|
||||
quirk_holder.hallucination = 0
|
||||
return
|
||||
if(prob(2)) //we'll all be mad soon enough
|
||||
if(DT_PROB(2, delta_time)) //we'll all be mad soon enough
|
||||
madness()
|
||||
|
||||
/datum/quirk/insanity/proc/madness()
|
||||
@@ -495,18 +495,18 @@
|
||||
/datum/quirk/social_anxiety/remove()
|
||||
UnregisterSignal(quirk_holder, list(COMSIG_MOB_EYECONTACT, COMSIG_MOB_EXAMINATE))
|
||||
|
||||
/datum/quirk/social_anxiety/on_process()
|
||||
/datum/quirk/social_anxiety/on_process(delta_time)
|
||||
var/nearby_people = 0
|
||||
for(var/mob/living/carbon/human/H in oview(3, quirk_holder))
|
||||
if(H.client)
|
||||
nearby_people++
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
if(prob(2 + nearby_people))
|
||||
if(DT_PROB(2 + nearby_people, delta_time))
|
||||
H.stuttering = max(3, H.stuttering)
|
||||
else if(prob(min(3, nearby_people)) && !H.silent)
|
||||
else if(DT_PROB(min(3, nearby_people), delta_time) && !H.silent)
|
||||
to_chat(H, "<span class='danger'>You retreat into yourself. You <i>really</i> don't feel up to talking.</span>")
|
||||
H.silent = max(10, H.silent)
|
||||
else if(prob(0.5) && dumb_thing)
|
||||
else if(DT_PROB(0.5, delta_time) && dumb_thing)
|
||||
to_chat(H, "<span class='userdanger'>You think of a dumb thing you said a long time ago and scream internally.</span>")
|
||||
dumb_thing = FALSE //only once per life
|
||||
if(prob(1))
|
||||
@@ -704,7 +704,7 @@
|
||||
dogtag.display = display
|
||||
human_holder.equip_in_one_of_slots(dogtag, slots , qdel_on_fail = TRUE)
|
||||
|
||||
/datum/quirk/allergic/on_process()
|
||||
/datum/quirk/allergic/on_process(delta_time)
|
||||
. = ..()
|
||||
if(!iscarbon(quirk_holder))
|
||||
return
|
||||
@@ -718,9 +718,9 @@
|
||||
instantiated_med.reagent_removal_skip_list |= ALLERGIC_REMOVAL_SKIP
|
||||
return //intentionally stops the entire proc so we avoid the organ damage after the loop
|
||||
instantiated_med.reagent_removal_skip_list -= ALLERGIC_REMOVAL_SKIP
|
||||
carbon_quirk_holder.adjustToxLoss(3)
|
||||
carbon_quirk_holder.reagents.add_reagent(/datum/reagent/toxin/histamine,3)
|
||||
if(prob(10))
|
||||
carbon_quirk_holder.adjustToxLoss(3 * delta_time)
|
||||
carbon_quirk_holder.reagents.add_reagent(/datum/reagent/toxin/histamine, 3 * delta_time)
|
||||
if(DT_PROB(10, delta_time))
|
||||
carbon_quirk_holder.vomit()
|
||||
carbon_quirk_holder.adjustOrganLoss(pick(ORGAN_SLOT_BRAIN,ORGAN_SLOT_APPENDIX,ORGAN_SLOT_LUNGS,ORGAN_SLOT_HEART,ORGAN_SLOT_LIVER,ORGAN_SLOT_STOMACH),10)
|
||||
|
||||
|
||||
@@ -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,25 @@
|
||||
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 (machine_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, TRUE)
|
||||
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 [initial(A.name)]!!"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
circuit = /obj/item/circuitboard/machine/cell_charger
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/charge_rate = 500
|
||||
var/charge_rate = 250
|
||||
|
||||
/obj/machinery/cell_charger/update_overlays()
|
||||
. = ..()
|
||||
@@ -30,7 +30,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/stock_parts/cell) && !panel_open)
|
||||
@@ -115,17 +115,17 @@
|
||||
charging.emp_act(severity)
|
||||
|
||||
/obj/machinery/cell_charger/RefreshParts()
|
||||
charge_rate = 500
|
||||
charge_rate = 250
|
||||
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 || (machine_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()
|
||||
|
||||
@@ -193,13 +193,13 @@
|
||||
begin_processing()
|
||||
|
||||
|
||||
/obj/machinery/defibrillator_mount/charging/process()
|
||||
/obj/machinery/defibrillator_mount/charging/process(delta_time)
|
||||
var/obj/item/stock_parts/cell/C = get_cell()
|
||||
if(!C || !is_operational)
|
||||
return PROCESS_KILL
|
||||
if(C.charge < C.maxcharge)
|
||||
use_power(100)
|
||||
C.give(80)
|
||||
use_power(50 * delta_time)
|
||||
C.give(40 * delta_time)
|
||||
update_icon()
|
||||
|
||||
//wallframe, for attaching the mounts easily
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
if(panel_open)
|
||||
. += "electrolyzer-open"
|
||||
|
||||
/obj/machinery/electrolyzer/process()
|
||||
/obj/machinery/electrolyzer/process(delta_time)
|
||||
if(!is_operational && on)
|
||||
on = FALSE
|
||||
if(!on)
|
||||
@@ -93,7 +93,7 @@
|
||||
var/datum/gas_mixture/env = L.return_air() //get air from the turf
|
||||
var/datum/gas_mixture/removed = env.remove(0.1 * env.total_moles())
|
||||
removed.assert_gases(/datum/gas/water_vapor, /datum/gas/oxygen, /datum/gas/hydrogen)
|
||||
var/proportion = min(removed.gases[/datum/gas/water_vapor][MOLES], (3 * workingPower))//Works to max 12 moles at a time.
|
||||
var/proportion = min(removed.gases[/datum/gas/water_vapor][MOLES], (1.5 * delta_time * workingPower))//Works to max 12 moles at a time.
|
||||
removed.gases[/datum/gas/water_vapor][MOLES] -= proportion * 2 * workingPower
|
||||
removed.gases[/datum/gas/oxygen][MOLES] += proportion * workingPower
|
||||
removed.gases[/datum/gas/hydrogen][MOLES] += proportion * 2 * workingPower
|
||||
|
||||
@@ -53,9 +53,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)
|
||||
@@ -128,7 +128,7 @@
|
||||
if(panel_open)
|
||||
. += "[icon_state]_panel"
|
||||
|
||||
/obj/machinery/fat_sucker/process()
|
||||
/obj/machinery/fat_sucker/process(delta_time)
|
||||
if(!processing)
|
||||
return
|
||||
if(!powered() || !occupant || !iscarbon(occupant))
|
||||
@@ -140,8 +140,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)
|
||||
|
||||
@@ -97,12 +97,12 @@
|
||||
update_icon()
|
||||
timerid = addtimer(CALLBACK(src, .proc/finish_interrogation), 450, TIMER_STOPPABLE)
|
||||
|
||||
/obj/machinery/hypnochair/process()
|
||||
/obj/machinery/hypnochair/process(delta_time)
|
||||
var/mob/living/carbon/C = occupant
|
||||
if(!istype(C) || C != victim)
|
||||
interrupt_interrogation()
|
||||
return
|
||||
if(prob(10) && !(C.get_eye_protection() > 0))
|
||||
if(DT_PROB(5, delta_time) && !(C.get_eye_protection() > 0))
|
||||
to_chat(C, "<span class='hypnophrase'>[pick(\
|
||||
"...blue... red... green... blue, red, green, blueredgreen<span class='small'>blueredgreen</span>",\
|
||||
"...pretty colors...",\
|
||||
|
||||
@@ -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 @@
|
||||
if(istype(beaker, /obj/item/reagent_containers/blood))
|
||||
// speed up transfer on blood packs
|
||||
transfer_amount *= 2
|
||||
beaker.reagents.trans_to(attached, transfer_amount, methods = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages
|
||||
beaker.reagents.trans_to(attached, transfer_amount * delta_time * 0.5, methods = INJECT, show_message = FALSE) //make reagents reacts, but don't spam messages
|
||||
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))
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
charging.forceMove(drop_location())
|
||||
setCharging(null)
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
/obj/machinery/recharger/process(delta_time)
|
||||
if(machine_stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -128,8 +128,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)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
var/obj/item/ammo_box/magazine/recharge/R = charging
|
||||
if(R.stored_ammo.len < R.max_ammo)
|
||||
R.stored_ammo += new R.ammo_type(R)
|
||||
use_power(200 * recharge_coeff)
|
||||
use_power(100 * recharge_coeff * delta_time)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
begin_processing()
|
||||
|
||||
|
||||
/obj/machinery/recharge_station/process()
|
||||
/obj/machinery/recharge_station/process(delta_time)
|
||||
if(occupant)
|
||||
process_occupant()
|
||||
process_occupant(delta_time)
|
||||
return 1
|
||||
|
||||
/obj/machinery/recharge_station/relaymove(mob/living/user, direction)
|
||||
@@ -107,7 +107,7 @@
|
||||
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)
|
||||
|
||||
@@ -144,9 +144,9 @@
|
||||
update_icon()
|
||||
QDEL_LIST(deployed_shields)
|
||||
|
||||
/obj/machinery/shieldgen/process()
|
||||
/obj/machinery/shieldgen/process(delta_time)
|
||||
if((machine_stat & BROKEN) && active)
|
||||
if(deployed_shields.len && prob(5))
|
||||
if(deployed_shields.len && DT_PROB(2.5, delta_time))
|
||||
qdel(pick(deployed_shields))
|
||||
|
||||
|
||||
|
||||
@@ -59,12 +59,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_state()
|
||||
if(machine_stat & NOPOWER)
|
||||
|
||||
@@ -20,7 +20,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
|
||||
@@ -55,7 +55,7 @@
|
||||
else
|
||||
. += "There is no power cell installed."
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.</span>" //100%, 75%, 50%, 25%
|
||||
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[siunit(heatingPower, "W", 1)]</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.</span>" //100%, 75%, 50%, 25%
|
||||
|
||||
/obj/machinery/space_heater/update_icon_state()
|
||||
if(on)
|
||||
@@ -69,7 +69,7 @@
|
||||
if(panel_open)
|
||||
. += "sheater-open"
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
/obj/machinery/space_heater/process(delta_time)
|
||||
if(!on || !is_operational)
|
||||
if (on) // If it's broken, turn it off too
|
||||
on = FALSE
|
||||
@@ -99,19 +99,19 @@
|
||||
return
|
||||
|
||||
var/heat_capacity = env.heat_capacity()
|
||||
var/requiredPower = abs(env.temperature - targetTemperature) * heat_capacity
|
||||
requiredPower = min(requiredPower, heatingPower)
|
||||
var/requiredEnergy = abs(env.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)
|
||||
env.temperature += deltaTemperature
|
||||
air_update_turf()
|
||||
cell.use(requiredPower / efficiency)
|
||||
cell.use(requiredEnergy / efficiency)
|
||||
else
|
||||
on = FALSE
|
||||
update_icon()
|
||||
@@ -125,7 +125,7 @@
|
||||
for(var/obj/item/stock_parts/capacitor/M in component_parts)
|
||||
cap += M.rating
|
||||
|
||||
heatingPower = laser * 40000
|
||||
heatingPower = laser * 20000
|
||||
|
||||
settableTemperatureRange = cap * 30
|
||||
efficiency = (cap + 1) * 10000
|
||||
|
||||
@@ -101,7 +101,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()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/// How long it takes to break out of the SSU.
|
||||
var/breakout_time = 300
|
||||
/// How fast it charges cells in a suit
|
||||
var/charge_rate = 500
|
||||
var/charge_rate = 250
|
||||
|
||||
/obj/machinery/suit_storage_unit/Initialize()
|
||||
. = ..()
|
||||
@@ -407,7 +407,7 @@
|
||||
if(occupant)
|
||||
dump_contents()
|
||||
|
||||
/obj/machinery/suit_storage_unit/process()
|
||||
/obj/machinery/suit_storage_unit/process(delta_time)
|
||||
if(!suit)
|
||||
return
|
||||
if(!istype(suit, /obj/item/clothing/suit/space))
|
||||
@@ -416,8 +416,8 @@
|
||||
return
|
||||
|
||||
var/obj/item/stock_parts/cell/C = suit.cell
|
||||
use_power(charge_rate)
|
||||
C.give(charge_rate)
|
||||
use_power(charge_rate * delta_time)
|
||||
C.give(charge_rate * delta_time)
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
|
||||
@@ -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/list/autolinkers = list() // list of text/number values to link with
|
||||
var/id = "NULL" // identification string
|
||||
var/network = "NULL" // the network of the machinery
|
||||
@@ -132,14 +132,14 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
else
|
||||
on = FALSE
|
||||
|
||||
/obj/machinery/telecomms/process()
|
||||
/obj/machinery/telecomms/process(delta_time)
|
||||
update_power()
|
||||
|
||||
// Update the icon
|
||||
update_icon()
|
||||
|
||||
if(traffic > 0)
|
||||
traffic -= netspeed
|
||||
traffic -= netspeed * delta_time
|
||||
|
||||
/obj/machinery/telecomms/emp_act(severity)
|
||||
. = ..()
|
||||
|
||||
@@ -165,18 +165,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=2)
|
||||
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=1)
|
||||
animate(transform=matrix(), time=1)
|
||||
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,5 +1,8 @@
|
||||
//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"
|
||||
desc = "A mysterious anomaly, seen commonly only in the region of space that the station orbits..."
|
||||
@@ -7,7 +10,7 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
light_range = 3
|
||||
var/movechance = 70
|
||||
|
||||
var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly
|
||||
var/area/impact_area
|
||||
|
||||
@@ -48,8 +51,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()
|
||||
@@ -63,8 +66,8 @@
|
||||
QDEL_NULL(aSignal)
|
||||
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()
|
||||
@@ -273,15 +276,17 @@
|
||||
name = "pyroclastic anomaly"
|
||||
icon_state = "mustard"
|
||||
var/ticks = 0
|
||||
/// How many seconds between each gas release
|
||||
var/releasedelay = 10
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/pyro
|
||||
|
||||
/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")
|
||||
@@ -376,3 +381,5 @@
|
||||
SSexplosions.medturf += T
|
||||
if(EXPLODE_LIGHT)
|
||||
SSexplosions.lowturf += T
|
||||
|
||||
#undef ANOMALY_MOVECHANCE
|
||||
|
||||
@@ -89,10 +89,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,1) * 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()
|
||||
|
||||
@@ -191,8 +191,8 @@ RSF
|
||||
to_dispense = /obj/item/reagent_containers/food/snacks/cookie
|
||||
to_chat(user, "<span class='notice'>Cookie Synthesizer reset.</span>")
|
||||
|
||||
/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,8 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
heat = 1000
|
||||
var/wax = 1000
|
||||
/// How many seconds it burns for
|
||||
var/wax = 2000
|
||||
var/lit = FALSE
|
||||
var/infinite = FALSE
|
||||
var/start_lit = FALSE
|
||||
@@ -20,7 +21,7 @@
|
||||
light()
|
||||
|
||||
/obj/item/candle/update_icon_state()
|
||||
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)
|
||||
@@ -58,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)
|
||||
new /obj/item/trash/candle(loc)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
|
||||
@@ -168,7 +168,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/RPpos = null
|
||||
var/attached = TRUE //if the gun arg isn't included initially, then the chronofield will work without one
|
||||
@@ -201,7 +201,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
|
||||
@@ -209,13 +209,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 class='boldnotice'>As the last essence of your being is erased from time, you are taken back to your most enjoyable memory. You feel happy...</span>")
|
||||
var/mob/dead/observer/ghost = captured.ghostize(1)
|
||||
if(captured.mind)
|
||||
@@ -232,14 +232,14 @@
|
||||
update_icon()
|
||||
if(gun)
|
||||
if(gun.field_check(src))
|
||||
tickstokill--
|
||||
timetokill -= delta_time
|
||||
else
|
||||
gun = null
|
||||
return .()
|
||||
else if(!attached)
|
||||
tickstokill--
|
||||
timetokill -= delta_time
|
||||
else
|
||||
tickstokill++
|
||||
timetokill += delta_time
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -22,14 +22,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "match_unlit"
|
||||
var/lit = FALSE
|
||||
var/burnt = FALSE
|
||||
var/smoketime = 5 // 10 seconds
|
||||
/// How long the match lasts in 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)
|
||||
@@ -102,7 +103,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
|
||||
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT)
|
||||
grind_results = list(/datum/reagent/carbon = 2)
|
||||
|
||||
@@ -123,7 +124,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
|
||||
@@ -131,7 +132,8 @@ 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.
|
||||
/// How long the cigarette lasts in seconds
|
||||
var/smoketime = 360
|
||||
var/chem_volume = 30
|
||||
var/smoke_all = FALSE /// Should we smoke all of the chems in the cig before it runs out. Splits each puff to take a portion of the overall chems so by the end you'll always have consumed all of the chems inside.
|
||||
var/list/list_reagents = list(/datum/reagent/drug/nicotine = 15)
|
||||
@@ -251,7 +253,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
* of chems to give them each time so they'll have smoked it all by the end.
|
||||
*/
|
||||
if (smoke_all)
|
||||
to_smoke = reagents.total_volume/((smoketime * 2) / (dragtime / 10))
|
||||
to_smoke = reagents.total_volume / (smoketime / dragtime)
|
||||
|
||||
reagents.expose(C, INGEST, fraction)
|
||||
var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
@@ -262,13 +264,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
reagents.remove_any(to_smoke)
|
||||
|
||||
/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 class='notice'>Your [name] goes out.</span>")
|
||||
@@ -276,7 +278,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)
|
||||
@@ -342,7 +344,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/clothing/mask/cigarette/syndicate
|
||||
desc = "An unknown brand cigarette."
|
||||
chem_volume = 60
|
||||
smoketime = 60
|
||||
smoketime = 2 * 60
|
||||
smoke_all = TRUE
|
||||
list_reagents = list(/datum/reagent/drug/nicotine = 10, /datum/reagent/medicine/omnizine = 15)
|
||||
|
||||
@@ -365,7 +367,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
type_butt = /obj/item/cigbutt/roach
|
||||
throw_speed = 0.5
|
||||
inhand_icon_state = "spliffoff"
|
||||
smoketime = 120 // four minutes
|
||||
smoketime = 4 * 60
|
||||
chem_volume = 50
|
||||
list_reagents = null
|
||||
|
||||
@@ -431,7 +433,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/clothing/mask/cigarette/candy
|
||||
name = "Little Timmy's candy cigarette"
|
||||
desc = "For all ages*! Doesn't contain any amount of nicotine. Health and safety risks can be read on the tip of the cigarette."
|
||||
smoketime = 120
|
||||
smoketime = 2 * 60
|
||||
icon_on = "candyon"
|
||||
icon_off = "candyoff" //make sure to add positional sprites in icons/obj/cigarettes.dmi if you add more.
|
||||
inhand_icon_state = "candyoff"
|
||||
@@ -468,7 +470,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
type_butt = /obj/item/cigbutt/cigarbutt
|
||||
throw_speed = 0.5
|
||||
inhand_icon_state = "cigaroff"
|
||||
smoketime = 300 // 11 minutes
|
||||
smoketime = 11 * 60
|
||||
chem_volume = 40
|
||||
list_reagents = list(/datum/reagent/drug/nicotine = 25)
|
||||
|
||||
@@ -478,7 +480,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 600 // 20 minutes
|
||||
smoketime = 20 * 60
|
||||
chem_volume = 80
|
||||
list_reagents =list(/datum/reagent/drug/nicotine = 40)
|
||||
|
||||
@@ -488,7 +490,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
icon_state = "cigar2off"
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 900 // 30 minutes
|
||||
smoketime = 30 * 60
|
||||
chem_volume = 50
|
||||
list_reagents =list(/datum/reagent/drug/nicotine = 15)
|
||||
|
||||
@@ -529,10 +531,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
|
||||
@@ -556,7 +558,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!packeditem)
|
||||
if(G.dry == 1)
|
||||
to_chat(user, "<span class='notice'>You stuff [O] into [src].</span>")
|
||||
smoketime = 400
|
||||
smoketime = 13 * 60
|
||||
packeditem = TRUE
|
||||
name = "[O.name]-packed [initial(name)]"
|
||||
if(O.reagents)
|
||||
@@ -849,6 +851,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 = FALSE // kinky
|
||||
var/super = FALSE //for the fattest vapes dude.
|
||||
|
||||
@@ -962,13 +966,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))
|
||||
@@ -978,17 +982,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
//open flame removed because vapes are a closed system, they won't 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, FALSE)
|
||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||
|
||||
@@ -270,6 +270,7 @@
|
||||
inhand_icon_state = "flare"
|
||||
worn_icon_state = "flare"
|
||||
actions_types = list()
|
||||
/// How many seconds of fuel we have left
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
@@ -279,12 +280,12 @@
|
||||
|
||||
/obj/item/flashlight/flare/Initialize()
|
||||
. = ..()
|
||||
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
|
||||
fuel = rand(1600, 2000)
|
||||
|
||||
/obj/item/flashlight/flare/process()
|
||||
/obj/item/flashlight/flare/process(delta_time)
|
||||
open_flame(heat)
|
||||
fuel = max(fuel - 1, 0)
|
||||
if(!fuel || !on)
|
||||
fuel = max(fuel -= delta_time, 0)
|
||||
if(fuel <= 0 || !on)
|
||||
turn_off()
|
||||
if(!fuel)
|
||||
icon_state = "[initial(icon_state)]-empty"
|
||||
@@ -313,7 +314,7 @@
|
||||
/obj/item/flashlight/flare/attack_self(mob/user)
|
||||
|
||||
// Usual checks
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
if(on)
|
||||
@@ -386,7 +387,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()
|
||||
..()
|
||||
@@ -396,11 +399,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
|
||||
|
||||
@@ -448,11 +451,12 @@
|
||||
inhand_icon_state = "glowstick"
|
||||
worn_icon_state = "lightstick"
|
||||
grind_results = list(/datum/reagent/phenol = 15, /datum/reagent/hydrogen = 10, /datum/reagent/oxygen = 5) //Meth-in-a-stick
|
||||
/// How many seconds of fuel we have left
|
||||
var/fuel = 0
|
||||
|
||||
|
||||
/obj/item/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
fuel = rand(3200, 4000)
|
||||
set_light_color(color)
|
||||
return ..()
|
||||
|
||||
@@ -462,9 +466,9 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/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()
|
||||
@@ -476,7 +480,7 @@
|
||||
/obj/item/flashlight/glowstick/update_icon()
|
||||
inhand_icon_state = "glowstick"
|
||||
cut_overlays()
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
icon_state = "glowstick-empty"
|
||||
cut_overlays()
|
||||
set_light_on(FALSE)
|
||||
@@ -491,7 +495,7 @@
|
||||
cut_overlays()
|
||||
|
||||
/obj/item/flashlight/glowstick/attack_self(mob/user)
|
||||
if(!fuel)
|
||||
if(fuel <= 0)
|
||||
to_chat(user, "<span class='notice'>[src] is spent.</span>")
|
||||
return
|
||||
if(on)
|
||||
|
||||
@@ -68,11 +68,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
|
||||
custom_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
|
||||
@@ -41,28 +37,24 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/process()
|
||||
update_icon()
|
||||
update_sound()
|
||||
/obj/item/geiger_counter/process(delta_time)
|
||||
if(scanning)
|
||||
radiation_count = LPFILTER(radiation_count, current_tick_amount, delta_time, RAD_GEIGER_RC)
|
||||
|
||||
if(!scanning)
|
||||
current_tick_amount = 0
|
||||
return
|
||||
if(current_tick_amount)
|
||||
grace = RAD_GEIGER_GRACE_PERIOD
|
||||
last_tick_amount = current_tick_amount
|
||||
|
||||
radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING
|
||||
radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING
|
||||
|
||||
if(current_tick_amount)
|
||||
grace = RAD_GRACE_PERIOD
|
||||
last_tick_amount = current_tick_amount
|
||||
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
grace--
|
||||
if(grace <= 0)
|
||||
radiation_count = 0
|
||||
else if(!(obj_flags & EMAGGED))
|
||||
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)
|
||||
|
||||
@@ -187,11 +187,11 @@
|
||||
flick_overlay_view(I, targloc, 10)
|
||||
icon_state = "pointer"
|
||||
|
||||
/obj/item/laser_pointer/process()
|
||||
/obj/item/laser_pointer/process(delta_time)
|
||||
if(!diode)
|
||||
recharging = FALSE
|
||||
return PROCESS_KILL
|
||||
if(prob(20 + diode.rating*20 - recharge_locked*2)) //t1 is 20, 2 40
|
||||
if(DT_PROB(10 + diode.rating*10 - recharge_locked*1, delta_time)) //t1 is 20, 2 40
|
||||
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()
|
||||
|
||||
@@ -232,7 +232,7 @@ effective or pretty fucking useless.
|
||||
if(user && user.get_item_by_slot(ITEM_SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
|
||||
/obj/item/shadowcloak/process()
|
||||
/obj/item/shadowcloak/process(delta_time)
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BELT) != src)
|
||||
Deactivate()
|
||||
return
|
||||
@@ -240,9 +240,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 = 10)
|
||||
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>You suddenly feel very solid!</span>")
|
||||
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
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
icon_state = "sparkler"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
heat = 1000
|
||||
var/burntime = 60
|
||||
/// Burn time in seconds
|
||||
var/burntime = 120
|
||||
var/lit = FALSE
|
||||
|
||||
/obj/item/sparkler/fire_act(exposed_temperature, exposed_volume)
|
||||
@@ -38,9 +39,9 @@
|
||||
playsound(src, 'sound/effects/fuse.ogg', 20, TRUE)
|
||||
update_icon()
|
||||
|
||||
/obj/item/sparkler/process()
|
||||
burntime--
|
||||
if(burntime < 1)
|
||||
/obj/item/sparkler/process(delta_time)
|
||||
burntime -= delta_time
|
||||
if(burntime <= 0)
|
||||
new /obj/item/stack/rods(drop_location())
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -75,14 +75,14 @@
|
||||
user.forceMove(get_turf(src))
|
||||
user.visible_message("<span class='warning'>[user] scrambles out of [src]!</span>", "<span class='notice'>You climb out of [src]!</span>")
|
||||
|
||||
/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)
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
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
|
||||
/// Amount of reagent to refill per second
|
||||
var/refill_rate = 0.5
|
||||
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()
|
||||
@@ -107,10 +108,10 @@
|
||||
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
|
||||
playsound(user, 'sound/machines/click.ogg', 30, TRUE)
|
||||
|
||||
/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)
|
||||
. = ..()
|
||||
|
||||
@@ -582,15 +582,18 @@
|
||||
icon_state = "shield"
|
||||
var/maxenergy = 1500
|
||||
var/energy = 1500
|
||||
var/energy_recharge = 7.5
|
||||
/// Recharging rate in energy per second
|
||||
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.
|
||||
/// Energy cost per tracked projectile damage amount per second
|
||||
var/projectile_damage_tick_ecost_coefficient = 10
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
/// Energy cost per tracked projectile per second
|
||||
var/projectile_tick_speed_ecost = 75
|
||||
var/list/obj/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
@@ -676,38 +679,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/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 class='warning'>[src] blinks \"ENERGY DEPLETED\".</span>")
|
||||
|
||||
/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/projectile/P, track_projectile = TRUE)
|
||||
if(tracked[P])
|
||||
|
||||
@@ -304,7 +304,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/on = FALSE
|
||||
var/powercost = 10
|
||||
var/datum/action/toggle_action
|
||||
@@ -354,8 +357,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/upgrade/selfrepair/process()
|
||||
if(!repair_tick)
|
||||
repair_tick = 1
|
||||
if(world.time < next_repair)
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/cyborg = toggle_action.owner
|
||||
@@ -384,7 +386,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(!TIMER_COOLDOWN_CHECK(src, COOLDOWN_BORG_SELF_REPAIR))
|
||||
TIMER_COOLDOWN_START(src, COOLDOWN_BORG_SELF_REPAIR, 200 SECONDS)
|
||||
|
||||
@@ -560,17 +560,17 @@
|
||||
RegisterSignal(src, COMSIG_TRY_STORAGE_TAKE, .proc/unfreeze)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/storage/organbox/process()
|
||||
/obj/item/storage/organbox/process(delta_time)
|
||||
///if there is enough coolant var
|
||||
var/cool = FALSE
|
||||
var/amount = reagents.get_reagent_amount(/datum/reagent/cryostylane)
|
||||
if(amount >= 0.1)
|
||||
reagents.remove_reagent(/datum/reagent/cryostylane, 0.1)
|
||||
var/amount = min(reagents.get_reagent_amount(/datum/reagent/cryostylane), 0.05 * delta_time)
|
||||
if(amount > 0)
|
||||
reagents.remove_reagent(/datum/reagent/cryostylane, amount)
|
||||
cool = TRUE
|
||||
else
|
||||
amount = reagents.get_reagent_amount(/datum/reagent/consumable/ice)
|
||||
if(amount >= 0.3)
|
||||
reagents.remove_reagent(/datum/reagent/consumable/ice, 0.2)
|
||||
amount = min(reagents.get_reagent_amount(/datum/reagent/consumable/ice), 0.1 * delta_time)
|
||||
if(amount > 0)
|
||||
reagents.remove_reagent(/datum/reagent/consumable/ice, amount)
|
||||
cool = TRUE
|
||||
if(!cooling && cool)
|
||||
cooling = TRUE
|
||||
|
||||
@@ -348,7 +348,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
|
||||
@@ -406,7 +407,7 @@
|
||||
if(ismob(loc))
|
||||
to_chat(loc, "<span class='notice'>[src] turns off.</span>")
|
||||
|
||||
/obj/item/reagent_containers/chemtank/process()
|
||||
/obj/item/reagent_containers/chemtank/process(delta_time)
|
||||
if(!ishuman(loc))
|
||||
turn_off()
|
||||
return
|
||||
@@ -418,8 +419,9 @@
|
||||
turn_off()
|
||||
return
|
||||
|
||||
var/used_amount = injection_amount/usage_ratio
|
||||
reagents.trans_to(user,used_amount,multiplier=usage_ratio, methods = INJECT)
|
||||
var/inj_am = injection_amount * delta_time
|
||||
var/used_amount = inj_am / usage_ratio
|
||||
reagents.trans_to(user, used_amount, multiplier=usage_ratio, methods = INJECT)
|
||||
update_icon()
|
||||
user.update_inv_back() //for overlays update
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#define WELDER_FUEL_BURN_INTERVAL 13
|
||||
/// How many seconds between each fuel depletion tick ("use" proc)
|
||||
#define WELDER_FUEL_BURN_INTERVAL 26
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
@@ -70,7 +71,7 @@
|
||||
. += "[initial(icon_state)]-on"
|
||||
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
/obj/item/weldingtool/process(delta_time)
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
@@ -83,7 +84,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()
|
||||
@@ -188,8 +189,9 @@
|
||||
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)
|
||||
check_fuel()
|
||||
|
||||
@@ -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,FALSE, FALSE, TRUE)
|
||||
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)
|
||||
@@ -25,10 +25,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)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
add_fingerprint(M)
|
||||
if(on)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
process()
|
||||
process(SSMACHINES_DT)
|
||||
soundloop.start()
|
||||
else
|
||||
soundloop.stop()
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
if(!reclaiming)
|
||||
reclaiming = TRUE
|
||||
START_PROCESSING(SSfluids, src)
|
||||
process()
|
||||
process(SSFLUIDS_DT)
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
name = "kitchen sink"
|
||||
|
||||
@@ -53,8 +53,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)
|
||||
@@ -116,7 +116,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())
|
||||
@@ -139,7 +139,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
|
||||
@@ -172,9 +172,9 @@
|
||||
ADD_TRAIT(L, TRAIT_PERMANENTLY_ONFIRE,TURF_TRAIT)
|
||||
L.update_fire()
|
||||
|
||||
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
|
||||
|
||||
@@ -22,7 +22,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.
|
||||
|
||||
|
||||
///Proc called to change the value of the `relay_enabled` variable and append behavior related to its change.
|
||||
@@ -64,7 +64,7 @@
|
||||
else
|
||||
icon_state = "bus_off"
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
/obj/machinery/ntnet_relay/process(delta_time)
|
||||
if(is_operational)
|
||||
use_power = ACTIVE_POWER_USE
|
||||
else
|
||||
@@ -72,8 +72,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,8 @@
|
||||
)
|
||||
var/mode = VEST_STEALTH
|
||||
var/stealth_active = FALSE
|
||||
var/combat_cooldown = 10
|
||||
/// Cooldown in seconds
|
||||
var/combat_cooldown = 20
|
||||
var/datum/icon_snapshot/disguise
|
||||
var/stealth_armor = list(MELEE = 15, BULLET = 15, LASER = 15, ENERGY = 25, 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)
|
||||
@@ -110,7 +111,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 class='warning'>Combat injection is still recharging.</span>")
|
||||
return
|
||||
var/mob/living/carbon/human/M = loc
|
||||
@@ -123,9 +124,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()
|
||||
@@ -830,6 +831,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/cordiolis_hepatico)
|
||||
|
||||
@@ -839,13 +842,13 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
START_PROCESSING(SSobj, src)
|
||||
to_chat(AM, "<span class='danger'>You feel a series of tiny pricks!</span>")
|
||||
|
||||
/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)
|
||||
|
||||
@@ -52,7 +52,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)
|
||||
@@ -62,7 +62,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)
|
||||
..()
|
||||
|
||||
|
||||
@@ -493,10 +493,10 @@
|
||||
/obj/item/clothing/suit/space/changeling/toggle_spacesuit_cell(mob/user)
|
||||
return
|
||||
|
||||
/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))
|
||||
H.adjust_bodytemperature(temperature_setting - H.bodytemperature) // force changelings to normal temp step mode played badly
|
||||
|
||||
/obj/item/clothing/head/helmet/space/changeling
|
||||
|
||||
@@ -214,9 +214,9 @@
|
||||
name = "spendtime"
|
||||
var/timer = 5 MINUTES
|
||||
|
||||
/datum/objective/stalk/process()
|
||||
/datum/objective/stalk/process(delta_time)
|
||||
if(owner?.current.stat != DEAD && target?.current.stat != DEAD && (target in view(5,owner.current)))
|
||||
timer -= 1 SECONDS
|
||||
timer -= delta_time * 10 // timer is in deciseconds
|
||||
///we don't want to process after the counter reaches 0, otherwise it is wasted processing
|
||||
if(timer <= 0)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
@@ -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/livies in T.contents - current_user)
|
||||
livies.adjustFireLoss(5)
|
||||
livies.adjustFireLoss(25 * delta_time)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/worm_contract
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
var/list/turfs = list()
|
||||
var/turf/centre
|
||||
var/static/list/blacklisted_turfs = typecacheof(list(/turf/open/indestructible,/turf/closed/indestructible,/turf/open/space,/turf/open/lava,/turf/open/chasm))
|
||||
var/spread_per_tick = 6
|
||||
var/spread_per_sec = 6
|
||||
|
||||
|
||||
/datum/rust_spread/New(loc)
|
||||
@@ -175,13 +175,14 @@
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
return ..()
|
||||
|
||||
/datum/rust_spread/process()
|
||||
/datum/rust_spread/process(delta_time)
|
||||
var/spread_am = round(spread_per_sec * delta_time)
|
||||
|
||||
if(edge_turfs.len < spread_per_tick)
|
||||
if(edge_turfs.len < spread_am)
|
||||
compile_turfs()
|
||||
|
||||
var/turf/T
|
||||
for(var/i in 0 to spread_per_tick)
|
||||
for(var/i in 0 to spread_am)
|
||||
if(!edge_turfs.len)
|
||||
continue
|
||||
T = pick(edge_turfs)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
var/scanning = FALSE
|
||||
var/timing = FALSE
|
||||
var/time = 10
|
||||
var/time = 20
|
||||
var/sensitivity = 1
|
||||
var/hearing_range = 3
|
||||
|
||||
@@ -73,10 +73,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)
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
|
||||
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 class='suicide'>[user] looks at the timer and decides [user.p_their()] fate! It looks like [user.p_theyre()] going to commit suicide!</span>")
|
||||
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 @@
|
||||
timing = TRUE
|
||||
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()
|
||||
|
||||
@@ -49,7 +49,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
|
||||
@@ -69,14 +69,14 @@
|
||||
return
|
||||
|
||||
|
||||
var/transfer_ratio = transfer_rate/air1.volume
|
||||
var/transfer_ratio = (transfer_rate * delta_time) / air1.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()
|
||||
|
||||
|
||||
@@ -59,7 +59,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 @@
|
||||
//No need to transfer if target is already full!
|
||||
return
|
||||
|
||||
var/transfer_ratio = transfer_rate/air1.volume
|
||||
var/transfer_ratio = (transfer_rate * delta_time) / air1.volume
|
||||
|
||||
//Actually transfer the gas
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
begin_processing()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process()
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process(delta_time)
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
@@ -239,19 +239,20 @@
|
||||
|
||||
if(air1.gases.len)
|
||||
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 * 25, methods = VAPOR) // Transfer reagents.
|
||||
air1.gases[/datum/gas/oxygen][MOLES] -= max(0,air1.gases[/datum/gas/oxygen][MOLES] - 2 / efficiency) //Let's use gas for this
|
||||
beaker.reagents.trans_to(occupant, 1, efficiency * 12.5 * delta_time, methods = VAPOR) // Transfer reagents.
|
||||
air1.gases[/datum/gas/oxygen][MOLES] -= max(0, air1.gases[/datum/gas/oxygen][MOLES] - delta_time / efficiency) //Let's use gas for this
|
||||
air1.garbage_collect()
|
||||
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
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos()
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos(delta_time)
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
@@ -278,8 +279,8 @@
|
||||
|
||||
var/heat = ((1 - cold_protection) * 0.1 + conduction_coefficient) * temperature_delta * (air_heat_capacity * heat_capacity / (air_heat_capacity + heat_capacity))
|
||||
|
||||
air1.temperature = clamp(air1.temperature - heat / air_heat_capacity, TCMB, MAX_TEMPERATURE)
|
||||
mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB)
|
||||
air1.temperature = clamp(air1.temperature - heat * delta_time / air_heat_capacity, TCMB, MAX_TEMPERATURE)
|
||||
mob_occupant.adjust_bodytemperature(heat * delta_time / heat_capacity, TCMB)
|
||||
|
||||
air1.gases[/datum/gas/oxygen][MOLES] = max(0,air1.gases[/datum/gas/oxygen][MOLES] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic.
|
||||
air1.garbage_collect()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
var/injecting = 0
|
||||
|
||||
var/volume_rate = 50
|
||||
var/volume_rate = 100
|
||||
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
@@ -52,7 +52,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
|
||||
@@ -63,7 +63,7 @@
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = air_contents.return_pressure() * volume_rate * delta_time / (air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
injecting = 1
|
||||
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = air_contents.return_pressure() * volume_rate / (air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
loc.assume_air(removed)
|
||||
update_parents()
|
||||
@@ -207,7 +207,7 @@
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos
|
||||
frequency = FREQ_ATMOS_STORAGE
|
||||
on = TRUE
|
||||
volume_rate = 200
|
||||
volume_rate = 400
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/atmos_waste
|
||||
name = "atmos waste outlet injector"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -138,32 +138,32 @@
|
||||
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(turf/tile)
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(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]
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
|
||||
if(air_contents.return_pressure() >= 50 * ONE_ATMOSPHERE)
|
||||
return FALSE
|
||||
|
||||
if(scrubbing & SCRUBBING)
|
||||
if(length(env_gases & filter_types))
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
|
||||
var/transfer_moles = min(1, volume_rate * delta_time / environment.volume)*environment.total_moles()
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
else //Just siphoning all air
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
var/transfer_moles = environment.total_moles() * (volume_rate * delta_time / environment.volume)
|
||||
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
resistance_flags = INDESTRUCTIBLE|ACID_PROOF|FIRE_PROOF
|
||||
var/spawn_id = null
|
||||
var/spawn_temp = T20C
|
||||
var/spawn_mol = MOLES_CELLSTANDARD * 10
|
||||
/// Moles of gas to spawn per second
|
||||
var/spawn_mol = MOLES_CELLSTANDARD * 5
|
||||
var/max_ext_mol = INFINITY
|
||||
var/max_ext_kpa = 6500
|
||||
var/overlay_color = "#FFFFFF"
|
||||
@@ -117,22 +118,22 @@
|
||||
on_overlay.color = overlay_color
|
||||
. += 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.assert_gas(spawn_id)
|
||||
merger.gases[spawn_id][MOLES] = (spawn_mol)
|
||||
merger.gases[spawn_id][MOLES] = spawn_mol * delta_time
|
||||
merger.temperature = spawn_temp
|
||||
O.assume_air(merger)
|
||||
O.air_update_turf(TRUE)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
L.bodytemperature = avg_temp
|
||||
pipe_air.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
|
||||
|
||||
@@ -78,4 +78,4 @@
|
||||
if(pipe_air.temperature > heat_limit + 1)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BODY_ZONE_CHEST)
|
||||
buckled_mob.apply_damage(delta_time * 2 * log(pipe_air.temperature - heat_limit), BURN, BODY_ZONE_CHEST)
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
else if(valve_open && holding)
|
||||
investigate_log("[key_name(user)] started a transfer into [holding].", INVESTIGATE_ATMOS)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos(delta_time)
|
||||
..()
|
||||
if(machine_stat & BROKEN)
|
||||
return PROCESS_KILL
|
||||
@@ -412,7 +412,7 @@
|
||||
|
||||
///function used to check the limit of the canisters and also set the amount of damage that the canister can receive, if the heat and pressure are way higher than the limit the more damage will be done
|
||||
if(our_temperature > heat_limit || our_pressure > pressure_limit)
|
||||
take_damage(clamp((our_temperature/heat_limit) * (our_pressure/pressure_limit), 5, 50), BURN, 0)
|
||||
take_damage(clamp((our_temperature/heat_limit) * (our_pressure/pressure_limit) * delta_time * 2, 5, 50), BURN, 0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/ui_state(mob/user)
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
if(connected_port)
|
||||
. += "siphon-connector"
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/pump/process_atmos(delta_time)
|
||||
..()
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/temperature = air_contents.return_temperature()
|
||||
///function used to check the limit of the pumps and also set the amount of damage that the pump can receive, if the heat and pressure are way higher than the limit the more damage will be done
|
||||
if(temperature > heat_limit || pressure > pressure_limit)
|
||||
take_damage(clamp((temperature/heat_limit) * (pressure/pressure_limit), 5, 50), BURN, 0)
|
||||
take_damage(clamp((temperature/heat_limit) * (pressure/pressure_limit) * delta_time * 0.5, 5, 50), BURN, 0)
|
||||
return
|
||||
|
||||
if(!on)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
///Max amount of pressure allowed inside of the canister before it starts to break (different tiers have different limits)
|
||||
var/pressure_limit = 50000
|
||||
var/on = FALSE
|
||||
var/volume_rate = 1000
|
||||
var/volume_rate = 500
|
||||
var/overpressure_m = 80
|
||||
var/use_overlays = TRUE
|
||||
var/list/scrubbing = list(
|
||||
@@ -44,7 +44,7 @@
|
||||
if(connected_port)
|
||||
. += "scrubber-connector"
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/process_atmos()
|
||||
/obj/machinery/portable_atmospherics/scrubber/process_atmos(delta_time)
|
||||
..()
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
@@ -58,16 +58,16 @@
|
||||
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(datum/gas_mixture/mixture)
|
||||
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(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.volume) * mixture.total_moles()
|
||||
var/transfer_moles = min(1, volume_rate * delta_time / mixture.volume) * mixture.total_moles()
|
||||
|
||||
var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter.
|
||||
var/datum/gas_mixture/filtered = new
|
||||
@@ -170,7 +170,7 @@
|
||||
/obj/machinery/portable_atmospherics/scrubber/huge/update_icon_state()
|
||||
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()
|
||||
@@ -182,7 +182,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"
|
||||
|
||||
@@ -175,7 +175,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
|
||||
@@ -187,9 +187,8 @@
|
||||
else
|
||||
// The changes that you've been hit with no shield but not
|
||||
// instantly critted are low, but have some healing.
|
||||
living_participant.adjustBruteLoss(-5)
|
||||
living_participant.adjustFireLoss(-5)
|
||||
|
||||
living_participant.adjustBruteLoss(-2.5 * delta_time)
|
||||
living_participant.adjustFireLoss(-2.5 * delta_time)
|
||||
|
||||
/obj/machinery/capture_the_flag/red
|
||||
name = "Red CTF Controller"
|
||||
@@ -672,11 +671,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()
|
||||
|
||||
|
||||
@@ -69,9 +69,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()
|
||||
|
||||
|
||||
|
||||
@@ -147,9 +147,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()
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
var/recharge_time = 0
|
||||
/// Current recharge progress.
|
||||
var/recharge_cooldown = 0
|
||||
/// Base recharge time which is used to get recharge_time.
|
||||
var/base_recharge_time = 100
|
||||
/// Base recharge time in seconds which is used to get recharge_time.
|
||||
var/base_recharge_time = 200
|
||||
/// Current /datum/blackmarket_purchase being received.
|
||||
var/receiving
|
||||
/// Current /datum/blackmarket_purchase being sent to the target uplink.
|
||||
@@ -68,12 +68,12 @@
|
||||
return
|
||||
queue += purchase
|
||||
|
||||
/obj/machinery/ltsrbt/process()
|
||||
/obj/machinery/ltsrbt/process(delta_time)
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(recharge_cooldown)
|
||||
recharge_cooldown--
|
||||
if(recharge_cooldown > 0)
|
||||
recharge_cooldown -= delta_time
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
actions_types = list(/datum/action/item_action/toggle_helmet_light)
|
||||
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
|
||||
visor_flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH | PEPPERPROOF
|
||||
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()
|
||||
@@ -72,23 +72,25 @@
|
||||
if(msg && ishuman(wearer))
|
||||
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></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)
|
||||
. = ..()
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
KZ.set_production(11 - (spread_cap / initial(spread_cap)) * 5) //Reverts spread_cap formula so resulting seed gets original production stat or equivalent back.
|
||||
qdel(src)
|
||||
|
||||
/datum/spacevine_controller/process()
|
||||
/datum/spacevine_controller/process(delta_time)
|
||||
if(!LAZYLEN(vines))
|
||||
qdel(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
@@ -496,9 +496,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()
|
||||
|
||||
@@ -511,7 +509,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()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user