Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into remove-sleeps
This commit is contained in:
@@ -1,38 +1,2 @@
|
||||
// _extools_api.dm - DM API for extools extension library
|
||||
// (blatently stolen from rust_g)
|
||||
//
|
||||
// To configure, create a `extools.config.dm` and set what you care about from
|
||||
// the following options:
|
||||
//
|
||||
// #define EXTOOLS "path/to/extools"
|
||||
// Override the .dll/.so detection logic with a fixed path or with detection
|
||||
// logic of your own.
|
||||
|
||||
#ifndef EXTOOLS
|
||||
// Default automatic EXTOOLS detection.
|
||||
// On Windows, looks in the standard places for `byond-extools.dll`.
|
||||
// On Linux, looks in the standard places for`libbyond-extools.so`.
|
||||
|
||||
/* This comment bypasses grep checks */ /var/__extools
|
||||
|
||||
/proc/__detect_extools()
|
||||
if (world.system_type == UNIX)
|
||||
if (fexists("./libbyond-extools.so"))
|
||||
// No need for LD_LIBRARY_PATH badness.
|
||||
return __extools = "./libbyond-extools.so"
|
||||
else
|
||||
// It's not in the current directory, so try others
|
||||
return __extools = "libbyond-extools.so"
|
||||
else
|
||||
return __extools = "byond-extools.dll"
|
||||
|
||||
#define EXTOOLS (__extools || __detect_extools())
|
||||
#endif
|
||||
|
||||
#ifndef UNIT_TESTS // use default logging as extools is broken on travis
|
||||
#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
|
||||
#endif
|
||||
|
||||
/proc/extools_log_write()
|
||||
|
||||
/proc/extools_finalize_logging()
|
||||
#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
|
||||
#define AUXMOS (world.system_type == MS_WINDOWS ? "auxmos.dll" : "libauxmos.so")
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/// Percentage of tick to leave for master controller to run
|
||||
#define MAPTICK_MC_MIN_RESERVE 70
|
||||
/// internal_tick_usage is updated every tick by extools
|
||||
#define MAPTICK_LAST_INTERNAL_TICK_USAGE ((GLOB.internal_tick_usage / world.tick_lag) * 100)
|
||||
#if DM_VERSION > 513
|
||||
#define MAPTICK_LAST_INTERNAL_TICK_USAGE world.map_cpu
|
||||
#else
|
||||
#define MAPTICK_LAST_INTERNAL_TICK_USAGE 50
|
||||
#endif
|
||||
/// Tick limit while running normally
|
||||
#define TICK_BYOND_RESERVE 2
|
||||
#define TICK_LIMIT_RUNNING (max(100 - TICK_BYOND_RESERVE - MAPTICK_LAST_INTERNAL_TICK_USAGE, MAPTICK_MC_MIN_RESERVE))
|
||||
@@ -19,6 +23,9 @@
|
||||
|
||||
/// Returns true if tick_usage is above the limit
|
||||
#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit )
|
||||
|
||||
#define TICK_REMAINING_MS ((Master.current_ticklimit - TICK_USAGE) * world.tick_lag)
|
||||
|
||||
/// runs stoplag if tick_usage is above the limit
|
||||
#define CHECK_TICK ( TICK_CHECK ? stoplag() : 0 )
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
//LISTMOS
|
||||
//indices of values in gas lists.
|
||||
#define META_GAS_SPECIFIC_HEAT 1
|
||||
#define META_GAS_NAME 2
|
||||
#define META_GAS_MOLES_VISIBLE 3
|
||||
#define META_GAS_OVERLAY 4
|
||||
#define META_GAS_DANGER 5
|
||||
#define META_GAS_ID 6
|
||||
#define META_GAS_FUSION_POWER 7
|
||||
//ATMOS
|
||||
//stuff you should probably leave well alone!
|
||||
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
|
||||
@@ -257,6 +248,26 @@
|
||||
#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT
|
||||
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
|
||||
|
||||
// Gas defines because i hate typepaths
|
||||
#define GAS_O2 "o2"
|
||||
#define GAS_N2 "n2"
|
||||
#define GAS_CO2 "co2"
|
||||
#define GAS_PLASMA "plasma"
|
||||
#define GAS_H2O "water_vapor"
|
||||
#define GAS_HYPERNOB "nob"
|
||||
#define GAS_NITROUS "n2o"
|
||||
#define GAS_NITRYL "no2"
|
||||
#define GAS_TRITIUM "tritium"
|
||||
#define GAS_BZ "bz"
|
||||
#define GAS_STIMULUM "stim"
|
||||
#define GAS_PLUOXIUM "pluox"
|
||||
#define GAS_MIASMA "miasma"
|
||||
#define GAS_METHANE "methane"
|
||||
#define GAS_METHYL_BROMIDE "methyl_bromide"
|
||||
|
||||
#define GAS_FLAG_DANGEROUS (1<<0)
|
||||
#define GAS_FLAG_BREATH_PROC (1<<1)
|
||||
|
||||
//HELPERS
|
||||
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
|
||||
if(T.dir & (NORTH|SOUTH)) { \
|
||||
@@ -284,17 +295,6 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
|
||||
//If you're doing spreading things related to atmos, DO NOT USE CANATMOSPASS, IT IS NOT CHEAP. use this instead, the info is cached after all. it's tweaked just a bit to allow for circular checks
|
||||
#define TURFS_CAN_SHARE(T1, T2) (LAZYACCESS(T2.atmos_adjacent_turfs, T1) || LAZYLEN(T1.atmos_adjacent_turfs & T2.atmos_adjacent_turfs))
|
||||
|
||||
GLOBAL_VAR(atmos_extools_initialized) // this must be an uninitialized (null) one or init_monstermos will be called twice because reasons
|
||||
#define ATMOS_EXTOOLS_CHECK if(!GLOB.atmos_extools_initialized){\
|
||||
GLOB.atmos_extools_initialized=TRUE;\
|
||||
if(fexists(EXTOOLS)){\
|
||||
var/result = call(EXTOOLS,"init_monstermos")();\
|
||||
if(result != "ok") {CRASH(result);}\
|
||||
} else {\
|
||||
CRASH("[EXTOOLS] does not exist!");\
|
||||
}\
|
||||
}
|
||||
|
||||
//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance.
|
||||
#define GAS_GARBAGE_COLLECT(GASGASGAS)\
|
||||
var/list/CACHE_GAS = GASGASGAS;\
|
||||
|
||||
@@ -63,6 +63,8 @@
|
||||
#define BLOCK_RETURN_MITIGATION_PERCENT "partial_mitigation"
|
||||
/// Used internally by run_parry proc, use on an on_active_parry() proc to override parrying efficiency.
|
||||
#define BLOCK_RETURN_OVERRIDE_PARRY_EFFICIENCY "override_parry_efficiency"
|
||||
/// Used internally by run_parry proc, use on an on_active_parry() proc to prevent counterattacks
|
||||
#define BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK "no_parry_counterattack"
|
||||
/// Always set to 100 by run_block() if BLOCK_SUCCESS is in return value. Otherwise, defaults to mitigation percent if not set. Used by projectile/proc/on_hit().
|
||||
#define BLOCK_RETURN_PROJECTILE_BLOCK_PERCENTAGE "projectile_block_percentage"
|
||||
|
||||
|
||||
@@ -570,3 +570,6 @@
|
||||
// twitch plays
|
||||
/// Returns direction: (wipe_votes)
|
||||
#define COMSIG_TWITCH_PLAYS_MOVEMENT_DATA "twitch_plays_movement_data"
|
||||
|
||||
// /datum/component/identification signals
|
||||
#define COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK "id_knowledge_check" // (mob/user) - returns a value from ID_COMPONENT_KNOWLEDGE_NONE to ID_COMPONENT_KNOWLEDGE_FULL
|
||||
|
||||
@@ -254,6 +254,9 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
||||
|
||||
#define isProbablyWallMounted(O) (O.pixel_x > 20 || O.pixel_x < -20 || O.pixel_y > 20 || O.pixel_y < -20)
|
||||
|
||||
#define isfinite(n) (isnum(n) && n == n)
|
||||
|
||||
#define isbook(O) (is_type_in_typecache(O, GLOB.book_types))
|
||||
|
||||
GLOBAL_LIST_INIT(book_types, typecacheof(list(
|
||||
|
||||
@@ -212,12 +212,17 @@
|
||||
/// Like DT_PROB_RATE but easier to use, simply put `if(DT_PROB(10, 5))`
|
||||
#define DT_PROB(prob_per_second_percent, delta_time) (prob(100*DT_PROB_RATE((prob_per_second_percent)/100, (delta_time))))
|
||||
// )
|
||||
|
||||
/// Taxicab distance--gets you the **actual** time it takes to get from one turf to another due to how we calculate diagonal movement
|
||||
#define MANHATTAN_DISTANCE(a, b) (abs(a.x - b.x) + abs(a.y - b.y))
|
||||
// )
|
||||
|
||||
/// A function that exponentially approaches a maximum value of L
|
||||
/// k is the rate at which is approaches L, x_0 is the point where the function = 0
|
||||
#define LOGISTIC_FUNCTION(L,k,x,x_0) (L/(1+(NUM_E**(-k*(x-x_0)))))
|
||||
|
||||
// )
|
||||
/// Make sure something is a boolean TRUE/FALSE 1/0 value, since things like bitfield & bitflag doesn't always give 1s and 0s.
|
||||
#define FORCE_BOOLEAN(x) ((x)? TRUE : FALSE)
|
||||
|
||||
// )
|
||||
/// Gives the number of pixels in an orthogonal line of tiles.
|
||||
#define TILES_TO_PIXELS(tiles) (tiles * PIXELS)
|
||||
// )
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#define TEXT_EAST "[EAST]"
|
||||
#define TEXT_WEST "[WEST]"
|
||||
|
||||
/// yeah yeah i'm a lazy asshole who can't debug yeah yeah
|
||||
#define DEBUG_LINE message_admins("DEBUG: [__FILE__] [__LINE__] executing!")
|
||||
|
||||
/// world.icon_size
|
||||
#define PIXELS 32
|
||||
|
||||
|
||||
@@ -343,3 +343,7 @@
|
||||
|
||||
///Define for spawning megafauna instead of a mob for cave gen
|
||||
#define SPAWN_MEGAFAUNA "bluh bluh huge boss"
|
||||
|
||||
// / Breathing types. Lungs can access either by these or by a string, which will be considered a gas ID.
|
||||
#define BREATH_OXY /datum/breathing_class/oxygen
|
||||
#define BREATH_PLASMA /datum/breathing_class/plasma
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
///Percentage of sound's range where no falloff is applied
|
||||
#define SOUND_DEFAULT_FALLOFF_DISTANCE 1 //For a normal sound this would be 1 tile of no falloff
|
||||
///The default exponent of sound falloff
|
||||
#define SOUND_FALLOFF_EXPONENT 6
|
||||
#define SOUND_FALLOFF_EXPONENT 7.5
|
||||
/// Default distance multiplier for sounds
|
||||
#define SOUND_DEFAULT_DISTANCE_MULTIPLIER 2.5
|
||||
/// Default range at which sound distance multiplier applies
|
||||
#define SOUND_DEFAULT_MULTIPLIER_EFFECT_RANGE 7
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
@@ -28,6 +28,5 @@
|
||||
#define VAR_PROTECTED var
|
||||
#endif
|
||||
|
||||
/world/proc/enable_debugger()
|
||||
if (fexists(EXTOOLS))
|
||||
call(EXTOOLS, "debug_initialize")()
|
||||
/proc/enable_debugging()
|
||||
CRASH("Auxtools not found")
|
||||
|
||||
@@ -105,8 +105,6 @@
|
||||
|
||||
#define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus //gives you fluff messages for cough, sneeze, headache, etc but without an actual virus
|
||||
|
||||
#define STATUS_EFFECT_NO_COMBAT_MODE /datum/status_effect/no_combat_mode //Wont allow combat mode and will disable it
|
||||
|
||||
#define STATUS_EFFECT_STASIS /datum/status_effect/grouped/stasis //Halts biological functions like bleeding, chemical processing, blood regeneration, walking, etc
|
||||
|
||||
#define STATUS_EFFECT_MESMERIZE /datum/status_effect/mesmerize //Just reskinned no_combat_mode
|
||||
|
||||
@@ -185,6 +185,7 @@
|
||||
#define FIRE_PRIORITY_CHAT 400
|
||||
#define FIRE_PRIORITY_RUNECHAT 410
|
||||
#define FIRE_PRIORITY_OVERLAYS 500
|
||||
#define FIRE_PRIORITY_CALLBACKS 600
|
||||
// #define FIRE_PRIORITY_EXPLOSIONS 666
|
||||
#define FIRE_PRIORITY_TIMER 700
|
||||
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
||||
@@ -199,6 +200,20 @@
|
||||
|
||||
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
||||
|
||||
// SSair run section
|
||||
#define SSAIR_PIPENETS 1
|
||||
#define SSAIR_ATMOSMACHINERY 2
|
||||
#define SSAIR_EXCITEDGROUPS 3
|
||||
#define SSAIR_HIGHPRESSURE 4
|
||||
#define SSAIR_HOTSPOTS 5
|
||||
#define SSAIR_TURF_CONDUCTION 6
|
||||
#define SSAIR_REBUILD_PIPENETS 7
|
||||
#define SSAIR_EQUALIZE 8
|
||||
#define SSAIR_ACTIVETURFS 9
|
||||
#define SSAIR_TURF_POST_PROCESS 10
|
||||
#define SSAIR_FINALIZE_TURFS 11
|
||||
#define SSAIR_ATMOSMACHINERY_AIR 12
|
||||
#define SSAIR_DEFERRED_AIRS 13
|
||||
|
||||
|
||||
//! ## Overlays subsystem
|
||||
@@ -228,14 +243,3 @@
|
||||
* * flags flags for this timer, see: code\__DEFINES\subsystems.dm
|
||||
*/
|
||||
#define addtimer(args...) _addtimer(args, file = __FILE__, line = __LINE__)
|
||||
|
||||
// SSair run section
|
||||
#define SSAIR_PIPENETS 1
|
||||
#define SSAIR_ATMOSMACHINERY 2
|
||||
#define SSAIR_EXCITEDGROUPS 3
|
||||
#define SSAIR_HIGHPRESSURE 4
|
||||
#define SSAIR_HOTSPOTS 5
|
||||
#define SSAIR_SUPERCONDUCTIVITY 6
|
||||
#define SSAIR_REBUILD_PIPENETS 7
|
||||
#define SSAIR_EQUALIZE 8
|
||||
#define SSAIR_ACTIVETURFS 9
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
|
||||
|
||||
/proc/extools_log_write()
|
||||
|
||||
/proc/extools_finalize_logging()
|
||||
|
||||
/proc/auxtools_stack_trace(msg)
|
||||
CRASH(msg)
|
||||
|
||||
GLOBAL_LIST_EMPTY(auxtools_initialized)
|
||||
|
||||
#define AUXTOOLS_CHECK(LIB)\
|
||||
if (!GLOB.auxtools_initialized[LIB] && fexists(LIB)) {\
|
||||
var/string = call(LIB,"auxtools_init")();\
|
||||
if(findtext(string, "SUCCESS")) {\
|
||||
GLOB.auxtools_initialized[LIB] = TRUE;\
|
||||
} else {\
|
||||
CRASH(string);\
|
||||
}\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_SHUTDOWN(LIB)\
|
||||
if (GLOB.auxtools_initialized[LIB] && fexists(LIB)){\
|
||||
call(LIB,"auxtools_shutdown")();\
|
||||
GLOB.auxtools_initialized[LIB] = FALSE;\
|
||||
}\
|
||||
+26
-21
@@ -1,23 +1,24 @@
|
||||
/**
|
||||
* Higher overhead "advanced" version of do_after.
|
||||
* @params
|
||||
* - atom/user is the atom doing the action or the "physical" user
|
||||
* - delay is time in deciseconds
|
||||
* - atom/target is the atom the action is being done to, defaults to user
|
||||
* - do_after_flags see __DEFINES/flags/do_after.dm for details.
|
||||
* - datum/callback/extra_checks - Every time this ticks, extra_checks() is invoked with (user, delay, target, time_left, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool).
|
||||
* Stage can be DO_AFTER_STARTING, DO_AFTER_PROGRESSING, DO_AFTER_FINISHING
|
||||
* If it returns DO_AFTER_STOP, this breaks.
|
||||
* If it returns nothing, all other checks are done.
|
||||
* If it returns DO_AFTER_PROCEED, all other checks are ignored.
|
||||
* - required_mobility_flags is checked with CHECK_ALL_MOBILITY. Will immediately fail if the user isn't a mob.
|
||||
* - requried_combat_flags is checked with CHECK_MULTIPLE_BITFIELDS. Will immediately fail if the user isn't a mob.
|
||||
* - mob/living/mob_redirect - advanced option: If this is specified, movement and mobility/combat flag checks will use this instead of user. Progressbars will also go to this.
|
||||
* - obj/item/tool - The tool we're using. See do_after flags for details.
|
||||
*/
|
||||
#define INVOKE_CALLBACK cb_return = extra_checks?.Invoke(user, delay, target, world.time - starttime, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool)
|
||||
* Higher overhead "advanced" version of do_after.
|
||||
* @params
|
||||
* - atom/user is the atom doing the action or the "physical" user
|
||||
* - delay is time in deciseconds
|
||||
* - atom/target is the atom the action is being done to, defaults to user
|
||||
* - do_after_flags see __DEFINES/flags/do_after.dm for details.
|
||||
* - datum/callback/extra_checks - Every time this ticks, extra_checks() is invoked with (user, delay, target, time_left, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool, passed_in).
|
||||
* Stage can be DO_AFTER_STARTING, DO_AFTER_PROGRESSING, DO_AFTER_FINISHING
|
||||
* If it returns DO_AFTER_STOP, this breaks.
|
||||
* If it returns nothing, all other checks are done.
|
||||
* If it returns DO_AFTER_PROCEED, all other checks are ignored.
|
||||
* passed_in is a list[PROGRESS_MULTIPLIER], for modification.
|
||||
* - required_mobility_flags is checked with CHECK_ALL_MOBILITY. Will immediately fail if the user isn't a mob.
|
||||
* - requried_combat_flags is checked with CHECK_MULTIPLE_BITFIELDS. Will immediately fail if the user isn't a mob.
|
||||
* - mob/living/mob_redirect - advanced option: If this is specified, movement and mobility/combat flag checks will use this instead of user. Progressbars will also go to this.
|
||||
* - obj/item/tool - The tool we're using. See do_after flags for details.
|
||||
*/
|
||||
#define INVOKE_CALLBACK cb_return = extra_checks?.Invoke(user, delay, target, timeleft, do_after_flags, required_mobility_flags, required_combat_flags, mob_redirect, stage, initially_held_item, tool, passed_in)
|
||||
#define CHECK_FLAG_FAILURE ((required_mobility_flags || required_combat_flags) && (!living_user || (required_mobility_flags && !CHECK_ALL_MOBILITY(living_user, required_mobility_flags)) || (required_combat_flags && !CHECK_MULTIPLE_BITFIELDS(living_user.combat_flags, required_combat_flags))))
|
||||
#define TIMELEFT (world.time - starttime)
|
||||
#define TIMELEFT (timeleft)
|
||||
/proc/do_after_advanced(atom/user, delay, atom/target, do_after_flags, datum/callback/extra_checks, required_mobility_flags, required_combat_flags, mob/living/mob_redirect, obj/item/tool)
|
||||
// CHECK AND SET VARIABLES
|
||||
if(!user)
|
||||
@@ -40,8 +41,7 @@
|
||||
return FALSE
|
||||
if(!(do_after_flags & DO_AFTER_NO_COEFFICIENT) && living_user)
|
||||
delay *= living_user.cached_multiplicative_actions_slowdown
|
||||
var/starttime = world.time
|
||||
var/endtime = world.time + delay
|
||||
var/timeleft = delay
|
||||
var/obj/item/initially_held_item = mob_redirect?.get_active_held_item()
|
||||
var/atom/movable/AM_user = ismovable(user) && user
|
||||
var/drifting = AM_user?.Process_Spacemove(NONE) && AM_user.inertia_dir
|
||||
@@ -51,6 +51,7 @@
|
||||
var/dy = initial_dy
|
||||
// DO OUR STARTING CHECKS
|
||||
var/cb_return
|
||||
var/list/passed_in = list(1)
|
||||
INVOKE_CALLBACK
|
||||
if(cb_return == DO_AFTER_STOP)
|
||||
return FALSE
|
||||
@@ -70,13 +71,17 @@
|
||||
var/locchanged
|
||||
var/ctu
|
||||
var/ctt
|
||||
while(world.time < endtime)
|
||||
var/tick_time = world.time
|
||||
while(timeleft > 0)
|
||||
stoplag(1)
|
||||
var/timepassed = world.time - tick_time
|
||||
timepassed = world.time
|
||||
progbar?.update(TIMELEFT)
|
||||
if(QDELETED(user) || QDELETED(target) || (user.loc == null) || (target.loc == null))
|
||||
. = FALSE
|
||||
break
|
||||
INVOKE_CALLBACK
|
||||
timeleft -= timepassed * passed_in[1]
|
||||
if(cb_return == DO_AFTER_STOP)
|
||||
. = FALSE
|
||||
break
|
||||
|
||||
@@ -270,6 +270,20 @@
|
||||
SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing, .)
|
||||
processing += A.contents
|
||||
|
||||
/proc/get_hearers_in_range(R, atom/source)
|
||||
var/turf/T = get_turf(source)
|
||||
. = list()
|
||||
if(!T)
|
||||
return
|
||||
var/list/processing = range(R, source)
|
||||
var/i = 0
|
||||
while(i < length(processing))
|
||||
var/atom/A = processing[++i]
|
||||
if(A.flags_1 & HEAR_1)
|
||||
. += A
|
||||
SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing, .)
|
||||
processing += A.contents
|
||||
|
||||
//viewers() but with a signal, for blacklisting.
|
||||
/proc/fov_viewers(depth = world.view, atom/center)
|
||||
if(!center)
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/datum/yelling_wavefill
|
||||
var/stop = FALSE
|
||||
var/list/atom/collected
|
||||
|
||||
/datum/yelling_wavefill/Destroy(force, ...)
|
||||
stop = TRUE
|
||||
collected = null // don't cut it, something else is probably using it now!
|
||||
return ..()
|
||||
|
||||
/datum/yelling_wavefill/proc/run_wavefill(atom/source, dist = 50)
|
||||
collected = list()
|
||||
do_run(source, dist)
|
||||
// to_chat(world, "DEBUG: collected [english_list(collected)]")
|
||||
|
||||
// blatantly copied from wave explosion code
|
||||
// check explosion2.dm for what this does and how it works.
|
||||
/datum/yelling_wavefill/proc/do_run(atom/source, dist)
|
||||
source = get_turf(source)
|
||||
var/list/edges = list()
|
||||
edges[source] = (NORTH|SOUTH|EAST|WEST)
|
||||
collected += typecache_filter_list(source.contents, GLOB.typecache_living)
|
||||
var/list/powers = list()
|
||||
powers[source] = dist
|
||||
var/list/processed = list()
|
||||
var/turf/T
|
||||
var/turf/expanding
|
||||
var/power
|
||||
var/dir
|
||||
var/returned
|
||||
#define RUN_YELL(_T, _P, _D) \
|
||||
returned = max(_P - max(_T.get_yelling_resistance(_P), 0) - 1, 0); \
|
||||
processed[_T] = returned;
|
||||
// _T.maptext = "[returned]";
|
||||
|
||||
var/list/turf/edges_next
|
||||
var/list/turf/powers_next
|
||||
var/list/turf/powers_returned
|
||||
var/list/turf/diagonals
|
||||
var/list/turf/diagonal_powers
|
||||
var/list/turf/diagonal_powers_max
|
||||
var/safety = 1000
|
||||
|
||||
#define CALCULATE_DIAGONAL_POWER(existing, adding, maximum) min(maximum, existing + adding)
|
||||
#define CALCULATE_DIAGONAL_CROSS_POWER(existing, adding) max(existing, adding)
|
||||
#define CARDINAL_MARK(ndir, cdir, edir) \
|
||||
if(edir & cdir) { \
|
||||
expanding = get_step(T,ndir); \
|
||||
if(expanding && (isnull(processed[expanding]) || (processed[expanding] < (power - 3)))) { \
|
||||
powers_next[expanding] = max(powers_next[expanding], returned); \
|
||||
edges_next[expanding] = (cdir | edges_next[expanding]); \
|
||||
}; \
|
||||
};
|
||||
|
||||
#define DIAGONAL_SUBSTEP(ndir, cdir, edir) \
|
||||
expanding = get_step(T,ndir); \
|
||||
if(expanding && (isnull(processed[expanding]) || (processed[expanding] < (power - 3)))) { \
|
||||
if(!edges_next[expanding]) { \
|
||||
diagonal_powers_max[expanding] = max(diagonal_powers_max[expanding], returned, powers[T]); \
|
||||
diagonal_powers[expanding] = CALCULATE_DIAGONAL_POWER(diagonal_powers[expanding], returned, diagonal_powers_max[expanding]); \
|
||||
diagonals[expanding] = (cdir | diagonals[expanding]); \
|
||||
}; \
|
||||
else { \
|
||||
powers_next[expanding] = CALCULATE_DIAGONAL_CROSS_POWER(powers_next[expanding], returned); \
|
||||
}; \
|
||||
};
|
||||
|
||||
#define DIAGONAL_MARK(ndir, cdir, edir) \
|
||||
if(edir & cdir) { \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, 90), turn(cdir, 90), edir); \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, -90), turn(cdir, -90), edir); \
|
||||
};
|
||||
|
||||
while(edges.len)
|
||||
edges_next = list()
|
||||
powers_next = list()
|
||||
powers_returned = list()
|
||||
diagonals = list()
|
||||
diagonal_powers = list()
|
||||
diagonal_powers_max = list()
|
||||
// to_chat(world, "DEBUG: cycle start edges [english_list_assoc(edges)]")
|
||||
|
||||
// process cardinals
|
||||
for(var/i in edges)
|
||||
T = i
|
||||
power = powers[T]
|
||||
dir = edges[T]
|
||||
RUN_YELL(T, power, dir)
|
||||
powers_returned[T] = returned
|
||||
if(returned >= 1)
|
||||
collected |= typecache_filter_list(T.contents, GLOB.typecache_living)
|
||||
else
|
||||
continue
|
||||
|
||||
CARDINAL_MARK(NORTH, NORTH, dir)
|
||||
CARDINAL_MARK(SOUTH, SOUTH, dir)
|
||||
CARDINAL_MARK(EAST, EAST, dir)
|
||||
CARDINAL_MARK(WEST, WEST, dir)
|
||||
|
||||
// to_chat(world, "DEBUG: cycle mid edges_next [english_list_assoc(edges_next)]")
|
||||
|
||||
// Sweep after cardinals for diagonals
|
||||
for(var/i in edges)
|
||||
T = i
|
||||
power = powers[T]
|
||||
dir = edges[T]
|
||||
returned = powers_returned[T]
|
||||
DIAGONAL_MARK(NORTH, NORTH, dir)
|
||||
DIAGONAL_MARK(SOUTH, SOUTH, dir)
|
||||
DIAGONAL_MARK(EAST, EAST, dir)
|
||||
DIAGONAL_MARK(WEST, WEST, dir)
|
||||
|
||||
// to_chat(world, "DEBUG: cycle mid diagonals [english_list_assoc(diagonals)]")
|
||||
|
||||
// Process diagonals:
|
||||
for(var/i in diagonals)
|
||||
T = i
|
||||
power = diagonal_powers[T]
|
||||
dir = diagonals[T]
|
||||
RUN_YELL(T, power, dir)
|
||||
if(returned >= 1)
|
||||
collected |= typecache_filter_list(T.contents, GLOB.typecache_living)
|
||||
else
|
||||
continue
|
||||
CARDINAL_MARK(NORTH, NORTH, dir)
|
||||
CARDINAL_MARK(SOUTH, SOUTH, dir)
|
||||
CARDINAL_MARK(EAST, EAST, dir)
|
||||
CARDINAL_MARK(WEST, WEST, dir)
|
||||
|
||||
// to_chat(world, "DEBUG: cycle end edges_next [english_list_assoc(edges_next)]")
|
||||
|
||||
// flush lists
|
||||
edges = edges_next
|
||||
powers = powers_next
|
||||
|
||||
// sleep(2.5)
|
||||
if(!--safety)
|
||||
CRASH("Yelling ran out of safety.")
|
||||
|
||||
#undef RUN_YELL
|
||||
#undef DIAGONAL_SUBSTEP
|
||||
#undef CALCULATE_DIAGONAL_POWER
|
||||
#undef CALCULATE_DIAGONAL_CROSS_POWER
|
||||
#undef DIAGONAL_MARK
|
||||
#undef CARDINAL_MARK
|
||||
|
||||
/proc/yelling_wavefill(atom/source, dist = 50)
|
||||
var/datum/yelling_wavefill/Y = new
|
||||
Y.run_wavefill(source, dist)
|
||||
. = Y.collected
|
||||
qdel(Y)
|
||||
@@ -288,6 +288,9 @@
|
||||
return
|
||||
|
||||
/atom/proc/ShiftClick(mob/user)
|
||||
attempt_examinate(user)
|
||||
|
||||
/atom/proc/attempt_examinate(mob/user)
|
||||
var/flags = SEND_SIGNAL(src, COMSIG_CLICK_SHIFT, user) | SEND_SIGNAL(user, COMSIG_MOB_CLICKED_SHIFT_ON, src)
|
||||
if(!(flags & COMPONENT_DENY_EXAMINATE) && user.client && (user.client.eye == user || user.client.eye == user.loc || flags & COMPONENT_ALLOW_EXAMINATE))
|
||||
user.examinate(src)
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
mouseControlObject = control
|
||||
if(mob)
|
||||
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOUSEMOVE, object, location, control, params)
|
||||
// god forgive me for i have sinned - used for autoparry. currently at 5 objects.
|
||||
moused_over_objects[object] = world.time
|
||||
if(moused_over_objects.len > 7)
|
||||
moused_over_objects.Cut(1, 2)
|
||||
..()
|
||||
|
||||
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
|
||||
@@ -115,7 +119,6 @@
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
|
||||
|
||||
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
return
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
if(!isnull(stagger_force))
|
||||
return stagger_force
|
||||
/// totally not an untested, arbitrary equation.
|
||||
return clamp((1.5 + (w_class/5)) * ((force_override || force) / 1.5), 0, 10 SECONDS)
|
||||
return clamp((1.5 + (w_class/5)) * ((force_override || force) / 1.5), 0, 10 SECONDS) * CONFIG_GET(number/melee_stagger_factor)
|
||||
|
||||
/obj/item/proc/do_stagger_action(mob/living/target, mob/living/user, force_override)
|
||||
if(!CHECK_BITFIELD(target.status_flags, CANSTAGGER))
|
||||
|
||||
@@ -269,6 +269,15 @@
|
||||
/mob/living/carbon/alien/humanoid/royal/queen = 2
|
||||
)
|
||||
|
||||
/datum/config_entry/number/sprintless_stagger_slowdown
|
||||
config_entry_value = 0
|
||||
|
||||
/datum/config_entry/number/melee_stagger_factor
|
||||
config_entry_value = 1
|
||||
|
||||
/datum/config_entry/number/sprintless_off_balance_slowdown
|
||||
config_entry_value = 0.85
|
||||
|
||||
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
|
||||
abstract_type = /datum/config_entry/number/movedelay
|
||||
integer = FALSE
|
||||
|
||||
@@ -12,11 +12,7 @@
|
||||
|
||||
/// Base regeneration per second
|
||||
/datum/config_entry/number/stamina_combat/base_regeneration
|
||||
config_entry_value = 0.5
|
||||
|
||||
/// Combat mode regeneration per second
|
||||
/datum/config_entry/number/stamina_combat/combat_regeneration
|
||||
config_entry_value = 5
|
||||
config_entry_value = 3.5
|
||||
|
||||
/// After out_of_combat_timer elapses, additionally regenerate this percent of total stamina per second. Unaffected by combat mode.
|
||||
/datum/config_entry/number/stamina_combat/percent_regeneration_out_of_combat
|
||||
|
||||
@@ -20,6 +20,9 @@ SUBSYSTEM_DEF(adjacent_air)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/adjacent_air/fire(resumed = FALSE, mc_check = TRUE)
|
||||
if(SSair.thread_running())
|
||||
pause()
|
||||
return
|
||||
|
||||
var/list/queue = src.queue
|
||||
|
||||
|
||||
+199
-183
@@ -9,24 +9,36 @@ SUBSYSTEM_DEF(air)
|
||||
var/cost_turfs = 0
|
||||
var/cost_groups = 0
|
||||
var/cost_highpressure = 0
|
||||
var/cost_deferred_airs
|
||||
var/cost_hotspots = 0
|
||||
var/cost_post_process = 0
|
||||
var/cost_superconductivity = 0
|
||||
var/cost_pipenets = 0
|
||||
var/cost_rebuilds = 0
|
||||
var/cost_atmos_machinery = 0
|
||||
var/cost_equalize = 0
|
||||
var/thread_wait_ticks = 0
|
||||
var/cur_thread_wait_ticks = 0
|
||||
|
||||
var/low_pressure_turfs = 0
|
||||
var/high_pressure_turfs = 0
|
||||
|
||||
var/num_group_turfs_processed = 0
|
||||
var/num_equalize_processed = 0
|
||||
|
||||
var/list/hotspots = list()
|
||||
var/list/networks = list()
|
||||
var/list/pipenets_needing_rebuilt = list()
|
||||
var/list/deferred_airs = list()
|
||||
var/max_deferred_airs = 0
|
||||
var/list/obj/machinery/atmos_machinery = list()
|
||||
var/list/obj/machinery/atmos_air_machinery = list()
|
||||
var/list/pipe_init_dirs_cache = list()
|
||||
|
||||
//atmos singletons
|
||||
var/list/gas_reactions = list()
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/active_super_conductivity = list()
|
||||
var/list/turf/open/high_pressure_delta = list()
|
||||
|
||||
|
||||
@@ -34,54 +46,88 @@ SUBSYSTEM_DEF(air)
|
||||
var/currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
var/map_loading = TRUE
|
||||
var/list/queued_for_activation
|
||||
|
||||
var/log_explosive_decompression = TRUE // If things get spammy, admemes can turn this off.
|
||||
|
||||
var/monstermos_turf_limit = 10
|
||||
var/monstermos_hard_turf_limit = 2000
|
||||
var/monstermos_enabled = TRUE
|
||||
// Max number of turfs equalization will grab.
|
||||
var/equalize_turf_limit = 10
|
||||
// Max number of turfs to look for a space turf, and max number of turfs that will be decompressed.
|
||||
var/equalize_hard_turf_limit = 2000
|
||||
// Whether equalization should be enabled at all.
|
||||
var/equalize_enabled = FALSE
|
||||
// Whether turf-to-turf heat exchanging should be enabled.
|
||||
var/heat_enabled = FALSE
|
||||
// Max number of times process_turfs will share in a tick.
|
||||
var/share_max_steps = 1
|
||||
// Excited group processing will try to equalize groups with total pressure difference less than this amount.
|
||||
var/excited_group_pressure_goal = 0.25
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg += "C:{"
|
||||
msg += "EQ:[round(cost_equalize,1)]|"
|
||||
msg += "AT:[round(cost_turfs,1)]|"
|
||||
msg += "EG:[round(cost_groups,1)]|"
|
||||
msg += "HP:[round(cost_highpressure,1)]|"
|
||||
msg += "HS:[round(cost_hotspots,1)]|"
|
||||
msg += "HE:[round(heat_process_time(),1)]|"
|
||||
msg += "SC:[round(cost_superconductivity,1)]|"
|
||||
msg += "PN:[round(cost_pipenets,1)]|"
|
||||
msg += "AM:[round(cost_atmos_machinery,1)]"
|
||||
msg += "} "
|
||||
var/active_turfs_len = get_amt_active_turfs()
|
||||
msg += "AT:[active_turfs_len]|"
|
||||
msg += "EG:[get_amt_excited_groups()]|"
|
||||
msg += "TC:{"
|
||||
msg += "AT:[round(cost_turfs,1)]|"
|
||||
msg += "EG:[round(cost_groups,1)]|"
|
||||
msg += "EQ:[round(cost_equalize,1)]|"
|
||||
msg += "PO:[round(cost_post_process,1)]"
|
||||
msg += "}"
|
||||
msg += "TH:[round(thread_wait_ticks,1)]|"
|
||||
msg += "HS:[hotspots.len]|"
|
||||
msg += "PN:[networks.len]|"
|
||||
msg += "HP:[high_pressure_delta.len]|"
|
||||
msg += "AS:[active_super_conductivity.len]|"
|
||||
msg += "HT:[high_pressure_turfs]|"
|
||||
msg += "LT:[low_pressure_turfs]|"
|
||||
msg += "ET:[num_equalize_processed]|"
|
||||
msg += "GT:[num_group_turfs_processed]|"
|
||||
msg += "DF:[max_deferred_airs]|"
|
||||
msg += "GA:[get_amt_gas_mixes()]|"
|
||||
msg += "MG:[get_max_gas_mixes()]|"
|
||||
msg += "AT/MS:[round((cost ? active_turfs_len/cost : 0),0.1)]"
|
||||
msg += "MG:[get_max_gas_mixes()]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/air/Initialize(timeofday)
|
||||
extools_update_ssair()
|
||||
map_loading = FALSE
|
||||
setup_allturfs()
|
||||
setup_atmos_machinery()
|
||||
setup_pipenets()
|
||||
gas_reactions = init_gas_reactions()
|
||||
extools_update_reactions()
|
||||
auxtools_update_reactions()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/air/proc/extools_update_ssair()
|
||||
/datum/controller/subsystem/air/proc/extools_update_reactions()
|
||||
|
||||
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
|
||||
|
||||
/proc/reset_all_air()
|
||||
SSair.can_fire = 0
|
||||
message_admins("Air reset begun.")
|
||||
for(var/turf/open/T in world)
|
||||
T.Initalize_Atmos(0)
|
||||
CHECK_TICK
|
||||
message_admins("Air reset done.")
|
||||
SSair.can_fire = 1
|
||||
|
||||
/datum/controller/subsystem/air/proc/thread_running()
|
||||
return FALSE
|
||||
|
||||
/proc/fix_corrupted_atmos()
|
||||
|
||||
/datum/admins/proc/fixcorruption()
|
||||
set category = "Debug"
|
||||
set desc="Fixes air that has weird NaNs (-1.#IND and such). Hopefully."
|
||||
set name="Fix Infinite Air"
|
||||
fix_corrupted_atmos()
|
||||
|
||||
/datum/controller/subsystem/air/fire(resumed = 0)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
timer = TICK_USAGE_REAL
|
||||
var/list/pipenet_rebuilds = pipenets_needing_rebuilt
|
||||
for(var/thing in pipenet_rebuilds)
|
||||
var/obj/machinery/atmospherics/AT = thing
|
||||
@@ -96,13 +142,14 @@ SUBSYSTEM_DEF(air)
|
||||
currentpart = SSAIR_PIPENETS
|
||||
|
||||
if(currentpart == SSAIR_PIPENETS || !resumed)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_pipenets(resumed)
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_ATMOSMACHINERY
|
||||
|
||||
// This is only machinery like filters, mixers that don't interact with air
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_atmos_machinery(resumed)
|
||||
@@ -110,33 +157,6 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = monstermos_enabled ? SSAIR_EQUALIZE : SSAIR_ACTIVETURFS
|
||||
|
||||
if(currentpart == SSAIR_EQUALIZE)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_turf_equalize(resumed)
|
||||
cost_equalize = MC_AVERAGE(cost_equalize, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_ACTIVETURFS
|
||||
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_active_turfs(resumed)
|
||||
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_EXCITEDGROUPS
|
||||
|
||||
if(currentpart == SSAIR_EXCITEDGROUPS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_excited_groups(resumed)
|
||||
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HIGHPRESSURE
|
||||
|
||||
if(currentpart == SSAIR_HIGHPRESSURE)
|
||||
@@ -146,6 +166,34 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_FINALIZE_TURFS
|
||||
// This literally just waits for the turf processing thread to finish, doesn't do anything else.
|
||||
// this is necessary cause the next step after this interacts with the air--we get consistency
|
||||
// issues if we don't wait for it, disappearing gases etc.
|
||||
if(currentpart == SSAIR_FINALIZE_TURFS)
|
||||
finish_turf_processing(resumed)
|
||||
if(state != SS_RUNNING)
|
||||
cur_thread_wait_ticks++
|
||||
return
|
||||
resumed = 0
|
||||
thread_wait_ticks = MC_AVERAGE(thread_wait_ticks, cur_thread_wait_ticks)
|
||||
cur_thread_wait_ticks = 0
|
||||
currentpart = SSAIR_DEFERRED_AIRS
|
||||
if(currentpart == SSAIR_DEFERRED_AIRS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_deferred_airs(resumed)
|
||||
cost_deferred_airs = MC_AVERAGE(cost_deferred_airs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_ATMOSMACHINERY_AIR
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY_AIR)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_atmos_air_machinery(resumed)
|
||||
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HOTSPOTS
|
||||
|
||||
if(currentpart == SSAIR_HOTSPOTS)
|
||||
@@ -155,19 +203,58 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_SUPERCONDUCTIVITY
|
||||
|
||||
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
|
||||
currentpart = heat_enabled ? SSAIR_TURF_CONDUCTION : SSAIR_ACTIVETURFS
|
||||
// Heat -- slow and of questionable usefulness. Off by default for this reason. Pretty cool, though.
|
||||
if(currentpart == SSAIR_TURF_CONDUCTION)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_super_conductivity(resumed)
|
||||
if(process_turf_heat(TICK_REMAINING_MS))
|
||||
pause()
|
||||
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_ACTIVETURFS
|
||||
// This simply starts the turf thread. It runs in the background until the FINALIZE_TURFS step, at which point it's waited for.
|
||||
// This also happens to do all the commented out stuff below, all in a single separate thread. This is mostly so that the
|
||||
// waiting is consistent.
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_turfs(resumed)
|
||||
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
/*
|
||||
// Monstermos and/or Putnamos--making large pressure deltas move faster
|
||||
if(currentpart == SSAIR_EQUALIZE)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_turf_equalize(resumed)
|
||||
cost_equalize = MC_AVERAGE(cost_equalize, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_EXCITEDGROUPS
|
||||
// Making small pressure deltas equalize immediately so they don't process anymore
|
||||
if(currentpart == SSAIR_EXCITEDGROUPS)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_excited_groups(resumed)
|
||||
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_TURF_POST_PROCESS
|
||||
// Quick multithreaded "should we display/react?" checks followed by finishing those up before the next step
|
||||
if(currentpart == SSAIR_TURF_POST_PROCESS)
|
||||
timer = TICK_USAGE_REAL
|
||||
post_process_turfs(resumed)
|
||||
cost_post_process = MC_AVERAGE(cost_post_process, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HOTSPOTS
|
||||
*/
|
||||
currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = networks.Copy()
|
||||
@@ -187,6 +274,31 @@ SUBSYSTEM_DEF(air)
|
||||
if(istype(atmos_machine, /obj/machinery/atmospherics))
|
||||
pipenets_needing_rebuilt += atmos_machine
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_deferred_airs(resumed = 0)
|
||||
max_deferred_airs = max(deferred_airs.len,max_deferred_airs)
|
||||
while(deferred_airs.len)
|
||||
var/list/cur_op = deferred_airs[deferred_airs.len]
|
||||
deferred_airs.len--
|
||||
var/datum/gas_mixture/air1
|
||||
var/datum/gas_mixture/air2
|
||||
if(isopenturf(cur_op[1]))
|
||||
var/turf/open/T = cur_op[1]
|
||||
air1 = T.return_air()
|
||||
else
|
||||
air1 = cur_op[1]
|
||||
if(isopenturf(cur_op[2]))
|
||||
var/turf/open/T = cur_op[2]
|
||||
air2 = T.return_air()
|
||||
else
|
||||
air2 = cur_op[2]
|
||||
if(istype(cur_op[3], /datum/callback))
|
||||
var/datum/callback/cb = cur_op[3]
|
||||
cb.Invoke(air1, air2)
|
||||
else
|
||||
air1.transfer_ratio_to(air2, cur_op[3])
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
if (!resumed)
|
||||
@@ -201,19 +313,22 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_atmos_air_machinery(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
if (!resumed)
|
||||
src.currentrun = active_super_conductivity.Copy()
|
||||
src.currentrun = atmos_air_machinery.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/turf/T = currentrun[currentrun.len]
|
||||
var/obj/machinery/M = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
T.super_conduct()
|
||||
if(!M || (M.process_atmos(seconds) == PROCESS_KILL))
|
||||
atmos_air_machinery.Remove(M)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turf_heat()
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = hotspots.Copy()
|
||||
@@ -241,7 +356,7 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0)
|
||||
if(process_turf_equalize_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
|
||||
if(process_turf_equalize_auxtools(resumed,TICK_REMAINING_MS))
|
||||
pause()
|
||||
/*
|
||||
//cache for sanic speed
|
||||
@@ -260,8 +375,8 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
|
||||
if(process_active_turfs_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
|
||||
/datum/controller/subsystem/air/proc/process_turfs(resumed = 0)
|
||||
if(process_turfs_auxtools(resumed,TICK_REMAINING_MS))
|
||||
pause()
|
||||
/*
|
||||
//cache for sanic speed
|
||||
@@ -280,75 +395,32 @@ SUBSYSTEM_DEF(air)
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
|
||||
if(process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
|
||||
if(process_excited_groups_auxtools(resumed,TICK_REMAINING_MS))
|
||||
pause()
|
||||
/*
|
||||
if (!resumed)
|
||||
src.currentrun = excited_groups.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/datum/excited_group/EG = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
EG.breakdown_cooldown++
|
||||
EG.dismantle_cooldown++
|
||||
if(EG.breakdown_cooldown >= EXCITED_GROUP_BREAKDOWN_CYCLES)
|
||||
EG.self_breakdown()
|
||||
else if(EG.dismantle_cooldown >= EXCITED_GROUP_DISMANTLE_CYCLES)
|
||||
EG.dismantle()
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_active_turfs_extools()
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize_extools()
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups_extools()
|
||||
/datum/controller/subsystem/air/proc/get_amt_excited_groups()
|
||||
/datum/controller/subsystem/air/proc/get_amt_active_turfs()
|
||||
/datum/controller/subsystem/air/proc/finish_turf_processing(resumed = 0)
|
||||
if(finish_turf_processing_auxtools(TICK_REMAINING_MS))
|
||||
pause()
|
||||
|
||||
/datum/controller/subsystem/air/proc/post_process_turfs(resumed = 0)
|
||||
if(post_process_turfs_auxtools(resumed,TICK_REMAINING_MS))
|
||||
pause()
|
||||
|
||||
/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools()
|
||||
/datum/controller/subsystem/air/proc/process_turfs_auxtools()
|
||||
/datum/controller/subsystem/air/proc/post_process_turfs_auxtools()
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools()
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups_auxtools()
|
||||
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
|
||||
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
|
||||
/datum/controller/subsystem/air/proc/add_to_active_extools()
|
||||
/datum/controller/subsystem/air/proc/remove_from_active_extools()
|
||||
/datum/controller/subsystem/air/proc/get_active_turfs()
|
||||
/datum/controller/subsystem/air/proc/clear_active_turfs()
|
||||
|
||||
/datum/controller/subsystem/air/proc/remove_from_active(turf/open/T)
|
||||
remove_from_active_extools(T)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00")
|
||||
#endif
|
||||
if(istype(T))
|
||||
T.set_excited(FALSE)
|
||||
T.eg_garbage_collect()
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_to_active(turf/open/T, blockchanges = 1)
|
||||
if(istype(T) && T.air)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY)
|
||||
#endif
|
||||
T.set_excited(TRUE)
|
||||
add_to_active_extools(T)
|
||||
if(blockchanges)
|
||||
T.eg_garbage_collect()
|
||||
else if(T.flags_1 & INITIALIZED_1)
|
||||
for(var/turf/S in T.atmos_adjacent_turfs)
|
||||
add_to_active(S)
|
||||
else if(map_loading)
|
||||
if(queued_for_activation)
|
||||
queued_for_activation[T] = T
|
||||
return
|
||||
else
|
||||
T.requires_activation = TRUE
|
||||
/datum/controller/subsystem/air/proc/turf_process_time()
|
||||
/datum/controller/subsystem/air/proc/heat_process_time()
|
||||
|
||||
/datum/controller/subsystem/air/StartLoadingMap()
|
||||
LAZYINITLIST(queued_for_activation)
|
||||
map_loading = TRUE
|
||||
|
||||
/datum/controller/subsystem/air/StopLoadingMap()
|
||||
map_loading = FALSE
|
||||
for(var/T in queued_for_activation)
|
||||
add_to_active(T)
|
||||
queued_for_activation.Cut()
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_allturfs()
|
||||
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
|
||||
@@ -356,7 +428,6 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
// Clear active turfs - faster than removing every single turf in the world
|
||||
// one-by-one, and Initalize_Atmos only ever adds `src` back in.
|
||||
clear_active_turfs()
|
||||
|
||||
for(var/thing in turfs_to_init)
|
||||
var/turf/T = thing
|
||||
@@ -364,67 +435,9 @@ SUBSYSTEM_DEF(air)
|
||||
continue
|
||||
T.Initalize_Atmos(times_fired)
|
||||
CHECK_TICK
|
||||
var/starting_ats = get_amt_active_turfs()
|
||||
if(starting_ats)
|
||||
sleep(world.tick_lag)
|
||||
var/timer = world.timeofday
|
||||
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
|
||||
var/list/turfs_to_check = get_active_turfs()
|
||||
for(var/T in turfs_to_check)
|
||||
GLOB.active_turfs_startlist += T
|
||||
|
||||
//now lets clear out these active turfs
|
||||
do
|
||||
var/list/new_turfs_to_check = list()
|
||||
for(var/turf/open/T in turfs_to_check)
|
||||
new_turfs_to_check += T.resolve_active_graph()
|
||||
CHECK_TICK
|
||||
for(var/T in new_turfs_to_check)
|
||||
add_to_active_extools(T)
|
||||
turfs_to_check = new_turfs_to_check
|
||||
|
||||
while (turfs_to_check.len)
|
||||
var/ending_ats = get_amt_active_turfs()
|
||||
/*for(var/thing in excited_groups)
|
||||
var/datum/excited_group/EG = thing
|
||||
//EG.self_breakdown(space_is_all_consuming = 1)
|
||||
//EG.dismantle()
|
||||
CHECK_TICK*/
|
||||
|
||||
var/msg = "HEY! LISTEN! [DisplayTimeText(world.timeofday - timer)] were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start."
|
||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||
warning(msg)
|
||||
|
||||
/turf/open/proc/resolve_active_graph()
|
||||
. = list()
|
||||
/*
|
||||
var/datum/excited_group/EG = excited_group
|
||||
if (blocks_air || !air)
|
||||
return
|
||||
if (!EG)
|
||||
EG = new
|
||||
EG.add_turf(src)
|
||||
|
||||
for (var/turf/open/ET in atmos_adjacent_turfs)
|
||||
if ( ET.blocks_air || !ET.air)
|
||||
continue
|
||||
|
||||
var/ET_EG = ET.excited_group
|
||||
if (ET_EG)
|
||||
if (ET_EG != EG)
|
||||
EG.merge_groups(ET_EG)
|
||||
EG = excited_group //merge_groups() may decide to replace our current EG
|
||||
else
|
||||
EG.add_turf(ET)
|
||||
if (!ET.excited)
|
||||
ET.excited = 1
|
||||
. += ET*/
|
||||
|
||||
/turf/open/space/resolve_active_graph()
|
||||
return list()
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_atmos_machinery()
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery)
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery + atmos_air_machinery)
|
||||
AM.atmosinit()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -432,7 +445,7 @@ SUBSYSTEM_DEF(air)
|
||||
// all atmos machinery has to initalize before the first
|
||||
// pipenet can be built.
|
||||
/datum/controller/subsystem/air/proc/setup_pipenets()
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery)
|
||||
for (var/obj/machinery/atmospherics/AM in atmos_machinery + atmos_air_machinery)
|
||||
AM.build_network()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -460,12 +473,15 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
return pipe_init_dirs_cache[type]["[dir]"]
|
||||
|
||||
/proc/get_extools_benchmarks()
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
#undef SSAIR_ACTIVETURFS
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOTS
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_TURF_CONDUCTION
|
||||
#undef SSAIR_REBUILD_PIPENETS
|
||||
#undef SSAIR_EQUALIZE
|
||||
#undef SSAIR_ACTIVETURFS
|
||||
#undef SSAIR_TURF_POST_PROCESS
|
||||
#undef SSAIR_FINALIZE_TURFS
|
||||
#undef SSAIR_ATMOSMACHINERY_AIR
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
SUBSYSTEM_DEF(callbacks)
|
||||
name = "Auxtools Callbacks"
|
||||
flags = SS_TICKER | SS_NO_INIT
|
||||
wait = 1
|
||||
priority = FIRE_PRIORITY_CALLBACKS
|
||||
|
||||
/proc/process_atmos_callbacks()
|
||||
SScallbacks.can_fire = 0
|
||||
SScallbacks.flags |= SS_NO_FIRE
|
||||
CRASH("Auxtools not found! Callback subsystem shutting itself off.")
|
||||
|
||||
/datum/controller/subsystem/callbacks/fire()
|
||||
if(process_atmos_callbacks(TICK_REMAINING_MS))
|
||||
pause()
|
||||
@@ -726,6 +726,8 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
preview_shuttle.register(replace)
|
||||
|
||||
preview_shuttle.reset_air()
|
||||
|
||||
// TODO indicate to the user that success happened, rather than just
|
||||
// blanking the modification tab
|
||||
preview_shuttle = null
|
||||
|
||||
@@ -31,18 +31,20 @@ SUBSYSTEM_DEF(time_track)
|
||||
"maptick",
|
||||
"num_timers",
|
||||
"air_turf_cost",
|
||||
"air_turf_thread_time",
|
||||
"air_equalize_cost",
|
||||
"air_post_process_cost",
|
||||
"air_eg_cost",
|
||||
"air_highpressure_cost",
|
||||
"air_hotspots_cost",
|
||||
"air_superconductivity_cost",
|
||||
"air_heat_spread_cost",
|
||||
"air_pipenets_cost",
|
||||
"air_rebuilds_cost",
|
||||
"air_turf_count",
|
||||
"air_eg_count",
|
||||
"air_amt_gas_mixes",
|
||||
"air_alloc_gas_mixes",
|
||||
"air_hotspot_count",
|
||||
"air_network_count",
|
||||
"air_delta_count",
|
||||
"air_superconductive_count"
|
||||
)
|
||||
)
|
||||
|
||||
@@ -81,17 +83,19 @@ SUBSYSTEM_DEF(time_track)
|
||||
MAPTICK_LAST_INTERNAL_TICK_USAGE,
|
||||
length(SStimer.timer_id_dict),
|
||||
SSair.cost_turfs,
|
||||
SSair.turf_process_time(),
|
||||
SSair.cost_equalize,
|
||||
SSair.cost_post_process,
|
||||
SSair.cost_groups,
|
||||
SSair.cost_highpressure,
|
||||
SSair.cost_hotspots,
|
||||
SSair.cost_superconductivity,
|
||||
SSair.cost_pipenets,
|
||||
SSair.cost_rebuilds,
|
||||
SSair.get_active_turfs(), //does not return a list, which is what we want
|
||||
SSair.get_amt_excited_groups(),
|
||||
SSair.get_amt_gas_mixes(),
|
||||
SSair.get_max_gas_mixes(),
|
||||
length(SSair.hotspots),
|
||||
length(SSair.networks),
|
||||
length(SSair.high_pressure_delta),
|
||||
length(SSair.active_super_conductivity)
|
||||
length(SSair.high_pressure_delta)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
|
||||
RegisterSignal(source, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove)
|
||||
RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move)
|
||||
RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move)
|
||||
if(hud_icon)
|
||||
hud_icon.combat_on = TRUE
|
||||
hud_icon.update_icon()
|
||||
@@ -115,7 +114,7 @@
|
||||
to_chat(source, self_message)
|
||||
if(playsound)
|
||||
source.playsound_local(source, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the toggleon sound!
|
||||
UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_CLIENT_MOVE))
|
||||
UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED))
|
||||
if(hud_icon)
|
||||
hud_icon.combat_on = FALSE
|
||||
hud_icon.update_icon()
|
||||
@@ -128,11 +127,6 @@
|
||||
if((mode_flags & COMBAT_MODE_ACTIVE) && L.client)
|
||||
L.setDir(lastmousedir, ismousemovement = TRUE)
|
||||
|
||||
/// Added movement delay if moving backward.
|
||||
/datum/component/combat_mode/proc/on_client_move(mob/source, client/client, direction, n, oldloc, added_delay)
|
||||
if(oldloc != n && direction == REVERSE_DIR(source.dir))
|
||||
client.move_delay += added_delay*0.5
|
||||
|
||||
///Changes the user direction to (try) match the pointer.
|
||||
/datum/component/combat_mode/proc/onMouseMove(mob/source, object, location, control, params)
|
||||
if(source.client.show_popup_menus)
|
||||
|
||||
@@ -72,6 +72,16 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_MELEE
|
||||
|
||||
/datum/crafting_recipe/newsbaton
|
||||
name = "Newspaper Baton"
|
||||
result = /obj/item/melee/classic_baton/telescopic/newspaper
|
||||
reqs = list(/obj/item/melee/classic_baton/telescopic = 1,
|
||||
/obj/item/newspaper = 1,
|
||||
/obj/item/stack/sticky_tape = 2)
|
||||
time = 40
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_MELEE
|
||||
|
||||
/datum/crafting_recipe/bokken
|
||||
name = "Training Bokken"
|
||||
result = /obj/item/melee/bokken
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
identification_method_flags = id_method_flags
|
||||
|
||||
/datum/component/identification/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, .proc/check_knowledge)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
if(identification_effect_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
|
||||
@@ -214,7 +214,6 @@
|
||||
/datum/component/nanites/proc/check_viral_prevention()
|
||||
return SEND_SIGNAL(src, COMSIG_NANITE_INTERNAL_VIRAL_PREVENTION_CHECK)
|
||||
|
||||
//Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
|
||||
///Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
|
||||
/datum/component/nanites/proc/sync(datum/signal_source, datum/component/nanites/source, full_overwrite = TRUE, copy_activation = FALSE)
|
||||
var/list/programs_to_remove = programs.Copy() - permanent_programs
|
||||
@@ -274,10 +273,9 @@
|
||||
|
||||
///Modifies the current nanite volume, then checks if the nanites are depleted or exceeding the maximum amount
|
||||
/datum/component/nanites/proc/adjust_nanites(datum/source, amount)
|
||||
nanite_volume = clamp(nanite_volume + amount, 0, max_nanites)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
nanite_volume += amount
|
||||
nanite_volume = max(nanite_volume + amount, 0) //Lets not have negative nanite counts on permanent ones.
|
||||
if(nanite_volume > max_nanites)
|
||||
reject_excess_nanites()
|
||||
if(nanite_volume <= 0) //oops we ran out
|
||||
@@ -407,7 +405,6 @@
|
||||
nanite_volume = clamp(amount, 0, max_nanites)
|
||||
|
||||
/datum/component/nanites/proc/set_max_volume(datum/source, amount)
|
||||
max_nanites = max(1, max_nanites)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
max_nanites = max(1, amount)
|
||||
|
||||
@@ -404,8 +404,8 @@
|
||||
if(M.loc)
|
||||
environment = M.loc.return_air()
|
||||
if(environment)
|
||||
plasmamount = environment.get_moles(/datum/gas/plasma)
|
||||
if(plasmamount && plasmamount > GLOB.meta_gas_visibility[/datum/gas/plasma]) //if there's enough plasma in the air to see
|
||||
plasmamount = environment.get_moles(GAS_PLASMA)
|
||||
if(plasmamount && plasmamount > GLOB.gas_data.visibility[GAS_PLASMA]) //if there's enough plasma in the air to see
|
||||
. += power * 0.5
|
||||
if(M.reagents.has_reagent(/datum/reagent/toxin/plasma))
|
||||
. += power * 0.75
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
return location.loc.assume_air(env)
|
||||
return location.assume_air(env)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/remove_air(amount)
|
||||
/obj/item/clothing/head/mob_holder/proc/get_loc_for_air()
|
||||
var/atom/location = loc
|
||||
if(!loc)
|
||||
return //null
|
||||
@@ -192,9 +192,33 @@
|
||||
while(location != T)
|
||||
location = location.loc
|
||||
if(ismob(location))
|
||||
return location.loc.remove_air(amount)
|
||||
return location.loc
|
||||
return location
|
||||
|
||||
/obj/item/clothing/head/mob_holder/assume_air_moles(datum/gas_mixture/env, moles)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.assume_air_moles(env, moles)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/assume_air_ratio(datum/gas_mixture/env, ratio)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.assume_air_ratio(env, ratio)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/remove_air(amount)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.remove_air(amount)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/remove_air_ratio(ratio)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.remove_air_ratio(ratio)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/transfer_air(datum/gas_mixture/taker, amount)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.transfer_air(taker, amount)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/transfer_air_ratio(datum/gas_mixture/taker, ratio)
|
||||
var/atom/location = get_loc_for_air()
|
||||
return location.transfer_air(taker, ratio)
|
||||
|
||||
// escape when found if applicable
|
||||
/obj/item/clothing/head/mob_holder/on_found(mob/living/finder)
|
||||
if(escape_on_find)
|
||||
|
||||
+12
-22
@@ -283,14 +283,11 @@
|
||||
// insanity define to mark the next set of cardinals.
|
||||
#define CARDINAL_MARK(ndir, cdir, edir) \
|
||||
if(edir & cdir) { \
|
||||
CARDINAL_MARK_NOCHECK(ndir, cdir, edir); \
|
||||
};
|
||||
|
||||
#define CARDINAL_MARK_NOCHECK(ndir, cdir, edir) \
|
||||
expanding = get_step(T,ndir); \
|
||||
if(expanding && !exploded_last[expanding] && !edges[expanding]) { \
|
||||
powers_next[expanding] = max(powers_next[expanding], returned); \
|
||||
edges_next[expanding] = (cdir | edges_next[expanding]); \
|
||||
expanding = get_step(T,ndir); \
|
||||
if(expanding && !exploded_last[expanding] && !edges[expanding]) { \
|
||||
powers_next[expanding] = max(powers_next[expanding], returned); \
|
||||
edges_next[expanding] = (cdir | edges_next[expanding]); \
|
||||
}; \
|
||||
};
|
||||
|
||||
// insanity define to do diagonal marking as 2 substeps
|
||||
@@ -308,24 +305,15 @@
|
||||
};
|
||||
|
||||
// insanity define to mark the diagonals that would otherwise be missed
|
||||
#define DIAGONAL_MARK(ndir, cdir, edir) \
|
||||
if(edir & cdir) { \
|
||||
DIAGONAL_MARK_NOCHECK(ndir, cdir, edir); \
|
||||
};
|
||||
|
||||
// this only works because right now, WEX_DIR_X is the same as a byond dir
|
||||
// and we know we're only passing in one dir at a time.
|
||||
// if this ever stops being the case, and explosions break when you touch this, now you know why.
|
||||
#define DIAGONAL_MARK_NOCHECK(ndir, cdir, edir) \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, 90), turn(cdir, 90), edir); \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, -90), turn(cdir, -90), edir);
|
||||
|
||||
// mark
|
||||
#define MARK(ndir, cdir, edir) \
|
||||
#define DIAGONAL_MARK(ndir, cdir, edir) \
|
||||
if(edir & cdir) { \
|
||||
CARDINAL_MARK_NOCHECK(ndir, cdir, edir); \
|
||||
DIAGONAL_MARK_NOCHECK(ndir, cdir, edir); \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, 90), turn(cdir, 90), edir); \
|
||||
DIAGONAL_SUBSTEP(turn(ndir, -90), turn(cdir, -90), edir); \
|
||||
};
|
||||
|
||||
CARDINAL_MARK(NORTH, WEX_DIR_NORTH, dir)
|
||||
CARDINAL_MARK(SOUTH, WEX_DIR_SOUTH, dir)
|
||||
CARDINAL_MARK(EAST, WEX_DIR_EAST, dir)
|
||||
@@ -372,7 +360,9 @@
|
||||
|
||||
#undef WEX_ACT
|
||||
|
||||
#undef CALCULATE_DIAGONAL_POWER
|
||||
#undef CALCULATE_DIAGONAL_CROSS_POWER
|
||||
|
||||
#undef DIAGONAL_SUBSTEP
|
||||
#undef DIAGONAL_MARK
|
||||
#undef CARDINAL_MARK
|
||||
#undef MARK
|
||||
|
||||
@@ -142,12 +142,12 @@
|
||||
// Can most things breathe?
|
||||
if(trace_gases)
|
||||
continue
|
||||
var/oxy_moles = A.get_moles(/datum/gas/oxygen)
|
||||
var/oxy_moles = A.get_moles(GAS_O2)
|
||||
if(oxy_moles < 16 || oxy_moles > 50)
|
||||
continue
|
||||
if(A.get_moles(/datum/gas/plasma))
|
||||
if(A.get_moles(GAS_PLASMA))
|
||||
continue
|
||||
if(A.get_moles(/datum/gas/carbon_dioxide) >= 10)
|
||||
if(A.get_moles(GAS_CO2) >= 10)
|
||||
continue
|
||||
|
||||
// Aim for goldilocks temperatures and pressure
|
||||
|
||||
@@ -43,12 +43,8 @@
|
||||
/datum/martial_art/proc/damage_roll(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
//Here we roll for our damage to be added into the damage var in the various attack procs. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode.
|
||||
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
if(SEND_SIGNAL(D, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 1.2
|
||||
if(!CHECK_MOBILITY(A, MOBILITY_STAND))
|
||||
damage *= 0.7
|
||||
if(SEND_SIGNAL(A, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 0.8
|
||||
return damage
|
||||
|
||||
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE)
|
||||
|
||||
@@ -144,14 +144,16 @@
|
||||
parry_time_active_visual_override = 3
|
||||
parry_time_spindown_visual_override = 12
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK //can attack while
|
||||
parry_time_perfect = 2.5 // first ds isn't perfect
|
||||
parry_time_perfect_leeway = 1.5
|
||||
parry_time_perfect = 2.5
|
||||
parry_time_perfect_leeway = 2.5
|
||||
parry_imperfect_falloff_percent = 5
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 65 // VERY generous
|
||||
parry_efficiency_perfect = 100
|
||||
parry_failed_stagger_duration = 4 SECONDS
|
||||
parry_failed_cooldown_duration = 2 SECONDS
|
||||
parry_cooldown = 0.5 SECONDS
|
||||
parry_flags = NONE
|
||||
|
||||
/mob/living/carbon/human/UseStaminaBuffer(amount, warn = FALSE, considered_action = TRUE)
|
||||
amount *= physiology? physiology.stamina_buffer_mod : 1
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
//can we sniff? is there miasma in the air?
|
||||
var/datum/gas_mixture/air = user.loc.return_air()
|
||||
|
||||
if(air.get_moles(/datum/gas/miasma))
|
||||
if(air.get_moles(GAS_MIASMA))
|
||||
user.adjust_disgust(sensitivity * 45)
|
||||
to_chat(user, "<span class='warning'>With your overly sensitive nose, you get a whiff of stench and feel sick! Try moving to a cleaner area!</span>")
|
||||
return
|
||||
|
||||
@@ -95,21 +95,31 @@
|
||||
/datum/status_effect/staggered/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
new_owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/stagger, TRUE, CONFIG_GET(number/sprintless_stagger_slowdown))
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/staggered/on_remove()
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/stagger)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance
|
||||
id = "offbalance"
|
||||
blocks_sprint = TRUE
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/off_balance/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
new_owner.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance, TRUE, CONFIG_GET(number/sprintless_off_balance_slowdown))
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance/on_remove()
|
||||
var/active_item = owner.get_active_held_item()
|
||||
if(active_item)
|
||||
owner.visible_message("<span class='warning'>[owner.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/off_balance)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/asleep
|
||||
@@ -117,24 +127,14 @@
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
icon_state = "asleep"
|
||||
|
||||
|
||||
/datum/status_effect/grouped/stasis
|
||||
id = "stasis"
|
||||
duration = -1
|
||||
tick_interval = 10
|
||||
var/last_dead_time
|
||||
|
||||
/datum/status_effect/no_combat_mode
|
||||
id = "no_combat_mode"
|
||||
alert_type = null
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
blocks_combatmode = TRUE
|
||||
|
||||
/datum/status_effect/no_combat_mode/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
|
||||
/datum/status_effect/no_combat_mode/robotic_emp
|
||||
/datum/status_effect/robotic_emp
|
||||
id = "emp_no_combat_mode"
|
||||
|
||||
/datum/status_effect/mesmerize
|
||||
@@ -144,13 +144,11 @@
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
ADD_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, "mesmerize")
|
||||
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
|
||||
|
||||
/datum/status_effect/mesmerize/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, "mesmerize")
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
|
||||
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
@@ -168,7 +166,7 @@
|
||||
id = "tased"
|
||||
alert_type = null
|
||||
var/movespeed_mod = /datum/movespeed_modifier/status_effect/tased
|
||||
var/stamdmg_per_ds = 0 //a 20 duration would do 20 stamdmg, disablers do 24 or something
|
||||
var/stamdmg_per_ds = 1 //a 20 duration would do 20 stamdmg, disablers do 24 or something
|
||||
var/last_tick = 0 //fastprocess processing speed is a goddamn sham, don't trust it.
|
||||
|
||||
/datum/status_effect/electrode/on_creation(mob/living/new_owner, set_duration)
|
||||
@@ -199,9 +197,9 @@
|
||||
/datum/status_effect/electrode/no_combat_mode
|
||||
id = "tased_strong"
|
||||
movespeed_mod = /datum/movespeed_modifier/status_effect/tased/no_combat_mode
|
||||
blocks_combatmode = TRUE
|
||||
stamdmg_per_ds = 1
|
||||
|
||||
|
||||
//OTHER DEBUFFS
|
||||
/datum/status_effect/his_wrath //does minor damage over time unless holding His Grace
|
||||
id = "his_wrath"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
|
||||
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
|
||||
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
|
||||
/// If this is TRUE, the user will have combt mode forcefully disabled while this is active.
|
||||
var/blocks_combatmode = FALSE
|
||||
/// If this is TRUE, the user will have sprint forcefully disabled while this is active.
|
||||
var/blocks_sprint = FALSE
|
||||
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
|
||||
@@ -61,8 +59,6 @@
|
||||
|
||||
/datum/status_effect/proc/on_apply() //Called whenever the buff is applied; returning FALSE will cause it to autoremove itself.
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(blocks_combatmode)
|
||||
ADD_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
if(blocks_sprint)
|
||||
ADD_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||
return TRUE
|
||||
@@ -74,8 +70,6 @@
|
||||
|
||||
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(blocks_combatmode)
|
||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
if(blocks_sprint)
|
||||
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||
return TRUE
|
||||
@@ -83,8 +77,6 @@
|
||||
/datum/status_effect/proc/be_replaced() //Called instead of on_remove when a status effect is replaced by itself or when a status effect with on_remove_on_mob_delete = FALSE has its mob deleted
|
||||
owner.clear_alert(id)
|
||||
LAZYREMOVE(owner.status_effects, src)
|
||||
if(blocks_combatmode)
|
||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
if(blocks_sprint)
|
||||
REMOVE_TRAIT(owner, TRAIT_SPRINT_LOCKED, src)
|
||||
owner = null
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
addtimer(CALLBACK(src, .proc/reenable_ai_control), 10)
|
||||
addtimer(CALLBACK(A, /obj/machinery/door/airlock.proc/reset_ai_wire), 1 SECONDS)
|
||||
if(WIRE_SHOCK) // Pulse to shock the door for 10 ticks.
|
||||
if(!A.secondsElectrified)
|
||||
A.set_electrified(30, usr)
|
||||
@@ -120,13 +120,11 @@
|
||||
A.lights = !A.lights
|
||||
A.update_icon()
|
||||
|
||||
/datum/wires/airlock/proc/reenable_ai_control()
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
if(A)
|
||||
if(A.aiControlDisabled == 1)
|
||||
A.aiControlDisabled = 0
|
||||
else if(A.aiControlDisabled == 2)
|
||||
A.aiControlDisabled = -1
|
||||
/obj/machinery/door/airlock/proc/reset_ai_wire()
|
||||
if(aiControlDisabled == 1)
|
||||
aiControlDisabled = 0
|
||||
else if(aiControlDisabled == 2)
|
||||
aiControlDisabled = -1
|
||||
|
||||
/datum/wires/airlock/on_cut(wire, mend)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
initial_flow = 1.5
|
||||
gauzed_clot_rate = 0.8
|
||||
internal_bleeding_chance = 30
|
||||
internal_bleeding_coefficient = 1.25
|
||||
internal_bleeding_coefficient = 1
|
||||
threshold_minimum = 40
|
||||
threshold_penalty = 15
|
||||
status_effect_type = /datum/status_effect/wound/pierce/moderate
|
||||
@@ -142,10 +142,10 @@
|
||||
occur_text = "looses a violent spray of blood, revealing a pierced wound"
|
||||
sound_effect = 'sound/effects/wounds/pierce2.ogg'
|
||||
severity = WOUND_SEVERITY_SEVERE
|
||||
initial_flow = 2.25
|
||||
initial_flow = 2
|
||||
gauzed_clot_rate = 0.6
|
||||
internal_bleeding_chance = 60
|
||||
internal_bleeding_coefficient = 1.5
|
||||
internal_bleeding_coefficient = 1.25
|
||||
threshold_minimum = 60
|
||||
threshold_penalty = 25
|
||||
status_effect_type = /datum/status_effect/wound/pierce/severe
|
||||
@@ -159,10 +159,10 @@
|
||||
occur_text = "blasts apart, sending chunks of viscera flying in all directions"
|
||||
sound_effect = 'sound/effects/wounds/pierce3.ogg'
|
||||
severity = WOUND_SEVERITY_CRITICAL
|
||||
initial_flow = 3
|
||||
initial_flow = 2.7
|
||||
gauzed_clot_rate = 0.4
|
||||
internal_bleeding_chance = 80
|
||||
internal_bleeding_coefficient = 1.75
|
||||
internal_bleeding_coefficient = 1.5
|
||||
threshold_minimum = 110
|
||||
threshold_penalty = 40
|
||||
status_effect_type = /datum/status_effect/wound/pierce/critical
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
occur_text = "is cut open, slowly leaking blood"
|
||||
sound_effect = 'sound/effects/wounds/blood1.ogg'
|
||||
severity = WOUND_SEVERITY_MODERATE
|
||||
initial_flow = 1.5
|
||||
initial_flow = 1.25
|
||||
minimum_flow = 0.375
|
||||
max_per_type = 3
|
||||
clot_rate = 0.12
|
||||
@@ -270,8 +270,8 @@
|
||||
occur_text = "is ripped open, veins spurting blood"
|
||||
sound_effect = 'sound/effects/wounds/blood2.ogg'
|
||||
severity = WOUND_SEVERITY_SEVERE
|
||||
initial_flow = 2.4375
|
||||
minimum_flow = 2.0625
|
||||
initial_flow = 2
|
||||
minimum_flow = 1.75
|
||||
clot_rate = 0.07
|
||||
max_per_type = 4
|
||||
threshold_minimum = 60
|
||||
@@ -288,8 +288,8 @@
|
||||
occur_text = "is torn open, spraying blood wildly"
|
||||
sound_effect = 'sound/effects/wounds/blood3.ogg'
|
||||
severity = WOUND_SEVERITY_CRITICAL
|
||||
initial_flow = 3.1875
|
||||
minimum_flow = 3
|
||||
initial_flow = 2.75
|
||||
minimum_flow = 2.5
|
||||
clot_rate = -0.05 // critical cuts actively get worse instead of better
|
||||
max_per_type = 5
|
||||
threshold_minimum = 90
|
||||
|
||||
+15
-1
@@ -378,12 +378,26 @@
|
||||
return FALSE
|
||||
|
||||
/atom/proc/assume_air(datum/gas_mixture/giver)
|
||||
qdel(giver)
|
||||
return null
|
||||
|
||||
/atom/proc/assume_air_moles(datum/gas_mixture/giver, moles)
|
||||
return null
|
||||
|
||||
/atom/proc/assume_air_ratio(datum/gas_mixture/giver, ratio)
|
||||
return null
|
||||
|
||||
/atom/proc/remove_air(amount)
|
||||
return null
|
||||
|
||||
/atom/proc/remove_air_ratio(ratio)
|
||||
return null
|
||||
|
||||
/atom/proc/transfer_air(datum/gas_mixture/taker, amount)
|
||||
return null
|
||||
|
||||
/atom/proc/transfer_air_ratio(datum/gas_mixture/taker, ratio)
|
||||
return null
|
||||
|
||||
/atom/proc/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
|
||||
@@ -57,7 +57,10 @@
|
||||
|
||||
/// Should we use tooltips, if the thing does not have the code implemented `get_tooltip_data()`, it will default to examine(src)
|
||||
var/tooltips = FALSE
|
||||
|
||||
/// How loudly we yell
|
||||
var/yell_power = 50
|
||||
/// last time we yelled
|
||||
var/last_yell = 0
|
||||
|
||||
/atom/movable/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
/datum/objective_item/steal/plasma/check_special_completion(obj/item/tank/T)
|
||||
var/target_amount = text2num(name)
|
||||
var/found_amount = 0
|
||||
found_amount += T.air_contents.get_moles(/datum/gas/plasma)
|
||||
found_amount += T.air_contents.get_moles(GAS_PLASMA)
|
||||
return found_amount>=target_amount
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
var/total_moles = air_sample.total_moles()
|
||||
if(total_moles)
|
||||
for(var/gas_id in air_sample.get_gases())
|
||||
var/gas_name = GLOB.meta_gas_names[gas_id]
|
||||
var/gas_name = GLOB.gas_data.names[gas_id]
|
||||
signal.data["gases"][gas_name] = air_sample.get_moles(gas_id) / total_moles * 100
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
@@ -73,11 +73,11 @@
|
||||
|
||||
/obj/machinery/air_sensor/Initialize()
|
||||
. = ..()
|
||||
SSair.atmos_machinery += src
|
||||
SSair.atmos_air_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
SSair.atmos_air_machinery -= src
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
DA.update_name()
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
|
||||
/obj/machinery/door/airlock/plasma/BlockThermalConductivity() //we don't stop the heat~
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
if(!glass && GLOB.cameranet)
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/door/BlockSuperconductivity() // All non-glass airlocks block heat, this is intended.
|
||||
/obj/machinery/door/BlockThermalConductivity() // All non-glass airlocks block heat, this is intended.
|
||||
if(opacity || heat_proof)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY
|
||||
|
||||
var/gas_type = /datum/gas/plasma
|
||||
var/gas_type = GAS_PLASMA
|
||||
var/efficiency_multiplier = 1
|
||||
var/gas_capacity = 0
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(panel_open)
|
||||
. += "sheater-open"
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
/obj/machinery/space_heater/process_atmos()
|
||||
if(!on || !is_operational())
|
||||
if (on) // If it's broken, turn it off too
|
||||
on = FALSE
|
||||
@@ -220,7 +220,7 @@
|
||||
usr.visible_message("<span class='notice'>[usr] switches [on ? "on" : "off"] \the [src].</span>", "<span class='notice'>You switch [on ? "on" : "off"] \the [src].</span>")
|
||||
update_icon()
|
||||
if (on)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
SSair.atmos_air_machinery += src
|
||||
. = TRUE
|
||||
if("mode")
|
||||
setMode = params["mode"]
|
||||
|
||||
@@ -422,12 +422,12 @@
|
||||
return
|
||||
var/datum/gas_mixture/GM = new
|
||||
if(prob(10))
|
||||
GM.adjust_moles(/datum/gas/plasma,100)
|
||||
GM.adjust_moles(GAS_PLASMA,100)
|
||||
GM.set_temperature(1500+T0C) //should be enough to start a fire
|
||||
T.visible_message("[src] suddenly disgorges a cloud of heated plasma.")
|
||||
qdel(src)
|
||||
else
|
||||
GM.adjust_moles(/datum/gas/plasma,5)
|
||||
GM.adjust_moles(GAS_PLASMA,5)
|
||||
GM.set_temperature(istype(T) ? T.air.return_temperature() : T20C)
|
||||
T.visible_message("[src] suddenly disgorges a cloud of plasma.")
|
||||
T.assume_air(GM)
|
||||
|
||||
+11
-21
@@ -203,11 +203,7 @@
|
||||
equipment.Cut()
|
||||
cell = null
|
||||
internal_tank = null
|
||||
if(loc)
|
||||
loc.assume_air(cabin_air)
|
||||
air_update_turf()
|
||||
else
|
||||
qdel(cabin_air)
|
||||
assume_air(cabin_air)
|
||||
cabin_air = null
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
@@ -257,8 +253,8 @@
|
||||
/obj/mecha/proc/add_cabin()
|
||||
cabin_air = new(200)
|
||||
cabin_air.set_temperature(T20C)
|
||||
cabin_air.set_moles(/datum/gas/oxygen,O2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
|
||||
cabin_air.set_moles(/datum/gas/nitrogen,N2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
|
||||
cabin_air.set_moles(GAS_O2,O2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
|
||||
cabin_air.set_moles(GAS_N2,N2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
|
||||
return cabin_air
|
||||
|
||||
/obj/mecha/proc/add_radio()
|
||||
@@ -321,13 +317,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)
|
||||
if(loc)
|
||||
loc.assume_air(leaked_gas)
|
||||
air_update_turf()
|
||||
else
|
||||
qdel(leaked_gas)
|
||||
assume_air_ratio(internal_tank.return_air(), 0.1)
|
||||
|
||||
if(internal_damage & MECHA_INT_SHORT_CIRCUIT)
|
||||
if(get_charge())
|
||||
@@ -350,8 +340,7 @@
|
||||
if(pressure_delta > 0) //cabin pressure lower than release pressure
|
||||
if(tank_air.return_temperature() > 0)
|
||||
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
var/datum/gas_mixture/removed = tank_air.remove(transfer_moles)
|
||||
cabin_air.merge(removed)
|
||||
tank_air.transfer_to(cabin_air,transfer_moles)
|
||||
else if(pressure_delta < 0) //cabin pressure higher than release pressure
|
||||
var/datum/gas_mixture/t_air = return_air()
|
||||
pressure_delta = cabin_pressure - release_pressure
|
||||
@@ -359,11 +348,7 @@
|
||||
pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta)
|
||||
if(pressure_delta > 0) //if location pressure is lower than cabin pressure
|
||||
transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION)
|
||||
var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles)
|
||||
if(t_air)
|
||||
t_air.merge(removed)
|
||||
else //just delete the cabin gas, we're in space or some shit
|
||||
qdel(removed)
|
||||
cabin_air.transfer_to(t_air, transfer_moles)
|
||||
|
||||
if(occupant)
|
||||
if(cell)
|
||||
@@ -809,6 +794,11 @@
|
||||
return cabin_air.remove(amount)
|
||||
return ..()
|
||||
|
||||
/obj/mecha/remove_air_ratio(ratio)
|
||||
if(use_internal_tank)
|
||||
return cabin_air.remove_ratio(ratio)
|
||||
return ..()
|
||||
|
||||
/obj/mecha/return_air()
|
||||
if(use_internal_tank)
|
||||
return cabin_air
|
||||
|
||||
@@ -19,10 +19,62 @@
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
var/stream = FALSE
|
||||
var/speed = 1
|
||||
var/range = 3
|
||||
var/hits_left = 3
|
||||
var/range_left = 3
|
||||
|
||||
/obj/effect/decal/chempuff/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/effect/decal/chempuff/Initialize(mapload, stream_mode, speed, range, hits_left)
|
||||
. = ..()
|
||||
stream = stream_mode
|
||||
src.speed = speed
|
||||
src.range = src.range_left = range
|
||||
src.hits_left = hits_left
|
||||
|
||||
/obj/effect/decal/chempuff/proc/hit_thing(atom/A)
|
||||
if(A == src || A.invisibility)
|
||||
return
|
||||
if(!hits_left)
|
||||
return
|
||||
if(stream)
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(!M.lying || !range_left)
|
||||
reagents.reaction(M, VAPOR)
|
||||
hits_left--
|
||||
else
|
||||
if(!range_left)
|
||||
reagents.reaction(A, VAPOR)
|
||||
else
|
||||
reagents.reaction(A)
|
||||
if(ismob(A))
|
||||
hits_left--
|
||||
|
||||
/obj/effect/decal/chempuff/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
hit_thing(AM)
|
||||
|
||||
/obj/effect/decal/chempuff/proc/run_puff(atom/target)
|
||||
set waitfor = FALSE
|
||||
for(var/i in 1 to range)
|
||||
range_left--
|
||||
if(!isturf(loc))
|
||||
break
|
||||
for(var/atom/T in loc)
|
||||
hit_thing(T)
|
||||
if(!hits_left || !isturf(loc))
|
||||
break
|
||||
if(hits_left && isturf(loc) && (!stream || !range_left))
|
||||
reagents.reaction(loc, VAPOR)
|
||||
hits_left--
|
||||
if(!hits_left)
|
||||
break
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.get_moles(/datum/gas/plasma)) //Absorb some plasma
|
||||
G.adjust_moles(/datum/gas/plasma,-plas_amt)
|
||||
var/plas_amt = min(30,G.get_moles(GAS_PLASMA)) //Absorb some plasma
|
||||
G.adjust_moles(GAS_PLASMA,-plas_amt)
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.return_temperature() > T20C)
|
||||
G.set_temperature(max(G.return_temperature()/2,T20C))
|
||||
@@ -322,7 +322,7 @@
|
||||
for(var/obj/effect/hotspot/H in O)
|
||||
qdel(H)
|
||||
for(var/I in G.get_gases())
|
||||
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
|
||||
if(I == GAS_O2 || I == GAS_N2)
|
||||
continue
|
||||
G.set_moles(I, 0)
|
||||
O.air_update_turf()
|
||||
@@ -341,7 +341,7 @@
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/foamedmetal/resin/BlockSuperconductivity()
|
||||
/obj/structure/foamedmetal/resin/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
#undef ALUMINUM_FOAM
|
||||
|
||||
@@ -170,9 +170,9 @@
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
if(G.get_moles(/datum/gas/plasma))
|
||||
G.adjust_moles(/datum/gas/nitrogen, G.get_moles(/datum/gas/plasma))
|
||||
G.set_moles(/datum/gas/plasma, 0)
|
||||
if(G.get_moles(GAS_PLASMA))
|
||||
G.adjust_moles(GAS_N2, G.get_moles(GAS_PLASMA))
|
||||
G.set_moles(GAS_PLASMA, 0)
|
||||
if (weldvents)
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
|
||||
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma]) / (((PRESSURE_P) * GLOB.meta_gas_specific_heats[/datum/gas/plasma] + (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_specific_heats[/datum/gas/oxygen] / CELSIUS_TO_KELVIN(TEMP_O)))
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA]) / (((PRESSURE_P) * GLOB.gas_data.specific_heats[GAS_PLASMA] + (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.gas_data.specific_heats[GAS_O2] / CELSIUS_TO_KELVIN(TEMP_O)))
|
||||
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
|
||||
|
||||
/obj/effect/spawner/newbomb
|
||||
@@ -19,10 +19,10 @@
|
||||
var/obj/item/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
PT.air_contents.set_moles(/datum/gas/plasma, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
|
||||
PT.air_contents.set_moles(GAS_PLASMA, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
|
||||
PT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_p))
|
||||
|
||||
OT.air_contents.set_moles(/datum/gas/oxygen, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
|
||||
OT.air_contents.set_moles(GAS_O2, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
|
||||
OT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_o))
|
||||
|
||||
V.tank_one = PT
|
||||
|
||||
@@ -461,6 +461,21 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
item_flags |= IN_INVENTORY
|
||||
if(item_flags & (ITEM_CAN_BLOCK | ITEM_CAN_PARRY) && user.client && !(type in user.client.block_parry_hinted))
|
||||
var/list/dat = list("<span class='boldnotice'>You have picked up an item that can be used to block and/or parry:</span>")
|
||||
// cit change - parry/block feedback
|
||||
var/datum/block_parry_data/data = return_block_parry_datum(block_parry_data)
|
||||
if(item_flags & ITEM_CAN_BLOCK)
|
||||
dat += "[src] can be used to block damage using directional block. Press your active block keybind to use it."
|
||||
if(data.block_automatic_enabled)
|
||||
dat += "[src] is also capable of automatically blocking damage, if you are facing the right direction (usually towards your attacker)!"
|
||||
if(item_flags & ITEM_CAN_PARRY)
|
||||
dat += "[src] can be used to parry damage using active parry. Pressed your active parry keybind to initiate a timed parry sequence."
|
||||
if(data.parry_automatic_enabled)
|
||||
dat += "[src] is also capable of automatically parrying an incoming attack, if your mouse is over your attacker at the time if you being hit in a direct, melee attack."
|
||||
dat += "Examine [src] to get a full readout of its block/parry stats."
|
||||
to_chat(user, dat.Join("<br>"))
|
||||
user.client.block_parry_hinted |= type
|
||||
|
||||
// called when "found" in pockets and storage items. Returns 1 if the search should end.
|
||||
/obj/item/proc/on_found(mob/finder)
|
||||
@@ -504,12 +519,13 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
*/
|
||||
/obj/item/proc/equipped(mob/user, slot, initial = FALSE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
var/signal_flags = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
current_equipped_slot = slot
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
if(!(signal_flags & COMPONENT_NO_GRANT_ACTIONS))
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
// if(!initial)
|
||||
// if(equip_sound && (slot_flags & slot))
|
||||
|
||||
@@ -242,12 +242,18 @@
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/obj/effect/chrono_field/assume_air()
|
||||
return 0
|
||||
return null
|
||||
|
||||
/obj/effect/chrono_field/assume_air_moles()
|
||||
return null
|
||||
|
||||
/obj/effect/chrono_field/assume_air_ratio()
|
||||
return null
|
||||
|
||||
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
|
||||
var/datum/gas_mixture/GM = new
|
||||
GM.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
|
||||
GM.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
|
||||
GM.set_moles(GAS_O2, MOLES_O2STANDARD)
|
||||
GM.set_moles(GAS_N2, MOLES_N2STANDARD)
|
||||
GM.set_temperature(T20C)
|
||||
return GM
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
for(var/id in environment.get_gases())
|
||||
var/gas_level = environment.get_moles(id)/total_moles
|
||||
if(gas_level > 0)
|
||||
dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%<br>"
|
||||
dat += "[GLOB.gas_data.names[id]]: [round(gas_level*100, 0.01)]%<br>"
|
||||
|
||||
dat += "Temperature: [round(environment.return_temperature()-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
|
||||
@@ -708,7 +708,7 @@ GENETICS SCANNER
|
||||
for(var/id in air_contents.get_gases())
|
||||
if(air_contents.get_moles(id) >= 0.005)
|
||||
var/gas_concentration = air_contents.get_moles(id)/total_moles
|
||||
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='notice'>[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)</span>")
|
||||
|
||||
else
|
||||
@@ -721,7 +721,7 @@ GENETICS SCANNER
|
||||
var/instability = round(cached_scan_results["fusion"], 0.01)
|
||||
var/tier = instability2text(instability)
|
||||
to_chat(user, "<span class='boldnotice'>Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.</span>")
|
||||
to_chat(user, "<span class='notice'>Instability of the last fusion reaction: [instability]\n This indicates it was [tier].</span>")
|
||||
to_chat(user, "<span class='notice'>Instability of the last fusion reaction: [instability]\n This indicates it was [tier]</span>")
|
||||
return
|
||||
|
||||
/obj/item/analyzer/proc/scan_turf(mob/user, turf/location)
|
||||
@@ -739,36 +739,36 @@ GENETICS SCANNER
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
if(total_moles)
|
||||
|
||||
var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles
|
||||
var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles
|
||||
var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles
|
||||
var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles
|
||||
var/o2_concentration = environment.get_moles(GAS_O2)/total_moles
|
||||
var/n2_concentration = environment.get_moles(GAS_N2)/total_moles
|
||||
var/co2_concentration = environment.get_moles(GAS_CO2)/total_moles
|
||||
var/plasma_concentration = environment.get_moles(GAS_PLASMA)/total_moles
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_N2), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_N2), 0.01)] mol)</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_O2), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_O2), 0.01)] mol)</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_CO2), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_CO2), 0.01)] mol)</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_PLASMA), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(GAS_PLASMA), 0.01)] mol)</span>")
|
||||
|
||||
for(var/id in environment.get_gases())
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = environment.get_moles(id)/total_moles
|
||||
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='alert'>[GLOB.gas_data.names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)</span>")
|
||||
|
||||
if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected
|
||||
|
||||
@@ -78,22 +78,29 @@ effective or pretty fucking useless.
|
||||
var/ui_x = 320
|
||||
var/ui_y = 335
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/identification/syndicate, ID_COMPONENT_DEL_ON_IDENTIFY, ID_COMPONENT_EFFECT_NO_ACTIONS, ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
return ..()
|
||||
var/knowledge = SEND_SIGNAL(src, COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, user) == ID_COMPONENT_KNOWLEDGE_FULL
|
||||
if(!irradiate)
|
||||
return
|
||||
if(!used)
|
||||
log_combat(user, M, "irradiated", src)
|
||||
log_combat(user, M, "[knowledge? "" : "unknowingly "]irradiated", src)
|
||||
var/cooldown = get_cooldown()
|
||||
used = TRUE
|
||||
icon_state = "health1"
|
||||
addtimer(VARSET_CALLBACK(src, used, FALSE), cooldown)
|
||||
addtimer(VARSET_CALLBACK(src, icon_state, "health"), cooldown)
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
if(knowledge)
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
addtimer(CALLBACK(src, .proc/radiation_aftereffect, M, intensity), (wavelength+(intensity*4))*5)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
if(knowledge)
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M, passed_intensity)
|
||||
if(QDELETED(M) || !ishuman(M) || HAS_TRAIT(M, TRAIT_RADIMMUNE))
|
||||
@@ -109,7 +116,9 @@ effective or pretty fucking useless.
|
||||
interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/interact(mob/user)
|
||||
ui_interact(user)
|
||||
var/knowledge = SEND_SIGNAL(src, COMSIG_IDENTIFICATION_KNOWLEDGE_CHECK, user) == ID_COMPONENT_KNOWLEDGE_FULL
|
||||
if(knowledge)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
@@ -172,20 +172,15 @@
|
||||
if(!target_self)
|
||||
target.set_volume(target.return_volume() + tank_two.volume)
|
||||
target.set_volume(target.return_volume() + tank_one.air_contents.return_volume())
|
||||
var/datum/gas_mixture/temp
|
||||
temp = tank_one.air_contents.remove_ratio(1)
|
||||
target.merge(temp)
|
||||
tank_one.air_contents.transfer_ratio_to(target, 1)
|
||||
if(!target_self)
|
||||
temp = tank_two.air_contents.remove_ratio(1)
|
||||
target.merge(temp)
|
||||
tank_two.air_contents.transfer_ratio_to(target, 1)
|
||||
|
||||
/obj/item/transfer_valve/proc/split_gases()
|
||||
if (!valve_open || !tank_one || !tank_two)
|
||||
return
|
||||
var/ratio1 = tank_one.air_contents.return_volume()/tank_two.air_contents.return_volume()
|
||||
var/datum/gas_mixture/temp
|
||||
temp = tank_two.air_contents.remove_ratio(ratio1)
|
||||
tank_one.air_contents.merge(temp)
|
||||
tank_two.air_contents.transfer_ratio_to(tank_one.air_contents, ratio1)
|
||||
tank_two.air_contents.set_volume(tank_two.air_contents.return_volume() - tank_one.air_contents.return_volume())
|
||||
|
||||
/*
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/datum/block_parry_data/dual_esword // please run at the man going apeshit with his funny doublesword
|
||||
can_block_directions = BLOCK_DIR_NORTH | BLOCK_DIR_NORTHEAST | BLOCK_DIR_NORTHWEST | BLOCK_DIR_WEST | BLOCK_DIR_EAST
|
||||
block_damage_absorption = 2
|
||||
block_damage_absorption = 5
|
||||
block_damage_multiplier = 0.15
|
||||
block_damage_multiplier_override = list(
|
||||
ATTACK_TYPE_MELEE = 0.25
|
||||
@@ -59,7 +59,7 @@
|
||||
)
|
||||
|
||||
parry_time_windup = 0
|
||||
parry_time_active = 8
|
||||
parry_time_active = 12
|
||||
parry_time_spindown = 0
|
||||
// we want to signal to players the most dangerous phase, the time when automatic counterattack is a thing.
|
||||
parry_time_windup_visual_override = 1
|
||||
@@ -69,12 +69,10 @@
|
||||
parry_time_perfect = 2 // first ds isn't perfect
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_imperfect_falloff_percent = 10
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 25 // VERY generous
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = CLICK_CD_MELEE
|
||||
|
||||
/obj/item/dualsaber/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
/obj/item/dualsaber/directional_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
@@ -83,7 +81,7 @@
|
||||
/obj/item/dualsaber/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
|
||||
. = ..()
|
||||
if(parry_efficiency >= 90) // perfect parry
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
|
||||
. |= BLOCK_SHOULD_REDIRECT
|
||||
|
||||
/obj/item/dualsaber/Initialize()
|
||||
@@ -369,14 +367,12 @@
|
||||
parry_time_perfect = 1
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_imperfect_falloff_percent = 7.5
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 80
|
||||
parry_efficiency_perfect = 120
|
||||
parry_efficiency_perfect_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 30,
|
||||
)
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = 2 SECONDS
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/chaplain/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -45,15 +45,15 @@
|
||||
// no attacking while blocking
|
||||
block_lock_attacking = TRUE
|
||||
|
||||
parry_time_windup = 1
|
||||
parry_time_active = 5
|
||||
parry_time_windup = 0
|
||||
parry_time_active = 7
|
||||
parry_time_spindown = 0
|
||||
parry_time_spindown_visual_override = 1
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING // no attacking while parrying
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK // no attacking while parrying
|
||||
parry_time_perfect = 0
|
||||
parry_time_perfect_leeway = 0.5
|
||||
parry_efficiency_perfect = 100
|
||||
parry_imperfect_falloff_percent = 1
|
||||
parry_efficiency_perfect = 85
|
||||
parry_imperfect_falloff_percent = 10
|
||||
parry_imperfect_falloff_percent_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 45 // really crappy vs projectiles
|
||||
)
|
||||
@@ -61,9 +61,7 @@
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 1 // extremely harsh window for projectiles
|
||||
)
|
||||
// not extremely punishing to fail, but no spamming the parry.
|
||||
parry_cooldown = 2.5 SECONDS
|
||||
parry_failed_stagger_duration = 1.5 SECONDS
|
||||
parry_failed_clickcd_duration = 1 SECONDS
|
||||
|
||||
/obj/item/electrostaff/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -210,13 +210,11 @@
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
|
||||
air_transfer.set_moles(/datum/gas/plasma, air_transfer.get_moles(/datum/gas/plasma) * 5)
|
||||
air_transfer.set_moles(GAS_PLASMA, air_transfer.get_moles(GAS_PLASMA) * 5)
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.return_temperature()*2) + 380,500)
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
SSair.add_to_active(target, 0)
|
||||
|
||||
|
||||
/obj/item/flamethrower/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -121,11 +121,14 @@
|
||||
parry_time_perfect = 2.5 // first ds isn't perfect
|
||||
parry_time_perfect_leeway = 1.5
|
||||
parry_imperfect_falloff_percent = 5
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_to_counterattack = INFINITY
|
||||
parry_efficiency_considered_successful = 65 // VERY generous
|
||||
parry_efficiency_perfect = 100
|
||||
parry_failed_stagger_duration = 4 SECONDS
|
||||
parry_cooldown = 0.5 SECONDS
|
||||
parry_automatic_enabled = TRUE
|
||||
autoparry_single_efficiency = 65
|
||||
autoparry_cooldown_absolute = 3 SECONDS
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -149,8 +152,8 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
|
||||
. = ..()
|
||||
if(parry_efficiency >= 80) // perfect parry
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
if(parry_efficiency >= 100) // perfect parry
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
|
||||
. |= BLOCK_SHOULD_REDIRECT
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg
|
||||
|
||||
@@ -72,15 +72,17 @@
|
||||
block_parry_data = /datum/block_parry_data/captain_saber
|
||||
|
||||
/datum/block_parry_data/captain_saber
|
||||
parry_time_windup = 0.5
|
||||
parry_time_active = 4
|
||||
parry_time_spindown = 1
|
||||
parry_time_windup = 0
|
||||
parry_time_active = 6
|
||||
parry_time_spindown = 0
|
||||
parry_time_perfect = 0.75
|
||||
parry_time_perfect_leeway = 0.75
|
||||
parry_imperfect_falloff_percent = 30
|
||||
parry_efficiency_perfect = 100
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = 2 SECONDS
|
||||
parry_failed_clickcd_duration = 1 SECONDS
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK
|
||||
parry_automatic_enabled = TRUE
|
||||
|
||||
/obj/item/melee/sabre/Initialize()
|
||||
. = ..()
|
||||
@@ -176,30 +178,24 @@
|
||||
|
||||
// Fast, efficient parry.
|
||||
/datum/block_parry_data/traitor_rapier
|
||||
parry_time_windup = 0.5
|
||||
parry_time_active = 5
|
||||
parry_time_windup = 0
|
||||
parry_time_active = 6
|
||||
parry_time_spindown = 0
|
||||
parry_time_active_visual_override = 3
|
||||
parry_time_spindown_visual_override = 2
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING
|
||||
parry_time_perfect = 0
|
||||
parry_time_perfect_leeway = 3
|
||||
parry_time_perfect = 1
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_time_perfect_leeway_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 1
|
||||
)
|
||||
parry_imperfect_falloff_percent_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 50 // useless after 3rd decisecond
|
||||
)
|
||||
parry_imperfect_falloff_percent = 30
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_to_counterattack = INFINITY
|
||||
parry_efficiency_considered_successful = 1
|
||||
parry_efficiency_perfect = 100
|
||||
parry_data = list(
|
||||
PARRY_DISARM_ATTACKER = TRUE,
|
||||
PARRY_KNOCKDOWN_ATTACKER = 10
|
||||
)
|
||||
parry_stamina_cost = 5
|
||||
parry_failed_stagger_duration = 2 SECONDS
|
||||
parry_failed_clickcd_duration = CLICK_CD_RANGE
|
||||
parry_automatic_enabled = TRUE
|
||||
parry_cooldown = 0
|
||||
|
||||
/obj/item/melee/rapier/active_parry_reflex_counter(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/return_list, parry_efficiency, list/effect_text)
|
||||
@@ -259,6 +255,8 @@
|
||||
var/stam_dmg = 30
|
||||
var/cooldown_check = 0 // Used internally, you don't want to modify
|
||||
var/cooldown = 13 // Default wait time until can stun again.
|
||||
/// block mitigation needed to prevent knockdown/disarms
|
||||
var/block_percent_to_counter = 50
|
||||
var/stun_time_silicon = 60 // How long it stuns silicons for - 6 seconds.
|
||||
var/affect_silicon = FALSE // Does it stun silicons.
|
||||
var/on_sound // "On" sound, played when switching between able to stun or not.
|
||||
@@ -356,7 +354,8 @@
|
||||
if(cooldown_check < world.time)
|
||||
if(!UseStaminaBufferStandard(user, STAM_COST_BATON_MOB_MULT, warn = TRUE))
|
||||
return DISCARD_LAST_ACTION
|
||||
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, null) & BLOCK_SUCCESS)
|
||||
var/list/block_return = list()
|
||||
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, block_return) & BLOCK_SUCCESS)
|
||||
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return
|
||||
if(ishuman(target))
|
||||
@@ -367,7 +366,8 @@
|
||||
if(stun_animation)
|
||||
user.do_attack_animation(target)
|
||||
playsound(get_turf(src), on_stun_sound, 75, 1, -1)
|
||||
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
var/countered = block_return[BLOCK_RETURN_MITIGATION_PERCENT] > block_percent_to_counter
|
||||
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, countered? 0 : hardstun_ds, stam_dmg, !countered)
|
||||
additional_effects_carbon(target, user)
|
||||
log_combat(user, target, "stunned", src)
|
||||
add_fingerprint(user)
|
||||
@@ -453,6 +453,18 @@
|
||||
playsound(src.loc, on_sound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/newspaper
|
||||
name = "The Daily Whiplash"
|
||||
desc = "A newspaper wrapped around a telescopic baton in such a way that it looks like you're beating people with a rolled up newspaper."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "newspaper"
|
||||
lefthand_file = 'icons/mob/inhands/misc/books_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/books_righthand.dmi'
|
||||
on_sound = 'sound/weapons/batonextend.ogg'
|
||||
on_icon_state = "newspaper2"
|
||||
off_icon_state = "newspaper"
|
||||
on_item_state = "newspaper"
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton
|
||||
name = "contractor baton"
|
||||
desc = "A compact, specialised baton assigned to Syndicate contractors. Applies light electrical shocks to targets."
|
||||
@@ -695,11 +707,14 @@
|
||||
playsound(src, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
|
||||
/obj/item/melee/roastingstick/proc/finish_roasting(user, atom/target)
|
||||
if(!held_sausage || held_sausage.roasted)
|
||||
return // no
|
||||
to_chat(user, "You finish roasting [held_sausage]")
|
||||
playsound(src,'sound/items/welder2.ogg',50,1)
|
||||
held_sausage.add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
held_sausage.name = "[target.name]-roasted [held_sausage.name]"
|
||||
held_sausage.desc = "[held_sausage.desc] It has been cooked to perfection on \a [target]."
|
||||
held_sausage.roasted = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/cleric_mace
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
|
||||
if(isanimal(occupant))
|
||||
var/mob/living/simple_animal/animal = occupant
|
||||
occupant_gas_supply[/datum/gas/oxygen] = 0.0064 //make sure it has some gas in so it isn't depressurized
|
||||
occupant_gas_supply[GAS_O2] = 0.0064 //make sure it has some gas in so it isn't depressurized
|
||||
occupant_gas_supply.set_temperature(animal.minbodytemp) //simple animals only care about temperature/pressure when their turf isnt a location
|
||||
|
||||
if(ishuman(occupant)) //humans require resistance to cold/heat and living in no air while inside, and lose this when outside
|
||||
|
||||
@@ -612,6 +612,12 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
icon_state = "kobold"
|
||||
item_state = "kobold"
|
||||
|
||||
/obj/item/toy/plush/lizardplushie/kobold
|
||||
name = "spacelizard plushie"
|
||||
desc = "An adorable stuffed toy that resembles a lizard in a suit."
|
||||
icon_state = "plushie_spacelizard"
|
||||
item_state = "plushie_spacelizard"
|
||||
|
||||
/obj/item/toy/plush/nukeplushie
|
||||
name = "operative plushie"
|
||||
desc = "A stuffed toy that resembles a syndicate nuclear operative. The tag claims operatives to be purely fictitious."
|
||||
@@ -643,17 +649,17 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
/obj/item/toy/plush/beeplushie
|
||||
name = "bee plushie"
|
||||
desc = "A cute toy that resembles an even cuter bee."
|
||||
icon_state = "plushie_h"
|
||||
item_state = "plushie_h"
|
||||
icon_state = "plushie_bee"
|
||||
item_state = "plushie_bee"
|
||||
attack_verb = list("stung")
|
||||
gender = FEMALE
|
||||
squeak_override = list('modular_citadel/sound/voice/scream_moth.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/mothplushie
|
||||
name = "insect plushie"
|
||||
name = "moth plushie"
|
||||
desc = "An adorable stuffed toy that resembles some kind of insect."
|
||||
icon_state = "bumble"
|
||||
item_state = "bumble"
|
||||
icon_state = "moff"
|
||||
item_state = "moff"
|
||||
squeak_override = list('modular_citadel/sound/voice/mothsqueak.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
@@ -665,6 +671,20 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
attack_verb = list("lit", "flickered", "flashed")
|
||||
squeak_override = list('sound/weapons/magout.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/drake
|
||||
name = "drake plushie"
|
||||
desc = "A large beast from lavaland turned into a marketable plushie!"
|
||||
icon_state = "drake"
|
||||
item_state = "drake"
|
||||
attack_verb = list("bit", "devoured", "burned")
|
||||
|
||||
/obj/item/toy/plush/deer
|
||||
name = "deer plushie"
|
||||
desc = "Oh deer, a plushie!"
|
||||
icon_state = "deer"
|
||||
item_state = "deer"
|
||||
attack_verb = list("bleated", "rammed", "kicked")
|
||||
|
||||
/obj/item/toy/plush/box
|
||||
name = "cardboard plushie"
|
||||
desc = "A toy box plushie, it holds cotten. Only a baddie would place a bomb through the postal system..."
|
||||
@@ -694,7 +714,7 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
attack_verb = list("scanned", "beeped", "stared")
|
||||
|
||||
/obj/item/toy/plush/borgplushie
|
||||
name = "robot plushie"
|
||||
name = "K9 plushie"
|
||||
desc = "An adorable stuffed toy of a robot."
|
||||
icon_state = "securityk9"
|
||||
item_state = "securityk9"
|
||||
@@ -702,25 +722,28 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
squeak_override = list('sound/machines/beep.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/borgplushie/medihound
|
||||
name = "medihound plushie"
|
||||
icon_state = "medihound"
|
||||
item_state = "medihound"
|
||||
|
||||
/obj/item/toy/plush/borgplushie/scrubpuppy
|
||||
name = "scrubpuppy plushie"
|
||||
icon_state = "scrubpuppy"
|
||||
item_state = "scrubpuppy"
|
||||
|
||||
/obj/item/toy/plush/borgplushie/pupdozer
|
||||
name = "pupdozer plushie"
|
||||
icon_state = "pupdozer"
|
||||
item_state = "pupdozer"
|
||||
|
||||
/obj/item/toy/plush/aiplush
|
||||
name = "AI plushie"
|
||||
desc = "A little stuffed toy AI core... it appears to be malfunctioning."
|
||||
icon_state = "exo"
|
||||
item_state = "exo"
|
||||
icon_state = "malfai"
|
||||
item_state = "malfai"
|
||||
attack_verb = list("hacked", "detonated", "overloaded")
|
||||
squeak_override = list('sound/machines/beep.ogg' = 9, 'sound/machines/buzz-two.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/mammal/fox
|
||||
icon_state = "fox"
|
||||
item_state = "fox"
|
||||
|
||||
/obj/item/toy/plush/snakeplushie
|
||||
name = "snake plushie"
|
||||
desc = "An adorable stuffed toy that resembles a snake. Not to be mistaken for the real thing."
|
||||
@@ -732,6 +755,72 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
/obj/item/toy/plush/mammal
|
||||
name = "mammal plushie"
|
||||
desc = "An adorable stuffed toy resembling some sort of crew member."
|
||||
icon_state = "ych"
|
||||
item_state = "ych"
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/mammal/fox
|
||||
name = "fox plushie"
|
||||
desc = "An adorable stuffed toy resembling a fox."
|
||||
icon_state = "fox"
|
||||
item_state = "fox"
|
||||
attack_verb = list("yipped", "geckered", "yapped")
|
||||
|
||||
/obj/item/toy/plush/mammal/dog
|
||||
name = "dog plushie"
|
||||
icon_state = "corgi"
|
||||
item_state = "corgi"
|
||||
desc = "An adorable stuffed toy that resembles a dog."
|
||||
attack_verb = list("barked", "boofed", "borked")
|
||||
squeak_override = list(
|
||||
'modular_citadel/sound/voice/bark1.ogg' = 1,
|
||||
'modular_citadel/sound/voice/bark2.ogg' = 1
|
||||
)
|
||||
|
||||
/obj/item/toy/plush/mammal/dog/fcorgi
|
||||
name = "corgi plushie"
|
||||
icon_state = "girlycorgi"
|
||||
item_state = "girlycorgi"
|
||||
desc = "An adorable stuffed toy that resembles a dog. This one dons a pink ribbon."
|
||||
|
||||
/obj/item/toy/plush/mammal/dog/borgi
|
||||
name = "borgi plushie"
|
||||
icon_state = "borgi"
|
||||
item_state = "borgi"
|
||||
desc = "An adorable stuffed toy that resembles a robot dog."
|
||||
|
||||
/obj/item/toy/plush/xeno
|
||||
name = "xenohybrid plushie"
|
||||
desc = "An adorable stuffed toy that resembles a xenomorphic crewmember."
|
||||
icon_state = "xeno"
|
||||
item_state = "xeno"
|
||||
squeak_override = list('sound/voice/hiss2.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/bird
|
||||
name = "bird plushie"
|
||||
desc = "An adorable stuffed plushie that resembles an avian."
|
||||
icon_state = "bird"
|
||||
item_state = "bird"
|
||||
attack_verb = list("peeped", "beeped", "poofed")
|
||||
squeak_override = list('modular_citadel/sound/voice/peep.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/sergal
|
||||
name = "sergal plushie"
|
||||
desc = "An adorable stuffed plushie that resembles a sagaru."
|
||||
icon_state = "sergal"
|
||||
item_state = "sergal"
|
||||
squeak_override = list('modular_citadel/sound/voice/merp.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/catgirl
|
||||
name = "feline plushie"
|
||||
desc = "An adorable stuffed toy that resembles a feline."
|
||||
icon_state = "cat"
|
||||
item_state = "cat"
|
||||
attack_verb = list("headbutt", "scritched", "bit")
|
||||
squeak_override = list('modular_citadel/sound/voice/nya.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/catgirl/fermis
|
||||
@@ -742,40 +831,25 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
attack_verb = list("cuddled", "petpatted", "wigglepurred")
|
||||
squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/xeno
|
||||
name = "xenohybrid plushie"
|
||||
desc = "An adorable stuffed toy that resmembles a xenomorphic crewmember."
|
||||
squeak_override = list('sound/voice/hiss2.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
/obj/item/toy/plush/teddybear
|
||||
name = "teddy"
|
||||
desc = "It's a teddy bear!"
|
||||
icon_state = "teddy"
|
||||
item_state = "teddy"
|
||||
|
||||
/obj/item/toy/plush/bird
|
||||
name = "bird plushie"
|
||||
desc = "An adorable stuffed plushie that resembles an avian."
|
||||
attack_verb = list("peeped", "beeped", "poofed")
|
||||
squeak_override = list('modular_citadel/sound/voice/peep.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/sergal
|
||||
name = "sergal plushie"
|
||||
desc = "An adorable stuffed plushie that resembles a sagaru."
|
||||
squeak_override = list('modular_citadel/sound/voice/merp.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/mammal/dog
|
||||
desc = "An adorable stuffed toy that resembles a canine."
|
||||
attack_verb = list("barked", "boofed", "borked")
|
||||
squeak_override = list(
|
||||
'modular_citadel/sound/voice/bark1.ogg' = 1,
|
||||
'modular_citadel/sound/voice/bark2.ogg' = 1
|
||||
)
|
||||
|
||||
/obj/item/toy/plush/catgirl
|
||||
name = "feline plushie"
|
||||
desc = "An adorable stuffed toy that resembles a feline."
|
||||
attack_verb = list("headbutt", "scritched", "bit")
|
||||
squeak_override = list('modular_citadel/sound/voice/nya.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
/obj/item/toy/plush/crab
|
||||
name = "crab plushie"
|
||||
desc = "Fewer pinches than a real one, but it still clicks."
|
||||
icon_state = "crab"
|
||||
item_state = "crab"
|
||||
attack_verb = list("clicked", "clacked", "pinched")
|
||||
|
||||
/obj/item/toy/plush/gondola
|
||||
name = "gondola plushie"
|
||||
desc = "Just looking at it seems to calm you down. Please do not eat it though."
|
||||
icon_state = "gondola"
|
||||
item_state = "gondola"
|
||||
attack_verb = list("calmed", "smiled", "peaced")
|
||||
|
||||
/obj/item/toy/plush/hairball
|
||||
name = "Hairball"
|
||||
|
||||
@@ -79,27 +79,27 @@
|
||||
var/weight = getweight(user, STAM_COST_ATTACK_MOB_MULT)
|
||||
if(!user.UseStaminaBuffer(weight, warn = TRUE))
|
||||
return FALSE
|
||||
var/datum/gas_mixture/gasused = tank.air_contents.remove(gasperfist * fisto_setting)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return FALSE
|
||||
var/totalitemdamage = target.pre_attacked_by(src, user)
|
||||
T.assume_air(gasused)
|
||||
T.air_update_turf()
|
||||
if(!gasused)
|
||||
var/moles_used = gasperfist * fisto_setting
|
||||
if(!moles_used)
|
||||
to_chat(user, "<span class='warning'>\The [src]'s tank is empty!</span>")
|
||||
target.apply_damage((totalitemdamage / 5), BRUTE)
|
||||
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1)
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a dull thunk as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
|
||||
"<span class='userdanger'>[user]'s punches you!</span>")
|
||||
return
|
||||
if(gasused.total_moles() < gasperfist * fisto_setting)
|
||||
if(tank.air_contents.total_moles() < moles_used)
|
||||
to_chat(user, "<span class='warning'>\The [src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
|
||||
playsound(loc, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
target.apply_damage((totalitemdamage / 2), BRUTE)
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a weak hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
|
||||
"<span class='userdanger'>[user]'s punch strikes with force!</span>")
|
||||
return
|
||||
T.assume_air_moles(tank.air_contents, gasperfist * fisto_setting)
|
||||
T.air_update_turf()
|
||||
target.apply_damage(totalitemdamage * fisto_setting, BRUTE, wound_bonus = -25*fisto_setting**2)
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
|
||||
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
|
||||
|
||||
@@ -681,7 +681,7 @@ as performing this in action() will cause the upgrade to end up in the borg inst
|
||||
action_icon_state = "Chevron_State_0"
|
||||
|
||||
var/currentState = 0
|
||||
var/maxReduction = 1
|
||||
var/maxReduction = 0.5
|
||||
|
||||
|
||||
/obj/effect/proc_holder/silicon/cyborg/vtecControl/Trigger(mob/living/silicon/robot/user)
|
||||
|
||||
@@ -34,6 +34,10 @@
|
||||
block_damage_absorption = 5
|
||||
block_resting_stamina_penalty_multiplier = 2
|
||||
block_projectile_mitigation = 75
|
||||
block_damage_absorption_override = list(
|
||||
TEXT_ATTACK_TYPE_TACKLE = INFINITY,
|
||||
TEXT_ATTACK_TYPE_THROWN = 10
|
||||
)
|
||||
|
||||
/obj/item/shield/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -120,8 +124,6 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/shield/proc/user_shieldbash(mob/living/user, atom/target, harmful)
|
||||
if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //Combat mode has to be enabled for shield bashing
|
||||
return FALSE
|
||||
if(!(shield_flags & SHIELD_CAN_BASH))
|
||||
to_chat(user, "<span class='warning'>[src] can't be used to shield bash!</span>")
|
||||
return FALSE
|
||||
@@ -376,11 +378,10 @@
|
||||
|
||||
/obj/item/shield/riot/flash/on_shield_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
. = ..()
|
||||
if (. && !embedded_flash.crit_fail)
|
||||
if (. && damage && !embedded_flash.crit_fail)
|
||||
embedded_flash.activate()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/shield/riot/flash/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/assembly/flash/handheld))
|
||||
var/obj/item/assembly/flash/handheld/flash = W
|
||||
@@ -564,7 +565,7 @@
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/energy/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
/obj/item/shield/energy/directional_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
var/stamina_loss_amount = 35
|
||||
var/turned_on = FALSE
|
||||
var/knockdown = TRUE
|
||||
/// block percent needed to prevent knockdown/disarm
|
||||
var/block_percent_to_counter = 50
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/hitcost = 750
|
||||
var/throw_hit_chance = 35
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
distribute_pressure = ONE_ATMOSPHERE * O2STANDARD
|
||||
actions_types = list(/datum/action/item_action/set_internals, /datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
|
||||
var/gas_type = /datum/gas/oxygen
|
||||
var/gas_type = GAS_O2
|
||||
var/on = FALSE
|
||||
var/stabilizers = FALSE
|
||||
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
|
||||
@@ -77,13 +77,7 @@
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
assume_air_moles(air_contents, num)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -116,13 +110,7 @@
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(num)
|
||||
if(removed.total_moles() < 0.005)
|
||||
turn_off(user)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
T.assume_air(removed)
|
||||
assume_air_moles(air_contents, num)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -171,7 +159,7 @@
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
distribute_pressure = 0
|
||||
gas_type = /datum/gas/carbon_dioxide
|
||||
gas_type = GAS_CO2
|
||||
|
||||
/obj/item/tank/jetpack/carbondioxide/eva
|
||||
name = "surplus jetpack (carbon dioxide)"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
/obj/item/tank/internals/oxygen/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
force = 10
|
||||
|
||||
/obj/item/tank/internals/anesthetic/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(/datum/gas/nitrous_oxide, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
air_contents.set_moles(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(GAS_NITROUS, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -63,8 +63,8 @@
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
|
||||
/obj/item/tank/internals/air/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(/datum/gas/nitrogen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
air_contents.set_moles(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
|
||||
air_contents.set_moles(GAS_N2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
return
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
|
||||
/obj/item/tank/internals/plasma/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
|
||||
@@ -98,14 +98,14 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/internals/plasma/full/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
//Makes empty oxygen tanks spawn without gas
|
||||
/obj/item/tank/internals/plasma/empty/populate_gas()
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasma/full/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
/*
|
||||
* Plasmaman Plasma Tank
|
||||
@@ -120,11 +120,11 @@
|
||||
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
|
||||
/obj/item/tank/internals/plasmaman/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/plasmaman/full/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_PLASMA, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
//makes empty plasma tanks spawn without gas.
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
|
||||
@@ -196,5 +196,5 @@
|
||||
volume = 10
|
||||
|
||||
/obj/item/tank/internals/methyl_bromide/populate_gas()
|
||||
air_contents.set_moles(/datum/gas/methyl_bromide, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
air_contents.set_moles(GAS_METHYL_BROMIDE, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
if(istype(location))
|
||||
location.assume_air(air_contents)
|
||||
air_contents.clear()
|
||||
SSair.add_to_active(location)
|
||||
visible_message("<span class='warning'[src] leaks gas!")
|
||||
|
||||
/obj/item/tank/Destroy()
|
||||
@@ -235,6 +234,9 @@
|
||||
/obj/item/tank/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
/obj/item/tank/remove_air_ratio(ratio)
|
||||
return air_contents.remove_ratio(ratio)
|
||||
|
||||
/obj/item/tank/return_air()
|
||||
return air_contents
|
||||
|
||||
@@ -247,6 +249,18 @@
|
||||
check_status()
|
||||
return 1
|
||||
|
||||
/obj/item/tank/assume_air_moles(datum/gas_mixture/giver, moles)
|
||||
giver.transfer_to(air_contents, moles)
|
||||
|
||||
check_status()
|
||||
return 1
|
||||
|
||||
/obj/item/tank/assume_air_ratio(datum/gas_mixture/giver, ratio)
|
||||
giver.transfer_ratio_to(air_contents, ratio)
|
||||
|
||||
check_status()
|
||||
return 1
|
||||
|
||||
/obj/item/tank/proc/remove_air_volume(volume_to_return)
|
||||
if(!air_contents)
|
||||
return null
|
||||
|
||||
@@ -332,6 +332,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
bare_wound_bonus = 0
|
||||
wound_bonus = 0
|
||||
|
||||
/obj/item/melee/bokken/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
|
||||
. = ..()
|
||||
if(!istype(object, /obj/item/melee/bokken))
|
||||
// no counterattack.
|
||||
block_return[BLOCK_RETURN_FORCE_NO_PARRY_COUNTERATTACK] = TRUE
|
||||
|
||||
/datum/block_parry_data/bokken // fucked up parry data, emphasizing quicker, shorter parries
|
||||
parry_stamina_cost = 10 // be wise about when you parry, though, else you won't be able to fight enough to make it count
|
||||
parry_time_windup = 0
|
||||
@@ -358,7 +364,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
parry_time_perfect = 2.5 // however...
|
||||
parry_time_perfect_leeway = 2 // the entire time, the parry is perfect
|
||||
parry_failed_stagger_duration = 1 SECONDS
|
||||
parry_failed_clickcd_duration = 1 SECONDS // more forgiving punishments for missed parries
|
||||
// still, don't fucking miss your parries or you're down stamina and staggered to shit
|
||||
|
||||
/datum/block_parry_data/bokken/quick_parry/proj
|
||||
@@ -475,7 +480,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
parry_time_perfect = 1
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_failed_stagger_duration = 1 SECONDS
|
||||
parry_failed_clickcd_duration = 1 SECONDS
|
||||
|
||||
/datum/block_parry_data/bokken/waki/quick_parry/proj
|
||||
parry_efficiency_perfect_override = list()
|
||||
|
||||
@@ -96,12 +96,43 @@
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/assume_air_moles(datum/gas_mixture/giver, moles)
|
||||
if(loc)
|
||||
return loc.assume_air_moles(giver, moles)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/assume_air_ratio(datum/gas_mixture/giver, ratio)
|
||||
if(loc)
|
||||
return loc.assume_air_ratio(giver, ratio)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/transfer_air(datum/gas_mixture/taker, moles)
|
||||
if(loc)
|
||||
return loc.transfer_air(taker, moles)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/transfer_air_ratio(datum/gas_mixture/taker, ratio)
|
||||
if(loc)
|
||||
return loc.transfer_air_ratio(taker, ratio)
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
/obj/remove_air(amount)
|
||||
if(loc)
|
||||
return loc.remove_air(amount)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/remove_air_ratio(ratio)
|
||||
if(loc)
|
||||
return loc.remove_air_ratio(ratio)
|
||||
else
|
||||
return null
|
||||
|
||||
/obj/return_air()
|
||||
if(loc)
|
||||
return loc.return_air()
|
||||
@@ -116,8 +147,7 @@
|
||||
|
||||
if(breath_request>0)
|
||||
var/datum/gas_mixture/environment = return_air()
|
||||
var/breath_percentage = BREATH_VOLUME / environment.return_volume()
|
||||
return remove_air(environment.total_moles() * breath_percentage)
|
||||
return remove_air_ratio(BREATH_VOLUME / environment.return_volume())
|
||||
else
|
||||
return null
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
resintype = "wall"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/wall/BlockSuperconductivity()
|
||||
return 1
|
||||
/obj/structure/alien/resin/wall/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
parry_time_perfect = 1.5
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_imperfect_falloff_percent = 7.5
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_to_counterattack = INFINITY
|
||||
parry_efficiency_considered_successful = 50
|
||||
parry_efficiency_perfect = 120
|
||||
parry_efficiency_perfect_override = list(
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
alpha = 150
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/firelock/BlockSuperconductivity()
|
||||
/obj/structure/holosign/barrier/firelock/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/firelock/Initialize()
|
||||
@@ -115,7 +115,7 @@
|
||||
CanAtmosPass = ATMOS_PASS_NO
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/holosign/barrier/combifan/BlockSuperconductivity()
|
||||
/obj/structure/holosign/barrier/combifan/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/holosign/barrier/combifan/Initialize()
|
||||
|
||||
@@ -150,9 +150,7 @@
|
||||
pod_moving = 0
|
||||
if(!QDELETED(pod))
|
||||
var/datum/gas_mixture/floor_mixture = loc.return_air()
|
||||
floor_mixture.archive()
|
||||
pod.air_contents.archive()
|
||||
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
|
||||
equalize_all_gases_in_list(list(pod.air_contents,floor_mixture))
|
||||
air_update_turf()
|
||||
|
||||
/obj/structure/transit_tube/station/init_tube_dirs()
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
/obj/structure/transit_tube_pod/Initialize()
|
||||
. = ..()
|
||||
air_contents.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
|
||||
air_contents.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
|
||||
air_contents.set_moles(GAS_O2, MOLES_O2STANDARD)
|
||||
air_contents.set_moles(GAS_N2, MOLES_N2STANDARD)
|
||||
air_contents.set_temperature(T20C)
|
||||
|
||||
|
||||
@@ -153,9 +153,25 @@
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return air_contents.merge(giver)
|
||||
|
||||
/obj/structure/transit_tube_pod/assume_air_moles(datum/gas_mixture/giver, moles)
|
||||
return giver.transfer_to(air_contents, moles)
|
||||
|
||||
/obj/structure/transit_tube_pod/assume_air_ratio(datum/gas_mixture/giver, ratio)
|
||||
return giver.transfer_ratio_to(air_contents, ratio)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air_ratio(ratio)
|
||||
return air_contents.remove_ratio(ratio)
|
||||
|
||||
/obj/structure/transit_tube_pod/transfer_air(datum/gas_mixture/taker, moles)
|
||||
return air_contents.transfer_to(taker, moles)
|
||||
|
||||
/obj/structure/transit_tube_pod/transfer_air_ratio(datum/gas_mixture/taker, ratio)
|
||||
return air_contents.transfer_ratio_to(taker, ratio)
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(istype(mob) && mob.client)
|
||||
if(!moving)
|
||||
|
||||
@@ -674,7 +674,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
/obj/structure/window/plasma/reinforced/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
/obj/structure/window/plasma/reinforced/BlockSuperconductivity()
|
||||
/obj/structure/window/plasma/reinforced/BlockThermalConductivity()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
|
||||
+6
-4
@@ -43,7 +43,8 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
|
||||
|
||||
*/
|
||||
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, envwet = -10000, envdry = 0)
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE,
|
||||
falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, envwet = -10000, envdry = 0, distance_multiplier = SOUND_DEFAULT_DISTANCE_MULTIPLIER, distance_multiplier_min_range = SOUND_DEFAULT_MULTIPLIER_EFFECT_RANGE)
|
||||
if(isarea(source))
|
||||
CRASH("playsound(): source is an area")
|
||||
|
||||
@@ -83,11 +84,11 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
if(get_dist(M, turf_source) <= maxdistance)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, get_dist(M, turf_source) <= distance_multiplier_min_range? 1 : distance_multiplier, envwet, envdry)
|
||||
for(var/P in SSmobs.dead_players_by_zlevel[source_z])
|
||||
var/mob/M = P
|
||||
if(get_dist(M, turf_source) <= maxdistance)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, get_dist(M, turf_source) <= distance_multiplier_min_range? 1 : distance_multiplier, envwet, envdry)
|
||||
|
||||
/*! playsound
|
||||
|
||||
@@ -108,7 +109,8 @@ distance_multiplier - Can be used to multiply the distance at which the sound is
|
||||
|
||||
*/
|
||||
|
||||
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, envwet = -10000, envdry = 0)
|
||||
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance,
|
||||
falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = SOUND_DEFAULT_DISTANCE_MULTIPLIER, envwet = -10000, envdry = 0)
|
||||
if(!client || !can_hear())
|
||||
return
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
|
||||
if(turf_type)
|
||||
var/turf/newT = ChangeTurf(turf_type, baseturf_type, flags)
|
||||
SSair.remove_from_active(newT)
|
||||
CALCULATE_ADJACENT_TURFS(newT)
|
||||
SSair.add_to_active(newT,1)
|
||||
|
||||
/turf/proc/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
@@ -54,6 +52,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
/turf/proc/TerraformTurf(path, new_baseturf, flags)
|
||||
return ChangeTurf(path, new_baseturf, flags)
|
||||
|
||||
/turf/proc/get_z_base_turf()
|
||||
. = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if (!ispath(.))
|
||||
. = text2path(.)
|
||||
if (!ispath(.))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
. = /turf/open/space
|
||||
|
||||
// Creates a new turf
|
||||
// new_baseturfs can be either a single type or list of types, formated the same as baseturfs. see turf.dm
|
||||
/turf/proc/ChangeTurf(path, list/new_baseturfs, flags)
|
||||
@@ -61,12 +67,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
if(null)
|
||||
return
|
||||
if(/turf/baseturf_bottom)
|
||||
path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if (!ispath(path))
|
||||
path = text2path(path)
|
||||
if (!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
path = get_z_base_turf()
|
||||
if(/turf/open/space/basic)
|
||||
// basic doesn't initialize and this will cause issues
|
||||
// no warning though because this can happen naturaly as a result of it being built on top of
|
||||
@@ -142,22 +143,25 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
|
||||
/turf/open/ChangeTurf(path, list/new_baseturfs, flags)
|
||||
if ((flags & CHANGETURF_INHERIT_AIR) && ispath(path, /turf/open))
|
||||
SSair.remove_from_active(src)
|
||||
var/datum/gas_mixture/stashed_air = new()
|
||||
stashed_air.copy_from(air)
|
||||
. = ..()
|
||||
if (!.) // changeturf failed or didn't do anything
|
||||
QDEL_NULL(stashed_air)
|
||||
update_air_ref()
|
||||
return
|
||||
var/turf/open/newTurf = .
|
||||
newTurf.air.copy_from(stashed_air)
|
||||
update_air_ref(planetary_atmos ? 1 : 2)
|
||||
QDEL_NULL(stashed_air)
|
||||
SSair.add_to_active(newTurf)
|
||||
else
|
||||
if(ispath(path,/turf/closed))
|
||||
flags |= CHANGETURF_RECALC_ADJACENT
|
||||
return ..()
|
||||
update_air_ref(-1)
|
||||
. = ..()
|
||||
else
|
||||
. = ..()
|
||||
if(!istype(air,/datum/gas_mixture))
|
||||
Initalize_Atmos(0)
|
||||
|
||||
// Take off the top layer turf and replace it with the next baseturf down
|
||||
/turf/proc/ScrapeAway(amount=1, flags)
|
||||
@@ -317,7 +321,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
total.merge(S.air)
|
||||
|
||||
air.copy_from(total.remove_ratio(1/turf_count))
|
||||
SSair.add_to_active(src)
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
@@ -8,15 +8,17 @@
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
wave_explosion_block = 10
|
||||
wave_explosion_multiply = 0.75
|
||||
/// How much we block yelling
|
||||
var/yelling_resistance = 10
|
||||
/// how much of inbound yelling to dampen
|
||||
var/yelling_dampen = 0.5
|
||||
|
||||
/turf/closed/Initialize()
|
||||
. = ..()
|
||||
update_air_ref()
|
||||
|
||||
/turf/closed/AfterChange()
|
||||
. = ..()
|
||||
SSair.high_pressure_delta -= src
|
||||
update_air_ref()
|
||||
|
||||
/turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
||||
return FALSE
|
||||
@@ -201,16 +203,19 @@
|
||||
desc = "A wall made out of a strange metal. The squares on it pulse in a predictable pattern."
|
||||
icon = 'icons/turf/walls/hierophant_wall.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
|
||||
/turf/closed/indestructible/rock/glacierrock
|
||||
name = "unaturally hard ice wall"
|
||||
desc = "Ice, hardened over thousands of years, you're not breaking through this."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "snow_rock"
|
||||
|
||||
|
||||
/turf/closed/indestructible/rock/glacierrock/blue
|
||||
name = "blue ice wall"
|
||||
desc = "The incredible compressive forces that formed this sturdy ice wall gave it a blue color."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "ice"
|
||||
canSmoothWith = list(/turf/closed/indestructible/rock/glacierrock/blue)
|
||||
|
||||
/turf/closed/get_yelling_resistance(power)
|
||||
return yelling_resistance + (power * yelling_dampen)
|
||||
|
||||
+11
-14
@@ -218,18 +218,15 @@
|
||||
flash_color(L, flash_color = "#C80000", flash_time = 10)
|
||||
|
||||
/turf/open/Initalize_Atmos(times_fired)
|
||||
set_excited(FALSE)
|
||||
if(!blocks_air)
|
||||
if(!istype(air,/datum/gas_mixture/turf))
|
||||
air = new(2500,src)
|
||||
air.copy_from_turf(src)
|
||||
update_air_ref(planetary_atmos ? 1 : 2)
|
||||
|
||||
update_visuals()
|
||||
|
||||
current_cycle = times_fired
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
for(var/i in atmos_adjacent_turfs)
|
||||
var/turf/open/enemy_tile = i
|
||||
var/datum/gas_mixture/enemy_air = enemy_tile.return_air()
|
||||
if(!get_excited() && air.compare(enemy_air))
|
||||
//testing("Active turf found. Return value of compare(): [is_active]")
|
||||
set_excited(TRUE)
|
||||
SSair.add_to_active_extools(src)
|
||||
|
||||
/turf/open/proc/GetHeatCapacity()
|
||||
. = air.heat_capacity()
|
||||
@@ -323,8 +320,8 @@
|
||||
|
||||
/turf/open/rad_act(pulse_strength)
|
||||
. = ..()
|
||||
if (air.get_moles(/datum/gas/carbon_dioxide) && air.get_moles(/datum/gas/oxygen))
|
||||
pulse_strength = min(pulse_strength,air.get_moles(/datum/gas/carbon_dioxide)*1000,air.get_moles(/datum/gas/oxygen)*2000) //Ensures matter is conserved properly
|
||||
air.set_moles(/datum/gas/carbon_dioxide, max(air.get_moles(/datum/gas/carbon_dioxide)-(pulse_strength/1000),0))
|
||||
air.set_moles(/datum/gas/oxygen, max(air.get_moles(/datum/gas/oxygen)-(pulse_strength/2000),0))
|
||||
air.adjust_moles(/datum/gas/pluoxium, pulse_strength/4000)
|
||||
if (air.get_moles(GAS_CO2) && air.get_moles(GAS_O2))
|
||||
pulse_strength = min(pulse_strength,air.get_moles(GAS_CO2)*1000,air.get_moles(GAS_O2)*2000) //Ensures matter is conserved properly
|
||||
air.set_moles(GAS_CO2, max(air.get_moles(GAS_CO2)-(pulse_strength/1000),0))
|
||||
air.set_moles(GAS_O2, max(air.get_moles(GAS_O2)-(pulse_strength/2000),0))
|
||||
air.adjust_moles(GAS_PLUOXIUM, pulse_strength/4000)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/turf/open/transparent
|
||||
baseturfs = /turf/open/transparent/openspace
|
||||
intact = FALSE //this means wires go on top
|
||||
|
||||
/turf/open/transparent/Initialize() // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
|
||||
. = ..()
|
||||
plane = OPENSPACE_PLANE
|
||||
layer = OPENSPACE_LAYER
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/open/transparent/LateInitialize()
|
||||
update_multiz(TRUE, TRUE)
|
||||
|
||||
/turf/open/transparent/Destroy()
|
||||
vis_contents.len = 0
|
||||
return ..()
|
||||
|
||||
/turf/open/transparent/update_multiz(prune_on_fail = FALSE, init = FALSE)
|
||||
. = ..()
|
||||
var/turf/T = below()
|
||||
if(!T)
|
||||
vis_contents.len = 0
|
||||
if(!show_bottom_level() && prune_on_fail) //If we cant show whats below, and we prune on fail, change the turf to plating as a fallback
|
||||
ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
||||
return FALSE
|
||||
if(init)
|
||||
vis_contents += T
|
||||
return TRUE
|
||||
|
||||
/turf/open/transparent/multiz_turf_del(turf/T, dir)
|
||||
if(dir != DOWN)
|
||||
return
|
||||
update_multiz()
|
||||
|
||||
/turf/open/transparent/multiz_turf_new(turf/T, dir)
|
||||
if(dir != DOWN)
|
||||
return
|
||||
update_multiz()
|
||||
|
||||
///Called when there is no real turf below this turf
|
||||
/turf/open/transparent/proc/show_bottom_level()
|
||||
var/turf/path = get_z_base_turf()
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), initial(path.icon_state), layer = TURF_LAYER, plane = PLANE_SPACE)
|
||||
underlays += underlay_appearance
|
||||
return TRUE
|
||||
|
||||
|
||||
/turf/open/transparent/glass
|
||||
name = "Glass floor"
|
||||
desc = "Dont jump on it, or do, I'm not your mom."
|
||||
icon = 'icons/turf/floors/glass.dmi'
|
||||
icon_state = "floor_glass"
|
||||
smooth = SMOOTH_MORE
|
||||
var/floor_tile = /obj/item/stack/sheet/glass
|
||||
canSmoothWith = list(/turf/open/transparent/glass, /turf/open/transparent/glass/reinforced)
|
||||
footstep = FOOTSTEP_PLATING
|
||||
barefootstep = FOOTSTEP_HARD_BAREFOOT
|
||||
clawfootstep = FOOTSTEP_HARD_CLAW
|
||||
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
|
||||
|
||||
/turf/open/transparent/glass/Initialize()
|
||||
icon_state = "" //Prevent the normal icon from appearing behind the smooth overlays
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/open/floor/glass/LateInitialize()
|
||||
. = ..()
|
||||
// AddElement(/datum/element/turf_z_transparency, TRUE)
|
||||
|
||||
/turf/open/transparent/glass/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin removing glass...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=80))
|
||||
if(!istype(src, /turf/open/transparent/glass))
|
||||
return TRUE
|
||||
if(floor_tile)
|
||||
new floor_tile(src, 2)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
|
||||
/turf/open/transparent/glass/reinforced
|
||||
name = "Reinforced glass floor"
|
||||
desc = "Do jump on it, it can take it."
|
||||
icon = 'icons/turf/floors/reinf_glass.dmi'
|
||||
floor_tile = /obj/item/stack/sheet/rglass
|
||||
|
||||
/turf/open/transparent/glass/reinforced/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin removing reinforced glass...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=80))
|
||||
if(!istype(src, /turf/open/transparent/glass/reinforced))
|
||||
return TRUE
|
||||
if(floor_tile)
|
||||
new floor_tile(src, 2)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
|
||||
var/icon_plating = "plating"
|
||||
thermal_conductivity = 0.004
|
||||
thermal_conductivity = 0.04
|
||||
heat_capacity = 10000
|
||||
intact = 1
|
||||
var/broken = 0
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
ChangeTurf(/turf/open/floor/plating/rust)
|
||||
|
||||
/turf/open/floor/wood/cold
|
||||
temperature = 255.37
|
||||
initial_temperature = 255.37
|
||||
|
||||
/turf/open/floor/wood/airless
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
icon = 'icons/turf/floors/ice_turf.dmi'
|
||||
icon_state = "unsmooth"
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
temperature = 180
|
||||
initial_temperature = 180
|
||||
planetary_atmos = TRUE
|
||||
baseturfs = /turf/open/floor/plating/ice
|
||||
slowdown = 1
|
||||
@@ -201,10 +201,10 @@
|
||||
canSmoothWith = list(/turf/open/floor/plating/ice/smooth, /turf/open/floor/plating/ice, /turf/open/floor/plating/ice/colder)
|
||||
|
||||
/turf/open/floor/plating/ice/colder
|
||||
temperature = 140
|
||||
initial_temperature = 140
|
||||
|
||||
/turf/open/floor/plating/ice/temperate
|
||||
temperature = 255.37
|
||||
initial_temperature = 255.37
|
||||
|
||||
/turf/open/floor/plating/ice/break_tile()
|
||||
return
|
||||
@@ -221,7 +221,7 @@
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
icon_state = "snowplating"
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
temperature = 180
|
||||
initial_temperature = 180
|
||||
attachment_holes = FALSE
|
||||
planetary_atmos = TRUE
|
||||
footstep = FOOTSTEP_SAND
|
||||
@@ -230,7 +230,7 @@
|
||||
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
|
||||
|
||||
/turf/open/floor/plating/snowed/cavern
|
||||
initial_gas_mix = "o2=0;n2=82;plasma=24;TEMP=120"
|
||||
initial_gas_mix = "n2=82;plasma=24;TEMP=120"
|
||||
|
||||
/turf/open/floor/plating/snowed/smoothed
|
||||
smooth = SMOOTH_MORE | SMOOTH_BORDER
|
||||
@@ -240,10 +240,10 @@
|
||||
icon_state = "smooth"
|
||||
|
||||
/turf/open/floor/plating/snowed/colder
|
||||
temperature = 140
|
||||
initial_temperature = 140
|
||||
|
||||
/turf/open/floor/plating/snowed/temperatre
|
||||
temperature = 255.37
|
||||
initial_temperature = 255.37
|
||||
|
||||
/turf/open/floor/plating/snowed/smoothed/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "reinforced floor"
|
||||
desc = "Extremely sturdy."
|
||||
icon_state = "engine"
|
||||
thermal_conductivity = 0.0025
|
||||
thermal_conductivity = 0.025
|
||||
heat_capacity = INFINITY
|
||||
floor_tile = /obj/item/stack/rods
|
||||
footstep = FOOTSTEP_PLATING
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
density = TRUE
|
||||
blocks_air = TRUE
|
||||
layer = EDGED_TURF_LAYER
|
||||
initial_temperature = 293.15
|
||||
// base_icon_state = "smoothrocks"
|
||||
temperature = TCMB
|
||||
var/smooth_icon = 'icons/turf/smoothrocks.dmi'
|
||||
var/environment_type = "asteroid"
|
||||
var/turf/open/floor/plating/turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
thermal_conductivity = 0.004
|
||||
thermal_conductivity = 0.04
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/plasma, /obj/structure/falsewall/plasma)
|
||||
|
||||
/turf/closed/wall/mineral/plasma/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
intact = 0
|
||||
dirt_buildup_allowed = FALSE
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
initial_temperature = TCMB
|
||||
thermal_conductivity = 0
|
||||
heat_capacity = 700000
|
||||
wave_explosion_multiply = EXPLOSION_DAMPEN_SPACE
|
||||
wave_explosion_block = EXPLOSION_BLOCK_SPACE
|
||||
@@ -15,7 +15,7 @@
|
||||
var/destination_x
|
||||
var/destination_y
|
||||
|
||||
var/static/datum/gas_mixture/immutable/space/space_gas = new
|
||||
var/static/datum/gas_mixture/immutable/space/space_gas
|
||||
plane = PLANE_SPACE
|
||||
layer = SPACE_LAYER
|
||||
light_power = 0.25
|
||||
@@ -36,8 +36,10 @@
|
||||
/turf/open/space/Initialize()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
icon_state = SPACE_ICON_STATE
|
||||
if(!space_gas)
|
||||
space_gas = new
|
||||
air = space_gas
|
||||
update_air_ref()
|
||||
update_air_ref(0)
|
||||
vis_contents.Cut() //removes inherited overlays
|
||||
visibilityChanged()
|
||||
|
||||
@@ -58,9 +60,6 @@
|
||||
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if(requires_activation)
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
|
||||
@@ -103,6 +102,9 @@
|
||||
/turf/open/space/remove_air(amount)
|
||||
return null
|
||||
|
||||
/turf/open/space/remove_air_ratio(amount)
|
||||
return null
|
||||
|
||||
/turf/open/space/proc/update_starlight()
|
||||
if(CONFIG_GET(flag/starlight))
|
||||
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
@@ -274,6 +276,8 @@
|
||||
destination_y = dest_y
|
||||
destination_z = dest_z
|
||||
|
||||
/turf/open/space/get_yelling_resistance(power)
|
||||
return INFINITY // no sound through space for crying out loud
|
||||
|
||||
/turf/open/space/transparent
|
||||
baseturfs = /turf/open/space/transparent/openspace
|
||||
@@ -318,12 +322,7 @@
|
||||
|
||||
///Called when there is no real turf below this turf
|
||||
/turf/open/space/transparent/proc/show_bottom_level()
|
||||
var/turf/path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if(!ispath(path))
|
||||
path = text2path(path)
|
||||
if(!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
var/turf/path = get_z_base_turf()
|
||||
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), initial(path.icon_state), layer = TURF_LAYER, plane = PLANE_SPACE)
|
||||
underlays += underlay_appearance
|
||||
return TRUE
|
||||
|
||||
+26
-3
@@ -16,7 +16,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
// This shouldn't be modified directly, use the helper procs.
|
||||
var/list/baseturfs = /turf/baseturf_bottom
|
||||
|
||||
var/temperature = T20C
|
||||
var/initial_temperature = T20C
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
var/max_fire_temperature_sustained = 0 //The max temperature of the fire which it was subjected to
|
||||
|
||||
@@ -76,7 +76,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
|
||||
if(requires_activation)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
@@ -96,9 +95,21 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
set_custom_materials(custom_materials)
|
||||
|
||||
ComponentInitialize()
|
||||
if(isopenturf(src))
|
||||
var/turf/open/O = src
|
||||
__auxtools_update_turf_temp_info(isspaceturf(get_z_base_turf()) && !O.planetary_atmos)
|
||||
else
|
||||
update_air_ref(-1)
|
||||
__auxtools_update_turf_temp_info(isspaceturf(get_z_base_turf()))
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/proc/__auxtools_update_turf_temp_info()
|
||||
|
||||
/turf/return_temperature()
|
||||
|
||||
/turf/proc/set_temperature()
|
||||
|
||||
/turf/proc/Initalize_Atmos(times_fired)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
|
||||
@@ -120,7 +131,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
for(var/A in B.contents)
|
||||
qdel(A)
|
||||
return
|
||||
SSair.remove_from_active(src)
|
||||
visibilityChanged()
|
||||
QDEL_LIST(blueprint_data)
|
||||
flags_1 &= ~INITIALIZED_1
|
||||
@@ -615,3 +625,16 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
. = ..()
|
||||
if(. != BULLET_ACT_FORCE_PIERCE)
|
||||
. = BULLET_ACT_TURF
|
||||
|
||||
/turf/proc/get_yelling_resistance(power)
|
||||
. = 0
|
||||
// don't bother checking fulltile, we don't need accuracy
|
||||
var/obj/window = locate(/obj/structure/window) in src
|
||||
if(!window)
|
||||
window = locate(/obj/machinery/door/window) in src
|
||||
if(window)
|
||||
. += 4 // windows are minimally resistant
|
||||
// if there's more than one someone fucked up as that shouldn't happen
|
||||
var/obj/machinery/door/D = locate() in src
|
||||
if(D?.density)
|
||||
. += D.opacity? 29 : 19 // glass doors are slightly more resistant to screaming
|
||||
|
||||
+15
-36
@@ -7,46 +7,20 @@ GLOBAL_VAR_INIT(tgs_initialized, FALSE)
|
||||
GLOBAL_VAR(topic_status_lastcache)
|
||||
GLOBAL_LIST(topic_status_cache)
|
||||
|
||||
/**
|
||||
* World creation
|
||||
*
|
||||
* Here is where a round itself is actually begun and setup.
|
||||
* * db connection setup
|
||||
* * config loaded from files
|
||||
* * loads admins
|
||||
* * Sets up the dynamic menu system
|
||||
* * and most importantly, calls initialize on the master subsystem, starting the game loop that causes the rest of the game to begin processing and setting up
|
||||
*
|
||||
*
|
||||
* Nothing happens until something moves. ~Albert Einstein
|
||||
*
|
||||
* For clarity, this proc gets triggered later in the initialization pipeline, it is not the first thing to happen, as it might seem.
|
||||
*
|
||||
* Initialization Pipeline:
|
||||
* Global vars are new()'ed, (including config, glob, and the master controller will also new and preinit all subsystems when it gets new()ed)
|
||||
* Compiled in maps are loaded (mainly centcom). all areas/turfs/objs/mobs(ATOMs) in these maps will be new()ed
|
||||
* world/New() (You are here)
|
||||
* Once world/New() returns, client's can connect.
|
||||
* 1 second sleep
|
||||
* Master Controller initialization.
|
||||
* Subsystem initialization.
|
||||
* Non-compiled-in maps are maploaded, all atoms are new()ed
|
||||
* All atoms in both compiled and uncompiled maps are initialized()
|
||||
*/
|
||||
//This happens after the Master subsystem new(s) (it's a global datum)
|
||||
//So subsystems globals exist, but are not initialised
|
||||
|
||||
/world/New()
|
||||
if (fexists(EXTOOLS))
|
||||
call(EXTOOLS, "maptick_initialize")()
|
||||
#ifdef EXTOOLS_LOGGING
|
||||
call(EXTOOLS, "init_logging")()
|
||||
else
|
||||
CRASH("[EXTOOLS] does not exist!")
|
||||
#endif
|
||||
enable_debugger()
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call(debug_server, "auxtools_init")()
|
||||
enable_debugging()
|
||||
AUXTOOLS_CHECK(AUXMOS)
|
||||
#ifdef REFERENCE_TRACKING
|
||||
enable_reference_tracking()
|
||||
#endif
|
||||
|
||||
world.Profile(PROFILE_START)
|
||||
log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
|
||||
|
||||
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
|
||||
|
||||
@@ -298,10 +272,15 @@ GLOBAL_LIST(topic_status_cache)
|
||||
|
||||
log_world("World rebooted at [TIME_STAMP("hh:mm:ss", FALSE)]")
|
||||
shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
AUXTOOLS_SHUTDOWN(AUXMOS)
|
||||
..()
|
||||
|
||||
/world/Del()
|
||||
shutdown_logging() // makes sure the thread is closed before end, else we terminate
|
||||
AUXTOOLS_SHUTDOWN(AUXMOS)
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call(debug_server, "auxtools_shutdown")()
|
||||
..()
|
||||
|
||||
/world/proc/update_status()
|
||||
@@ -378,7 +357,7 @@ GLOBAL_LIST(topic_status_cache)
|
||||
SSidlenpcpool.MaxZChanged()
|
||||
world.refresh_atmos_grid()
|
||||
|
||||
/// Extools atmos
|
||||
/// Auxtools atmos
|
||||
/world/proc/refresh_atmos_grid()
|
||||
|
||||
/world/proc/change_fps(new_value = 20)
|
||||
|
||||
@@ -194,6 +194,7 @@ GLOBAL_PROTECT(admin_verbs_debug)
|
||||
// /client/proc/check_missing_sprites,
|
||||
// #endif
|
||||
/datum/admins/proc/create_or_modify_area,
|
||||
/datum/admins/proc/fixcorruption,
|
||||
#ifdef REFERENCE_TRACKING
|
||||
/datum/admins/proc/view_refs,
|
||||
/datum/admins/proc/view_del_failures,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user