diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index dc05bae4431..56f05e84f10 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,15 +1,22 @@ Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. -The latest database version is 4.6; The query to update the schema revision table is: +The latest database version is 4.7; The query to update the schema revision table is: -INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 6); +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 7); or -INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 6); +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 7); In any query remember to add a prefix to the table names if you use one. ---------------------------------------------------- +Version 4.7, 18 August 2018, by CitrusGender +Modified table `messages`, adding column `severity` to classify notes based on their severity. + +ALTER TABLE `messages` ADD `severity` enum('high','medium','minor','none') DEFAULT NULL AFTER `expire_timestamp` + +---------------------------------------------------- + Version 4.6, 11 August 2018, by Jordie0608 Modified table `messages`, adding column `expire_timestamp` to allow for auto-"deleting" messages. diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 18602cc52a9..dc0861220ae 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -254,6 +254,7 @@ CREATE TABLE `messages` ( `round_id` int(11) unsigned NOT NULL, `secret` tinyint(1) unsigned NOT NULL, `expire_timestamp` datetime DEFAULT NULL, + `severity` enum('high','medium','minor','none') DEFAULT NULL, `lasteditor` varchar(32) DEFAULT NULL, `edits` text, `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 938b293035a..5cb57a9582e 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -254,6 +254,7 @@ CREATE TABLE `SS13_messages` ( `round_id` int(11) unsigned NOT NULL, `secret` tinyint(1) unsigned NOT NULL, `expire_timestamp` datetime DEFAULT NULL, + `severity` enum('high','medium','minor','none') DEFAULT NULL, `lasteditor` varchar(32) DEFAULT NULL, `edits` text, `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0', diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index 97ce6ef6fdd..161bb21d038 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -22,46 +22,46 @@ #define START_PROCESSING(Processor, Datum) if (!(Datum.datum_flags & DF_ISPROCESSING)) {Datum.datum_flags |= DF_ISPROCESSING;Processor.processing += Datum} #define STOP_PROCESSING(Processor, Datum) Datum.datum_flags &= ~DF_ISPROCESSING;Processor.processing -= Datum -//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier) +//! SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier) -//subsystem does not initialize. +/// subsystem does not initialize. #define SS_NO_INIT 1 -//subsystem does not fire. -// (like can_fire = 0, but keeps it from getting added to the processing subsystems list) -// (Requires a MC restart to change) +/** subsystem does not fire. */ +/// (like can_fire = 0, but keeps it from getting added to the processing subsystems list) +/// (Requires a MC restart to change) #define SS_NO_FIRE 2 -//subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) -// SS_BACKGROUND has its own priority bracket +/** subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) */ +/// SS_BACKGROUND has its own priority bracket #define SS_BACKGROUND 4 -//subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) +/// subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background)) #define SS_NO_TICK_CHECK 8 -//Treat wait as a tick count, not DS, run every wait ticks. -// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems) -// (implies all runlevels because of how it works) -// (overrides SS_BACKGROUND) -// This is designed for basically anything that works as a mini-mc (like SStimer) +/** Treat wait as a tick count, not DS, run every wait ticks. */ +/// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems) +/// (implies all runlevels because of how it works) +/// (overrides SS_BACKGROUND) +/// This is designed for basically anything that works as a mini-mc (like SStimer) #define SS_TICKER 16 -//keep the subsystem's timing on point by firing early if it fired late last fire because of lag -// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds. +/** keep the subsystem's timing on point by firing early if it fired late last fire because of lag */ +/// ie: if a 20ds subsystem fires say 5 ds late due to lag or what not, its next fire would be in 15ds, not 20ds. #define SS_KEEP_TIMING 32 -//Calculate its next fire after its fired. -// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) -// This flag overrides SS_KEEP_TIMING +/** Calculate its next fire after its fired. */ +/// (IE: if a 5ds wait SS takes 2ds to run, its next fire should be 5ds away, not 3ds like it normally would be) +/// This flag overrides SS_KEEP_TIMING #define SS_POST_FIRE_TIMING 64 -//SUBSYSTEM STATES -#define SS_IDLE 0 //aint doing shit. -#define SS_QUEUED 1 //queued to run -#define SS_RUNNING 2 //actively running -#define SS_PAUSED 3 //paused by mc_tick_check -#define SS_SLEEPING 4 //fire() slept. -#define SS_PAUSING 5 //in the middle of pausing +//! SUBSYSTEM STATES +#define SS_IDLE 0 /// aint doing shit. +#define SS_QUEUED 1 /// queued to run +#define SS_RUNNING 2 /// actively running +#define SS_PAUSED 3 /// paused by mc_tick_check +#define SS_SLEEPING 4 /// fire() slept. +#define SS_PAUSING 5 /// in the middle of pausing #define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\ /datum/controller/subsystem/##X/New(){\ diff --git a/code/__DEFINES/footsteps.dm b/code/__DEFINES/footsteps.dm new file mode 100644 index 00000000000..e66d5186440 --- /dev/null +++ b/code/__DEFINES/footsteps.dm @@ -0,0 +1,66 @@ +#define FOOTSTEP_WOOD "wood" +#define FOOTSTEP_FLOOR "floor" +#define FOOTSTEP_PLATING "plating" +#define FOOTSTEP_CARPET "carpet" +#define FOOTSTEP_SAND "sand" +#define FOOTSTEP_GRASS "grass" +#define FOOTSTEP_WATER "water" +#define FOOTSTEP_LAVA "lava" + +/* + +id = list( +list(sounds), +base volume, +extra range addition +) + + +*/ + +GLOBAL_LIST_INIT(footstep, list( + FOOTSTEP_WOOD = list(list( + 'sound/effects/footstep/wood1.ogg', + 'sound/effects/footstep/wood2.ogg', + 'sound/effects/footstep/wood3.ogg', + 'sound/effects/footstep/wood4.ogg', + 'sound/effects/footstep/wood5.ogg'), 100, 0), + FOOTSTEP_FLOOR = list(list( + 'sound/effects/footstep/floor1.ogg', + 'sound/effects/footstep/floor2.ogg', + 'sound/effects/footstep/floor3.ogg', + 'sound/effects/footstep/floor4.ogg', + 'sound/effects/footstep/floor5.ogg'), 75, -1), + FOOTSTEP_PLATING = list(list( + 'sound/effects/footstep/plating1.ogg', + 'sound/effects/footstep/plating2.ogg', + 'sound/effects/footstep/plating3.ogg', + 'sound/effects/footstep/plating4.ogg', + 'sound/effects/footstep/plating5.ogg'), 100, 1), + FOOTSTEP_CARPET = list(list( + 'sound/effects/footstep/carpet1.ogg', + 'sound/effects/footstep/carpet2.ogg', + 'sound/effects/footstep/carpet3.ogg', + 'sound/effects/footstep/carpet4.ogg', + 'sound/effects/footstep/carpet5.ogg'), 75, -1), + FOOTSTEP_SAND = list(list( + 'sound/effects/footstep/asteroid1.ogg', + 'sound/effects/footstep/asteroid2.ogg', + 'sound/effects/footstep/asteroid3.ogg', + 'sound/effects/footstep/asteroid4.ogg', + 'sound/effects/footstep/asteroid5.ogg'), 75, 0), + FOOTSTEP_GRASS = list(list( + 'sound/effects/footstep/grass1.ogg', + 'sound/effects/footstep/grass2.ogg', + 'sound/effects/footstep/grass3.ogg', + 'sound/effects/footstep/grass4.ogg'), 75, 0), + FOOTSTEP_WATER = list(list( + 'sound/effects/footstep/water1.ogg', + 'sound/effects/footstep/water2.ogg', + 'sound/effects/footstep/water3.ogg', + 'sound/effects/footstep/water4.ogg'), 100, 1), + FOOTSTEP_LAVA = list(list( + 'sound/effects/footstep/lava1.ogg', + 'sound/effects/footstep/lava2.ogg', + 'sound/effects/footstep/lava3.ogg'), 100, 0), +)) \ No newline at end of file diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm index e3f662dc3fd..55131a26ed8 100644 --- a/code/__DEFINES/logging.dm +++ b/code/__DEFINES/logging.dm @@ -32,6 +32,7 @@ #define LOG_OWNERSHIP (1 << 11) #define LOG_GAME (1 << 12) #define LOG_ADMIN_PRIVATE (1 << 13) +#define LOG_ASAY (1 << 14) //Individual logging panel pages #define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 8f274fcde46..4e306d224d5 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -457,3 +457,5 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE)) #define CAMERA_NO_GHOSTS 0 #define CAMERA_SEE_GHOSTS_BASIC 1 #define CAMERA_SEE_GHOSTS_ORBIT 2 + +#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : (istype(I, /datum/mind) ? I:current?:client : null))) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 056c5a45653..c8a583a55ea 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -14,13 +14,13 @@ // Shuttle return values #define SHUTTLE_CAN_DOCK "can_dock" -#define SHUTTLE_NOT_A_DOCKING_PORT "not_a_docking_port" -#define SHUTTLE_DWIDTH_TOO_LARGE "docking_width_too_large" -#define SHUTTLE_WIDTH_TOO_LARGE "width_too_large" -#define SHUTTLE_DHEIGHT_TOO_LARGE "docking_height_too_large" -#define SHUTTLE_HEIGHT_TOO_LARGE "height_too_large" -#define SHUTTLE_ALREADY_DOCKED "we_are_already_docked" -#define SHUTTLE_SOMEONE_ELSE_DOCKED "someone_else_docked" +#define SHUTTLE_NOT_A_DOCKING_PORT "not a docking port" +#define SHUTTLE_DWIDTH_TOO_LARGE "docking width too large" +#define SHUTTLE_WIDTH_TOO_LARGE "width too large" +#define SHUTTLE_DHEIGHT_TOO_LARGE "docking height too large" +#define SHUTTLE_HEIGHT_TOO_LARGE "height too large" +#define SHUTTLE_ALREADY_DOCKED "we are already docked" +#define SHUTTLE_SOMEONE_ELSE_DOCKED "someone else docked" //Launching Shuttles to CentCom #define NOLAUNCH -1 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 6f49344dc6b..b62febed7e2 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -1,7 +1,7 @@ //Update this whenever the db schema changes //make sure you add an update to the schema_version stable in the db changelog #define DB_MAJOR_VERSION 4 -#define DB_MINOR_VERSION 6 +#define DB_MINOR_VERSION 7 //Timing subsystem //Don't run if there is an identical unique timer active diff --git a/code/__DEFINES/vehicles.dm b/code/__DEFINES/vehicles.dm new file mode 100644 index 00000000000..0bcc14d0d71 --- /dev/null +++ b/code/__DEFINES/vehicles.dm @@ -0,0 +1,9 @@ +//Vehicle control flags + +#define VEHICLE_CONTROL_PERMISSION 1 +#define VEHICLE_CONTROL_DRIVE 2 +#define VEHICLE_CONTROL_KIDNAPPED 4 //Can't leave vehicle voluntarily, has to resist. + + +//Car trait flags +#define CAN_KIDNAP 1 \ No newline at end of file diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm index bfadbc9104b..96807214f2f 100644 --- a/code/_globalvars/lists/typecache.dm +++ b/code/_globalvars/lists/typecache.dm @@ -5,4 +5,8 @@ GLOBAL_LIST_INIT(typecache_mob, typecacheof(/mob)) +GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living)) + +GLOBAL_LIST_INIT(typecache_stack, typecacheof(/obj/item/stack)) + GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure))) diff --git a/code/datums/components/README.md b/code/datums/components/README.md index b617c8a25b1..05ce0577216 100644 --- a/code/datums/components/README.md +++ b/code/datums/components/README.md @@ -32,8 +32,12 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/var/list/datum_components` (private) * Lazy associated list of type -> component/list of components. -1. `/datum/component/var/enabled` (protected, boolean) - * If the component is enabled. If not, it will not react to signals +1. `/datum/var/list/comp_lookup` (private) + * Lazy associated list of signal -> registree/list of registrees +1. `/datum/var/list/signal_procs` (private) + * Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum receives that signal +1. `/datum/var/signal_enabled` (protected, boolean) + * If the datum is signal enabled. If not, it will not react to signals * `FALSE` by default, set to `TRUE` when a signal is registered 1. `/datum/component/var/dupe_mode` (protected, enum) * How duplicate component types are handled when added to the datum. @@ -45,14 +49,12 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo * Definition of a duplicate component type * `null` means exact match on `type` (default) * Any other type means that and all subtypes -1. `/datum/component/var/list/signal_procs` (private) - * Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum receives that signal 1. `/datum/component/var/datum/parent` (protected, read-only) * The datum this component belongs to * Never `null` in child procs -1. `report_signal_origin` (protected, boolean) - * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. - * `FALSE` by default. +1. `report_signal_origin` (protected, boolean) + * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. + * `FALSE` by default. ### Procs @@ -88,6 +90,14 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/proc/_SendSignal(signal, list/arguments)` (private, final) * Handles most of the actual signaling procedure * Will runtime if used on datums with an empty component list +1. `/datum/proc/RegisterSignal(datum/target, signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final) + * If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments + * Makes the datum listen for the specified `signal` on it's `parent` datum. + * When that signal is received `proc_ref` will be called on the component, along with associated arguments + * Example proc ref: `.proc/OnEvent` + * If a previous registration is overwritten by the call, a runtime occurs. Setting `override` to TRUE prevents this + * These callbacks run asyncronously + * Returning `TRUE` from these callbacks will trigger a `TRUE` return from the `SendSignal()` that initiated it 1. `/datum/component/New(datum/parent, ...)` (private, final) * Runs internal setup for the component * Extra arguments are passed to `Initialize()` @@ -121,13 +131,5 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/component/proc/UnregisterFromParent` (abstract, no-sleep) * Counterpart to `RegisterWithParent()` * Used to unregister the signals that should only be on the `parent` object -1. `/datum/component/proc/RegisterSignal(datum/target, signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final) - * If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments - * Makes a component listen for the specified `signal` on it's `parent` datum. - * When that signal is received `proc_ref` will be called on the component, along with associated arguments - * Example proc ref: `.proc/OnEvent` - * If a previous registration is overwritten by the call, a runtime occurs. Setting `override` to TRUE prevents this - * These callbacks run asyncronously - * Returning `TRUE` from these callbacks will trigger a `TRUE` return from the `SendSignal()` that initiated it ### See/Define signals and their arguments in __DEFINES\components.dm diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 1b6e8a69268..b3d3b464348 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -1,8 +1,6 @@ /datum/component - var/enabled = FALSE var/dupe_mode = COMPONENT_DUPE_HIGHLANDER var/dupe_type - var/list/signal_procs var/datum/parent /datum/component/New(datum/P, ...) @@ -57,15 +55,11 @@ return /datum/component/Destroy(force=FALSE, silent=FALSE) - enabled = FALSE - var/datum/P = parent - if(!force) + if(!force && parent) _RemoveFromParent() if(!silent) - SEND_SIGNAL(P, COMSIG_COMPONENT_REMOVING, src) + SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src) parent = null - for(var/target in signal_procs) - UnregisterSignal(target, signal_procs[target]) return ..() /datum/component/proc/_RemoveFromParent() @@ -89,7 +83,7 @@ /datum/component/proc/UnregisterFromParent() return -/datum/component/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE) +/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE) if(QDELETED(src) || QDELETED(target)) return @@ -122,9 +116,9 @@ else // Many other things have registered here lookup[sig_type][src] = TRUE - enabled = TRUE + signal_enabled = TRUE -/datum/component/proc/UnregisterSignal(datum/target, sig_type_or_types) +/datum/proc/UnregisterSignal(datum/target, sig_type_or_types) var/list/lookup = target.comp_lookup if(!signal_procs || !signal_procs[target] || !lookup) return @@ -174,15 +168,15 @@ /datum/proc/_SendSignal(sigtype, list/arguments) var/target = comp_lookup[sigtype] if(!length(target)) - var/datum/component/C = target - if(!C.enabled) + var/datum/C = target + if(!C.signal_enabled) return NONE var/datum/callback/CB = C.signal_procs[src][sigtype] return CB.InvokeAsync(arglist(arguments)) . = NONE for(var/I in target) - var/datum/component/C = I - if(!C.enabled) + var/datum/C = I + if(!C.signal_enabled) continue var/datum/callback/CB = C.signal_procs[src][sigtype] . |= CB.InvokeAsync(arglist(arguments)) diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm new file mode 100644 index 00000000000..2276e7cd274 --- /dev/null +++ b/code/datums/components/footstep.dm @@ -0,0 +1,39 @@ +/datum/component/footstep + var/steps = 0 + var/volume + var/e_range + +/datum/component/footstep/Initialize(volume_ = 0.5, e_range_ = -1) + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + volume = volume_ + e_range = e_range_ + RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/play_footstep) + +/datum/component/footstep/proc/play_footstep() + var/turf/open/T = get_turf(parent) + if(!istype(T)) + return + var/mob/living/LM = parent + var/v = volume + var/e = e_range + if(!T.footstep || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing) + return + if(iscarbon(LM)) + var/mob/living/carbon/C = LM + if(!C.get_bodypart(BODY_ZONE_L_LEG) && !C.get_bodypart(BODY_ZONE_R_LEG)) + return + if(ishuman(C) && C.m_intent == MOVE_INTENT_WALK) + v /= 2 + e -= 5 + steps++ + if(steps >= 6) + steps = 0 + if(steps % 2) + return + if(!LM.has_gravity(T) && steps != 0) // don't need to step as often when you hop around + return + playsound(T, pick(GLOB.footstep[T.footstep][1]), + GLOB.footstep[T.footstep][2] * v, + TRUE, + GLOB.footstep[T.footstep][3] + e) diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 759b07f8c68..202de771978 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -27,8 +27,13 @@ max_amount = max(0, max_amt) show_on_examine = _show_on_examine disable_attackby = _disable_attackby + if(allowed_types) - allowed_typecache = typecacheof(allowed_types) + if(ispath(allowed_types) && allowed_types == /obj/item/stack) + allowed_typecache = GLOB.typecache_stack + else + allowed_typecache = typecacheof(allowed_types) + precondition = _precondition after_insert = _after_insert diff --git a/code/datums/components/remote_materials.dm b/code/datums/components/remote_materials.dm index b69c15c3297..b746997bb72 100644 --- a/code/datums/components/remote_materials.dm +++ b/code/datums/components/remote_materials.dm @@ -57,7 +57,7 @@ handles linking back and forth. list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), local_size, FALSE, - list(/obj/item/stack)) + /obj/item/stack) /datum/component/remote_materials/proc/set_local_size(size) local_size = size diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 88608d21ba1..e74e30b5366 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -2,7 +2,9 @@ var/gc_destroyed //Time when this object was destroyed. var/list/active_timers //for SStimer var/list/datum_components //for /datum/components - var/list/comp_lookup //for /datum/components + var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register + var/list/signal_procs + var/signal_enabled = FALSE var/datum_flags = NONE var/datum/weakref/weak_reference @@ -31,6 +33,9 @@ continue qdel(timer) + //BEGIN: ECS SHIT + signal_enabled = FALSE + var/list/dc = datum_components if(dc) var/all_components = dc[/datum/component] @@ -56,6 +61,10 @@ comp.UnregisterSignal(src, sig) comp_lookup = lookup = null + for(var/target in signal_procs) + UnregisterSignal(target, signal_procs[target]) + //END: ECS SHIT + return QDEL_HINT_QUEUE #ifdef DATUMVAR_DEBUGGING_MODE diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 45a490fc732..57cdb9bcf51 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -16,7 +16,7 @@ var/emote_type = EMOTE_VISIBLE //Whether the emote is visible or audible var/restraint_check = FALSE //Checks if the mob is restrained before performing the emote var/muzzle_ignore = FALSE //Will only work if the emote is EMOTE_AUDIBLE - var/list/mob_type_allowed_typecache = list(/mob) //Types that are allowed to use that emote + var/list/mob_type_allowed_typecache = /mob //Types that are allowed to use that emote var/list/mob_type_blacklist_typecache //Types that are NOT allowed to use that emote var/list/mob_type_ignore_stat_typecache var/stat_allowed = CONSCIOUS @@ -25,7 +25,16 @@ /datum/emote/New() if(key_third_person) emote_list[key_third_person] = src - mob_type_allowed_typecache = typecacheof(mob_type_allowed_typecache) + if (ispath(mob_type_allowed_typecache)) + switch (mob_type_allowed_typecache) + if (/mob) + mob_type_allowed_typecache = GLOB.typecache_mob + if (/mob/living) + mob_type_allowed_typecache = GLOB.typecache_living + else + mob_type_allowed_typecache = typecacheof(mob_type_allowed_typecache) + else + mob_type_allowed_typecache = typecacheof(mob_type_allowed_typecache) mob_type_blacklist_typecache = typecacheof(mob_type_blacklist_typecache) mob_type_ignore_stat_typecache = typecacheof(mob_type_ignore_stat_typecache) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 169f74eb32d..af5d400d15b 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -62,6 +62,8 @@ var/unconvertable = FALSE var/late_joiner = FALSE + var/force_escaped = FALSE // Set by Into The Sunset command of the shuttle manipulator + /datum/mind/New(var/key) src.key = key soulOwner = src diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d801b4d1750..b5d85eebded 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -613,6 +613,8 @@ log_admin(log_text) if(LOG_ADMIN_PRIVATE) log_admin_private(log_text) + if(LOG_ASAY) + log_adminsay(log_text) if(LOG_OWNERSHIP) log_game(log_text) if(LOG_GAME) diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index bf401e5ad2d..a3440fad39a 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -74,7 +74,7 @@ . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) GET_COMPONENT(slipper, /datum/component/slippery) - slipper.enabled = active + slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user) ..() @@ -99,7 +99,7 @@ /obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text) ..() GET_COMPONENT(slipper, /datum/component/slippery) - slipper.enabled = active + slipper.signal_enabled = active /obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user) return "" @@ -131,12 +131,12 @@ . = ..() AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP) GET_COMPONENT(slipper, /datum/component/slippery) - slipper.enabled = active + slipper.signal_enabled = active /obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user) ..() GET_COMPONENT(slipper, /datum/component/slippery) - slipper.enabled = active + slipper.signal_enabled = active /obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1) if(active) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 5c37dd18c2b..69394a643ca 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -20,6 +20,8 @@ /datum/objective/proc/considered_escaped(datum/mind/M) if(!considered_alive(M)) return FALSE + if(M.force_escaped) + return TRUE if(SSticker.force_ending || SSticker.mode.station_was_nuked) // Just let them win. return TRUE if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME) @@ -154,7 +156,7 @@ if(!target || !considered_alive(target) || considered_afk(target)) return TRUE var/turf/T = get_turf(target.current) - return T && !is_station_level(T.z) + return !T || !is_station_level(T.z) /datum/objective/mutiny/update_explanation_text() ..() diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index c5e26c98eed..7a10e4122c0 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -25,10 +25,10 @@ var/list/chem_buttons //Used when emagged to scramble which chem is used, eg: antitoxin -> morphine var/scrambled_chems = FALSE //Are chem buttons scrambled? used as a warning var/enter_message = "You feel cool air surround you. You go numb as your senses turn inward." - occupant_typecache = list(/mob/living) /obj/machinery/sleeper/Initialize() . = ..() + occupant_typecache = GLOB.typecache_living update_icon() reset_chem_buttons() diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index ffe7961534f..7c92c158b37 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -50,7 +50,7 @@ /obj/machinery/droneDispenser/Initialize() . = ..() - var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, list(/obj/item/stack)) + var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/stack) materials.insert_amount(starting_amount) materials.precise_insertion = TRUE using_materials = list(MAT_METAL=metal_cost, MAT_GLASS=glass_cost) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index c1f41ac5c5f..01e304872f1 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -36,7 +36,7 @@ /obj/machinery/mecha_part_fabricator/Initialize() var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0, - TRUE, list(/obj/item/stack), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE stored_research = new return ..() diff --git a/code/game/sound.dm b/code/game/sound.dm index 39ed83a765c..6bd53aba7ab 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -160,9 +160,9 @@ if("gun_remove_empty_magazine") soundin = pick('sound/weapons/gun_magazine_remove_empty_1.ogg', 'sound/weapons/gun_magazine_remove_empty_2.ogg', 'sound/weapons/gun_magazine_remove_empty_3.ogg', 'sound/weapons/gun_magazine_remove_empty_4.ogg') if("gun_slide_lock") - soundin = pick('sound/weapons/gun_slide_lock_1.ogg', 'sound/weapons/gun_slide_lock_2.ogg', 'sound/weapons/gun_slide_lock_3.ogg', 'sound/weapons/gun_slide_lock_4.ogg', 'sound/weapons/gun_slide_lock_5.ogg') + soundin = pick('sound/weapons/gun_slide_lock_1.ogg', 'sound/weapons/gun_slide_lock_2.ogg', 'sound/weapons/gun_slide_lock_3.ogg', 'sound/weapons/gun_slide_lock_4.ogg', 'sound/weapons/gun_slide_lock_5.ogg') if("law") - soundin = pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg') + soundin = pick('sound/voice/beepsky/god.ogg', 'sound/voice/beepsky/iamthelaw.ogg', 'sound/voice/beepsky/secureday.ogg', 'sound/voice/beepsky/radio.ogg', 'sound/voice/beepsky/insult.ogg', 'sound/voice/beepsky/creep.ogg') if("honkbot_e") - soundin = pick('sound/items/bikehorn.ogg', 'sound/items/AirHorn2.ogg', 'sound/misc/sadtrombone.ogg', 'sound/items/AirHorn.ogg', 'sound/effects/reee.ogg', 'sound/items/WEEOO1.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bcreep.ogg','sound/magic/Fireball.ogg' ,'sound/effects/pray.ogg', 'sound/voice/hiss1.ogg','sound/machines/buzz-sigh.ogg', 'sound/machines/ping.ogg', 'sound/weapons/flashbang.ogg', 'sound/weapons/bladeslice.ogg') + soundin = pick('sound/items/bikehorn.ogg', 'sound/items/AirHorn2.ogg', 'sound/misc/sadtrombone.ogg', 'sound/items/AirHorn.ogg', 'sound/effects/reee.ogg', 'sound/items/WEEOO1.ogg', 'sound/voice/beepsky/iamthelaw.ogg', 'sound/voice/beepsky/creep.ogg','sound/magic/Fireball.ogg' ,'sound/effects/pray.ogg', 'sound/voice/hiss1.ogg','sound/machines/buzz-sigh.ogg', 'sound/machines/ping.ogg', 'sound/weapons/flashbang.ogg', 'sound/weapons/bladeslice.ogg') return soundin diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 8bbf8ed2224..77c658419c7 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -7,6 +7,8 @@ var/list/archdrops var/wet + var/footstep = null + /turf/open/ComponentInitialize() . = ..() if(wet) @@ -18,6 +20,7 @@ name = "floor" icon = 'icons/turf/floors.dmi' icon_state = "floor" + footstep = FOOTSTEP_FLOOR tiled_dirt = TRUE /turf/open/indestructible/Melt() @@ -32,6 +35,7 @@ /turf/open/indestructible/sound name = "squeaky floor" + footstep = null var/sound /turf/open/indestructible/sound/Entered(var/mob/AM) @@ -46,6 +50,7 @@ icon_state = "necro1" baseturfs = /turf/open/indestructible/necropolis initial_gas_mix = LAVALAND_DEFAULT_ATMOS + footstep = FOOTSTEP_LAVA tiled_dirt = FALSE /turf/open/indestructible/necropolis/Initialize() @@ -82,6 +87,7 @@ name = "notebook floor" desc = "A floor made of invulnerable notebook paper." icon_state = "paperfloor" + footstep = null tiled_dirt = FALSE /turf/open/indestructible/binary @@ -89,6 +95,7 @@ CanAtmosPass = ATMOS_PASS_NO baseturfs = /turf/open/indestructible/binary icon_state = "binary" + footstep = null /turf/open/indestructible/airblock icon_state = "bluespace" @@ -100,6 +107,7 @@ desc = "Brass plating that gently radiates heat. For some reason, it reminds you of blood." icon_state = "reebe" baseturfs = /turf/open/indestructible/clock_spawn_room + footstep = FOOTSTEP_PLATING /turf/open/indestructible/clock_spawn_room/Entered() ..() diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 582afb78006..777cbedd26a 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -6,6 +6,8 @@ icon = 'icons/turf/floors.dmi' baseturfs = /turf/open/floor/plating + footstep = FOOTSTEP_FLOOR + var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default var/icon_plating = "plating" thermal_conductivity = 0.040 diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 5dc12acb890..3d574d48b47 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -12,6 +12,7 @@ icon_state = "wood" floor_tile = /obj/item/stack/tile/wood broken_states = list("wood-broken", "wood-broken2", "wood-broken3", "wood-broken4", "wood-broken5", "wood-broken6", "wood-broken7") + footstep = FOOTSTEP_WOOD tiled_dirt = FALSE /turf/open/floor/wood/examine(mob/user) @@ -69,6 +70,7 @@ broken_states = list("sand") flags_1 = NONE bullet_bounce_sound = null + footstep = FOOTSTEP_GRASS var/ore_type = /obj/item/stack/ore/glass var/turfverb = "uproot" tiled_dirt = FALSE @@ -98,6 +100,7 @@ initial_gas_mix = "o2=22;n2=82;TEMP=180" slowdown = 2 bullet_sizzle = TRUE + footstep = FOOTSTEP_SAND /turf/open/floor/grass/snow/try_replace_tile(obj/item/stack/tile/T, mob/user, params) return @@ -130,6 +133,7 @@ ore_type = /obj/item/stack/ore/glass/basalt turfverb = "dig up" slowdown = 0 + footstep = FOOTSTEP_SAND /turf/open/floor/grass/fakebasalt/Initialize() . = ..() @@ -149,6 +153,7 @@ canSmoothWith = list(/turf/open/floor/carpet) flags_1 = NONE bullet_bounce_sound = null + footstep = FOOTSTEP_CARPET tiled_dirt = FALSE /turf/open/floor/carpet/examine(mob/user) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 6916b61e0c8..f7bebce4685 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -144,6 +144,7 @@ desc = "Tightly-pressed brass tiles. They emit minute vibration." icon_state = "plating" baseturfs = /turf/open/floor/clockwork + footstep = FOOTSTEP_PLATING var/uses_overlay = TRUE var/obj/effect/clockwork/overlay/floor/realappearence diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index eeed31bd9ff..9d2adbdfba2 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -12,6 +12,8 @@ icon_state = "plating" intact = FALSE baseturfs = /turf/open/space + footstep = FOOTSTEP_PLATING + var/attachment_holes = TRUE /turf/open/floor/plating/examine(mob/user) diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index a57213a4f97..b8da9350a48 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -9,6 +9,7 @@ icon_state = "asteroid" icon_plating = "asteroid" postdig_icon_change = TRUE + footstep = FOOTSTEP_SAND var/environment_type = "asteroid" var/turf_type = /turf/open/floor/plating/asteroid //Because caves do whacky shit to revert to normal var/floor_variance = 20 //probability floor has a different icon state @@ -298,6 +299,7 @@ icon_state = "snow-ice" icon_plating = "snow-ice" environment_type = "snow_cavern" + footstep = FOOTSTEP_FLOOR /turf/open/floor/plating/asteroid/snow/ice/burn_tile() return FALSE diff --git a/code/game/turfs/simulated/floor/plating/dirt.dm b/code/game/turfs/simulated/floor/plating/dirt.dm index 25778a52248..dc865634f4b 100644 --- a/code/game/turfs/simulated/floor/plating/dirt.dm +++ b/code/game/turfs/simulated/floor/plating/dirt.dm @@ -8,6 +8,7 @@ initial_gas_mix = LAVALAND_DEFAULT_ATMOS planetary_atmos = TRUE attachment_holes = FALSE + footstep = FOOTSTEP_SAND tiled_dirt = FALSE /turf/open/floor/plating/dirt/dark diff --git a/code/game/turfs/simulated/floor/plating/misc_plating.dm b/code/game/turfs/simulated/floor/plating/misc_plating.dm index ebfba4f54c5..f86ab3c03c5 100644 --- a/code/game/turfs/simulated/floor/plating/misc_plating.dm +++ b/code/game/turfs/simulated/floor/plating/misc_plating.dm @@ -46,6 +46,7 @@ initial_gas_mix = LAVALAND_DEFAULT_ATMOS planetary_atmos = TRUE attachment_holes = FALSE + footstep = FOOTSTEP_SAND tiled_dirt = FALSE /turf/open/floor/plating/ashplanet/Initialize() @@ -77,6 +78,7 @@ smooth_icon = 'icons/turf/floors/rocky_ash.dmi' layer = MID_TURF_LAYER canSmoothWith = list(/turf/open/floor/plating/ashplanet/rocky, /turf/closed) + footstep = FOOTSTEP_FLOOR /turf/open/floor/plating/ashplanet/wateryrock gender = PLURAL @@ -84,6 +86,7 @@ smooth = null icon_state = "wateryrock" slowdown = 2 + footstep = FOOTSTEP_FLOOR /turf/open/floor/plating/ashplanet/wateryrock/Initialize() icon_state = "[icon_state][rand(1, 9)]" @@ -96,6 +99,7 @@ flags_1 = NONE attachment_holes = FALSE bullet_bounce_sound = null + footstep = FOOTSTEP_SAND /turf/open/floor/plating/beach/try_replace_tile(obj/item/stack/tile/T, mob/user, params) return @@ -136,6 +140,7 @@ gender = PLURAL name = "iron sand" desc = "Like sand, but more metal." + footstep = FOOTSTEP_SAND /turf/open/floor/plating/ironsand/Initialize() . = ..() @@ -159,6 +164,7 @@ slowdown = 1 attachment_holes = FALSE bullet_sizzle = TRUE + footstep = FOOTSTEP_FLOOR /turf/open/floor/plating/ice/Initialize() . = ..() @@ -195,6 +201,7 @@ temperature = 180 attachment_holes = FALSE planetary_atmos = TRUE + footstep = FOOTSTEP_SAND /turf/open/floor/plating/snowed/cavern initial_gas_mix = "o2=0;n2=82;plasma=24;TEMP=120" diff --git a/code/game/turfs/simulated/floor/reinf_floor.dm b/code/game/turfs/simulated/floor/reinf_floor.dm index 34cea3d1b71..e677de8c5c8 100644 --- a/code/game/turfs/simulated/floor/reinf_floor.dm +++ b/code/game/turfs/simulated/floor/reinf_floor.dm @@ -6,6 +6,7 @@ thermal_conductivity = 0.025 heat_capacity = INFINITY floor_tile = /obj/item/stack/rods + footstep = FOOTSTEP_PLATING tiled_dirt = FALSE /turf/open/floor/engine/examine(mob/user) diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index b6f862cab57..b9e355b1229 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -12,6 +12,8 @@ light_color = LIGHT_COLOR_LAVA bullet_bounce_sound = 'sound/items/welder2.ogg' + footstep = FOOTSTEP_LAVA + /turf/open/lava/ex_act(severity, target) contents_explosion(severity, target) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index 777a9b15fbb..b46dd1d06c9 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -11,3 +11,4 @@ bullet_sizzle = TRUE bullet_bounce_sound = null //needs a splashing sound one day. + footstep = FOOTSTEP_WATER diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm index 0420f86ab3f..8a426b9115f 100644 --- a/code/modules/admin/DB_ban/functions.dm +++ b/code/modules/admin/DB_ban/functions.dm @@ -412,6 +412,12 @@ output += "