mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
[MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* 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 * Process procs now properly utilize deltatime when implementing rates, timers and probabilities Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -1129,8 +1129,8 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/hallucination/danger/anomaly/process()
|
||||
if(prob(70))
|
||||
/obj/effect/hallucination/danger/anomaly/process(delta_time)
|
||||
if(DT_PROB(45, delta_time))
|
||||
step(src,pick(GLOB.alldirs))
|
||||
|
||||
/obj/effect/hallucination/danger/anomaly/Destroy()
|
||||
|
||||
@@ -474,8 +474,8 @@
|
||||
/obj/item/reagent_containers/food/snacks/chewable
|
||||
slot_flags = ITEM_SLOT_MASK
|
||||
value = FOOD_WORTHLESS
|
||||
///How long it lasts before being deleted
|
||||
var/succ_dur = 180
|
||||
///How long it lasts before being deleted in seconds
|
||||
var/succ_dur = 360
|
||||
///The delay between each time it will handle reagents
|
||||
var/succ_int = 100
|
||||
///Stores the time set for the next handle_reagents
|
||||
@@ -492,12 +492,12 @@
|
||||
return
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/chewable/process()
|
||||
/obj/item/reagent_containers/food/snacks/chewable/process(delta_time)
|
||||
if(iscarbon(loc))
|
||||
if(succ_dur < 1)
|
||||
if(succ_dur <= 0)
|
||||
qdel(src)
|
||||
return
|
||||
succ_dur--
|
||||
succ_dur -= delta_time
|
||||
if((reagents && reagents.total_volume) && (next_succ <= world.time))
|
||||
handle_reagents()
|
||||
next_succ = world.time + succ_int
|
||||
@@ -564,7 +564,7 @@
|
||||
color = "#E48AB5" // craftable custom gums someday?
|
||||
list_reagents = list(/datum/reagent/consumable/sugar = 5)
|
||||
tastes = list("candy" = 1)
|
||||
succ_dur = 450 //15 minutes
|
||||
succ_dur = 15 * 60
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/chewable/bubblegum/nicotine
|
||||
name = "nicotine gum"
|
||||
@@ -585,7 +585,7 @@
|
||||
color = "#913D3D"
|
||||
list_reagents = list(/datum/reagent/blood = 15)
|
||||
tastes = list("hell" = 1)
|
||||
succ_dur = 180
|
||||
succ_dur = 6 * 60
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/chewable/bubblegum/bubblegum/process()
|
||||
. = ..()
|
||||
|
||||
@@ -20,6 +20,9 @@ God bless America.
|
||||
-
|
||||
*/
|
||||
|
||||
#define DEEPFRYER_COOKTIME 60
|
||||
#define DEEPFRYER_BURNTIME 120
|
||||
|
||||
/obj/machinery/deepfryer
|
||||
name = "deep fryer"
|
||||
desc = "Deep fried <i>everything</i>."
|
||||
@@ -31,7 +34,7 @@ God bless America.
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/obj/item/food/deepfryholder/frying //What's being fried RIGHT NOW?
|
||||
var/cook_time = 0
|
||||
var/oil_use = 0.05 //How much cooking oil is used per tick
|
||||
var/oil_use = 0.025 //How much cooking oil is used per second
|
||||
var/fry_speed = 1 //How quickly we fry food
|
||||
var/frying_fried //If the object has been fried; used for messages
|
||||
var/frying_burnt //If the object has been burnt
|
||||
@@ -64,7 +67,7 @@ God bless America.
|
||||
var/oil_efficiency
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
oil_efficiency += M.rating
|
||||
oil_use = initial(oil_use) - (oil_efficiency * 0.0095)
|
||||
oil_use = initial(oil_use) - (oil_efficiency * 0.00475)
|
||||
fry_speed = oil_efficiency
|
||||
|
||||
/obj/machinery/deepfryer/examine(mob/user)
|
||||
@@ -72,7 +75,7 @@ God bless America.
|
||||
if(frying)
|
||||
. += "You can make out \a [frying] in the oil."
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use*10]</b> units of oil per second.</span>"
|
||||
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use]</b> units of oil per second.</span>"
|
||||
|
||||
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/reagent_containers/pill))
|
||||
@@ -105,20 +108,20 @@ God bless America.
|
||||
icon_state = "fryer_on"
|
||||
fry_loop.start()
|
||||
|
||||
/obj/machinery/deepfryer/process()
|
||||
/obj/machinery/deepfryer/process(delta_time)
|
||||
..()
|
||||
var/datum/reagent/consumable/cooking_oil/C = reagents.has_reagent(/datum/reagent/consumable/cooking_oil)
|
||||
if(!C)
|
||||
return
|
||||
reagents.chem_temp = C.fry_temperature
|
||||
if(frying)
|
||||
reagents.trans_to(frying, oil_use, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
|
||||
cook_time += fry_speed
|
||||
if(cook_time >= 30 && !frying_fried)
|
||||
reagents.trans_to(frying, oil_use * delta_time, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
|
||||
cook_time += fry_speed * delta_time
|
||||
if(cook_time >= DEEPFRYER_COOKTIME && !frying_fried)
|
||||
frying_fried = TRUE //frying... frying... fried
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, TRUE)
|
||||
audible_message("<span class='notice'>[src] dings!</span>")
|
||||
else if (cook_time >= 60 && !frying_burnt)
|
||||
else if (cook_time >= DEEPFRYER_BURNTIME && !frying_burnt)
|
||||
frying_burnt = TRUE
|
||||
visible_message("<span class='warning'>[src] emits an acrid smell!</span>")
|
||||
|
||||
@@ -154,3 +157,6 @@ God bless America.
|
||||
C.Paralyze(60)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return ..()
|
||||
|
||||
#undef DEEPFRYER_COOKTIME
|
||||
#undef DEEPFRYER_BURNTIME
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
//I JUST WANNA GRILL FOR GOD'S SAKE
|
||||
|
||||
#define GRILL_FUELUSAGE_IDLE 0.5
|
||||
#define GRILL_FUELUSAGE_ACTIVE 5
|
||||
|
||||
/obj/machinery/grill
|
||||
name = "grill"
|
||||
desc = "Just like the old days."
|
||||
@@ -20,7 +23,7 @@
|
||||
/obj/machinery/grill/update_icon_state()
|
||||
if(grilled_item)
|
||||
icon_state = "grill"
|
||||
else if(grill_fuel)
|
||||
else if(grill_fuel > 0)
|
||||
icon_state = "grill_on"
|
||||
else
|
||||
icon_state = "grill_open"
|
||||
@@ -48,7 +51,7 @@
|
||||
else if(food_item.foodtype & GRILLED)
|
||||
to_chat(user, "<span class='notice'>[food_item] has already been grilled!</span>")
|
||||
return
|
||||
else if(!grill_fuel)
|
||||
else if(grill_fuel <= 0)
|
||||
to_chat(user, "<span class='warning'>There is not enough fuel!</span>")
|
||||
return
|
||||
else if(!grilled_item && user.transferItemToLoc(food_item, src))
|
||||
@@ -67,21 +70,21 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/machinery/grill/process()
|
||||
/obj/machinery/grill/process(delta_time)
|
||||
..()
|
||||
update_icon()
|
||||
if(!grill_fuel)
|
||||
if(grill_fuel <= 0)
|
||||
return
|
||||
else
|
||||
grill_fuel -= 1
|
||||
if(prob(1))
|
||||
grill_fuel -= GRILL_FUELUSAGE_IDLE * delta_time
|
||||
if(DT_PROB(0.5, delta_time))
|
||||
var/datum/effect_system/smoke_spread/bad/smoke = new
|
||||
smoke.set_up(1, loc)
|
||||
smoke.start()
|
||||
if(grilled_item)
|
||||
grill_time += 1
|
||||
grilled_item.reagents.add_reagent(/datum/reagent/consumable/char, 1)
|
||||
grill_fuel -= 10
|
||||
grill_time += delta_time
|
||||
grilled_item.reagents.add_reagent(/datum/reagent/consumable/char, 0.5 * delta_time)
|
||||
grill_fuel -= GRILL_FUELUSAGE_ACTIVE * delta_time
|
||||
grilled_item.AddComponent(/datum/component/sizzle)
|
||||
|
||||
/obj/machinery/grill/Exited(atom/movable/AM)
|
||||
@@ -123,19 +126,19 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/grill/proc/finish_grill()
|
||||
switch(grill_time) //no 0-9 to prevent spam
|
||||
if(10 to 15)
|
||||
switch(grill_time) //no 0-20 to prevent spam
|
||||
if(20 to 30)
|
||||
grilled_item.name = "lightly-grilled [grilled_item.name]"
|
||||
grilled_item.desc = "[grilled_item.desc] It's been lightly grilled."
|
||||
if(16 to 39)
|
||||
if(30 to 80)
|
||||
grilled_item.name = "grilled [grilled_item.name]"
|
||||
grilled_item.desc = "[grilled_item.desc] It's been grilled."
|
||||
grilled_item.foodtype |= FRIED
|
||||
if(40 to 50)
|
||||
if(80 to 100)
|
||||
grilled_item.name = "heavily grilled [grilled_item.name]"
|
||||
grilled_item.desc = "[grilled_item.desc] It's been heavily grilled."
|
||||
grilled_item.foodtype |= FRIED
|
||||
if(51 to INFINITY) //grill marks reach max alpha
|
||||
if(100 to INFINITY) //grill marks reach max alpha
|
||||
grilled_item.name = "Powerfully Grilled [grilled_item.name]"
|
||||
grilled_item.desc = "A [grilled_item.name]. Reminds you of your wife, wait, no, it's prettier!"
|
||||
grilled_item.foodtype |= FRIED
|
||||
@@ -144,3 +147,6 @@
|
||||
|
||||
/obj/machinery/grill/unwrenched
|
||||
anchored = FALSE
|
||||
|
||||
#undef GRILL_FUELUSAGE_IDLE
|
||||
#undef GRILL_FUELUSAGE_ACTIVE
|
||||
|
||||
@@ -422,14 +422,14 @@
|
||||
/obj/machinery/smartfridge/organ/RefreshParts()
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
max_n_of_items = 20 * B.rating
|
||||
repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1))
|
||||
repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1) * 0.5)
|
||||
|
||||
/obj/machinery/smartfridge/organ/process()
|
||||
/obj/machinery/smartfridge/organ/process(delta_time)
|
||||
for(var/organ in contents)
|
||||
var/obj/item/organ/O = organ
|
||||
if(!istype(O))
|
||||
return
|
||||
O.applyOrganDamage(-repair_rate)
|
||||
O.applyOrganDamage(-repair_rate * delta_time)
|
||||
|
||||
/obj/machinery/smartfridge/organ/Exited(atom/movable/AM, atom/newLoc)
|
||||
. = ..()
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
var/obj/item/bombcore/miniature/pizza/bomb
|
||||
var/bomb_active = FALSE // If the bomb is counting down.
|
||||
var/bomb_defused = TRUE // If the bomb is inert.
|
||||
var/bomb_timer = 1 // How long before blowing the bomb.
|
||||
/// Min bomb timer allowed
|
||||
var/bomb_timer = 1 // How long before blowing the bomb, in seconds.
|
||||
/// Min bomb timer allowed in seconds
|
||||
var/bomb_timer_min = 1
|
||||
/// Max bomb timer allower
|
||||
var/bomb_timer_max = 10
|
||||
/// Max bomb timer allower in seconds
|
||||
var/bomb_timer_max = 20
|
||||
|
||||
/obj/item/pizzabox/Initialize()
|
||||
. = ..()
|
||||
@@ -131,10 +131,10 @@
|
||||
if (isnull(bomb_timer))
|
||||
return
|
||||
|
||||
bomb_timer = clamp(CEILING(bomb_timer / 2, 1), bomb_timer_min, bomb_timer_max)
|
||||
bomb_timer = clamp(CEILING(bomb_timer, 1), bomb_timer_min, bomb_timer_max)
|
||||
bomb_defused = FALSE
|
||||
|
||||
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer * 2] seconds")
|
||||
log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer] seconds")
|
||||
bomb.adminlog = "The [bomb.name] in [src.name] that [key_name(user)] activated has detonated!"
|
||||
|
||||
to_chat(user, "<span class='warning'>You trap [src] with [bomb].</span>")
|
||||
@@ -213,10 +213,10 @@
|
||||
to_chat(user, "<span class='warning'>That's not a pizza!</span>")
|
||||
..()
|
||||
|
||||
/obj/item/pizzabox/process()
|
||||
/obj/item/pizzabox/process(delta_time)
|
||||
if(bomb_active && !bomb_defused && (bomb_timer > 0))
|
||||
playsound(loc, 'sound/items/timer.ogg', 50, FALSE)
|
||||
bomb_timer--
|
||||
bomb_timer -= delta_time
|
||||
if(bomb_active && !bomb_defused && (bomb_timer <= 0))
|
||||
if(bomb in src)
|
||||
bomb.detonate()
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
obj_flags ^= EMAGGED
|
||||
say("Safeties restored. Restarting...")
|
||||
|
||||
/obj/machinery/computer/holodeck/process()
|
||||
if(damaged && prob(10))
|
||||
/obj/machinery/computer/holodeck/process(delta_time)
|
||||
if(damaged && DT_PROB(5, delta_time))
|
||||
for(var/turf/T in linked)
|
||||
if(prob(5))
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
do_sparks(2, 1, T)
|
||||
return
|
||||
|
||||
|
||||
@@ -89,13 +89,13 @@
|
||||
held_mob = loc
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process()
|
||||
/obj/item/reagent_containers/food/snacks/grown/ghost_chili/process(delta_time)
|
||||
if(held_mob && loc == held_mob)
|
||||
if(held_mob.is_holding(src))
|
||||
if(istype(held_mob) && held_mob.gloves)
|
||||
return
|
||||
held_mob.adjust_bodytemperature(15 * TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
if(prob(10))
|
||||
held_mob.adjust_bodytemperature(7.5 * TEMPERATURE_DAMAGE_COEFFICIENT * delta_time)
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(held_mob, "<span class='warning'>Your hand holding [src] burns!</span>")
|
||||
else
|
||||
held_mob = null
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/seeds/starthistle/corpse_flower/process()
|
||||
/obj/item/seeds/starthistle/corpse_flower/process(delta_time)
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
if(parent.age < maturation) // Start a little before it blooms
|
||||
return
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
var/datum/gas_mixture/stank = new
|
||||
ADD_GAS(/datum/gas/miasma, stank.gases)
|
||||
stank.gases[/datum/gas/miasma][MOLES] = (yield + 6)*7*MIASMA_CORPSE_MOLES // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.gases[/datum/gas/miasma][MOLES] = (yield + 6)*3.5*MIASMA_CORPSE_MOLES*delta_time // this process is only being called about 2/7 as much as corpses so this is 12-32 times a corpses
|
||||
stank.temperature = T20C // without this the room would eventually freeze and miasma mining would be easier
|
||||
T.assume_air(stank)
|
||||
T.air_update_turf()
|
||||
|
||||
@@ -254,41 +254,41 @@
|
||||
if(burning & !grill)
|
||||
Burn()
|
||||
|
||||
/obj/structure/bonfire/proc/Burn()
|
||||
/obj/structure/bonfire/proc/Burn(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000,500,1)
|
||||
current_location.hotspot_expose(1000, 250 * delta_time, 1)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(1000, 500)
|
||||
O.fire_act(1000, 250 * delta_time)
|
||||
else if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
|
||||
/obj/structure/bonfire/proc/Cook()
|
||||
/obj/structure/bonfire/proc/Cook(delta_time = 2)
|
||||
var/turf/current_location = get_turf(src)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
else if(isliving(A)) //It's still a fire, idiot.
|
||||
var/mob/living/L = A
|
||||
L.adjust_fire_stacks(fire_stack_strength)
|
||||
L.adjust_fire_stacks(fire_stack_strength * 0.5 * delta_time)
|
||||
L.IgniteMob()
|
||||
else if(istype(A, /obj/item) && prob(20))
|
||||
else if(istype(A, /obj/item) && DT_PROB(10, delta_time))
|
||||
var/obj/item/O = A
|
||||
O.microwave_act()
|
||||
|
||||
/obj/structure/bonfire/process()
|
||||
/obj/structure/bonfire/process(delta_time)
|
||||
if(!CheckOxygen())
|
||||
extinguish()
|
||||
return
|
||||
if(!grill)
|
||||
Burn()
|
||||
Burn(delta_time)
|
||||
else
|
||||
Cook()
|
||||
Cook(delta_time)
|
||||
|
||||
/obj/structure/bonfire/extinguish()
|
||||
if(burning)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/process()
|
||||
/obj/machinery/hydroponics/process(delta_time)
|
||||
var/needs_update = 0 // Checks if the icon needs updating so we don't redraw empty trays every time
|
||||
|
||||
if(myseed && (myseed.loc != src))
|
||||
@@ -136,9 +136,9 @@
|
||||
update_icon()
|
||||
|
||||
else if(self_sustaining)
|
||||
adjustWater(rand(1,2))
|
||||
adjustWeeds(-1)
|
||||
adjustPests(-1)
|
||||
adjustWater(rand(1,2) * delta_time * 0.5)
|
||||
adjustWeeds(-0.5 * delta_time)
|
||||
adjustPests(-0.5 * delta_time)
|
||||
|
||||
if(world.time > (lastcycle + cycledelay))
|
||||
lastcycle = world.time
|
||||
|
||||
@@ -69,11 +69,11 @@
|
||||
armor = list(MELEE = 70, BULLET = 40, LASER = 10, ENERGY = 20, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator, /obj/item/pickaxe)
|
||||
|
||||
/obj/item/clothing/suit/space/hostile_environment/process()
|
||||
/obj/item/clothing/suit/space/hostile_environment/process(delta_time)
|
||||
. = ..()
|
||||
var/mob/living/carbon/C = loc
|
||||
if(istype(C) && prob(2)) //cursed by bubblegum
|
||||
if(prob(15))
|
||||
if(istype(C) && DT_PROB(1, delta_time)) //cursed by bubblegum
|
||||
if(DT_PROB(7.5, delta_time))
|
||||
new /datum/hallucination/oh_yeah(C)
|
||||
to_chat(C, "<span class='colossus'><b>[pick("I AM IMMORTAL.","I SHALL TAKE BACK WHAT'S MINE.","I SEE YOU.","YOU CANNOT ESCAPE ME FOREVER.","DEATH CANNOT HOLD ME.")]</b></span>")
|
||||
else
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#define SMELT_AMOUNT 10
|
||||
/// Smelt amount per second
|
||||
#define SMELT_AMOUNT 5
|
||||
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
@@ -194,13 +195,13 @@
|
||||
if(istype(target, /obj/item/stack/ore))
|
||||
process_ore(target)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
/obj/machinery/mineral/processing_unit/process(delta_time)
|
||||
if(on)
|
||||
if(selected_material)
|
||||
smelt_ore()
|
||||
smelt_ore(delta_time)
|
||||
|
||||
else if(selected_alloy)
|
||||
smelt_alloy()
|
||||
smelt_alloy(delta_time)
|
||||
|
||||
|
||||
if(CONSOLE)
|
||||
@@ -208,11 +209,11 @@
|
||||
else
|
||||
end_processing()
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore(delta_time = 2)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/datum/material/mat = selected_material
|
||||
if(mat)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT * delta_time) ) ? SMELT_AMOUNT * delta_time : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
if(!sheets_to_remove)
|
||||
on = FALSE
|
||||
else
|
||||
@@ -220,13 +221,13 @@
|
||||
materials.retrieve_sheets(sheets_to_remove, mat, out)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy()
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy(delta_time = 2)
|
||||
var/datum/design/alloy = stored_research.isDesignResearchedID(selected_alloy) //check if it's a valid design
|
||||
if(!alloy)
|
||||
on = FALSE
|
||||
return
|
||||
|
||||
var/amount = can_smelt(alloy)
|
||||
var/amount = can_smelt(alloy, delta_time)
|
||||
|
||||
if(!amount)
|
||||
on = FALSE
|
||||
@@ -237,11 +238,11 @@
|
||||
|
||||
generate_mineral(alloy.build_path)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D)
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D, delta_time = 2)
|
||||
if(D.make_reagents.len)
|
||||
return FALSE
|
||||
|
||||
var/build_amount = SMELT_AMOUNT
|
||||
var/build_amount = SMELT_AMOUNT * delta_time
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
var/emitterhealth = 20
|
||||
var/emittermaxhealth = 20
|
||||
var/emitterregen = 0.25
|
||||
var/emitterregen = 0.125
|
||||
var/emittercd = 50
|
||||
var/emitteroverloadcd = 100
|
||||
var/emittersemicd = FALSE
|
||||
@@ -312,8 +312,8 @@
|
||||
set_health(maxHealth - getBruteLoss() - getFireLoss())
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
/mob/living/silicon/pai/process(delta_time)
|
||||
emitterhealth = clamp((emitterhealth + emitterregen * delta_time), -50, emittermaxhealth)
|
||||
|
||||
/obj/item/paicard/attackby(obj/item/W, mob/user, params)
|
||||
if(pai && (istype(W, /obj/item/encryptionkey) || W.tool_behaviour == TOOL_SCREWDRIVER))
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
T.cell.give(S.e_cost * coeff)
|
||||
T.update_icon()
|
||||
else
|
||||
T.charge_tick = 0
|
||||
T.charge_timer = 0
|
||||
|
||||
/obj/item/robot_module/peacekeeper
|
||||
name = "Peacekeeper"
|
||||
|
||||
@@ -386,10 +386,10 @@
|
||||
START_PROCESSING(SSobj, E)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/egg/var/amount_grown = 0
|
||||
/obj/item/reagent_containers/food/snacks/egg/process()
|
||||
/obj/item/reagent_containers/food/snacks/egg/process(delta_time)
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(1,2)
|
||||
if(amount_grown >= 100)
|
||||
amount_grown += rand(1,2) * delta_time
|
||||
if(amount_grown >= 200)
|
||||
visible_message("<span class='notice'>[src] hatches with a quiet cracking sound.</span>")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -176,11 +176,11 @@ While using this makes the system rely on OnFire, it still gives options for tim
|
||||
activator = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/elite_tumor/process()
|
||||
/obj/structure/elite_tumor/process(delta_time)
|
||||
if(isturf(loc))
|
||||
for(var/mob/living/simple_animal/hostile/asteroid/elite/elitehere in loc)
|
||||
if(elitehere == mychild && activity == TUMOR_PASSIVE)
|
||||
mychild.adjustHealth(-mychild.maxHealth*0.05)
|
||||
mychild.adjustHealth(-mychild.maxHealth*0.025*delta_time)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(mychild))
|
||||
H.color = "#FF0000"
|
||||
|
||||
|
||||
@@ -193,11 +193,11 @@
|
||||
"<span class='userdanger'>Touching the portal, you are quickly pulled through into a world of unimaginable horror!</span>")
|
||||
contents.Add(user)
|
||||
|
||||
/obj/structure/spawner/nether/process()
|
||||
/obj/structure/spawner/nether/process(delta_time)
|
||||
for(var/mob/living/M in contents)
|
||||
if(M)
|
||||
playsound(src, 'sound/magic/demon_consume.ogg', 50, TRUE)
|
||||
M.adjustBruteLoss(60)
|
||||
M.adjustBruteLoss(60 * delta_time)
|
||||
new /obj/effect/gibspawner/generic(get_turf(M), M)
|
||||
if(M.stat == DEAD)
|
||||
var/mob/living/simple_animal/hostile/netherworld/blankbody/blank
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
/// The amount of time the rift has charged for.
|
||||
var/time_charged = 0
|
||||
/// The maximum charge the rift can have. It actually goes to max_charge + 1, as to prevent constantly retriggering the effects on full charge.
|
||||
var/max_charge = 240
|
||||
var/max_charge = 480
|
||||
/// How many carp spawns it has available.
|
||||
var/carp_stored = 0
|
||||
/// A reference to the Space Dragon that created it.
|
||||
@@ -453,12 +453,12 @@
|
||||
playsound(src, 'sound/vehicles/rocketlaunch.ogg', 100, TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/structure/carp_rift/process()
|
||||
time_charged = min(time_charged + 1, max_charge + 1)
|
||||
/obj/structure/carp_rift/process(delta_time)
|
||||
time_charged = min(time_charged + delta_time, max_charge + 1)
|
||||
update_check()
|
||||
for(var/mob/living/simple_animal/hostile/hostilehere in loc)
|
||||
if("carp" in hostilehere.faction)
|
||||
hostilehere.adjustHealth(-10)
|
||||
hostilehere.adjustHealth(-5 * delta_time)
|
||||
var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(hostilehere))
|
||||
H.color = "#0000FF"
|
||||
if(time_charged < max_charge)
|
||||
@@ -470,8 +470,7 @@
|
||||
icon_state = "carp_rift_carpspawn"
|
||||
light_color = LIGHT_COLOR_PURPLE
|
||||
else
|
||||
var/spawncarp = rand(1,40)
|
||||
if(spawncarp == 1)
|
||||
if(DT_PROB(1.25, delta_time))
|
||||
new /mob/living/simple_animal/hostile/carp(loc)
|
||||
|
||||
/obj/structure/carp_rift/attack_ghost(mob/user)
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
to_chat(user, "<span class='warning'>You press the power button but \the [src] does not respond.</span>")
|
||||
|
||||
// Process currently calls handle_power(), may be expanded in future if more things are added.
|
||||
/obj/item/modular_computer/process()
|
||||
/obj/item/modular_computer/process(delta_time)
|
||||
if(!enabled) // The computer is turned off
|
||||
last_power_usage = 0
|
||||
return
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
if(active_program)
|
||||
if(active_program.program_state != PROGRAM_STATE_KILLED)
|
||||
active_program.process_tick()
|
||||
active_program.process_tick(delta_time)
|
||||
active_program.ntnet_status = get_ntnet_status()
|
||||
else
|
||||
active_program = null
|
||||
@@ -246,12 +246,12 @@
|
||||
for(var/I in idle_threads)
|
||||
var/datum/computer_file/program/P = I
|
||||
if(P.program_state != PROGRAM_STATE_KILLED)
|
||||
P.process_tick()
|
||||
P.process_tick(delta_time)
|
||||
P.ntnet_status = get_ntnet_status()
|
||||
else
|
||||
idle_threads.Remove(P)
|
||||
|
||||
handle_power() // Handles all computer power interaction
|
||||
handle_power(delta_time) // Handles all computer power interaction
|
||||
//check_update_ui_need()
|
||||
|
||||
// Function used by NanoUI's to obtain data for header. All relevant entries begin with "PC_"
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
shutdown_computer(0)
|
||||
|
||||
// Handles power-related things, such as battery interaction, recharging, shutdown when it's discharged
|
||||
/obj/item/modular_computer/proc/handle_power()
|
||||
/obj/item/modular_computer/proc/handle_power(delta_time)
|
||||
var/obj/item/computer_hardware/recharger/recharger = all_components[MC_CHARGE]
|
||||
if(recharger)
|
||||
recharger.process()
|
||||
recharger.process(delta_time)
|
||||
|
||||
var/power_usage = screen_on ? base_active_power_usage : base_idle_power_usage
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
return ..()
|
||||
|
||||
// Process currently calls handle_power(), may be expanded in future if more things are added.
|
||||
/obj/machinery/modular_computer/process()
|
||||
/obj/machinery/modular_computer/process(delta_time)
|
||||
if(cpu)
|
||||
// Keep names in sync.
|
||||
cpu.name = name
|
||||
cpu.process()
|
||||
cpu.process(delta_time)
|
||||
|
||||
// Used in following function to reduce copypaste
|
||||
/obj/machinery/modular_computer/proc/power_failure(malfunction = 0)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
return 0
|
||||
|
||||
// Called by Process() on device that runs us, once every tick.
|
||||
/datum/computer_file/program/proc/process_tick()
|
||||
/datum/computer_file/program/proc/process_tick(delta_time)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,9 +18,9 @@ It is possible to destroy the net by the occupant or someone else.
|
||||
can_buckle = 1
|
||||
buckle_lying = 0
|
||||
buckle_prevents_pull = TRUE
|
||||
var/mob/living/carbon/affecting//Who it is currently affecting, if anyone.
|
||||
var/mob/living/carbon/master//Who shot web. Will let this person know if the net was successful or failed.
|
||||
var/check = 15//30 seconds before teleportation. Could be extended I guess.
|
||||
var/mob/living/carbon/affecting //Who it is currently affecting, if anyone.
|
||||
var/mob/living/carbon/master //Who shot web. Will let this person know if the net was successful or failed.
|
||||
var/check = 30 // seconds before teleportation. Could be extended I guess.
|
||||
var/success = FALSE
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ It is possible to destroy the net by the occupant or someone else.
|
||||
to_chat(master, "<span class='userdanger'>ERROR</span>: unable to initiate transport protocol. Procedure terminated.")
|
||||
return ..()
|
||||
|
||||
/obj/structure/energy_net/process()
|
||||
/obj/structure/energy_net/process(delta_time)
|
||||
if(QDELETED(affecting)||affecting.loc!=loc)
|
||||
qdel(src)//Get rid of the net.
|
||||
return
|
||||
|
||||
if(check>0)
|
||||
check--
|
||||
if(check > 0)
|
||||
check -= delta_time
|
||||
return
|
||||
|
||||
success = TRUE
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"), forced = "ninjaboost")
|
||||
a_boost--
|
||||
to_chat(H, "<span class='notice'>There are <B>[a_boost]</B> adrenaline boosts remaining.</span>")
|
||||
s_coold = 3
|
||||
s_coold = 6
|
||||
addtimer(CALLBACK(src, .proc/ninjaboost_after), 70)
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost_after()
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
playsound(H.loc, 'sound/effects/empulse.ogg', 60, 2)
|
||||
empulse(H, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
s_coold = 4
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
playsound(H.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
s_bombs--
|
||||
to_chat(H, "<span class='notice'>There are <B>[s_bombs]</B> smoke bombs remaining.</span>")
|
||||
s_coold = 1
|
||||
s_coold = 2
|
||||
|
||||
@@ -34,8 +34,8 @@ Contents:
|
||||
//Main function variables.
|
||||
var/s_initialized = 0//Suit starts off.
|
||||
var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick().
|
||||
var/s_cost = 5//Base energy cost each ntick.
|
||||
var/s_acost = 25//Additional cost for additional powers active.
|
||||
var/s_cost = 2.5//Base energy cost each ntick.
|
||||
var/s_acost = 12.5//Additional cost for additional powers active.
|
||||
var/s_delay = 40//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability.
|
||||
var/a_transfer = 20//How much radium is used per adrenaline boost.
|
||||
var/a_maxamount = 7//Maximum number of adrenaline boosts.
|
||||
@@ -75,7 +75,7 @@ Contents:
|
||||
return
|
||||
|
||||
// Space Suit temperature regulation and power usage
|
||||
/obj/item/clothing/suit/space/space_ninja/process()
|
||||
/obj/item/clothing/suit/space/space_ninja/process(delta_time)
|
||||
var/mob/living/carbon/human/user = src.loc
|
||||
if(!user || !ishuman(user) || !(user.wear_suit == src))
|
||||
return
|
||||
@@ -85,11 +85,11 @@ Contents:
|
||||
if(!affecting)
|
||||
terminate() // Kills the suit and attached objects.
|
||||
else if(cell.charge > 0)
|
||||
if(s_coold)
|
||||
s_coold-- // Checks for ability s_cooldown first.
|
||||
cell.charge -= s_cost // s_cost is the default energy cost each ntick, usually 5.
|
||||
if(s_coold > 0)
|
||||
s_coold -= delta_time // Checks for ability s_cooldown first.
|
||||
cell.charge -= s_cost * delta_time // s_cost is the default energy cost each ntick, usually 5.
|
||||
if(stealth) // If stealth is active.
|
||||
cell.charge -= s_acost
|
||||
cell.charge -= s_acost * delta_time
|
||||
else
|
||||
cell.charge = 0
|
||||
cancel_stealth()
|
||||
@@ -106,8 +106,8 @@ Contents:
|
||||
|
||||
//Randomizes suit parameters.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/randomize_param()
|
||||
s_cost = rand(1,20)
|
||||
s_acost = rand(20,100)
|
||||
s_cost = rand(1,10)
|
||||
s_acost = rand(10,50)
|
||||
s_delay = rand(10,100)
|
||||
s_bombs = rand(5,20)
|
||||
a_boost = rand(1,7)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
///I cant find a good name for this. Basically if target is 300, and this is 10, it will still target 300 but will start emptying itself at 290 and 310.
|
||||
var/allowed_temperature_difference = 1
|
||||
///cool/heat power
|
||||
var/heater_coefficient = 0.1
|
||||
var/heater_coefficient = 0.05
|
||||
///Are we turned on or off? this is from the on and off button
|
||||
var/enabled = TRUE
|
||||
///COOLING, HEATING or NEUTRAL. We track this for change, so we dont needlessly update our icon
|
||||
@@ -30,7 +30,7 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/plumbing/acclimator, bolt)
|
||||
|
||||
/obj/machinery/plumbing/acclimator/process()
|
||||
/obj/machinery/plumbing/acclimator/process(delta_time)
|
||||
if(machine_stat & NOPOWER || !enabled || !reagents.total_volume || reagents.chem_temp == target_temperature)
|
||||
if(acclimate_state != NEUTRAL)
|
||||
acclimate_state = NEUTRAL
|
||||
@@ -51,7 +51,7 @@
|
||||
if(reagents.chem_temp <= target_temperature && target_temperature - allowed_temperature_difference <= reagents.chem_temp) //heating here
|
||||
emptying = TRUE
|
||||
|
||||
reagents.adjust_thermal_energy((target_temperature - reagents.chem_temp) * heater_coefficient * SPECIFIC_HEAT_DEFAULT * reagents.total_volume) //keep constant with chem heater
|
||||
reagents.adjust_thermal_energy((target_temperature - reagents.chem_temp) * heater_coefficient * delta_time * SPECIFIC_HEAT_DEFAULT * reagents.total_volume) //keep constant with chem heater
|
||||
reagents.handle_reactions()
|
||||
|
||||
/obj/machinery/plumbing/acclimator/update_icon_state()
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
name = "chemical disposer"
|
||||
desc = "Breaks down chemicals and annihilates them."
|
||||
icon_state = "disposal"
|
||||
///we remove 10 reagents per second
|
||||
var/disposal_rate = 10
|
||||
///we remove 5 reagents per second
|
||||
var/disposal_rate = 5
|
||||
|
||||
/obj/machinery/plumbing/disposer/Initialize(mapload, bolt)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/plumbing/simple_demand, bolt)
|
||||
|
||||
/obj/machinery/plumbing/disposer/process()
|
||||
/obj/machinery/plumbing/disposer/process(delta_time)
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
if(reagents.total_volume)
|
||||
if(icon_state != initial(icon_state) + "_working") //threw it here instead of update icon since it only has two states
|
||||
icon_state = initial(icon_state) + "_working"
|
||||
reagents.remove_any(disposal_rate)
|
||||
reagents.remove_any(disposal_rate * delta_time)
|
||||
else
|
||||
if(icon_state != initial(icon_state))
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 1000
|
||||
|
||||
///units we pump per process (2 seconds)
|
||||
var/pump_power = 2
|
||||
///units we pump per second
|
||||
var/pump_power = 1
|
||||
///set to true if the loop couldnt find a geyser in process, so it remembers and stops checking every loop until moved. more accurate name would be absolutely_no_geyser_under_me_so_dont_try
|
||||
var/geyserless = FALSE
|
||||
///The geyser object
|
||||
@@ -30,7 +30,7 @@
|
||||
update_icon()
|
||||
geyserless = FALSE //we switched state, so lets just set this back aswell
|
||||
|
||||
/obj/machinery/plumbing/liquid_pump/process()
|
||||
/obj/machinery/plumbing/liquid_pump/process(delta_time)
|
||||
if(!anchored || panel_open || geyserless)
|
||||
return
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50)
|
||||
return
|
||||
|
||||
pump()
|
||||
pump(delta_time)
|
||||
|
||||
///pump up that sweet geyser nectar
|
||||
/obj/machinery/plumbing/liquid_pump/proc/pump()
|
||||
/obj/machinery/plumbing/liquid_pump/proc/pump(delta_time)
|
||||
if(!geyser || !geyser.reagents)
|
||||
return
|
||||
geyser.reagents.trans_to(src, pump_power)
|
||||
geyser.reagents.trans_to(src, pump_power * delta_time)
|
||||
|
||||
/obj/machinery/plumbing/liquid_pump/update_icon_state()
|
||||
if(geyser)
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/plumbing/simple_supply, bolt)
|
||||
|
||||
/obj/machinery/plumbing/synthesizer/process()
|
||||
/obj/machinery/plumbing/synthesizer/process(delta_time)
|
||||
if(machine_stat & NOPOWER || !reagent_id || !amount)
|
||||
return
|
||||
if(reagents.total_volume >= amount) //otherwise we get leftovers, and we need this to be precise
|
||||
if(reagents.total_volume >= amount*delta_time*0.5) //otherwise we get leftovers, and we need this to be precise
|
||||
return
|
||||
reagents.add_reagent(reagent_id, amount)
|
||||
reagents.add_reagent(reagent_id, amount*delta_time*0.5)
|
||||
|
||||
/obj/machinery/plumbing/synthesizer/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/stock_parts/cell/process()
|
||||
/obj/item/stock_parts/cell/process(delta_time)
|
||||
if(self_recharge)
|
||||
give(chargerate * 0.25)
|
||||
give(chargerate * 0.125 * delta_time)
|
||||
else
|
||||
return PROCESS_KILL
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/stored_energy = 0
|
||||
var/active = 0
|
||||
var/locked = FALSE
|
||||
var/drainratio = 1
|
||||
var/drainratio = 0.5
|
||||
var/powerproduction_drain = 0.001
|
||||
|
||||
/obj/machinery/power/rad_collector/anchored/Initialize()
|
||||
@@ -37,7 +37,7 @@
|
||||
/obj/machinery/power/rad_collector/should_have_node()
|
||||
return anchored
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
/obj/machinery/power/rad_collector/process(delta_time)
|
||||
if(!loaded_tank)
|
||||
return
|
||||
if(!loaded_tank.air_contents.gases[/datum/gas/plasma])
|
||||
@@ -45,7 +45,7 @@
|
||||
playsound(src, 'sound/machines/ding.ogg', 50, TRUE)
|
||||
eject()
|
||||
else
|
||||
var/gasdrained = min(powerproduction_drain*drainratio,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES])
|
||||
var/gasdrained = min(powerproduction_drain*drainratio*delta_time,loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES])
|
||||
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= gasdrained
|
||||
loaded_tank.air_contents.assert_gas(/datum/gas/tritium)
|
||||
loaded_tank.air_contents.gases[/datum/gas/tritium][MOLES] += gasdrained
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
if(. && !anchored)
|
||||
step(src, get_dir(M, src))
|
||||
|
||||
/obj/machinery/power/emitter/process()
|
||||
/obj/machinery/power/emitter/process(delta_time)
|
||||
if(machine_stat & (BROKEN))
|
||||
return
|
||||
if(!welded || (!powernet && active_power_usage))
|
||||
@@ -197,7 +197,7 @@
|
||||
log_game("Emitter lost power in [AREACOORD(src)]")
|
||||
return
|
||||
if(charge <= 80)
|
||||
charge += 5
|
||||
charge += 2.5 * delta_time
|
||||
if(!check_delay() || manual == TRUE)
|
||||
return FALSE
|
||||
fire_beam()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/the_singularitygen/process()
|
||||
/obj/machinery/the_singularitygen/process(delta_time)
|
||||
if(energy > 0)
|
||||
if(energy >= 200)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -32,4 +32,4 @@
|
||||
transfer_fingerprints_to(S)
|
||||
qdel(src)
|
||||
else
|
||||
energy -= 1
|
||||
energy -= delta_time * 0.5
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/armed = FALSE //whether the gun is attached, FALSE is attached, TRUE is the gun is wielded.
|
||||
var/overheat = 0
|
||||
var/overheat_max = 40
|
||||
var/heat_diffusion = 1
|
||||
var/heat_diffusion = 0.5
|
||||
|
||||
/obj/item/minigunpack/Initialize()
|
||||
. = ..()
|
||||
@@ -26,8 +26,8 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/minigunpack/process()
|
||||
overheat = max(0, overheat - heat_diffusion)
|
||||
/obj/item/minigunpack/process(delta_time)
|
||||
overheat = max(0, overheat - heat_diffusion * delta_time)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/minigunpack/attack_hand(mob/living/carbon/user)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
ammo_x_offset = 2
|
||||
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
|
||||
var/selfcharge = 0
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
var/charge_timer = 0
|
||||
var/charge_delay = 8
|
||||
var/use_cyborg_cell = FALSE //whether the gun's cell drains the cyborg user's cell to recharge
|
||||
var/dead_cell = FALSE //set to true so the gun is given an empty cell
|
||||
|
||||
@@ -71,12 +71,12 @@
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/process()
|
||||
/obj/item/gun/energy/process(delta_time)
|
||||
if(selfcharge && cell && cell.percent() < 100)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
charge_timer += delta_time
|
||||
if(charge_timer < charge_delay)
|
||||
return
|
||||
charge_tick = 0
|
||||
charge_timer = 0
|
||||
cell.give(100)
|
||||
if(!chambered) //if empty chamber we try to charge a new shot
|
||||
recharge_newshot(TRUE)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
desc = "An energy gun with an experimental miniaturized nuclear reactor that automatically charges the internal power cell."
|
||||
icon_state = "nucgun"
|
||||
inhand_icon_state = "nucgun"
|
||||
charge_delay = 5
|
||||
charge_delay = 10
|
||||
pin = null
|
||||
can_charge = FALSE
|
||||
ammo_x_offset = 1
|
||||
@@ -103,9 +103,9 @@
|
||||
var/fail_tick = 0
|
||||
var/fail_chance = 0
|
||||
|
||||
/obj/item/gun/energy/e_gun/nuclear/process()
|
||||
/obj/item/gun/energy/e_gun/nuclear/process(delta_time)
|
||||
if(fail_tick > 0)
|
||||
fail_tick--
|
||||
fail_tick -= delta_time * 0.5
|
||||
..()
|
||||
|
||||
/obj/item/gun/energy/e_gun/nuclear/shoot_live_shot(mob/living/user, pointblank = 0, atom/pbtarget = null, message = 1)
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
var/checks_antimagic = TRUE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
var/charge_tick = 0
|
||||
var/recharge_rate = 8
|
||||
var/charge_timer = 0
|
||||
var/can_charge = TRUE
|
||||
var/ammo_type
|
||||
var/no_den_usage
|
||||
@@ -62,14 +62,14 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/gun/magic/process()
|
||||
/obj/item/gun/magic/process(delta_time)
|
||||
if (charges >= max_charges)
|
||||
charge_tick = 0
|
||||
charge_timer = 0
|
||||
return
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate)
|
||||
charge_timer += delta_time
|
||||
if(charge_timer < recharge_rate)
|
||||
return 0
|
||||
charge_tick = 0
|
||||
charge_timer = 0
|
||||
charges++
|
||||
if(charges == 1)
|
||||
recharge_newshot()
|
||||
|
||||
@@ -117,14 +117,14 @@
|
||||
begin_processing()
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/process()
|
||||
if (recharge_counter >= 4)
|
||||
/obj/machinery/chem_dispenser/process(delta_time)
|
||||
if (recharge_counter >= 8)
|
||||
var/usedpower = cell.give(recharge_amount)
|
||||
if(usedpower)
|
||||
use_power(250*recharge_amount)
|
||||
recharge_counter = 0
|
||||
return
|
||||
recharge_counter++
|
||||
recharge_counter += delta_time
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/display_beaker()
|
||||
var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/target_temperature = 300
|
||||
var/heater_coefficient = 0.1
|
||||
var/heater_coefficient = 0.05
|
||||
var/on = FALSE
|
||||
|
||||
/obj/machinery/chem_heater/Destroy()
|
||||
@@ -56,14 +56,14 @@
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Heating reagents at <b>[heater_coefficient*1000]%</b> speed.</span>"
|
||||
|
||||
/obj/machinery/chem_heater/process()
|
||||
/obj/machinery/chem_heater/process(delta_time)
|
||||
..()
|
||||
if(machine_stat & NOPOWER)
|
||||
return
|
||||
if(on)
|
||||
if(beaker && beaker.reagents.total_volume)
|
||||
//keep constant with the chemical acclimator please
|
||||
beaker.reagents.adjust_thermal_energy((target_temperature - beaker.reagents.chem_temp) * heater_coefficient * SPECIFIC_HEAT_DEFAULT * beaker.reagents.total_volume)
|
||||
beaker.reagents.adjust_thermal_energy((target_temperature - beaker.reagents.chem_temp) * heater_coefficient * delta_time * SPECIFIC_HEAT_DEFAULT * beaker.reagents.total_volume)
|
||||
beaker.reagents.handle_reactions()
|
||||
|
||||
/obj/machinery/chem_heater/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -22,8 +22,8 @@ Borg Hypospray
|
||||
possible_transfer_amounts = list()
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
||||
var/charge_timer = 0
|
||||
var/recharge_time = 10 //Time it takes for shots to recharge (in seconds)
|
||||
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
@@ -48,11 +48,11 @@ Borg Hypospray
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick >= recharge_time)
|
||||
/obj/item/reagent_containers/borghypo/process(delta_time) //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_timer += delta_time
|
||||
if(charge_timer >= recharge_time)
|
||||
regenerate_reagents()
|
||||
charge_tick = 0
|
||||
charge_timer = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
if(open)
|
||||
. += "<span class='notice'>The battery case is open.</span>"
|
||||
|
||||
/obj/item/reagent_containers/glass/maunamug/process()
|
||||
/obj/item/reagent_containers/glass/maunamug/process(delta_time)
|
||||
..()
|
||||
if(on && (!cell || cell.charge <= 0)) //Check if we ran out of power
|
||||
change_power_status(FALSE)
|
||||
return FALSE
|
||||
cell.use(10) //Basic cell goes for like 200 seconds, bluespace for 8000
|
||||
cell.use(5 * delta_time) //Basic cell goes for like 200 seconds, bluespace for 8000
|
||||
if(!reagents.total_volume)
|
||||
return FALSE
|
||||
var/max_temp = min(500 + (500 * (0.2 * cell.rating)), 1000) // 373 to 1000
|
||||
reagents.adjust_thermal_energy(0.8 * cell.maxcharge * reagents.total_volume, max_temp = max_temp) // 4 kelvin every tick on a basic cell. 160k on bluespace
|
||||
reagents.adjust_thermal_energy(0.4 * cell.maxcharge * reagents.total_volume * delta_time, max_temp = max_temp) // 4 kelvin every tick on a basic cell. 160k on bluespace
|
||||
reagents.handle_reactions()
|
||||
update_icon()
|
||||
if(reagents.chem_temp >= max_temp)
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
//timed process
|
||||
//charge the gas reservoir and perform flush if ready
|
||||
/obj/machinery/disposal/bin/process()
|
||||
/obj/machinery/disposal/bin/process(delta_time)
|
||||
if(machine_stat & BROKEN) //nothing can happen if broken
|
||||
return
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
var/pressure_delta = (SEND_PRESSURE*1.01) - air_contents.return_pressure()
|
||||
|
||||
if(env.temperature > 0)
|
||||
var/transfer_moles = 0.1 * pressure_delta*air_contents.volume/(env.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = 0.05 * delta_time * pressure_delta*air_contents.volume/(env.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||
|
||||
@@ -97,11 +97,11 @@ Slimecrossing Weapons
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/gun/magic/bloodchill/process()
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges)
|
||||
/obj/item/gun/magic/bloodchill/process(delta_time)
|
||||
charge_timer += delta_time
|
||||
if(charge_timer < recharge_rate || charges >= max_charges)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
charge_timer = 0
|
||||
var/mob/living/M = loc
|
||||
if(istype(M) && M.blood_volume >= 20)
|
||||
charges++
|
||||
|
||||
@@ -11,7 +11,7 @@ Recurring extracts:
|
||||
var/extract_type
|
||||
var/obj/item/slime_extract/extract
|
||||
var/cooldown = 0
|
||||
var/max_cooldown = 5 //In sets of 2 seconds.
|
||||
var/max_cooldown = 10 // In seconds
|
||||
|
||||
/obj/item/slimecross/recurring/Initialize()
|
||||
. = ..()
|
||||
@@ -26,9 +26,9 @@ Recurring extracts:
|
||||
src.forceMove(extract)
|
||||
START_PROCESSING(SSobj,src)
|
||||
|
||||
/obj/item/slimecross/recurring/process()
|
||||
/obj/item/slimecross/recurring/process(delta_time)
|
||||
if(cooldown > 0)
|
||||
cooldown--
|
||||
cooldown -= delta_time
|
||||
else if(extract.Uses < 10 && extract.Uses > 0)
|
||||
extract.Uses++
|
||||
cooldown = max_cooldown
|
||||
@@ -61,17 +61,17 @@ Recurring extracts:
|
||||
/obj/item/slimecross/recurring/metal
|
||||
extract_type = /obj/item/slime_extract/metal
|
||||
colour = "metal"
|
||||
max_cooldown = 10
|
||||
max_cooldown = 20
|
||||
|
||||
/obj/item/slimecross/recurring/yellow
|
||||
extract_type = /obj/item/slime_extract/yellow
|
||||
colour = "yellow"
|
||||
max_cooldown = 10
|
||||
max_cooldown = 20
|
||||
|
||||
/obj/item/slimecross/recurring/darkpurple
|
||||
extract_type = /obj/item/slime_extract/darkpurple
|
||||
colour = "dark purple"
|
||||
max_cooldown = 10
|
||||
max_cooldown = 20
|
||||
|
||||
/obj/item/slimecross/recurring/darkblue
|
||||
extract_type = /obj/item/slime_extract/darkblue
|
||||
@@ -88,7 +88,7 @@ Recurring extracts:
|
||||
/obj/item/slimecross/recurring/sepia
|
||||
extract_type = /obj/item/slime_extract/sepia
|
||||
colour = "sepia"
|
||||
max_cooldown = 18 //No infinite timestop for you!
|
||||
max_cooldown = 36 //No infinite timestop for you!
|
||||
|
||||
/obj/item/slimecross/recurring/cerulean
|
||||
extract_type = /obj/item/slime_extract/cerulean
|
||||
@@ -113,7 +113,7 @@ Recurring extracts:
|
||||
/obj/item/slimecross/recurring/gold
|
||||
extract_type = /obj/item/slime_extract/gold
|
||||
colour = "gold"
|
||||
max_cooldown = 15
|
||||
max_cooldown = 30
|
||||
|
||||
/obj/item/slimecross/recurring/oil
|
||||
extract_type = /obj/item/slime_extract/oil
|
||||
@@ -130,9 +130,9 @@ Recurring extracts:
|
||||
/obj/item/slimecross/recurring/adamantine
|
||||
extract_type = /obj/item/slime_extract/adamantine
|
||||
colour = "adamantine"
|
||||
max_cooldown = 10
|
||||
max_cooldown = 20
|
||||
|
||||
/obj/item/slimecross/recurring/rainbow
|
||||
extract_type = /obj/item/slime_extract/rainbow
|
||||
colour = "rainbow"
|
||||
max_cooldown = 20 //It's pretty powerful.
|
||||
max_cooldown = 40 //It's pretty powerful.
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
log_shuttle("[key_name(user)] has authorized early shuttle launch in [COORD(src)]")
|
||||
// Now check if we're on our way
|
||||
. = TRUE
|
||||
process()
|
||||
process(SSMACHINES_DT)
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/proc/clear_recent_action(mob/user)
|
||||
acted_recently -= user
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
authorized += ID
|
||||
|
||||
process()
|
||||
process(SSMACHINES_DT)
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/Destroy()
|
||||
// Our fake IDs that the emag generated are just there for colour
|
||||
|
||||
@@ -103,8 +103,8 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
|
||||
var/charge_type = "recharge" //can be recharge or charges, see charge_max and charge_counter descriptions; can also be based on the holder's vars now, use "holder_var" for that
|
||||
|
||||
var/charge_max = 100 //recharge time in deciseconds if charge_type = "recharge" or starting charges if charge_type = "charges"
|
||||
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each decisecond if charge_type = "recharge" or -- each cast if charge_type = "charges"
|
||||
var/charge_max = 10 //recharge time in seconds if charge_type = "recharge" or starting charges if charge_type = "charges"
|
||||
var/charge_counter = 0 //can only cast spells if it equals recharge, ++ each second if charge_type = "recharge" or -- each cast if charge_type = "charges"
|
||||
var/still_recharging_msg = "<span class='notice'>The spell is still recharging.</span>"
|
||||
var/recharging = TRUE
|
||||
|
||||
@@ -298,9 +298,9 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
/obj/effect/proc_holder/spell/proc/start_recharge()
|
||||
recharging = TRUE
|
||||
|
||||
/obj/effect/proc_holder/spell/process()
|
||||
/obj/effect/proc_holder/spell/process(delta_time)
|
||||
if(recharging && charge_type == "recharge" && (charge_counter < charge_max))
|
||||
charge_counter += 2 //processes 5 times per second instead of 10.
|
||||
charge_counter += delta_time
|
||||
if(charge_counter >= charge_max)
|
||||
action.UpdateButtonIcon()
|
||||
charge_counter = charge_max
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
/obj/item/organ/proc/on_find(mob/living/finder)
|
||||
return
|
||||
|
||||
/obj/item/organ/process()
|
||||
on_death() //Kinda hate doing it like this, but I really don't want to call process directly.
|
||||
/obj/item/organ/process(delta_time)
|
||||
on_death(delta_time) //Kinda hate doing it like this, but I really don't want to call process directly.
|
||||
|
||||
/obj/item/organ/proc/on_death() //runs decay when outside of a person
|
||||
/obj/item/organ/proc/on_death(delta_time = 2) //runs decay when outside of a person
|
||||
if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN))
|
||||
return
|
||||
applyOrganDamage(maxHealth * decay_factor)
|
||||
applyOrganDamage(maxHealth * decay_factor * 0.5 * delta_time)
|
||||
|
||||
/obj/item/organ/proc/on_life() //repair organ damage if the organ is not failing
|
||||
if(organ_flags & ORGAN_FAILING)
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
* Run an update cycle for this UI. Called internally by SStgui
|
||||
* every second or so.
|
||||
*/
|
||||
/datum/tgui/process(force = FALSE)
|
||||
/datum/tgui/process(delta_time, force = FALSE)
|
||||
if(closing)
|
||||
return
|
||||
var/datum/host = src_object.ui_host(user)
|
||||
|
||||
@@ -79,10 +79,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/ridden/atv/process()
|
||||
/obj/vehicle/ridden/atv/process(delta_time)
|
||||
if(obj_integrity >= integrity_failure * max_integrity)
|
||||
return PROCESS_KILL
|
||||
if(prob(20))
|
||||
if(DT_PROB(10, delta_time))
|
||||
return
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(0, src)
|
||||
|
||||
@@ -371,23 +371,23 @@
|
||||
break //in case user is holding two guns
|
||||
|
||||
//processing internal damage, temperature, air regulation, alert updates, lights power use.
|
||||
/obj/vehicle/sealed/mecha/process()
|
||||
/obj/vehicle/sealed/mecha/process(delta_time)
|
||||
var/internal_temp_regulation = 1
|
||||
|
||||
if(internal_damage)
|
||||
if(internal_damage & MECHA_INT_FIRE)
|
||||
if(!(internal_damage & MECHA_INT_TEMP_CONTROL) && prob(5))
|
||||
if(!(internal_damage & MECHA_INT_TEMP_CONTROL) && DT_PROB(2.5, delta_time))
|
||||
clearInternalDamage(MECHA_INT_FIRE)
|
||||
if(internal_tank)
|
||||
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
|
||||
if(int_tank_air.return_pressure() > internal_tank.maximum_pressure && !(internal_damage & MECHA_INT_TANK_BREACH))
|
||||
setInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
if(int_tank_air && int_tank_air.return_volume() > 0) //heat the air_contents
|
||||
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
|
||||
int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(5,7.5)*delta_time)
|
||||
if(cabin_air && cabin_air.return_volume()>0)
|
||||
cabin_air.temperature = min(6000+T0C, cabin_air.return_temperature()+rand(10,15))
|
||||
cabin_air.temperature = min(6000+T0C, cabin_air.return_temperature()+rand(5,7.5)*delta_time)
|
||||
if(cabin_air.return_temperature() > max_temperature/2)
|
||||
take_damage(4/round(max_temperature/cabin_air.return_temperature(),0.1), BURN, 0, 0)
|
||||
take_damage(delta_time*2/round(max_temperature/cabin_air.return_temperature(),0.1), BURN, 0, 0)
|
||||
|
||||
if(internal_damage & MECHA_INT_TEMP_CONTROL)
|
||||
internal_temp_regulation = 0
|
||||
@@ -395,7 +395,7 @@
|
||||
if(internal_damage & MECHA_INT_TANK_BREACH) //remove some air from internal tank
|
||||
if(internal_tank)
|
||||
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
|
||||
var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.1)
|
||||
var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(DT_PROB_RATE(0.05, delta_time))
|
||||
if(loc)
|
||||
loc.assume_air(leaked_gas)
|
||||
air_update_turf()
|
||||
@@ -405,13 +405,13 @@
|
||||
if(internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
if(get_charge())
|
||||
spark_system.start()
|
||||
cell.charge -= min(20,cell.charge)
|
||||
cell.maxcharge -= min(20,cell.maxcharge)
|
||||
cell.charge -= min(10 * delta_time, cell.charge)
|
||||
cell.maxcharge -= min(10 * delta_time, cell.maxcharge)
|
||||
|
||||
if(internal_temp_regulation)
|
||||
if(cabin_air && cabin_air.return_volume() > 0)
|
||||
var/delta = cabin_air.temperature - T20C
|
||||
cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
|
||||
cabin_air.temperature -= clamp(round(delta / 8, 0.1), -5, 5) * delta_time
|
||||
|
||||
if(internal_tank)
|
||||
var/datum/gas_mixture/tank_air = internal_tank.return_air()
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/container_resist_act(mob/living/user)
|
||||
go_out()
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/process(delta_time)
|
||||
if(..())
|
||||
return
|
||||
if(!chassis.has_charge(energy_drain))
|
||||
@@ -231,12 +231,12 @@
|
||||
if(!M)
|
||||
return
|
||||
if(M.health > 0)
|
||||
M.adjustOxyLoss(-1)
|
||||
M.AdjustStun(-80)
|
||||
M.AdjustKnockdown(-80)
|
||||
M.AdjustParalyzed(-80)
|
||||
M.AdjustImmobilized(-80)
|
||||
M.AdjustUnconscious(-80)
|
||||
M.adjustOxyLoss(-0.5 * delta_time)
|
||||
M.AdjustStun(-40 * delta_time)
|
||||
M.AdjustKnockdown(-40 * delta_time)
|
||||
M.AdjustParalyzed(-40 * delta_time)
|
||||
M.AdjustImmobilized(-40 * delta_time)
|
||||
M.AdjustUnconscious(-40 * delta_time)
|
||||
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
|
||||
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
|
||||
chassis.use_power(energy_drain)
|
||||
@@ -258,7 +258,7 @@
|
||||
var/list/processed_reagents
|
||||
var/max_syringes = 10
|
||||
var/max_volume = 75 //max reagent volume
|
||||
var/synth_speed = 5 //[num] reagent units per cycle
|
||||
var/synth_speed = 2.5 //[num] reagent units per second
|
||||
energy_drain = 10
|
||||
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
|
||||
range = MECHA_MELEE|MECHA_RANGED
|
||||
@@ -507,7 +507,7 @@
|
||||
update_equip_info()
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/process(delta_time)
|
||||
if(..())
|
||||
return
|
||||
if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain))
|
||||
@@ -515,7 +515,7 @@
|
||||
log_message("Reagent processing stopped.", LOG_MECHA)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/amount = synth_speed / processed_reagents.len
|
||||
var/amount = delta_time * synth_speed / processed_reagents.len
|
||||
for(var/reagent in processed_reagents)
|
||||
reagents.add_reagent(reagent,amount)
|
||||
chassis.use_power(energy_drain)
|
||||
@@ -545,7 +545,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/process()
|
||||
if(..())
|
||||
return
|
||||
medigun.process()
|
||||
medigun.process(SSOBJ_DT)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/action(mob/source, atom/movable/target, params)
|
||||
medigun.process_fire(target, loc)
|
||||
|
||||
@@ -196,7 +196,9 @@
|
||||
icon_state = "repair_droid"
|
||||
energy_drain = 50
|
||||
range = 0
|
||||
var/health_boost = 1
|
||||
|
||||
/// Repaired health per second
|
||||
var/health_boost = 0.5
|
||||
var/icon/droid_overlay
|
||||
var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH)
|
||||
selectable = 0
|
||||
@@ -239,15 +241,15 @@
|
||||
send_byjax(chassis.occupants,"exosuit.browser", "[REF(src)]", get_equip_info())
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/repair_droid/process(delta_time)
|
||||
if(!chassis)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/h_boost = health_boost
|
||||
var/h_boost = health_boost * delta_time
|
||||
var/repaired = 0
|
||||
if(chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
h_boost *= -2
|
||||
else if(chassis.internal_damage && prob(15))
|
||||
else if(chassis.internal_damage && DT_PROB(8, delta_time))
|
||||
for(var/int_dam_flag in repairable_damage)
|
||||
if(chassis.internal_damage & int_dam_flag)
|
||||
chassis.clearInternalDamage(int_dam_flag)
|
||||
@@ -323,7 +325,7 @@
|
||||
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span> [src.name] - <a href='?src=[REF(src)];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process(delta_time)
|
||||
if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -341,7 +343,7 @@
|
||||
pow_chan = c
|
||||
break
|
||||
if(pow_chan)
|
||||
var/delta = min(20, chassis.cell.maxcharge-cur_charge)
|
||||
var/delta = min(10 * delta_time, chassis.cell.maxcharge-cur_charge)
|
||||
chassis.give_power(delta)
|
||||
A.use_power(delta*coeff, pow_chan)
|
||||
|
||||
@@ -359,9 +361,12 @@
|
||||
var/coeff = 100
|
||||
var/obj/item/stack/sheet/fuel
|
||||
var/max_fuel = 150000
|
||||
var/fuel_per_cycle_idle = 25
|
||||
var/fuel_per_cycle_active = 200
|
||||
var/power_per_cycle = 20
|
||||
/// Fuel used per second while idle, not generating
|
||||
var/fuelrate_idle = 12.5
|
||||
/// Fuel used per second while actively generating
|
||||
var/fuelrate_active = 100
|
||||
/// Energy recharged per second
|
||||
var/rechargerate = 10
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/Initialize()
|
||||
. = ..()
|
||||
@@ -418,7 +423,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params)
|
||||
load_fuel(weapon)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/process(delta_time)
|
||||
if(!chassis)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -432,11 +437,11 @@
|
||||
log_message("Deactivated.", LOG_MECHA)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
var/use_fuel = fuel_per_cycle_idle
|
||||
var/use_fuel = fuelrate_idle
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
use_fuel = fuel_per_cycle_active
|
||||
chassis.give_power(power_per_cycle)
|
||||
fuel.amount -= min(use_fuel/MINERAL_MATERIAL_AMOUNT,fuel.amount)
|
||||
use_fuel = fuelrate_active
|
||||
chassis.give_power(rechargerate * delta_time)
|
||||
fuel.amount -= min(delta_time * use_fuel / MINERAL_MATERIAL_AMOUNT, fuel.amount)
|
||||
update_equip_info()
|
||||
return TRUE
|
||||
|
||||
@@ -446,17 +451,17 @@
|
||||
desc = "An exosuit module that generates power using uranium as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
max_fuel = 50000
|
||||
fuel_per_cycle_idle = 10
|
||||
fuel_per_cycle_active = 30
|
||||
power_per_cycle = 50
|
||||
var/rad_per_cycle = 30
|
||||
fuelrate_idle = 5
|
||||
fuelrate_active = 15
|
||||
rechargerate = 25
|
||||
var/radrate = 15
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
|
||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src, 0)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/process()
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/process(delta_time)
|
||||
if(..())
|
||||
radiation_pulse(get_turf(src), rad_per_cycle)
|
||||
radiation_pulse(get_turf(src), radrate * delta_time)
|
||||
|
||||
|
||||
/////////////////////////////////////////// THRUSTERS /////////////////////////////////////////////
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
circuit = /obj/item/circuitboard/machine/mech_recharger
|
||||
var/obj/vehicle/sealed/mecha/recharging_mech
|
||||
var/obj/machinery/computer/mech_bay_power_console/recharge_console
|
||||
var/max_charge = 50
|
||||
var/recharge_power = 25
|
||||
var/on = FALSE
|
||||
var/turf/recharging_turf = null
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
var/MC
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
MC += C.rating
|
||||
max_charge = MC * 25
|
||||
recharge_power = MC * 12.5
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Base recharge rate at <b>[max_charge]J</b> per cycle.</span>"
|
||||
. += "<span class='notice'>The status display reads: Recharge power <b>[siunit(recharge_power, "W", 1)]</b>.</span>"
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port/process()
|
||||
/obj/machinery/mech_bay_recharge_port/process(delta_time)
|
||||
if(machine_stat & NOPOWER || !recharge_console)
|
||||
return
|
||||
if(!recharging_mech)
|
||||
@@ -58,7 +58,7 @@
|
||||
recharge_console.update_icon()
|
||||
if(recharging_mech && recharging_mech.cell)
|
||||
if(recharging_mech.cell.charge < recharging_mech.cell.maxcharge)
|
||||
var/delta = min(max_charge, recharging_mech.cell.maxcharge - recharging_mech.cell.charge)
|
||||
var/delta = min(recharge_power * delta_time, recharging_mech.cell.maxcharge - recharging_mech.cell.charge)
|
||||
recharging_mech.give_power(delta)
|
||||
use_power(delta*150)
|
||||
else
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/ridden/secway/process()
|
||||
/obj/vehicle/ridden/secway/process(delta_time)
|
||||
if(obj_integrity >= integrity_failure * max_integrity)
|
||||
return PROCESS_KILL
|
||||
if(prob(20))
|
||||
if(DT_PROB(10, delta_time))
|
||||
return
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(0, src)
|
||||
|
||||
@@ -122,8 +122,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
var/seconds_electrified = MACHINE_NOT_ELECTRIFIED
|
||||
///When this is TRUE, we fire items at customers! We're broken!
|
||||
var/shoot_inventory = 0
|
||||
///How likely this is to happen (prob 100)
|
||||
var/shoot_inventory_chance = 2
|
||||
///How likely this is to happen (prob 100) per second
|
||||
var/shoot_inventory_chance = 1
|
||||
//Stop spouting those godawful pitches!
|
||||
var/shut_up = 0
|
||||
///can we access the hidden inventory?
|
||||
@@ -871,7 +871,7 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
SSblackbox.record_feedback("nested tally", "vending_machine_usage", 1, list("[type]", "[R.product_path]"))
|
||||
vend_ready = TRUE
|
||||
|
||||
/obj/machinery/vending/process()
|
||||
/obj/machinery/vending/process(delta_time)
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
return PROCESS_KILL
|
||||
if(!active)
|
||||
@@ -881,12 +881,12 @@ GLOBAL_LIST_EMPTY(vending_products)
|
||||
seconds_electrified--
|
||||
|
||||
//Pitch to the people! Really sell it!
|
||||
if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && prob(5))
|
||||
if(last_slogan + slogan_delay <= world.time && slogan_list.len > 0 && !shut_up && DT_PROB(2.5, delta_time))
|
||||
var/slogan = pick(slogan_list)
|
||||
speak(slogan)
|
||||
last_slogan = world.time
|
||||
|
||||
if(shoot_inventory && prob(shoot_inventory_chance))
|
||||
if(shoot_inventory && DT_PROB(shoot_inventory_chance, delta_time))
|
||||
throw_item()
|
||||
/**
|
||||
* Speak the given message verbally
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
web of pus and viscera, bound tightly around the brain like some \
|
||||
biological harness.</span>")
|
||||
|
||||
/obj/item/organ/zombie_infection/process()
|
||||
/obj/item/organ/zombie_infection/process(delta_time)
|
||||
if(!owner)
|
||||
return
|
||||
if(!(src in owner.internal_organs))
|
||||
@@ -48,8 +48,8 @@
|
||||
if(owner.mob_biotypes & MOB_MINERAL)//does not process in inorganic things
|
||||
return
|
||||
if (causes_damage && !iszombie(owner) && owner.stat != DEAD)
|
||||
owner.adjustToxLoss(1)
|
||||
if (prob(10))
|
||||
owner.adjustToxLoss(0.5 * delta_time)
|
||||
if(DT_PROB(5, delta_time))
|
||||
to_chat(owner, "<span class='danger'>You feel sick...</span>")
|
||||
if(timer_id)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user