mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 07:48:55 +00:00
Merge pull request #16061 from jupyterkat/auxmos-515
Update Auxmos to latest for 515 support
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
@@ -17,4 +19,4 @@ indent_style = space
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Dockerfile]
|
||||
indent_style = space
|
||||
indent_style = space
|
||||
2
.tgs.yml
2
.tgs.yml
@@ -3,7 +3,7 @@
|
||||
version: 1
|
||||
# The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job)
|
||||
# Must be interpreted as a string, keep quoted
|
||||
byond: "514.1556"
|
||||
byond: "515.1634"
|
||||
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
|
||||
static_files:
|
||||
# Config directory should be static
|
||||
|
||||
BIN
auxmos.dll
BIN
auxmos.dll
Binary file not shown.
BIN
auxmos.pdb
BIN
auxmos.pdb
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
#define AUXMOS (world.system_type == MS_WINDOWS ? "auxmos.dll" : __detect_auxmos())
|
||||
|
||||
/proc/__detect_auxmos()
|
||||
var/static/known_auxmos_var
|
||||
if(!known_auxmos_var)
|
||||
if (fexists("./libauxmos.so"))
|
||||
known_auxmos_var = "./libauxmos.so"
|
||||
else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/libauxmos.so"))
|
||||
known_auxmos_var = "[world.GetConfig("env", "HOME")]/.byond/bin/libauxmos.so"
|
||||
else
|
||||
CRASH("Could not find libauxmos.so")
|
||||
return known_auxmos_var
|
||||
185
code/__DEFINES/bindings.dm
Normal file
185
code/__DEFINES/bindings.dm
Normal file
@@ -0,0 +1,185 @@
|
||||
//THIS FILE IS AUTOMATICALLY GENERATED BY AUXMOS, PLEASE DO NOT TOUCH IT
|
||||
//PROC DEFINITIONS MAY MOVE AROUND, THIS IS NORMAL
|
||||
|
||||
/* This comment bypasses grep checks */ /var/__auxmos
|
||||
|
||||
/proc/__detect_auxmos()
|
||||
if (world.system_type == UNIX)
|
||||
return __auxmos = "libauxmos"
|
||||
else
|
||||
return __auxmos = "auxmos"
|
||||
|
||||
#define AUXMOS (__auxmos || __detect_auxmos())
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools(remaining)
|
||||
return LIBCALL(AUXMOS, "byond:equalize_hook_ffi")(src, remaining)
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups_auxtools(remaining)
|
||||
return LIBCALL(AUXMOS, "byond:groups_hook_ffi")(src, remaining)
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_turfs_auxtools(remaining)
|
||||
return LIBCALL(AUXMOS, "byond:process_turf_hook_ffi")(src, remaining)
|
||||
|
||||
/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools(time_remaining)
|
||||
return LIBCALL(AUXMOS, "byond:finish_process_turfs_ffi")(time_remaining)
|
||||
|
||||
/datum/controller/subsystem/air/proc/thread_running()
|
||||
return LIBCALL(AUXMOS, "byond:thread_running_hook_ffi")()
|
||||
|
||||
/turf/proc/__update_auxtools_turf_adjacency_info()
|
||||
return LIBCALL(AUXMOS, "byond:hook_infos_ffi")(src)
|
||||
|
||||
/turf/proc/update_air_ref(flag)
|
||||
return LIBCALL(AUXMOS, "byond:hook_register_turf_ffi")(src, flag)
|
||||
|
||||
/proc/finalize_gas_refs()
|
||||
return LIBCALL(AUXMOS, "byond:finalize_gas_refs_ffi")()
|
||||
|
||||
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
|
||||
return LIBCALL(AUXMOS, "byond:update_reactions_ffi")()
|
||||
|
||||
/proc/auxtools_atmos_init(gas_data)
|
||||
return LIBCALL(AUXMOS, "byond:hook_init_ffi")(gas_data)
|
||||
|
||||
/proc/_auxtools_register_gas(gas)
|
||||
return LIBCALL(AUXMOS, "byond:hook_register_gas_ffi")(gas)
|
||||
|
||||
/datum/gas_mixture/proc/__auxtools_parse_gas_string(string)
|
||||
return LIBCALL(AUXMOS, "byond:parse_gas_string_ffi")(src, string)
|
||||
|
||||
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
|
||||
return LIBCALL(AUXMOS, "byond:hook_max_gas_mixes_ffi")()
|
||||
|
||||
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
|
||||
return LIBCALL(AUXMOS, "byond:hook_amt_gas_mixes_ffi")()
|
||||
|
||||
/proc/equalize_all_gases_in_list(gas_list)
|
||||
return LIBCALL(AUXMOS, "byond:equalize_all_hook_ffi")(gas_list)
|
||||
|
||||
/datum/gas_mixture/proc/get_oxidation_power(temp)
|
||||
return LIBCALL(AUXMOS, "byond:oxidation_power_hook_ffi")(src, temp)
|
||||
|
||||
/datum/gas_mixture/proc/get_fuel_amount(temp)
|
||||
return LIBCALL(AUXMOS, "byond:fuel_amount_hook_ffi")(src, temp)
|
||||
|
||||
/datum/gas_mixture/proc/equalize_with(total)
|
||||
return LIBCALL(AUXMOS, "byond:equalize_with_hook_ffi")(src, total)
|
||||
|
||||
/datum/gas_mixture/proc/transfer_ratio_to(other, ratio)
|
||||
return LIBCALL(AUXMOS, "byond:transfer_ratio_hook_ffi")(src, other, ratio)
|
||||
|
||||
/datum/gas_mixture/proc/transfer_to(other, moles)
|
||||
return LIBCALL(AUXMOS, "byond:transfer_hook_ffi")(src, other, moles)
|
||||
|
||||
/datum/gas_mixture/proc/adjust_heat(temp)
|
||||
return LIBCALL(AUXMOS, "byond:adjust_heat_hook_ffi")(src, temp)
|
||||
|
||||
/datum/gas_mixture/proc/react(holder)
|
||||
return LIBCALL(AUXMOS, "byond:react_hook_ffi")(src, holder)
|
||||
|
||||
/datum/gas_mixture/proc/compare(other)
|
||||
return LIBCALL(AUXMOS, "byond:compare_hook_ffi")(src, other)
|
||||
|
||||
/datum/gas_mixture/proc/clear()
|
||||
return LIBCALL(AUXMOS, "byond:clear_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/mark_immutable()
|
||||
return LIBCALL(AUXMOS, "byond:mark_immutable_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/scrub_into(into, ratio_v, gas_list)
|
||||
return LIBCALL(AUXMOS, "byond:scrub_into_hook_ffi")(src, into, ratio_v, gas_list)
|
||||
|
||||
/datum/gas_mixture/proc/get_by_flag(flag_val)
|
||||
return LIBCALL(AUXMOS, "byond:get_by_flag_hook_ffi")(src, flag_val)
|
||||
|
||||
/datum/gas_mixture/proc/__remove_by_flag(into, flag_val, amount_val)
|
||||
return LIBCALL(AUXMOS, "byond:remove_by_flag_hook_ffi")(src, into, flag_val, amount_val)
|
||||
|
||||
/datum/gas_mixture/proc/divide(num_val)
|
||||
return LIBCALL(AUXMOS, "byond:divide_hook_ffi")(src, num_val)
|
||||
|
||||
/datum/gas_mixture/proc/multiply(num_val)
|
||||
return LIBCALL(AUXMOS, "byond:multiply_hook_ffi")(src, num_val)
|
||||
|
||||
/datum/gas_mixture/proc/subtract(num_val)
|
||||
return LIBCALL(AUXMOS, "byond:subtract_hook_ffi")(src, num_val)
|
||||
|
||||
/datum/gas_mixture/proc/add(num_val)
|
||||
return LIBCALL(AUXMOS, "byond:add_hook_ffi")(src, num_val)
|
||||
|
||||
/datum/gas_mixture/proc/adjust_multi(...)
|
||||
var/list/args_copy = args.Copy()
|
||||
args_copy.Insert(1, src)
|
||||
return LIBCALL(AUXMOS, "byond:adjust_multi_hook_ffi")(arglist(args_copy))
|
||||
|
||||
/datum/gas_mixture/proc/adjust_moles_temp(id_val, num_val, temp_val)
|
||||
return LIBCALL(AUXMOS, "byond:adjust_moles_temp_hook_ffi")(src, id_val, num_val, temp_val)
|
||||
|
||||
/datum/gas_mixture/proc/adjust_moles(id_val, num_val)
|
||||
return LIBCALL(AUXMOS, "byond:adjust_moles_hook_ffi")(src, id_val, num_val)
|
||||
|
||||
/datum/gas_mixture/proc/set_moles(gas_id, amt_val)
|
||||
return LIBCALL(AUXMOS, "byond:set_moles_hook_ffi")(src, gas_id, amt_val)
|
||||
|
||||
/datum/gas_mixture/proc/get_moles(gas_id)
|
||||
return LIBCALL(AUXMOS, "byond:get_moles_hook_ffi")(src, gas_id)
|
||||
|
||||
/datum/gas_mixture/proc/set_volume(vol_arg)
|
||||
return LIBCALL(AUXMOS, "byond:set_volume_hook_ffi")(src, vol_arg)
|
||||
|
||||
/datum/gas_mixture/proc/partial_heat_capacity(gas_id)
|
||||
return LIBCALL(AUXMOS, "byond:partial_heat_capacity_ffi")(src, gas_id)
|
||||
|
||||
/datum/gas_mixture/proc/set_temperature(arg_temp)
|
||||
return LIBCALL(AUXMOS, "byond:set_temperature_hook_ffi")(src, arg_temp)
|
||||
|
||||
/datum/gas_mixture/proc/get_gases()
|
||||
return LIBCALL(AUXMOS, "byond:get_gases_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/temperature_share(...)
|
||||
var/list/args_copy = args.Copy()
|
||||
args_copy.Insert(1, src)
|
||||
return LIBCALL(AUXMOS, "byond:temperature_share_hook_ffi")(arglist(args_copy))
|
||||
|
||||
/datum/gas_mixture/proc/copy_from(giver)
|
||||
return LIBCALL(AUXMOS, "byond:copy_from_hook_ffi")(src, giver)
|
||||
|
||||
/datum/gas_mixture/proc/__remove(into, amount_arg)
|
||||
return LIBCALL(AUXMOS, "byond:remove_hook_ffi")(src, into, amount_arg)
|
||||
|
||||
/datum/gas_mixture/proc/__remove_ratio(into, ratio_arg)
|
||||
return LIBCALL(AUXMOS, "byond:remove_ratio_hook_ffi")(src, into, ratio_arg)
|
||||
|
||||
/datum/gas_mixture/proc/merge(giver)
|
||||
return LIBCALL(AUXMOS, "byond:merge_hook_ffi")(src, giver)
|
||||
|
||||
/datum/gas_mixture/proc/thermal_energy()
|
||||
return LIBCALL(AUXMOS, "byond:thermal_energy_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/return_volume()
|
||||
return LIBCALL(AUXMOS, "byond:return_volume_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/return_temperature()
|
||||
return LIBCALL(AUXMOS, "byond:return_temperature_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/return_pressure()
|
||||
return LIBCALL(AUXMOS, "byond:return_pressure_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/total_moles()
|
||||
return LIBCALL(AUXMOS, "byond:total_moles_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/set_min_heat_capacity(arg_min)
|
||||
return LIBCALL(AUXMOS, "byond:min_heat_cap_hook_ffi")(src, arg_min)
|
||||
|
||||
/datum/gas_mixture/proc/heat_capacity()
|
||||
return LIBCALL(AUXMOS, "byond:heat_cap_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/__gasmixture_unregister()
|
||||
return LIBCALL(AUXMOS, "byond:unregister_gasmixture_hook_ffi")(src)
|
||||
|
||||
/datum/gas_mixture/proc/__gasmixture_register()
|
||||
return LIBCALL(AUXMOS, "byond:register_gasmixture_hook_ffi")(src)
|
||||
|
||||
/proc/process_atmos_callbacks(remaining)
|
||||
return LIBCALL(AUXMOS, "byond:atmos_callback_handle_ffi")(remaining)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(body.mind){\
|
||||
body.mind.add_skill_modifier(prototype.identifier)\
|
||||
} else {\
|
||||
prototype.RegisterSignal(body, COMSIG_MOB_ON_NEW_MIND, /datum/skill_modifier.proc/on_mob_new_mind, TRUE)\
|
||||
prototype.RegisterSignal(body, COMSIG_MOB_ON_NEW_MIND, TYPE_PROC_REF(/datum/skill_modifier, on_mob_new_mind), TRUE)\
|
||||
}
|
||||
|
||||
/// Same as above but to remove the skill modifier.
|
||||
|
||||
@@ -3,30 +3,72 @@
|
||||
|
||||
// The SPACEMAN_DMM define is set by the linter and other tooling when it runs.
|
||||
#ifdef SPACEMAN_DMM
|
||||
/**
|
||||
* Sets a return type expression for a proc. The return type can take the forms:
|
||||
|
||||
* `/typepath` - a raw typepath. The return type of the proc is the type named.
|
||||
|
||||
* `param` - a typepath given as a parameter, for procs which return an instance of the passed-in type.
|
||||
|
||||
* `param.type` - the static type of a passed-in parameter, for procs which
|
||||
* return their input or otherwise another value of the same type.
|
||||
|
||||
* `param[_].type` - the static type of a passed-in parameter, with one level
|
||||
* of `/list` stripped, for procs which select one item from a list. The `[_]`
|
||||
* may be repeated to strip more levels of `/list`.
|
||||
*/
|
||||
#define RETURN_TYPE(X) set SpacemanDMM_return_type = X
|
||||
/**
|
||||
* If set, will enable a diagnostic on children of the proc it is set on which do
|
||||
* not contain any `..()` parent calls. This can help with finding situations
|
||||
* where a signal or other important handling in the parent proc is being skipped.
|
||||
* Child procs may set this setting to `0` instead to override the check.
|
||||
*/
|
||||
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
/**
|
||||
* If set, raise a warning for any child procs that override this one,
|
||||
* regardless of if it calls parent or not.
|
||||
* This functions in a similar way to the `final` keyword in some languages.
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
|
||||
/**
|
||||
* If set, raise a warning if the proc or one of the sub-procs it calls
|
||||
* uses a blocking call, such as `sleep()` or `input()` without using `set waitfor = 0`
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X
|
||||
/**
|
||||
* If set, ensure a proc is 'pure', such that it does not make any changes
|
||||
* outside itself or output. This also checks to make sure anything using
|
||||
* this proc doesn't invoke it without making use of the return value.
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X
|
||||
///Private procs can only be called by things of exactly the same type.
|
||||
#define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X
|
||||
///Protected procs can only be call by things of the same type *or subtypes*.
|
||||
#define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X
|
||||
///If set, will not lint.
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
|
||||
///If set, overriding their value isn't permitted by types that inherit it.
|
||||
#define VAR_FINAL var/SpacemanDMM_final
|
||||
///Private vars can only be called by things of exactly the same type.
|
||||
#define VAR_PRIVATE var/SpacemanDMM_private
|
||||
///Protected vars can only be called by things of the same type *or subtypes*.
|
||||
#define VAR_PROTECTED var/SpacemanDMM_protected
|
||||
#else
|
||||
#define RETURN_TYPE(X)
|
||||
#define SHOULD_CALL_PARENT(X)
|
||||
#define UNLINT(X) X
|
||||
#define SHOULD_NOT_OVERRIDE(X)
|
||||
#define SHOULD_NOT_SLEEP(X)
|
||||
#define SHOULD_BE_PURE(X)
|
||||
#define PRIVATE_PROC(X)
|
||||
#define PROTECTED_PROC(X)
|
||||
#define UNLINT(X) X
|
||||
|
||||
#define VAR_FINAL var
|
||||
#define VAR_PRIVATE var
|
||||
#define VAR_PROTECTED var
|
||||
#endif
|
||||
|
||||
/proc/enable_debugging()
|
||||
CRASH("Auxtools not found")
|
||||
|
||||
43
code/__HELPERS/_auxtools_api.dm
Normal file
43
code/__HELPERS/_auxtools_api.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
#define AUXTOOLS_FULL_INIT 2
|
||||
#define AUXTOOLS_PARTIAL_INIT 1
|
||||
|
||||
GLOBAL_LIST_EMPTY(auxtools_initialized)
|
||||
GLOBAL_PROTECT(auxtools_initialized)
|
||||
|
||||
#define AUXTOOLS_CHECK(LIB)\
|
||||
if (!CONFIG_GET(flag/auxtools_enabled)) {\
|
||||
CRASH("Auxtools is not enabled in config!");\
|
||||
}\
|
||||
if (GLOB.auxtools_initialized[LIB] != AUXTOOLS_FULL_INIT) {\
|
||||
if (fexists(LIB)) {\
|
||||
var/string = LIBCALL(LIB,"auxtools_init")();\
|
||||
if(findtext(string, "SUCCESS")) {\
|
||||
GLOB.auxtools_initialized[LIB] = AUXTOOLS_FULL_INIT;\
|
||||
} else {\
|
||||
CRASH(string);\
|
||||
}\
|
||||
} else {\
|
||||
CRASH("No file named [LIB] found!")\
|
||||
}\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_SHUTDOWN(LIB)\
|
||||
if (GLOB.auxtools_initialized[LIB] == AUXTOOLS_FULL_INIT && fexists(LIB)){\
|
||||
LIBCALL(LIB,"auxtools_shutdown")();\
|
||||
GLOB.auxtools_initialized[LIB] = AUXTOOLS_PARTIAL_INIT;\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_FULL_SHUTDOWN(LIB)\
|
||||
if (GLOB.auxtools_initialized[LIB] && fexists(LIB)){\
|
||||
LIBCALL(LIB,"auxtools_full_shutdown")();\
|
||||
GLOB.auxtools_initialized[LIB] = FALSE;\
|
||||
}
|
||||
|
||||
/proc/auxtools_stack_trace(msg)
|
||||
CRASH(msg)
|
||||
|
||||
/proc/auxtools_expr_stub()
|
||||
CRASH("auxtools not loaded")
|
||||
|
||||
/proc/enable_debugging(mode, port)
|
||||
CRASH("auxtools not loaded")
|
||||
@@ -1,31 +0,0 @@
|
||||
//#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)
|
||||
|
||||
//glob doesn't exist yet at some gas new calls, imma use it anyways
|
||||
GLOBAL_REAL_VAR(list/__auxtools_initialized) = list()
|
||||
|
||||
#define AUXTOOLS_CHECK(LIB)\
|
||||
if (!__auxtools_initialized[LIB]) {\
|
||||
if (fexists(LIB)) {\
|
||||
var/string = LIBCALL(LIB,"auxtools_init")();\
|
||||
if(findtext(string, "SUCCESS")) {\
|
||||
__auxtools_initialized[LIB] = TRUE;\
|
||||
} else {\
|
||||
CRASH(string);\
|
||||
}\
|
||||
} else {\
|
||||
CRASH("No file named [LIB] found!")\
|
||||
}\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_SHUTDOWN(LIB)\
|
||||
if (__auxtools_initialized[LIB] && fexists(LIB)){\
|
||||
LIBCALL(LIB,"auxtools_shutdown")();\
|
||||
__auxtools_initialized[LIB] = FALSE;\
|
||||
}\
|
||||
@@ -1,12 +1,12 @@
|
||||
// This file contains defines allowing targeting byond versions newer than the supported
|
||||
|
||||
//Update this whenever you need to take advantage of more recent byond features
|
||||
#define MIN_COMPILER_VERSION 514
|
||||
#define MIN_COMPILER_BUILD 1556
|
||||
#define MIN_COMPILER_VERSION 515
|
||||
#define MIN_COMPILER_BUILD 1634
|
||||
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
|
||||
//Don't forget to update this part
|
||||
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
|
||||
#error You need version 514.1556 or higher
|
||||
#error You need version 515.1634 or higher
|
||||
#endif
|
||||
|
||||
#if (DM_VERSION == 514 && DM_BUILD > 1575 && DM_BUILD <= 1577)
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
|
||||
if(aicamera.in_camera_mode)
|
||||
aicamera.camera_mode_off()
|
||||
INVOKE_ASYNC(aicamera, /obj/item/camera.proc/captureimage, pixel_turf, usr)
|
||||
INVOKE_ASYNC(aicamera, TYPE_PROC_REF(/obj/item/camera, captureimage), pixel_turf, usr)
|
||||
return
|
||||
if(waypoint_mode)
|
||||
waypoint_mode = FALSE
|
||||
INVOKE_ASYNC(src, .proc/set_waypoint, A)
|
||||
INVOKE_ASYNC(src, PROC_REF(set_waypoint), A)
|
||||
return
|
||||
|
||||
A.attack_ai(src)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
if(aicamera.in_camera_mode) //Cyborg picture taking
|
||||
aicamera.camera_mode_off()
|
||||
INVOKE_ASYNC(aicamera, /obj/item/camera.proc/captureimage, A, usr)
|
||||
INVOKE_ASYNC(aicamera, TYPE_PROC_REF(/obj/item/camera, captureimage), A, usr)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item(TRUE)
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!W && A.Adjacent(src) && (isobj(A) || ismob(A)))
|
||||
var/atom/movable/C = A
|
||||
if(C.can_buckle && C.has_buckled_mobs())
|
||||
INVOKE_ASYNC(C, /atom/movable.proc/precise_user_unbuckle_mob, src)
|
||||
INVOKE_ASYNC(C, TYPE_PROC_REF(/atom/movable, precise_user_unbuckle_mob), src)
|
||||
return
|
||||
|
||||
if(!W && (get_dist(src,A) <= interaction_range))
|
||||
|
||||
@@ -243,7 +243,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6,
|
||||
if(color_timer_id)
|
||||
return
|
||||
add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY) //We unfortunately cannot animate matrix colors. Curse you lummy it would be ~~non~~trivial to interpolate between the two valuessssssssss
|
||||
color_timer_id = addtimer(CALLBACK(src, .proc/remove_color, color), 2 SECONDS)
|
||||
color_timer_id = addtimer(CALLBACK(src, PROC_REF(remove_color), color), 2 SECONDS)
|
||||
|
||||
/atom/movable/screen/button_palette/proc/remove_color(list/to_remove)
|
||||
color_timer_id = null
|
||||
@@ -293,7 +293,7 @@ GLOBAL_LIST_INIT(palette_removed_matrix, list(1.4,0,0,0, 0.7,0.4,0,0, 0.4,0,0.6,
|
||||
return
|
||||
|
||||
if(expanded)
|
||||
RegisterSignal(usr.client, COMSIG_CLIENT_CLICK, .proc/clicked_while_open)
|
||||
RegisterSignal(usr.client, COMSIG_CLIENT_CLICK, PROC_REF(clicked_while_open))
|
||||
else
|
||||
UnregisterSignal(usr.client, COMSIG_CLIENT_CLICK)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return
|
||||
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
||||
. = _try_interact(user)
|
||||
INVOKE_ASYNC(src, .proc/on_attack_hand, user, act_intent, .)
|
||||
INVOKE_ASYNC(src, PROC_REF(on_attack_hand), user, act_intent, .)
|
||||
if(!(. & ATTACK_IGNORE_ACTION))
|
||||
if(attack_hand_unwieldlyness)
|
||||
user.DelayNextAction(attack_hand_unwieldlyness, considered_action = attack_hand_is_action)
|
||||
|
||||
@@ -309,7 +309,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
//(higher subsystems will be sooner in the queue, adding them later in the loop means we don't have to loop thru them next queue add)
|
||||
sortTim(tickersubsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
|
||||
for(var/I in runlevel_sorted_subsystems)
|
||||
sortTim(runlevel_sorted_subsystems, GLOBAL_PROC_REF(cmp_subsystem_priority))
|
||||
sortTim(I, GLOBAL_PROC_REF(cmp_subsystem_priority))
|
||||
I += tickersubsystems
|
||||
|
||||
var/cached_runlevel = current_runlevel
|
||||
|
||||
@@ -6,6 +6,8 @@ SUBSYSTEM_DEF(air)
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/cached_cost = 0
|
||||
|
||||
var/cost_turfs = 0
|
||||
var/cost_groups = 0
|
||||
var/cost_highpressure = 0
|
||||
@@ -26,6 +28,9 @@ SUBSYSTEM_DEF(air)
|
||||
var/num_group_turfs_processed = 0
|
||||
var/num_equalize_processed = 0
|
||||
|
||||
var/gas_mixes_count = 0
|
||||
var/gas_mixes_allocated = 0
|
||||
|
||||
var/list/hotspots = list()
|
||||
var/list/networks = list()
|
||||
var/list/pipenets_needing_rebuilt = list()
|
||||
@@ -53,8 +58,6 @@ SUBSYSTEM_DEF(air)
|
||||
var/equalize_hard_turf_limit = 2000
|
||||
// Whether equalization is enabled. Can be disabled for performance reasons.
|
||||
var/equalize_enabled = FALSE
|
||||
// When above 0, won't equalize; performance handling
|
||||
var/eq_cooldown = 0
|
||||
// Whether turf-to-turf heat exchanging should be enabled.
|
||||
var/heat_enabled = FALSE
|
||||
// Max number of times process_turfs will share in a tick.
|
||||
@@ -65,8 +68,6 @@ SUBSYSTEM_DEF(air)
|
||||
var/excited_group_pressure_goal = 1
|
||||
// Target for excited_group_pressure_goal; can go below this, if it determines the thread is taking too long.
|
||||
var/excited_group_pressure_goal_target = 1
|
||||
// If this is set to 0, monstermos won't process planet atmos
|
||||
var/planet_equalize_enabled = 0
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg += "C:{"
|
||||
@@ -91,8 +92,8 @@ SUBSYSTEM_DEF(air)
|
||||
msg += "LT:[low_pressure_turfs]|"
|
||||
msg += "ET:[num_equalize_processed]|"
|
||||
msg += "GT:[num_group_turfs_processed]|"
|
||||
msg += "GA:[get_amt_gas_mixes()]|"
|
||||
msg += "MG:[get_max_gas_mixes()]"
|
||||
msg += "GA:[gas_mixes_count]|"
|
||||
msg += "MG:[gas_mixes_allocated]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/air/Initialize(timeofday)
|
||||
@@ -107,7 +108,6 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
/datum/controller/subsystem/air/proc/extools_update_ssair()
|
||||
|
||||
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_reaction(datum/gas_reaction/r)
|
||||
gas_reactions += r
|
||||
@@ -123,9 +123,6 @@ SUBSYSTEM_DEF(air)
|
||||
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()
|
||||
@@ -137,6 +134,12 @@ SUBSYSTEM_DEF(air)
|
||||
/datum/controller/subsystem/air/fire(resumed = 0)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
|
||||
thread_wait_ticks = MC_AVERAGE(thread_wait_ticks, cur_thread_wait_ticks)
|
||||
cur_thread_wait_ticks = 0
|
||||
|
||||
gas_mixes_count = get_amt_gas_mixes()
|
||||
gas_mixes_allocated = get_max_gas_mixes()
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
timer = TICK_USAGE_REAL
|
||||
var/list/pipenet_rebuilds = pipenets_needing_rebuilt
|
||||
@@ -150,6 +153,30 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_PIPENETS
|
||||
|
||||
if(currentpart == SSAIR_PIPENETS || !resumed)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_pipenets(resumed)
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(cached_cost))
|
||||
resumed = 0
|
||||
currentpart = SSAIR_ATMOSMACHINERY
|
||||
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_atmos_machinery(resumed)
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(cached_cost))
|
||||
currentpart = SSAIR_ACTIVETURFS
|
||||
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
@@ -158,6 +185,13 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = equalize_enabled ? SSAIR_EQUALIZE : SSAIR_EXCITEDGROUPS
|
||||
|
||||
if(currentpart == SSAIR_EQUALIZE)
|
||||
process_turf_equalize(resumed)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_EXCITEDGROUPS
|
||||
|
||||
if(currentpart == SSAIR_EXCITEDGROUPS)
|
||||
@@ -165,34 +199,10 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = equalize_enabled ? SSAIR_EQUALIZE : SSAIR_FINALIZE_TURFS
|
||||
|
||||
if(currentpart == SSAIR_EQUALIZE)
|
||||
equalize_turfs(resumed)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_FINALIZE_TURFS
|
||||
|
||||
if(currentpart == SSAIR_FINALIZE_TURFS)
|
||||
finish_turf_processing(resumed)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = FALSE
|
||||
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
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY)
|
||||
timer = TICK_USAGE_REAL
|
||||
process_atmos_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
|
||||
@@ -200,21 +210,28 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
if(currentpart == SSAIR_HIGHPRESSURE)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_high_pressure_delta(resumed)
|
||||
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(cached_cost))
|
||||
resumed = 0
|
||||
currentpart = SSAIR_HOTSPOTS
|
||||
|
||||
if(currentpart == SSAIR_HOTSPOTS)
|
||||
timer = TICK_USAGE_REAL
|
||||
if(!resumed)
|
||||
cached_cost = 0
|
||||
process_hotspots(resumed)
|
||||
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
cached_cost += TICK_USAGE_REAL - timer
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(cached_cost))
|
||||
resumed = 0
|
||||
currentpart = heat_enabled ? SSAIR_TURF_CONDUCTION : SSAIR_REBUILD_PIPENETS
|
||||
|
||||
// Heat -- slow and of questionable usefulness. Off by default for this reason. Pretty cool, though.
|
||||
if(currentpart == SSAIR_TURF_CONDUCTION)
|
||||
timer = TICK_USAGE_REAL
|
||||
@@ -309,14 +326,8 @@ SUBSYSTEM_DEF(air)
|
||||
if(post_process_turfs_auxtools(TICK_REMAINING_MS))
|
||||
pause()
|
||||
|
||||
/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools()
|
||||
/datum/controller/subsystem/air/proc/equalize_turfs_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/turf_process_time()
|
||||
/datum/controller/subsystem/air/proc/heat_process_time()
|
||||
/datum/controller/subsystem/air/proc/process_turf_heat()
|
||||
@@ -392,6 +403,19 @@ SUBSYSTEM_DEF(air)
|
||||
var/datum/atmosphere/mix = atmos_gen[gas_string]
|
||||
return mix.gas_string
|
||||
|
||||
/datum/controller/subsystem/air/proc/start_processing_machine(obj/machinery/machine)
|
||||
if(machine.atmos_processing)
|
||||
return
|
||||
machine.atmos_processing = TRUE
|
||||
atmos_machinery += machine
|
||||
|
||||
/datum/controller/subsystem/air/proc/stop_processing_machine(obj/machinery/machine)
|
||||
if(!machine.atmos_processing)
|
||||
return
|
||||
machine.atmos_processing = FALSE
|
||||
atmos_machinery -= machine
|
||||
currentrun -= machine
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
|
||||
@@ -4,11 +4,6 @@ SUBSYSTEM_DEF(callbacks)
|
||||
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()
|
||||
|
||||
@@ -190,9 +190,9 @@ SUBSYSTEM_DEF(dbcore)
|
||||
for (var/thing in querys)
|
||||
var/datum/db_query/query = thing
|
||||
if (warn)
|
||||
INVOKE_ASYNC(query, /datum/db_query.proc/warn_execute)
|
||||
INVOKE_ASYNC(query, TYPE_PROC_REF(/datum/db_query, warn_execute))
|
||||
else
|
||||
INVOKE_ASYNC(query, /datum/db_query.proc/Execute)
|
||||
INVOKE_ASYNC(query, TYPE_PROC_REF(/datum/db_query, Execute))
|
||||
|
||||
for (var/thing in querys)
|
||||
var/datum/db_query/query = thing
|
||||
|
||||
@@ -618,7 +618,7 @@ SUBSYSTEM_DEF(job)
|
||||
var/oldjobs = SSjob.occupations
|
||||
sleep(20)
|
||||
for (var/datum/job/J in oldjobs)
|
||||
INVOKE_ASYNC(src, .proc/RecoverJob, J)
|
||||
INVOKE_ASYNC(src, PROC_REF(RecoverJob), J)
|
||||
|
||||
/datum/controller/subsystem/job/proc/RecoverJob(datum/job/J)
|
||||
var/datum/job/newjob = GetJob(J.title)
|
||||
|
||||
@@ -173,7 +173,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
message_admins("Shuttles in transit detected. Attempting to fast travel. Timeout is [wipe_safety_delay/10] seconds.")
|
||||
var/list/cleared = list()
|
||||
for(var/i in in_transit)
|
||||
INVOKE_ASYNC(src, .proc/safety_clear_transit_dock, i, in_transit[i], cleared)
|
||||
INVOKE_ASYNC(src, PROC_REF(safety_clear_transit_dock), i, in_transit[i], cleared)
|
||||
UNTIL((go_ahead < world.time) || (cleared.len == in_transit.len))
|
||||
do_wipe_turf_reservations()
|
||||
clearing_reserved_turfs = FALSE
|
||||
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(npcpool)
|
||||
|
||||
invoking = TRUE
|
||||
invoke_start = world.time
|
||||
INVOKE_ASYNC(src, .proc/invoke_process, SA)
|
||||
INVOKE_ASYNC(src, PROC_REF(invoke_process), SA)
|
||||
if(invoking)
|
||||
stack_trace("WARNING: [SA] ([SA.type]) slept during NPCPool processing.")
|
||||
invoking = FALSE
|
||||
|
||||
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(pathfinder)
|
||||
while(flow[free])
|
||||
CHECK_TICK
|
||||
free = (free % lcount) + 1
|
||||
var/t = addtimer(CALLBACK(src, /datum/flowcache.proc/toolong, free), 150, TIMER_STOPPABLE)
|
||||
var/t = addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/flowcache, toolong), free), 150, TIMER_STOPPABLE)
|
||||
flow[free] = t
|
||||
flow[t] = M
|
||||
return free
|
||||
|
||||
@@ -137,7 +137,7 @@ SUBSYSTEM_DEF(statpanels)
|
||||
if(length(turfitems) < 30) // only create images for the first 30 items on the turf, for performance reasons
|
||||
if(!(REF(turf_content) in cached_images))
|
||||
cached_images += REF(turf_content)
|
||||
turf_content.RegisterSignal(turf_content, COMSIG_PARENT_QDELETING, /atom/.proc/remove_from_cache) // we reset cache if anything in it gets deleted
|
||||
turf_content.RegisterSignal(turf_content, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/atom/, remove_from_cache)) // we reset cache if anything in it gets deleted
|
||||
if(ismob(turf_content) || length(turf_content.overlays) > 2)
|
||||
turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), costly_icon2html(turf_content, target, sourceonly=TRUE))
|
||||
else
|
||||
|
||||
@@ -488,7 +488,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if (!prob((world.time/600)*CONFIG_GET(number/maprotatechancedelta)) && CONFIG_GET(flag/tgstyle_maprotation))
|
||||
return
|
||||
if(CONFIG_GET(flag/tgstyle_maprotation))
|
||||
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
|
||||
INVOKE_ASYNC(SSmapping, TYPE_PROC_REF(/datum/controller/subsystem/mapping/, maprotate))
|
||||
else
|
||||
var/vote_type = CONFIG_GET(string/map_vote_type)
|
||||
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = vote_type)
|
||||
|
||||
@@ -257,7 +257,7 @@ SUBSYSTEM_DEF(timer)
|
||||
return
|
||||
|
||||
// Sort all timers by time to run
|
||||
sortTim(alltimers, .proc/cmp_timer)
|
||||
sortTim(alltimers, PROC_REF(cmp_timer))
|
||||
|
||||
// Get the earliest timer, and if the TTR is earlier than the current world.time,
|
||||
// then set the head offset appropriately to be the earliest time tracked by the
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return
|
||||
Remove(owner)
|
||||
owner = M
|
||||
RegisterSignal(owner, COMSIG_PARENT_QDELETING, .proc/clear_ref, override = TRUE)
|
||||
RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(clear_ref), override = TRUE)
|
||||
|
||||
GiveAction(M)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(owner)
|
||||
UnregisterSignal(owner, COMSIG_PARENT_QDELETING)
|
||||
if(target == owner)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/clear_ref)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clear_ref))
|
||||
owner = null
|
||||
|
||||
/datum/action/proc/Trigger()
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
icon_state = beam_icon_state
|
||||
beam_type = btype
|
||||
if(time < INFINITY)
|
||||
addtimer(CALLBACK(src,.proc/End), time)
|
||||
addtimer(CALLBACK(src,PROC_REF(End)), time)
|
||||
|
||||
/datum/beam/proc/Start()
|
||||
Draw()
|
||||
@@ -167,5 +167,5 @@
|
||||
|
||||
/atom/proc/Beam(atom/BeamTarget,icon_state="b_beam",icon='icons/effects/beam.dmi',time=50, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time = 3)
|
||||
var/datum/beam/newbeam = new(src,BeamTarget,icon,icon_state,time,maxdistance,beam_type,beam_sleep_time)
|
||||
INVOKE_ASYNC(newbeam, /datum/beam/.proc/Start)
|
||||
INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam, Start))
|
||||
return newbeam
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
trauma = _trauma
|
||||
owner = trauma.owner
|
||||
|
||||
INVOKE_ASYNC(src, .proc/setup_friend)
|
||||
INVOKE_ASYNC(src, PROC_REF(setup_friend))
|
||||
|
||||
join = new
|
||||
join.Grant(src)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
to_chat(owner, "<span class='warning'>You feel sick...</span>")
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel really sick at the thought of being alone!</span>")
|
||||
addtimer(CALLBACK(owner, /mob/living/carbon.proc/vomit, high_stress), 50) //blood vomit if high stress
|
||||
addtimer(CALLBACK(owner, TYPE_PROC_REF(/mob/living/carbon, vomit), high_stress), 50) //blood vomit if high stress
|
||||
if(2)
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>You can't stop shaking...</span>")
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
var/message = hearing_args[HEARING_RAW_MESSAGE]
|
||||
if(findtext(message, codeword))
|
||||
hearing_args[HEARING_RAW_MESSAGE] = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/brain_trauma/severe/split_personality, switch_personalities)), 10)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], codeword))
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
* ## USAGE
|
||||
*
|
||||
* ```
|
||||
* var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn)
|
||||
* var/datum/callback/C = new(object|null, PROC_REF(procname), arg1, arg2, ... argn)
|
||||
* var/timerid = addtimer(C, time, timertype)
|
||||
* you can also use the compiler define shorthand
|
||||
* var/timerid = addtimer(CALLBACK(object|null, PROC_REF(type/path|procstring), arg1, arg2, ... argn), time, timertype)
|
||||
* var/timerid = addtimer(CALLBACK(object|null, PROC_REF(procname), arg1, arg2, ... argn), time, timertype)
|
||||
* ```
|
||||
*
|
||||
* Note: proc strings can only be given for datum proc calls, global procs must be proc paths
|
||||
@@ -26,27 +26,19 @@
|
||||
* ## PROC TYPEPATH SHORTCUTS
|
||||
* (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...)
|
||||
*
|
||||
* ### global proc while in another global proc:
|
||||
* .procname
|
||||
* ### proc defined on current(src) object OR overridden at src or any of it's parents:
|
||||
* PROC_REF(procname)
|
||||
*
|
||||
* `CALLBACK(GLOBAL_PROC, .some_proc_here)`
|
||||
* `CALLBACK(src, PROC_REF(some_proc_here))`
|
||||
*
|
||||
* ### proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents:
|
||||
* .procname
|
||||
* ### global proc
|
||||
* GLOBAL_PROC_REF(procname)
|
||||
*
|
||||
* `CALLBACK(src, .some_proc_here)`
|
||||
*
|
||||
* ### when the above doesn't apply:
|
||||
*.proc/procname
|
||||
*
|
||||
* `CALLBACK(src, .proc/some_proc_here)`
|
||||
* `CALLBACK(src, GLOBAL_PROC_REF(some_proc_here))`
|
||||
*
|
||||
*
|
||||
* proc defined on a parent of a some type
|
||||
*
|
||||
* `/some/type/.proc/some_proc_here`
|
||||
*
|
||||
* Otherwise you must always provide the full typepath of the proc (/type/of/thing/proc/procname)
|
||||
* ### proc defined on some type
|
||||
* TYPE_PROC_REF(/some/type, some_proc_here)
|
||||
*/
|
||||
/datum/callback
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
stack_trace("/datum/chatmessage created with [isnull(owner) ? "null" : "invalid"] mob owner")
|
||||
qdel(src)
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/generate_image, text, target, owner, extra_classes, lifespan)
|
||||
INVOKE_ASYNC(src, PROC_REF(generate_image), text, target, owner, extra_classes, lifespan)
|
||||
|
||||
/datum/chatmessage/Destroy()
|
||||
if (owned_by)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return
|
||||
if(M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it?
|
||||
if(butchering_enabled && (can_be_blunt || source.get_sharpness()))
|
||||
INVOKE_ASYNC(src, .proc/startButcher, source, M, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(startButcher), source, M, user)
|
||||
return COMPONENT_ITEM_NO_ATTACK
|
||||
|
||||
if(ishuman(M) && source.force && source.get_sharpness())
|
||||
@@ -37,7 +37,7 @@
|
||||
user.show_message("<span class='warning'>[H]'s neck has already been already cut, you can't make the bleeding any worse!</span>", 1, \
|
||||
"<span class='warning'>Their neck has already been already cut, you can't make the bleeding any worse!</span>")
|
||||
return COMPONENT_ITEM_NO_ATTACK
|
||||
INVOKE_ASYNC(src, .proc/startNeckSlice, source, H, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(startNeckSlice), source, H, user)
|
||||
return COMPONENT_ITEM_NO_ATTACK
|
||||
|
||||
/datum/component/butchering/proc/startButcher(obj/item/source, mob/living/M, mob/living/user)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
for (var/thing in to_check)
|
||||
if (droppable(thing))
|
||||
. = 1
|
||||
INVOKE_ASYNC(src, .proc/drop, thing)
|
||||
INVOKE_ASYNC(src, PROC_REF(drop), thing)
|
||||
|
||||
/datum/component/chasm/proc/droppable(atom/movable/AM)
|
||||
// avoid an infinite loop, but allow falling a large distance
|
||||
|
||||
@@ -42,22 +42,22 @@
|
||||
tox_loss = L.getToxLoss()
|
||||
oxy_loss = L.getOxyLoss()
|
||||
brain_loss = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
rewind_type = .proc/rewind_living
|
||||
rewind_type = PROC_REF(rewind_living)
|
||||
|
||||
if(iscarbon(parent))
|
||||
var/mob/living/carbon/C = parent
|
||||
saved_bodyparts = C.save_bodyparts()
|
||||
rewind_type = .proc/rewind_carbon
|
||||
rewind_type = PROC_REF(rewind_carbon)
|
||||
|
||||
else if(isanimal(parent))
|
||||
var/mob/living/simple_animal/M = parent
|
||||
brute_loss = M.bruteloss
|
||||
rewind_type = .proc/rewind_animal
|
||||
rewind_type = PROC_REF(rewind_animal)
|
||||
|
||||
else if(isobj(parent))
|
||||
var/obj/O = parent
|
||||
integrity = O.obj_integrity
|
||||
rewind_type = .proc/rewind_obj
|
||||
rewind_type = PROC_REF(rewind_obj)
|
||||
|
||||
addtimer(CALLBACK(src, rewind_type), rewind_interval)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/component/wearertargeting/earprotection
|
||||
signals = list(COMSIG_CARBON_SOUNDBANG)
|
||||
mobtype = /mob/living/carbon
|
||||
proctype = .proc/reducebang
|
||||
proctype = PROC_REF(reducebang)
|
||||
|
||||
/datum/component/wearertargeting/earprotection/Initialize(_valid_slots)
|
||||
. = ..()
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
detonate()
|
||||
|
||||
/datum/component/explodable/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOB_APPLY_DAMAGE, .proc/explodable_attack_zone, TRUE)
|
||||
RegisterSignal(equipper, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(explodable_attack_zone), TRUE)
|
||||
|
||||
/datum/component/explodable/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOB_APPLY_DAMAGE)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
RegisterSignal(M, COMSIG_ROBOT_UPDATE_ICONS, PROC_REF(manual_centered_render_source))
|
||||
var/atom/A = M
|
||||
if(M.loc && !isturf(M.loc))
|
||||
REGISTER_NESTED_LOCS(M, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved)
|
||||
REGISTER_NESTED_LOCS(M, nested_locs, COMSIG_MOVABLE_MOVED, PROC_REF(on_loc_moved))
|
||||
A = nested_locs[nested_locs.len]
|
||||
CENTERED_RENDER_SOURCE(owner_mask, A, src)
|
||||
M.client.images += shadow_mask
|
||||
@@ -213,7 +213,7 @@
|
||||
var/turf/T
|
||||
if(!isturf(source.loc)) //Recalculate all nested locations.
|
||||
UNREGISTER_NESTED_LOCS( nested_locs, COMSIG_MOVABLE_MOVED, 1)
|
||||
REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved)
|
||||
REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, PROC_REF(on_loc_moved))
|
||||
var/atom/movable/topmost = nested_locs[nested_locs.len]
|
||||
T = topmost.loc
|
||||
CENTERED_RENDER_SOURCE(owner_mask, topmost, src)
|
||||
@@ -233,7 +233,7 @@
|
||||
var/atom/movable/prev_topmost = nested_locs[nested_locs.len]
|
||||
if(prev_topmost != source)
|
||||
UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, nested_locs.Find(source) + 1)
|
||||
REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, .proc/on_loc_moved)
|
||||
REGISTER_NESTED_LOCS(source, nested_locs, COMSIG_MOVABLE_MOVED, PROC_REF(on_loc_moved))
|
||||
var/atom/movable/topmost = nested_locs[nested_locs.len]
|
||||
if(topmost != prev_topmost)
|
||||
CENTERED_RENDER_SOURCE(owner_mask, topmost, src)
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
RegisterSignal(shooter, COMSIG_MOB_CLIENT_LOGOUT, PROC_REF(autofire_off))
|
||||
if(!QDELETED(shooter))
|
||||
UnregisterSignal(shooter, COMSIG_MOB_CLIENT_LOGIN)
|
||||
parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, /obj/item/gun/.proc/autofire_bypass_check)
|
||||
parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, /obj/item/gun/.proc/do_autofire)
|
||||
parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, TYPE_PROC_REF(/obj/item/gun, autofire_bypass_check))
|
||||
parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, TYPE_PROC_REF(/obj/item/gun, do_autofire))
|
||||
|
||||
|
||||
/datum/component/automatic_fire/proc/autofire_off(datum/source)
|
||||
@@ -270,7 +270,7 @@
|
||||
if(istype(akimbo_gun) && weapon_weight < WEAPON_MEDIUM)
|
||||
if(akimbo_gun.weapon_weight < WEAPON_MEDIUM && akimbo_gun.can_trigger_gun(shooter))
|
||||
bonus_spread = dual_wield_spread
|
||||
addtimer(CALLBACK(akimbo_gun, /obj/item/gun.proc/process_fire, target, shooter, TRUE, params, null, bonus_spread), 1)
|
||||
addtimer(CALLBACK(akimbo_gun, TYPE_PROC_REF(/obj/item/gun, process_fire), target, shooter, TRUE, params, null, bonus_spread), 1)
|
||||
process_fire(target, shooter, TRUE, params, null, bonus_spread)
|
||||
return COMPONENT_AUTOFIRE_SHOT_SUCCESS //All is well, we can continue shooting.
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(target_callback)
|
||||
can_target_callback = target_callback
|
||||
else
|
||||
can_target_callback = CALLBACK(src, .proc/can_target)
|
||||
can_target_callback = CALLBACK(src, PROC_REF(can_target))
|
||||
if(range)
|
||||
lock_cursor_range = range
|
||||
if(typecache)
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
if(master.mind)
|
||||
master.mind.add_skill_modifier(malus.identifier)
|
||||
else
|
||||
malus.RegisterSignal(master, COMSIG_MOB_ON_NEW_MIND, /datum/skill_modifier.proc/on_mob_new_mind, TRUE)
|
||||
malus.RegisterSignal(master, COMSIG_MOB_ON_NEW_MIND, TYPE_PROC_REF(/datum/skill_modifier, on_mob_new_mind), TRUE)
|
||||
malus.value_mod = malus.level_mod = 1 - (sanity_level - 3) * MOOD_INSANITY_MALUS
|
||||
else if(malus)
|
||||
if(master.mind)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/component/wearertargeting/phantomthief
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
signals = list(COMSIG_LIVING_COMBAT_ENABLED, COMSIG_LIVING_COMBAT_DISABLED)
|
||||
proctype = .proc/handlefilterstuff
|
||||
proctype = PROC_REF(handlefilterstuff)
|
||||
var/filter_x
|
||||
var/filter_y
|
||||
var/filter_size
|
||||
|
||||
@@ -29,7 +29,7 @@ handles linking back and forth.
|
||||
|
||||
var/turf/T = get_turf(parent)
|
||||
if (force_connect || (mapload && is_station_level(T.z)))
|
||||
addtimer(CALLBACK(src, .proc/LateInitialize))
|
||||
addtimer(CALLBACK(src, PROC_REF(LateInitialize)))
|
||||
else if (allow_standalone)
|
||||
_MakeLocal()
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
if(over_object == M)
|
||||
user_show_to_mob(M, trigger_on_found = TRUE)
|
||||
if(isrevenant(M))
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/RevenantThrow, over_object, M, source)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, PROC_REF(RevenantThrow), over_object, M, source)
|
||||
return
|
||||
if(check_locked(null, M) || !M.CanReach(A))
|
||||
return
|
||||
@@ -444,7 +444,7 @@
|
||||
A.do_jiggle()
|
||||
A.add_fingerprint(M)
|
||||
if(!istype(over_object, /atom/movable/screen))
|
||||
INVOKE_ASYNC(src, .proc/dump_content_at, over_object, M)
|
||||
INVOKE_ASYNC(src, PROC_REF(dump_content_at), over_object, M)
|
||||
return
|
||||
if(A.loc != M)
|
||||
return
|
||||
|
||||
@@ -145,7 +145,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
active = TRUE
|
||||
update_items()
|
||||
if(user)
|
||||
INVOKE_ASYNC(src, .proc/ui_interact, user)
|
||||
INVOKE_ASYNC(src, PROC_REF(ui_interact), user)
|
||||
// an unlocked uplink blocks also opening the PDA or headset menu
|
||||
return COMPONENT_NO_INTERACT
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/component/wearertargeting
|
||||
var/list/valid_slots = list()
|
||||
var/list/signals = list()
|
||||
var/proctype = .proc/pass
|
||||
var/proctype = PROC_REF(pass)
|
||||
var/mobtype = /mob/living
|
||||
|
||||
/datum/component/wearertargeting/Initialize()
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
qdel(parent.GetComponent(/datum/component/slippery))
|
||||
return
|
||||
|
||||
var/datum/component/slippery/S = parent.LoadComponent(/datum/component/slippery, NONE, CALLBACK(src, .proc/AfterSlip))
|
||||
var/datum/component/slippery/S = parent.LoadComponent(/datum/component/slippery, NONE, CALLBACK(src, PROC_REF(AfterSlip)))
|
||||
S.intensity = intensity
|
||||
S.lube_flags = lube_flags
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
var/P
|
||||
if(iscarbon(target))
|
||||
P = .proc/snail_crawl
|
||||
P = PROC_REF(snail_crawl)
|
||||
else
|
||||
P = .proc/lubricate
|
||||
P = PROC_REF(lubricate)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, P)
|
||||
|
||||
/datum/element/snailcrawl/Detach(mob/living/carbon/target)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
strip_menu = new(source, src)
|
||||
LAZYSET(strip_menus, source, strip_menu)
|
||||
|
||||
INVOKE_ASYNC(strip_menu, /datum/.proc/ui_interact, user)
|
||||
INVOKE_ASYNC(strip_menu, TYPE_PROC_REF(/datum, ui_interact), user)
|
||||
|
||||
/// A representation of an item that can be stripped down
|
||||
/datum/strippable_item
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
/obj/item/disk/holodisk/Initialize(mapload)
|
||||
. = ..()
|
||||
if(preset_record_text)
|
||||
INVOKE_ASYNC(src, .proc/build_record)
|
||||
INVOKE_ASYNC(src, PROC_REF(build_record))
|
||||
|
||||
/obj/item/disk/holodisk/Destroy()
|
||||
QDEL_NULL(record)
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
if (T && isturf(T))
|
||||
if (!D.stat)
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, TYPE_PROC_REF(/mob/living/carbon/human, DefaultCombatKnockdown), 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
source.name = "[name] [source.name]"
|
||||
|
||||
// if(beauty_modifier) returnign in hardsync2 if i ever port ebeauty cmp
|
||||
// addtimer(CALLBACK(source, /datum.proc/_AddElement, list(/datum/element/beauty, beauty_modifier * amount)), 0)
|
||||
// addtimer(CALLBACK(source, TYPE_PROC_REF(/datum, _AddElement), list(/datum/element/beauty, beauty_modifier * amount)), 0)
|
||||
|
||||
if(istype(source, /obj)) //objs
|
||||
on_applied_obj(source, amount, material_flags)
|
||||
@@ -152,7 +152,7 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
source.name = initial(source.name)
|
||||
|
||||
// if(beauty_modifier) //component/beauty/InheritComponent() will handle the removal.
|
||||
// addtimer(CALLBACK(source, /datum.proc/_AddElement, list(/datum/element/beauty, -beauty_modifier * amount)), 0)
|
||||
// addtimer(CALLBACK(source, TYPE_PROC_REF(/datum, _AddElement), list(/datum/element/beauty, -beauty_modifier * amount)), 0)
|
||||
|
||||
if(istype(source, /obj)) //objs
|
||||
on_removed_obj(source, amount, material_flags)
|
||||
|
||||
@@ -1662,7 +1662,7 @@ GLOBAL_LIST(objective_choices)
|
||||
continue
|
||||
S.charge_counter = delay
|
||||
S.UpdateButton()
|
||||
INVOKE_ASYNC(S, /obj/effect/proc_holder/spell.proc/start_recharge)
|
||||
INVOKE_ASYNC(S, TYPE_PROC_REF(/obj/effect/proc_holder/spell, start_recharge))
|
||||
|
||||
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
|
||||
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(iscatperson(H))
|
||||
H.dna.species.start_wagging_tail(H)
|
||||
addtimer(CALLBACK(H.dna.species, /datum/species.proc/stop_wagging_tail, H), 30)
|
||||
addtimer(CALLBACK(H.dna.species, TYPE_PROC_REF(/datum/species, stop_wagging_tail), H), 30)
|
||||
description = "<span class='nicegreen'>They want to play on the table!</span>\n"
|
||||
mood_change = 2
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
RegisterSignal(
|
||||
src,
|
||||
COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET,
|
||||
.proc/add_item_context,
|
||||
PROC_REF(add_item_context),
|
||||
)
|
||||
|
||||
/// Creates a "Type-A" contextual screentip interaction.
|
||||
|
||||
@@ -115,8 +115,8 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
skill_holder.need_static_data_update = TRUE
|
||||
|
||||
if(M.modifier_flags & MODIFIER_SKILL_BODYBOUND)
|
||||
M.RegisterSignal(src, COMSIG_MIND_TRANSFER, /datum/skill_modifier.proc/on_mind_transfer)
|
||||
M.RegisterSignal(current, COMSIG_MOB_ON_NEW_MIND, /datum/skill_modifier.proc/on_mob_new_mind, TRUE)
|
||||
M.RegisterSignal(src, COMSIG_MIND_TRANSFER, TYPE_PROC_REF(/datum/skill_modifier, on_mind_transfer))
|
||||
M.RegisterSignal(current, COMSIG_MOB_ON_NEW_MIND, TYPE_PROC_REF(/datum/skill_modifier, on_mob_new_mind), TRUE)
|
||||
RegisterSignal(M, COMSIG_PARENT_PREQDELETED, PROC_REF(on_skill_modifier_deletion))
|
||||
|
||||
#undef ADD_MOD_STEP
|
||||
@@ -201,4 +201,4 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
|
||||
/datum/skill_modifier/proc/on_mob_new_mind(mob/source)
|
||||
source.mind.add_skill_modifier(identifier)
|
||||
RegisterSignal(source.mind, COMSIG_MIND_TRANSFER, /datum/skill_modifier.proc/on_mind_transfer)
|
||||
RegisterSignal(source.mind, COMSIG_MIND_TRANSFER, TYPE_PROC_REF(/datum/skill_modifier, on_mind_transfer))
|
||||
|
||||
@@ -1059,8 +1059,8 @@
|
||||
// The brain trauma itself does its own set of logging, but this is the only place the source of the hypnosis phrase can be found.
|
||||
hearing_speaker.log_message("has hypnotised [key_name(C)] with the phrase '[hypnomsg]'", LOG_ATTACK)
|
||||
C.log_message("has been hypnotised by the phrase '[hypnomsg]' spoken by [key_name(hearing_speaker)]", LOG_VICTIM, log_globally = FALSE)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hypnomsg), 10)
|
||||
addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
|
||||
addtimer(CALLBACK(C, TYPE_PROC_REF(/mob/living/carbon, gain_trauma), /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hypnomsg), 10)
|
||||
addtimer(CALLBACK(C, TYPE_PROC_REF(/mob/living, Stun), 60, TRUE, TRUE), 15) //Take some time to think about it
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/spasms
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
if(!A.shorted)
|
||||
A.shorted = TRUE
|
||||
A.update_icon()
|
||||
addtimer(CALLBACK(A, /obj/machinery/airalarm.proc/reset, wire), 1200)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/airalarm, reset), wire), 1200)
|
||||
if(WIRE_IDSCAN) // Toggle lock.
|
||||
A.locked = !A.locked
|
||||
if(WIRE_AI) // Disable AI control for a while.
|
||||
if(!A.aidisabled)
|
||||
A.aidisabled = TRUE
|
||||
addtimer(CALLBACK(A, /obj/machinery/airalarm.proc/reset, wire), 100)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/airalarm, reset), wire), 100)
|
||||
if(WIRE_PANIC) // Toggle panic siphon.
|
||||
if(!A.shorted)
|
||||
if(A.mode == 1) // AALARM_MODE_SCRUB
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
return
|
||||
if(!A.requiresID() || A.check_access(null))
|
||||
if(A.density)
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock.proc/open)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, open))
|
||||
else
|
||||
INVOKE_ASYNC(A, /obj/machinery/door/airlock.proc/close)
|
||||
INVOKE_ASYNC(A, TYPE_PROC_REF(/obj/machinery/door/airlock, close))
|
||||
else
|
||||
holder.visible_message("<span class='notice'>You hear a a grinding noise coming from the airlock.</span>")
|
||||
if(WIRE_BOLTS) // Pulse to toggle bolts (but only raise if power is on).
|
||||
@@ -106,7 +106,7 @@
|
||||
A.aiControlDisabled = 1
|
||||
else if(A.aiControlDisabled == -1)
|
||||
A.aiControlDisabled = 2
|
||||
addtimer(CALLBACK(A, /obj/machinery/door/airlock.proc/reset_ai_wire), 1 SECONDS)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/door/airlock, reset_ai_wire)), 1 SECONDS)
|
||||
if(WIRE_SHOCK) // Pulse to shock the door for 10 ticks.
|
||||
if(!A.secondsElectrified)
|
||||
A.set_electrified(30, usr)
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
if(!A.shorted)
|
||||
A.shorted = TRUE
|
||||
A.update()
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc.proc/reset, wire), 1200)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, reset), wire), 1200)
|
||||
if(WIRE_IDSCAN) // Unlock for a little while.
|
||||
A.locked = FALSE
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc.proc/reset, wire), 300)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, reset), wire), 300)
|
||||
if(WIRE_AI) // Disable AI control for a very short time.
|
||||
if(!A.aidisabled)
|
||||
A.aidisabled = TRUE
|
||||
addtimer(CALLBACK(A, /obj/machinery/power/apc.proc/reset, wire), 10)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/power/apc, reset), wire), 10)
|
||||
|
||||
/datum/wires/apc/on_cut(index, mend)
|
||||
var/obj/machinery/power/apc/A = holder
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
switch(wire)
|
||||
if(WIRE_HACK)
|
||||
A.adjust_hacked(!A.hacked)
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, reset), wire), 60)
|
||||
if(WIRE_SHOCK)
|
||||
A.shocked = !A.shocked
|
||||
A.shock(usr, 50)
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, reset), wire), 60)
|
||||
if(WIRE_DISABLE)
|
||||
A.disabled = !A.disabled
|
||||
addtimer(CALLBACK(A, /obj/machinery/autolathe.proc/reset, wire), 60)
|
||||
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/autolathe, reset), wire), 60)
|
||||
|
||||
/datum/wires/autolathe/on_cut(wire, mend)
|
||||
var/obj/machinery/autolathe/A = holder
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
/datum/wound/blunt/moderate/proc/chiropractice(mob/living/carbon/human/user)
|
||||
var/time = base_treat_time
|
||||
|
||||
if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
if(prob(65))
|
||||
@@ -254,7 +254,7 @@
|
||||
/datum/wound/blunt/moderate/proc/malpractice(mob/living/carbon/human/user)
|
||||
var/time = base_treat_time
|
||||
|
||||
if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, time, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
if(prob(65))
|
||||
@@ -275,7 +275,7 @@
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] begins resetting [victim]'s [limb.name] with [I].</span>", "<span class='notice'>You begin resetting [victim]'s [limb.name] with [I]...</span>")
|
||||
|
||||
if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
if(victim == user)
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
user.visible_message("<span class='danger'>[user] begins hastily applying [I] to [victim]'s' [limb.name]...</span>", "<span class='warning'>You begin hastily applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name], disregarding the warning label...</span>")
|
||||
|
||||
if(!do_after(user, base_treat_time * 1.5 * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * 1.5 * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
I.use(1)
|
||||
@@ -388,7 +388,7 @@
|
||||
|
||||
user.visible_message("<span class='danger'>[user] begins applying [I] to [victim]'s' [limb.name]...</span>", "<span class='warning'>You begin applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name]...</span>")
|
||||
|
||||
if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * (user == victim ? 1.5 : 1), target = victim, extra_checks=CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
regen_points_current = 0
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/// if someone is using ointment on our burns
|
||||
/datum/wound/burn/proc/ointment(obj/item/stack/medical/ointment/I, mob/user)
|
||||
user.visible_message("<span class='notice'>[user] begins applying [I] to [victim]'s [limb.name]...</span>", "<span class='notice'>You begin applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name]...</span>")
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
limb.heal_damage(I.heal_brute, I.heal_burn)
|
||||
@@ -197,7 +197,7 @@
|
||||
/// if someone is using mesh on our burns
|
||||
/datum/wound/burn/proc/mesh(obj/item/stack/medical/mesh/I, mob/user)
|
||||
user.visible_message("<span class='notice'>[user] begins wrapping [victim]'s [limb.name] with [I]...</span>", "<span class='notice'>You begin wrapping [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
limb.heal_damage(I.heal_brute, I.heal_burn)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
/datum/wound/pierce/proc/suture(obj/item/stack/medical/suture/I, mob/user)
|
||||
var/self_penalty_mult = (user == victim ? 1.4 : 1)
|
||||
user.visible_message("<span class='notice'>[user] begins stitching [victim]'s [limb.name] with [I]...</span>", "<span class='notice'>You begin stitching [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] stitches up some of the bleeding on [victim].</span>", "<span class='green'>You stitch up some of the bleeding on [user == victim ? "yourself" : "[victim]"].</span>")
|
||||
var/blood_sutured = I.stop_bleeding / self_penalty_mult * 0.5
|
||||
@@ -112,7 +112,7 @@
|
||||
/datum/wound/pierce/proc/tool_cauterize(obj/item/I, mob/user)
|
||||
var/self_penalty_mult = (user == victim ? 1.5 : 1)
|
||||
user.visible_message("<span class='danger'>[user] begins cauterizing [victim]'s [limb.name] with [I]...</span>", "<span class='danger'>You begin cauterizing [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='green'>[user] cauterizes some of the bleeding on [victim].</span>", "<span class='green'>You cauterize some of the bleeding on [victim].</span>")
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
user.visible_message("<span class='notice'>[user] begins licking the wounds on [victim]'s [limb.name].</span>", "<span class='notice'>You begin licking the wounds on [victim]'s [limb.name]...</span>", ignored_mobs=victim)
|
||||
to_chat(victim, "<span class='notice'>[user] begins to lick the wounds on your [limb.name].</span")
|
||||
if(!do_after(user, base_treat_time, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] licks the wounds on [victim]'s [limb.name].</span>", "<span class='notice'>You lick some of the wounds on [victim]'s [limb.name]</span>", ignored_mobs=victim)
|
||||
@@ -197,7 +197,7 @@
|
||||
/datum/wound/slash/proc/las_cauterize(obj/item/gun/energy/laser/lasgun, mob/user)
|
||||
var/self_penalty_mult = (user == victim ? 1.25 : 1)
|
||||
user.visible_message("<span class='warning'>[user] begins aiming [lasgun] directly at [victim]'s [limb.name]...</span>", "<span class='userdanger'>You begin aiming [lasgun] directly at [user == victim ? "your" : "[victim]'s"] [limb.name]...</span>")
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
var/damage = lasgun.chambered.BB.damage
|
||||
lasgun.chambered.BB.wound_bonus -= 30
|
||||
@@ -212,7 +212,7 @@
|
||||
/datum/wound/slash/proc/tool_cauterize(obj/item/I, mob/user)
|
||||
var/self_penalty_mult = (user == victim ? 1.5 : 1)
|
||||
user.visible_message("<span class='danger'>[user] begins cauterizing [victim]'s [limb.name] with [I]...</span>", "<span class='danger'>You begin cauterizing [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='green'>[user] cauterizes some of the bleeding on [victim].</span>", "<span class='green'>You cauterize some of the bleeding on [victim].</span>")
|
||||
@@ -232,7 +232,7 @@
|
||||
var/self_penalty_mult = (user == victim ? 1.4 : 1)
|
||||
user.visible_message("<span class='notice'>[user] begins stitching [victim]'s [limb.name] with [I]...</span>", "<span class='notice'>You begin stitching [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
if(!do_after(user, base_treat_time * self_penalty_mult, target=victim, extra_checks = CALLBACK(src, PROC_REF(still_exists))))
|
||||
return
|
||||
user.visible_message("<span class='green'>[user] stitches up some of the bleeding on [victim].</span>", "<span class='green'>You stitch up some of the bleeding on [user == victim ? "yourself" : "[victim]"].</span>")
|
||||
var/blood_sutured = I.stop_bleeding / self_penalty_mult
|
||||
|
||||
@@ -420,7 +420,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
if(D.operating)
|
||||
D.nextstate = opening ? FIREDOOR_OPEN : FIREDOOR_CLOSED
|
||||
else if(!(D.density ^ opening))
|
||||
INVOKE_ASYNC(D, (opening ? /obj/machinery/door/firedoor.proc/open : /obj/machinery/door/firedoor.proc/close))
|
||||
INVOKE_ASYNC(D, (opening ? TYPE_PROC_REF(/obj/machinery/door/firedoor, open) : TYPE_PROC_REF(/obj/machinery/door/firedoor, close)))
|
||||
|
||||
/area/proc/firealert(obj/source)
|
||||
if(always_unpowered == 1) //no fire alarms in space/asteroid
|
||||
@@ -513,7 +513,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
var/mob/living/silicon/SILICON = i
|
||||
if(SILICON.triggerAlarm("Burglar", src, cameras, trigger))
|
||||
//Cancel silicon alert after 1 minute
|
||||
addtimer(CALLBACK(SILICON, /mob/living/silicon.proc/cancelAlarm,"Burglar",src,trigger), 600)
|
||||
addtimer(CALLBACK(SILICON, TYPE_PROC_REF(/mob/living/silicon, cancelAlarm),"Burglar",src,trigger), 600)
|
||||
|
||||
/area/proc/set_fire_alarm_effects(boolean)
|
||||
fire = boolean
|
||||
|
||||
@@ -922,7 +922,7 @@
|
||||
if(STR == src_object)
|
||||
progress.end_progress()
|
||||
return
|
||||
while(do_after(user, 1 SECONDS, src, NONE, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress)))
|
||||
while(do_after(user, 1 SECONDS, src, NONE, FALSE, CALLBACK(STR, TYPE_PROC_REF(/datum/component/storage, handle_mass_item_insertion), things, src_object, user, progress)))
|
||||
stoplag(1)
|
||||
progress.end_progress()
|
||||
to_chat(user, "<span class='notice'>You dump as much of [src_object.parent]'s contents into [STR.insert_preposition]to [src] as you can.</span>")
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if(isobj(A) || ismob(A))
|
||||
if(A.layer > highest.layer)
|
||||
highest = A
|
||||
INVOKE_ASYNC(src, .proc/SpinAnimation, 5, 2)
|
||||
INVOKE_ASYNC(src, PROC_REF(SpinAnimation), 5, 2)
|
||||
throw_impact(highest)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -1291,9 +1291,9 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
|
||||
var/payout_bonus = 0
|
||||
var/area/dropoff = null
|
||||
var/static/list/blacklisted_areas = typecacheof(list(/area/ai_monitored/turret_protected,
|
||||
/area/solars/,
|
||||
/area/ruin/, //thank you station space ruins
|
||||
/area/science/test_area/,
|
||||
/area/solars,
|
||||
/area/ruin, //thank you station space ruins
|
||||
/area/science/test_area,
|
||||
/area/shuttle/))
|
||||
|
||||
/datum/objective/contract/proc/generate_dropoff() // Generate a random valid area on the station that the dropoff will happen.
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/datum/game_mode/traitor/post_setup()
|
||||
for(var/datum/mind/traitor in pre_traitors)
|
||||
var/datum/antagonist/traitor/new_antag = new antag_datum()
|
||||
addtimer(CALLBACK(traitor, /datum/mind.proc/add_antag_datum, new_antag), rand(10,100))
|
||||
addtimer(CALLBACK(traitor, TYPE_PROC_REF(/datum/mind, add_antag_datum), new_antag), rand(10,100))
|
||||
if(!exchange_blue)
|
||||
exchange_blue = -1 //Block latejoiners from getting exchange objectives
|
||||
..()
|
||||
|
||||
@@ -139,6 +139,9 @@ Class Procs:
|
||||
var/market_verb = "Customer"
|
||||
var/payment_department = ACCOUNT_ENG
|
||||
|
||||
///Boolean on whether this machines interact with atmos
|
||||
var/atmos_processing = FALSE
|
||||
|
||||
/obj/machinery/Initialize(mapload)
|
||||
if(!armor)
|
||||
armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 70)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
matching_designs = list()
|
||||
|
||||
/obj/machinery/autolathe/ComponentInitialize()
|
||||
AddComponent(/datum/component/material_container, SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID], 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
AddComponent(/datum/component/material_container, SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID], 0, TRUE, null, null, CALLBACK(src, PROC_REF(AfterMaterialInsert)))
|
||||
|
||||
/obj/machinery/autolathe/Destroy()
|
||||
QDEL_NULL(wires)
|
||||
@@ -477,4 +477,4 @@
|
||||
// override the base to allow plastics
|
||||
/obj/machinery/autolathe/ComponentInitialize()
|
||||
var/list/extra_mats = list(/datum/material/plastic)
|
||||
AddComponent(/datum/component/material_container, SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID] + extra_mats, 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
AddComponent(/datum/component/material_container, SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID] + extra_mats, 0, TRUE, null, null, CALLBACK(src, PROC_REF(AfterMaterialInsert)))
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
if(G.suiciding) // The ghost came from a body that is suiciding.
|
||||
return FALSE
|
||||
if(clonemind.damnation_type) //Can't clone the damned.
|
||||
INVOKE_ASYNC(src, .proc/horrifyingsound)
|
||||
INVOKE_ASYNC(src, PROC_REF(horrifyingsound))
|
||||
mess = TRUE
|
||||
update_icon()
|
||||
return FALSE
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
else
|
||||
playsound(src, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3)
|
||||
|
||||
timer_id = addtimer(CALLBACK(src, .proc/enemy_action,player_stance,user),1 SECONDS,TIMER_STOPPABLE)
|
||||
timer_id = addtimer(CALLBACK(src, PROC_REF(enemy_action),player_stance,user),1 SECONDS,TIMER_STOPPABLE)
|
||||
gameover_check(user)
|
||||
|
||||
///the enemy turn, the enemy's action entirely depend on their current passive and a teensy tiny bit of randomness
|
||||
|
||||
@@ -73,11 +73,11 @@
|
||||
|
||||
/obj/machinery/air_sensor/Initialize(mapload)
|
||||
. = ..()
|
||||
SSair.atmos_machinery += src
|
||||
SSair.start_processing_machine(src)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
SSair.stop_processing_machine(src)
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
/obj/machinery/computer/security/telescreen/entertainment/proc/BigClick()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
INVOKE_ASYNC(src, /atom.proc/interact, usr)
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, interact), usr)
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment/proc/notify(on)
|
||||
if(on && icon_state == icon_state_off)
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
glow.update_light()
|
||||
continue
|
||||
if(prob(2)) // Unique effects for the dance floor that show up randomly to mix things up
|
||||
INVOKE_ASYNC(src, .proc/hierofunk)
|
||||
INVOKE_ASYNC(src, PROC_REF(hierofunk))
|
||||
sleep(playing.song_beat)
|
||||
|
||||
#undef DISCO_INFENO_RANGE
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
set_frequency(frequency)
|
||||
|
||||
if(closeOtherId != null)
|
||||
addtimer(CALLBACK(.proc/update_other_id), 5)
|
||||
addtimer(CALLBACK(PROC_REF(update_other_id)), 5)
|
||||
if(glass)
|
||||
airlock_material = "glass"
|
||||
if(security_level > AIRLOCK_SECURITY_METAL)
|
||||
@@ -224,9 +224,9 @@
|
||||
return
|
||||
|
||||
if(density)
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
INVOKE_ASYNC(src, PROC_REF(open))
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/close)
|
||||
INVOKE_ASYNC(src, PROC_REF(close))
|
||||
|
||||
if("bolt")
|
||||
if(command_value == "on" && locked)
|
||||
@@ -403,7 +403,7 @@
|
||||
secondsBackupPowerLost = 10
|
||||
if(!spawnPowerRestoreRunning)
|
||||
spawnPowerRestoreRunning = TRUE
|
||||
INVOKE_ASYNC(src, .proc/handlePowerRestore)
|
||||
INVOKE_ASYNC(src, PROC_REF(handlePowerRestore))
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/loseBackupPower()
|
||||
@@ -411,7 +411,7 @@
|
||||
src.secondsBackupPowerLost = 60
|
||||
if(!spawnPowerRestoreRunning)
|
||||
spawnPowerRestoreRunning = TRUE
|
||||
INVOKE_ASYNC(src, .proc/handlePowerRestore)
|
||||
INVOKE_ASYNC(src, PROC_REF(handlePowerRestore))
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/regainBackupPower()
|
||||
@@ -1127,9 +1127,9 @@
|
||||
if(!axe.wielded)
|
||||
to_chat(user, "<span class='warning'>You need to be wielding \the [axe] to do that!</span>")
|
||||
return
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
INVOKE_ASYNC(src, (density ? PROC_REF(open) : PROC_REF(close)), 2)
|
||||
else
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
INVOKE_ASYNC(src, (density ? PROC_REF(open) : PROC_REF(close)), 2)
|
||||
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(!I.can_force_powered)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
. = ..()
|
||||
SSradio.remove_object(src, air_frequency)
|
||||
air_connection = SSradio.add_object(src, air_frequency, RADIO_TO_AIRALARM)
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
INVOKE_ASYNC(src, PROC_REF(open))
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
|
||||
..()
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(door.density)
|
||||
continue
|
||||
INVOKE_ASYNC(door, /obj/machinery/door/window/brigdoor.proc/close)
|
||||
INVOKE_ASYNC(door, TYPE_PROC_REF(/obj/machinery/door/window/brigdoor, close))
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken)
|
||||
@@ -117,7 +117,7 @@
|
||||
for(var/obj/machinery/door/window/brigdoor/door in targets)
|
||||
if(!door.density)
|
||||
continue
|
||||
INVOKE_ASYNC(door, /obj/machinery/door/window/brigdoor.proc/open)
|
||||
INVOKE_ASYNC(door, TYPE_PROC_REF(/obj/machinery/door/window/brigdoor, open))
|
||||
|
||||
for(var/obj/structure/closet/secure_closet/brig/C in targets)
|
||||
if(C.broken)
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
if(prob(severity/5) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
INVOKE_ASYNC(src, PROC_REF(open))
|
||||
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = MACHINE_NOT_ELECTRIFIED
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
/obj/machinery/door/firedoor/power_change()
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
INVOKE_ASYNC(src, .proc/latetoggle)
|
||||
INVOKE_ASYNC(src, PROC_REF(latetoggle))
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
/obj/machinery/door/poddoor/shuttledock/proc/check()
|
||||
var/turf/T = get_step(src, checkdir)
|
||||
if(!istype(T, turftype))
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
INVOKE_ASYNC(src, PROC_REF(open))
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/close)
|
||||
INVOKE_ASYNC(src, PROC_REF(close))
|
||||
|
||||
/obj/machinery/door/poddoor/incinerator_toxmix
|
||||
name = "combustion chamber vent"
|
||||
|
||||
@@ -349,11 +349,11 @@
|
||||
return
|
||||
|
||||
if(density)
|
||||
INVOKE_ASYNC(src, .proc/open)
|
||||
INVOKE_ASYNC(src, PROC_REF(open))
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/close)
|
||||
INVOKE_ASYNC(src, PROC_REF(close))
|
||||
if("touch")
|
||||
INVOKE_ASYNC(src, .proc/open_and_close)
|
||||
INVOKE_ASYNC(src, PROC_REF(open_and_close))
|
||||
|
||||
/obj/machinery/door/window/brigdoor
|
||||
name = "secure door"
|
||||
|
||||
@@ -20,7 +20,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
|
||||
/obj/machinery/doppler_array/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE,null,null,CALLBACK(src,.proc/rot_message))
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE,null,null,CALLBACK(src,PROC_REF(rot_message)))
|
||||
|
||||
/obj/machinery/doppler_array/Destroy()
|
||||
GLOB.doppler_arrays -= src
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
if(program)
|
||||
program.receive_user_command(href_list["command"])
|
||||
addtimer(CALLBACK(program, /datum/computer/file/embedded_program.proc/process), 5)
|
||||
addtimer(CALLBACK(program, TYPE_PROC_REF(/datum/computer/file/embedded_program, process)), 5)
|
||||
|
||||
usr.set_machine(src)
|
||||
addtimer(CALLBACK(src, PROC_REF(updateDialog)), 5)
|
||||
|
||||
@@ -703,7 +703,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(HOLORECORD_SOUND)
|
||||
playsound(src,entry[2],50,TRUE)
|
||||
if(HOLORECORD_DELAY)
|
||||
addtimer(CALLBACK(src,.proc/replay_entry,entry_number+1),entry[2])
|
||||
addtimer(CALLBACK(src,PROC_REF(replay_entry),entry_number+1),entry[2])
|
||||
return
|
||||
if(HOLORECORD_LANGUAGE)
|
||||
var/datum/language_holder/holder = replay_holo.get_language_holder()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
stored_research = new /datum/techweb/specialized/autounlocking/limbgrower
|
||||
. = ..()
|
||||
AddComponent(/datum/component/plumbing/simple_demand)
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_WRENCH | ROTATION_CLOCKWISE, null, CALLBACK(src, .proc/can_be_rotated))
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_WRENCH | ROTATION_CLOCKWISE, null, CALLBACK(src, PROC_REF(can_be_rotated)))
|
||||
|
||||
/obj/machinery/limbgrower/ui_interact(mob/user, datum/tgui/ui)
|
||||
. = ..()
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
on = !on
|
||||
|
||||
if(on)
|
||||
INVOKE_ASYNC(src, .proc/magnetic_process)
|
||||
INVOKE_ASYNC(src, PROC_REF(magnetic_process))
|
||||
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
if("togglemoving")
|
||||
moving = !moving
|
||||
if(moving)
|
||||
INVOKE_ASYNC(src, .proc/MagnetMove)
|
||||
INVOKE_ASYNC(src, PROC_REF(MagnetMove))
|
||||
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -127,7 +127,7 @@ DEFINE_BITFIELD(turret_flags, list(
|
||||
base.layer = NOT_HIGH_OBJ_LAYER
|
||||
underlays += base
|
||||
if(!has_cover)
|
||||
INVOKE_ASYNC(src, .proc/popUp)
|
||||
INVOKE_ASYNC(src, PROC_REF(popUp))
|
||||
|
||||
/obj/machinery/porta_turret/proc/toggle_on(var/set_to)
|
||||
var/current = on
|
||||
@@ -599,7 +599,7 @@ DEFINE_BITFIELD(turret_flags, list(
|
||||
if(target)
|
||||
popUp() //pop the turret up if it's not already up.
|
||||
setDir(get_dir(base, target))//even if you can't shoot, follow the target
|
||||
INVOKE_ASYNC(src, .proc/shootAt, target)
|
||||
INVOKE_ASYNC(src, PROC_REF(shootAt), target)
|
||||
return TRUE
|
||||
return
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/obj/machinery/sheetifier/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/meat), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/reagent_containers/food/snacks/meat/slab, CALLBACK(src, PROC_REF(CanInsertMaterials)), CALLBACK(src, .proc/AfterInsertMaterials))
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/meat), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/reagent_containers/food/snacks/meat/slab, CALLBACK(src, PROC_REF(CanInsertMaterials)), CALLBACK(src, PROC_REF(AfterInsertMaterials)))
|
||||
|
||||
/obj/machinery/sheetifier/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
jackpots = rand(1, 4) //false hope
|
||||
plays = rand(75, 200)
|
||||
|
||||
INVOKE_ASYNC(src, .proc/toggle_reel_spin, TRUE)//The reels won't spin unless we activate them
|
||||
INVOKE_ASYNC(src, PROC_REF(toggle_reel_spin), TRUE)//The reels won't spin unless we activate them
|
||||
|
||||
var/list/reel = reels[1]
|
||||
for(var/i = 0, i < reel.len, i++) //Populate the reels.
|
||||
randomize_reels()
|
||||
|
||||
INVOKE_ASYNC(src, .proc/toggle_reel_spin, FALSE)
|
||||
INVOKE_ASYNC(src, PROC_REF(toggle_reel_spin), FALSE)
|
||||
|
||||
/obj/machinery/computer/slot_machine/Destroy()
|
||||
if(balance)
|
||||
|
||||
@@ -222,7 +222,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)
|
||||
SSair.atmos_machinery += src
|
||||
SSair.start_processing_machine(src)
|
||||
. = TRUE
|
||||
if("mode")
|
||||
setMode = params["mode"]
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/effect/anomaly/grav/high/Initialize(mapload, new_lifespan)
|
||||
. = ..()
|
||||
INVOKE_ASYNC(src, .proc/setup_grav_field)
|
||||
INVOKE_ASYNC(src, PROC_REF(setup_grav_field))
|
||||
|
||||
/obj/effect/anomaly/grav/high/proc/setup_grav_field()
|
||||
grav_field = make_field(/datum/proximity_monitor/advanced/gravity, list("current_range" = 7, "host" = src, "gravity_value" = rand(0,3)))
|
||||
@@ -245,7 +245,7 @@
|
||||
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
INVOKE_ASYNC(src, .proc/blue_effect, M)
|
||||
INVOKE_ASYNC(src, PROC_REF(blue_effect), M)
|
||||
|
||||
/obj/effect/anomaly/bluespace/proc/blue_effect(mob/M)
|
||||
var/obj/blueeffect = new /obj(src)
|
||||
@@ -280,7 +280,7 @@
|
||||
T.atmos_spawn_air("o2=5;plasma=5;TEMP=1000")
|
||||
|
||||
/obj/effect/anomaly/pyro/detonate()
|
||||
INVOKE_ASYNC(src, .proc/makepyroslime)
|
||||
INVOKE_ASYNC(src, PROC_REF(makepyroslime))
|
||||
|
||||
/obj/effect/anomaly/pyro/proc/makepyroslime()
|
||||
var/turf/open/T = get_turf(src)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
name = "poster - [name]"
|
||||
desc = "A large piece of space-resistant printed paper. [desc]"
|
||||
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 300)), 0)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum, _AddElement), list(/datum/element/beauty, 300)), 0)
|
||||
|
||||
/obj/structure/sign/poster/proc/randomise(base_type)
|
||||
var/list/poster_types = subtypesof(base_type)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/obj/effect/countdown/Initialize(mapload)
|
||||
. = ..()
|
||||
attach(loc)
|
||||
RegisterSignal(loc, COMSIG_PARENT_QDELETING, .proc/on_parent_deleting)
|
||||
RegisterSignal(loc, COMSIG_PARENT_QDELETING, PROC_REF(on_parent_deleting))
|
||||
|
||||
/obj/effect/countdown/proc/on_parent_deleting(atom/being_deleted, force)
|
||||
qdel(src)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(LAZYLEN(diseases_to_add))
|
||||
AddComponent(/datum/component/infective, diseases_to_add)
|
||||
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, beauty)), 0)
|
||||
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum, _AddElement), list(/datum/element/beauty, beauty)), 0)
|
||||
|
||||
/**
|
||||
* A data list is passed into this.
|
||||
|
||||
@@ -53,7 +53,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
for(var/i in 1 to number)
|
||||
if(total_effects > 20)
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/generate_effect)
|
||||
INVOKE_ASYNC(src, PROC_REF(generate_effect))
|
||||
|
||||
/datum/effect_system/proc/generate_effect()
|
||||
if(holder)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
INVOKE_ASYNC(src, .proc/fade_out)
|
||||
INVOKE_ASYNC(src, PROC_REF(fade_out))
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user