diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 7859d735d6..201418eba1 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -41663,7 +41663,7 @@ dir = 4 }, /obj/machinery/atmospherics/pipe/simple/green/visible, -/obj/machinery/atmospherics/pipe/simple/dark/visible{ +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ dir = 4 }, /turf/open/floor/plasteel/white/corner, @@ -44797,7 +44797,7 @@ /area/engine/engineering) "ccy" = ( /obj/machinery/atmospherics/pipe/simple/yellow/visible, -/obj/machinery/atmospherics/pipe/simple/dark/visible{ +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ dir = 4 }, /turf/open/floor/plasteel, @@ -45150,7 +45150,7 @@ "cdB" = ( /obj/machinery/atmospherics/pipe/simple/cyan/visible, /obj/effect/spawner/structure/window/reinforced, -/obj/machinery/atmospherics/pipe/simple/dark/visible{ +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ dir = 4 }, /turf/open/floor/plating, @@ -54054,6 +54054,13 @@ }, /turf/open/floor/wood, /area/crew_quarters/bar) +"emX" = ( +/obj/machinery/atmospherics/pipe/simple/green/visible{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/yellow/visible, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/icemoon/surface/outdoors) "ene" = ( /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 @@ -55773,6 +55780,12 @@ }, /turf/open/floor/plasteel, /area/crew_quarters/fitness/pool) +"iBR" = ( +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ + dir = 6 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/icemoon/surface/outdoors) "iEJ" = ( /obj/machinery/door/airlock/external{ name = "Escape Pod One" @@ -56517,6 +56530,12 @@ /obj/structure/window, /turf/open/floor/wood, /area/crew_quarters/bar) +"krn" = ( +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ + dir = 9 + }, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/icemoon/surface/outdoors) "ksp" = ( /obj/machinery/atmospherics/pipe/simple/orange/visible, /turf/closed/wall, @@ -57370,6 +57389,13 @@ }, /turf/open/floor/plating, /area/maintenance/starboard/fore) +"mAU" = ( +/obj/machinery/atmospherics/pipe/simple/yellow/visible{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/yellow/visible, +/turf/open/floor/plating/asteroid/snow/icemoon, +/area/icemoon/surface/outdoors) "mCy" = ( /obj/machinery/space_heater{ anchored = 1 @@ -97640,14 +97666,14 @@ bFJ bvd bKH bzs -avm -ayF -avm -ayF -avB -ayF -avm -ayF +iBR +avx +mAU +avx +emX +avx +mAU +krn avB awd awe diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 82dc87e465..07f24fd8a3 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -101,8 +101,5 @@ #define TOGGLES_CITADEL 0 -//component stuff -#define COMSIG_VORE_TOGGLED "voremode_toggled" // totally not copypasta - //belly sound pref things #define NORMIE_HEARCHECK 4 diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 6ef8b07ddd..6e9383326e 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -29,38 +29,27 @@ #define EFFECT_DROWSY "drowsy" #define EFFECT_JITTER "jitter" -// /mob/living/combat_flags -#define CAN_TOGGLE_COMBAT_MODE(mob) FORCE_BOOLEAN((mob.stat == CONSCIOUS) && !(mob.combat_flags & COMBAT_FLAG_HARD_STAMCRIT)) - -/// Default combat flags for those affected by ((stamina combat)) +/// Default combat flags for those affected by sprinting (combat mode has been made into its own component) #define COMBAT_FLAGS_DEFAULT NONE -/// Default combat flags for everyone else (so literally everyone but humans) -#define COMBAT_FLAGS_STAMSYSTEM_EXEMPT (COMBAT_FLAG_SPRINT_ACTIVE | COMBAT_FLAG_COMBAT_ACTIVE | COMBAT_FLAG_SPRINT_TOGGLED | COMBAT_FLAG_COMBAT_TOGGLED | COMBAT_FLAG_SPRINT_FORCED | COMBAT_FLAG_COMBAT_FORCED) -/// Default combat flags for those only affected by sprint (so just silicons) -#define COMBAT_FLAGS_STAMEXEMPT_YESSPRINT (COMBAT_FLAG_COMBAT_ACTIVE | COMBAT_FLAG_COMBAT_TOGGLED | COMBAT_FLAG_COMBAT_FORCED) +/// Default combat flags for everyone else (so literally everyone but humans). +#define COMBAT_FLAGS_SPRINT_EXEMPT (COMBAT_FLAG_SPRINT_ACTIVE | COMBAT_FLAG_SPRINT_TOGGLED | COMBAT_FLAG_SPRINT_FORCED) -/// The user wants combat mode on -#define COMBAT_FLAG_COMBAT_TOGGLED (1<<0) /// The user wants sprint mode on -#define COMBAT_FLAG_SPRINT_TOGGLED (1<<1) -/// Combat mode is currently active -#define COMBAT_FLAG_COMBAT_ACTIVE (1<<2) +#define COMBAT_FLAG_SPRINT_TOGGLED (1<<0) /// Sprint is currently active -#define COMBAT_FLAG_SPRINT_ACTIVE (1<<3) +#define COMBAT_FLAG_SPRINT_ACTIVE (1<<1) /// Currently attempting to crawl under someone -#define COMBAT_FLAG_ATTEMPTING_CRAWL (1<<4) +#define COMBAT_FLAG_ATTEMPTING_CRAWL (1<<2) /// Currently stamcritted -#define COMBAT_FLAG_HARD_STAMCRIT (1<<5) +#define COMBAT_FLAG_HARD_STAMCRIT (1<<3) /// Currently attempting to resist up from the ground -#define COMBAT_FLAG_RESISTING_REST (1<<6) +#define COMBAT_FLAG_RESISTING_REST (1<<4) /// Intentionally resting -#define COMBAT_FLAG_INTENTIONALLY_RESTING (1<<7) +#define COMBAT_FLAG_INTENTIONALLY_RESTING (1<<5) /// Currently stamcritted but not as violently -#define COMBAT_FLAG_SOFT_STAMCRIT (1<<8) -/// Force combat mode on at all times, overrides everything including combat disable traits. -#define COMBAT_FLAG_COMBAT_FORCED (1<<9) +#define COMBAT_FLAG_SOFT_STAMCRIT (1<<6) /// Force sprint mode on at all times, overrides everything including sprint disable traits. -#define COMBAT_FLAG_SPRINT_FORCED (1<<10) +#define COMBAT_FLAG_SPRINT_FORCED (1<<7) // Helpers for getting someone's stamcrit state. Cast to living. #define NOT_STAMCRIT 0 diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm index 65e1d0e980..f1548bbe0f 100644 --- a/code/__DEFINES/construction.dm +++ b/code/__DEFINES/construction.dm @@ -69,6 +69,7 @@ #define CAT_WEAPONRY "Weaponry" #define CAT_WEAPON "Weapons" #define CAT_AMMO "Ammunition" +#define CAT_PARTS "Weapon Parts" #define CAT_ROBOT "Robots" #define CAT_MISC "Misc" #define CAT_MISCELLANEOUS "Miscellaneous" diff --git a/code/__DEFINES/dcs/flags.dm b/code/__DEFINES/dcs/flags.dm index 59c0c58b8d..2dbd4874d9 100644 --- a/code/__DEFINES/dcs/flags.dm +++ b/code/__DEFINES/dcs/flags.dm @@ -75,3 +75,11 @@ #define ID_COMPONENT_KNOWLEDGE_NONE 0 /// Has full knowledge #define ID_COMPONENT_KNOWLEDGE_FULL 1 + +// Combat mode flags. +/// The user wants combat mode on +#define COMBAT_MODE_TOGGLED (1<<0) +/// combat mode is active. +#define COMBAT_MODE_ACTIVE (1<<1) +/// combat mode is not active +#define COMBAT_MODE_INACTIVE (1<<2) \ No newline at end of file diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 6c68e7ecad..ea9ebbec02 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -149,7 +149,8 @@ // /mob signals #define COMSIG_MOB_CLICKED_SHIFT_ON "mob_shift_click_on" //from base of /atom/ShiftClick(): (atom/A), for return values, see COMSIG_CLICK_SHIFT -#define COMSIG_MOB_FOV_VIEW "mob_visible_atoms" //from base of mob/fov_view(): (list/visible_atoms) +#define COMSIG_MOB_FOV_VIEW "mob_visible_atoms" //from base of /mob/fov_view(): (list/visible_atoms) +#define COMSIG_MOB_POINTED "mob_pointed" //from base of /mob/verb/pointed(): (atom/A) #define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/A), for return values, see COMSIG_CLICK_SHIFT #define COMPONENT_EXAMINATE_BLIND 3 //outputs the "something is there but you can't see it" message. #define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed) @@ -192,7 +193,12 @@ #define COMSIG_MOB_SPELL_CAN_CAST "mob_spell_can_cast" //from base of /obj/effect/proc_holder/spell/can_cast(): (spell) -#define COMSIG_ROBOT_UPDATE_ICONS "robot_update_icons" //from base of robot/update_icons(): () +// /client signals +#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client) +#define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client) +#define COMSIG_MOB_CLIENT_MOVE "mob_client_move" //sent when client/Move() finishes with no early returns: (client, direction, n, oldloc) +#define COMSIG_MOB_CLIENT_CHANGE_VIEW "mob_client_change_view" //from base of /client/change_view(): (client, old_view, view) +#define COMSIG_MOB_CLIENT_MOUSEMOVE "mob_client_mousemove" //from base of /client/MouseMove(): (object, location, control, params) // /mob/living signals #define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) @@ -204,17 +210,10 @@ #define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: () #define COMSIG_LIVING_REVIVE "living_revive" //from base of mob/living/revive() (full_heal, admin_revive) -#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client) -#define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client) -#define COMSIG_MOB_CLIENT_MOVE "mob_client_move" //sent when client/Move() finishes with no early returns: (client, direction, n, oldloc) -#define COMSIG_MOB_CLIENT_CHANGE_VIEW "mob_client_change_view" //from base of /client/change_view(): (client, old_view, view) - #define COMSIG_MOB_RESET_PERSPECTIVE "mob_reset_perspective" //from base of /mob/reset_perspective(): (atom/target) #define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override) // This returns flags as defined for block in __DEFINES/combat.dm! #define COMSIG_LIVING_RUN_BLOCK "living_do_run_block" //from base of mob/living/do_run_block(): (real_attack, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone) -#define COMSIG_LIVING_COMBAT_ENABLED "combatmode_enabled" //from base of mob/living/enable_combat_mode() (was_forced) -#define COMSIG_LIVING_COMBAT_DISABLED "combatmode_disabled" //from base of mob/living/disable_combat_mode() (was_forced) #define COMSIG_LIVING_GET_BLOCKING_ITEMS "get_blocking_items" //from base of mob/living/get_blocking_items(): (list/items) //ALL OF THESE DO NOT TAKE INTO ACCOUNT WHETHER AMOUNT IS 0 OR LOWER AND ARE SENT REGARDLESS! @@ -232,6 +231,10 @@ #define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity)) #define COMSIG_CARBON_IDENTITY_TRANSFERRED_TO "carbon_id_transferred_to" //from datum/dna/transfer_identity(): (datum/dna, transfer_SE) #define COMSIG_CARBON_TACKLED "carbon_tackled" //sends from tackle.dm on tackle completion + +// /mob/living/silicon signals +#define COMSIG_ROBOT_UPDATE_ICONS "robot_update_icons" //from base of robot/update_icons(): () + // /mob/living/simple_animal/hostile signals #define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget" #define COMPONENT_HOSTILE_NO_ATTACK 1 @@ -342,6 +345,14 @@ //NTnet #define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata)) +//Combat mode +#define COMSIG_TOGGLE_COMBAT_MODE "toggle_combat_mode" //safely toggles combat mode. +#define COMSIG_DISABLE_COMBAT_MODE "disable_combat_mode" //safely disables combat mode. +#define COMSIG_ENABLE_COMBAT_MODE "enable_combat_mode" //safely enables combat mode. +#define COMSIG_LIVING_COMBAT_ENABLED "combatmode_enabled" //from base of datum/component/combat_mode/enable_combat_mode() (was_forced) +#define COMSIG_LIVING_COMBAT_DISABLED "combatmode_disabled" //from base of datum/component/combat_mode/disable_combat_mode() (was_forced) +#define COMSIG_COMBAT_MODE_CHECK "combatmode_check" //called when checking the combat mode flags (enabled/disabled/forced) + //Nanites #define COMSIG_HAS_NANITES "has_nanites" //() returns TRUE if nanites are found #define COMSIG_NANITE_IS_STEALTHY "nanite_is_stealthy" //() returns TRUE if nanites have stealth diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 9facaf5d70..abc0507bf4 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -74,8 +74,10 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define FLYING (1<<1) #define VENTCRAWLING (1<<2) #define FLOATING (1<<3) -#define UNSTOPPABLE (1<<4) //When moving, will Bump()/Cross()/Uncross() everything, but won't be stopped. -#define CRAWLING (1<<5) //Applied if you're crawling around on the ground/resting. +///When moving, will Bump()/Cross()/Uncross() everything, but won't be stopped. +#define UNSTOPPABLE (1<<4) +///Applied if you're crawling around on the ground/resting. +#define CRAWLING (1<<5) //Fire and Acid stuff, for resistance_flags #define LAVA_PROOF (1<<0) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 9847556b37..a39ebf36ba 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -30,31 +30,32 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s //Human Overlays Indexes///////// //LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS -#define MUTATIONS_LAYER 32 //mutations. Tk headglows, cold resistance glow, etc -#define GENITALS_BEHIND_LAYER 31 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer -#define BODY_BEHIND_LAYER 30 //certain mutantrace features (tail when looking south) that must appear behind the body parts -#define BODYPARTS_LAYER 29 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag -#define MARKING_LAYER 28 //Matrixed body markings because clashing with snouts? -#define BODY_ADJ_LAYER 27 //certain mutantrace features (snout, body markings) that must appear above the body parts -#define GENITALS_FRONT_LAYER 26 //Draws some genitalia above clothes and the TAUR body if need be. -#define BODY_LAYER 25 //underwear, undershirts, socks, eyes, lips(makeup) -#define BODY_ADJ_UPPER_LAYER 24 -#define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) -#define DAMAGE_LAYER 22 //damage indicators (cuts and burns) -#define UNIFORM_LAYER 21 -#define ID_LAYER 20 -#define HANDS_PART_LAYER 19 -#define SHOES_LAYER 18 -#define GLOVES_LAYER 17 -#define EARS_LAYER 16 -#define SUIT_LAYER 15 -#define GENITALS_EXPOSED_LAYER 14 -#define GLASSES_LAYER 13 -#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 11 -#define NECK_LAYER 10 -#define BACK_LAYER 9 -#define HAIR_LAYER 8 //TODO: make part of head layer? +#define MUTATIONS_LAYER 33 //mutations. Tk headglows, cold resistance glow, etc +#define GENITALS_BEHIND_LAYER 32 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer +#define BODY_BEHIND_LAYER 31 //certain mutantrace features (tail when looking south) that must appear behind the body parts +#define BODYPARTS_LAYER 30 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag +#define MARKING_LAYER 29 //Matrixed body markings because clashing with snouts? +#define BODY_ADJ_LAYER 28 //certain mutantrace features (snout, body markings) that must appear above the body parts +#define GENITALS_FRONT_LAYER 27 //Draws some genitalia above clothes and the TAUR body if need be. +#define BODY_LAYER 26 //underwear, undershirts, socks, eyes, lips(makeup) +#define BODY_ADJ_UPPER_LAYER 25 +#define FRONT_MUTATIONS_LAYER 24 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes) +#define DAMAGE_LAYER 23 //damage indicators (cuts and burns) +#define UNIFORM_LAYER 22 +#define ID_LAYER 21 +#define HANDS_PART_LAYER 20 +#define SHOES_LAYER 19 +#define GLOVES_LAYER 18 +#define EARS_LAYER 17 +#define SUIT_LAYER 16 +#define GENITALS_EXPOSED_LAYER 15 +#define GLASSES_LAYER 14 +#define BELT_LAYER 13 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 12 +#define NECK_LAYER 11 +#define BACK_LAYER 10 +#define HAIR_LAYER 9 //TODO: make part of head layer? +#define HORNS_LAYER 8 #define FACEMASK_LAYER 7 #define HEAD_LAYER 6 #define HANDCUFF_LAYER 5 @@ -62,7 +63,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s #define HANDS_LAYER 3 #define BODY_FRONT_LAYER 2 #define FIRE_LAYER 1 //If you're on fire -#define TOTAL_LAYERS 32 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; +#define TOTAL_LAYERS 33 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; //Human Overlay Index Shortcuts for alternate_worn_layer, layers //Because I *KNOW* somebody will think layer+1 means "above" diff --git a/code/__DEFINES/storage/volumetrics.dm b/code/__DEFINES/storage/volumetrics.dm index 62eaa226c4..d5da40a722 100644 --- a/code/__DEFINES/storage/volumetrics.dm +++ b/code/__DEFINES/storage/volumetrics.dm @@ -36,4 +36,5 @@ GLOBAL_LIST_INIT(default_weight_class_to_volume, list( #define STORAGE_VOLUME_BACKPACK (DEFAULT_VOLUME_NORMAL * 7) #define STORAGE_VOLUME_DUFFLEBAG (DEFAULT_VOLUME_NORMAL * 10) #define STORAGE_VOLUME_BAG_OF_HOLDING (DEFAULT_VOLUME_NORMAL * 20) - +#define STORAGE_VOLUME_CHEMISTRY_BAG (DEFAULT_VOLUME_TINY * 50) +#define STORAGE_VOLUME_PILL_BOTTLE (DEFAULT_VOLUME_TINY * 7) diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index e164a4ec96..7c0811ec59 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,253 +1,343 @@ -//tgstation-server DMAPI +// tgstation-server DMAPI -#define TGS_DMAPI_VERSION "5.1.1" +#define TGS_DMAPI_VERSION "5.2.1" -//All functions and datums outside this document are subject to change with any version and should not be relied on +// All functions and datums outside this document are subject to change with any version and should not be relied on. -//CONFIGURATION +// CONFIGURATION -//create this define if you want to do configuration outside of this file +/// Create this define if you want to do TGS configuration outside of this file. #ifndef TGS_EXTERNAL_CONFIGURATION -//Comment this out once you've filled in the below +// Comment this out once you've filled in the below. #error TGS API unconfigured -//Uncomment this if you wish to allow the game to interact with TGS 3 -//This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()() +// Uncomment this if you wish to allow the game to interact with TGS 3. +// This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()() //#define TGS_V3_API -//Required interfaces (fill in with your codebase equivalent): +// Required interfaces (fill in with your codebase equivalent): -//create a global variable named `Name` and set it to `Value` +/// Create a global variable named `Name` and set it to `Value`. #define TGS_DEFINE_AND_SET_GLOBAL(Name, Value) -//Read the value in the global variable `Name` +/// Read the value in the global variable `Name`. #define TGS_READ_GLOBAL(Name) -//Set the value in the global variable `Name` to `Value` +/// Set the value in the global variable `Name` to `Value`. #define TGS_WRITE_GLOBAL(Name, Value) -//Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game use of DD -> TGS capabilities +/// Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game use of DD -> TGS capabilities. #define TGS_PROTECT_DATUM(Path) -//Display an announcement `message` from the server to all players +/// Display an announcement `message` from the server to all players. #define TGS_WORLD_ANNOUNCE(message) -//Notify current in-game administrators of a string `event` +/// Notify current in-game administrators of a string `event`. #define TGS_NOTIFY_ADMINS(event) -//Write an info `message` to a server log +/// Write an info `message` to a server log. #define TGS_INFO_LOG(message) -//Write an warning `message` to a server log +/// Write an warning `message` to a server log. #define TGS_WARNING_LOG(message) -//Write an error `message` to a server log +/// Write an error `message` to a server log. #define TGS_ERROR_LOG(message) -//Get the number of connected /clients +/// Get the number of connected /clients. #define TGS_CLIENT_COUNT #endif -//EVENT CODES +// EVENT CODES -#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //Before a reboot mode change, extras parameters are the current and new reboot mode enums -#define TGS_EVENT_PORT_SWAP -2 //Before a port change is about to happen, extra parameters is new port -#define TGS_EVENT_INSTANCE_RENAMED -3 //Before the instance is renamed, extra parameter is the new name -#define TGS_EVENT_WATCHDOG_REATTACH -4 //After the watchdog reattaches to DD, extra parameter is the new /datum/tgs_version of the server +/// Before a reboot mode change, extras parameters are the current and new reboot mode enums +#define TGS_EVENT_REBOOT_MODE_CHANGE -1 +/// Before a port change is about to happen, extra parameters is new port +#define TGS_EVENT_PORT_SWAP -2 +/// Before the instance is renamed, extra parameter is the new name +#define TGS_EVENT_INSTANCE_RENAMED -3 +/// After the watchdog reattaches to DD, extra parameter is the new [/datum/tgs_version] of the server +#define TGS_EVENT_WATCHDOG_REATTACH -4 -//See the descriptions for the parameters of these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs +/// When the repository is reset to its origin reference. Parameters: Reference name, Commit SHA #define TGS_EVENT_REPO_RESET_ORIGIN 0 +/// When the repository performs a checkout. Parameters: Checkout git object #define TGS_EVENT_REPO_CHECKOUT 1 +/// When the repository performs a fetch operation. No parameters #define TGS_EVENT_REPO_FETCH 2 +/// When the repository merges a pull request. Parameters: PR Number, PR Sha, (Nullable) Comment made by TGS user #define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3 +/// Before the repository makes a sychronize operation. Parameters: Absolute repostiory path #define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4 +/// Before a BYOND install operation begins. Parameters: [/datum/tgs_version] of the installing BYOND #define TGS_EVENT_BYOND_INSTALL_START 5 +/// When a BYOND install operation fails. Parameters: Error message #define TGS_EVENT_BYOND_INSTALL_FAIL 6 +/// When the active BYOND version changes. Parameters: (Nullable) [/datum/tgs_version] of the current BYOND, [/datum/tgs_version] of the new BYOND #define TGS_EVENT_BYOND_ACTIVE_VERSION_CHANGE 7 +/// When the compiler starts running. Parameters: Game directory path, origin commit SHA #define TGS_EVENT_COMPILE_START 8 +/// When a compile is cancelled. No parameters #define TGS_EVENT_COMPILE_CANCELLED 9 +/// When a compile fails. Parameters: Game directory path, [TRUE]/[FALSE] based on if the cause for failure was DMAPI validation #define TGS_EVENT_COMPILE_FAILURE 10 -#define TGS_EVENT_COMPILE_COMPLETE 11 // Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the TGS_EVENT_DEPLOYMENT_COMPLETE instead +/// When a compile operation completes. Note, this event fires before the new .dmb is loaded into the watchdog. Consider using the [TGS_EVENT_DEPLOYMENT_COMPLETE] instead. Parameters: Game directory path +#define TGS_EVENT_COMPILE_COMPLETE 11 +/// When an automatic update for the current instance begins. No parameters #define TGS_EVENT_INSTANCE_AUTO_UPDATE_START 12 +/// When the repository encounters a merge conflict: Parameters: Base SHA, target SHA, base reference, target reference #define TGS_EVENT_REPO_MERGE_CONFLICT 13 +/// When a deployment completes. No Parameters #define TGS_EVENT_DEPLOYMENT_COMPLETE 14 +/// Before the watchdog shuts down. Not sent for graceful shutdowns. No parameters. #define TGS_EVENT_WATCHDOG_SHUTDOWN 15 +/// Before the watchdog detaches for a TGS update/restart. No parameters. #define TGS_EVENT_WATCHDOG_DETACH 16 -//OTHER ENUMS +// OTHER ENUMS +/// The server will reboot normally. #define TGS_REBOOT_MODE_NORMAL 0 +/// The server will stop running on reboot. #define TGS_REBOOT_MODE_SHUTDOWN 1 +/// The watchdog will restart on reboot. #define TGS_REBOOT_MODE_RESTART 2 +/// DreamDaemon Trusted security level. #define TGS_SECURITY_TRUSTED 0 +/// DreamDaemon Safe security level. #define TGS_SECURITY_SAFE 1 +/// DreamDaemon Ultrasafe security level. #define TGS_SECURITY_ULTRASAFE 2 //REQUIRED HOOKS -//Call this somewhere in /world/New() that is always run -//IMPORTANT: This function may sleep! -//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels -//minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated +/** + * Call this somewhere in [/world/proc/New] that is always run. This function may sleep! + * + * * event_handler - Optional user defined [/datum/tgs_event_handler]. + * * minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated. Can be one of [TGS_SECURITY_ULTRASAFE], [TGS_SECURITY_SAFE], or [TGS_SECURITY_TRUSTED]. + */ /world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE) return -//Call this when your initializations are complete and your game is ready to play before any player interactions happen -//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running -//Most importantly, before this point, note that any static files or directories may be in use by another server. Your code should account for this -//This function should not be called before ..() in /world/New() +/** + * Call this when your initializations are complete and your game is ready to play before any player interactions happen. + * + * This may use [/world/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running. + * Before this point, note that any static files or directories may be in use by another server. Your code should account for this. + * This function should not be called before ..() in [/world/proc/New]. + */ /world/proc/TgsInitializationComplete() return -//Put this at the start of /world/Topic() +/// Put this at the start of [/world/proc/Topic]. #define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return -//Call this at the beginning of world/Reboot(reason) +/** + * Call this at the beginning of [world/proc/Reboot]. + */ /world/proc/TgsReboot() return -//DATUM DEFINITIONS -//unless otherwise specified all datums defined here should be considered read-only, warranty void if written +// DATUM DEFINITIONS +// All datums defined here should be considered read-only -//represents git revision information about the current world build +/// Represents git revision information. /datum/tgs_revision_information - var/commit //full sha of compiled commit - var/origin_commit //full sha of last known remote commit. This may be null if the TGS repository is not currently tracking a remote branch + /// Full SHA of the commit. + var/commit + /// Full sha of last known remote commit. This may be null if the TGS repository is not currently tracking a remote branch. + var/origin_commit -//represents a version of tgstation-server +/// Represents a version. /datum/tgs_version - var/suite //The suite/major version, can be >=3 + /// The suite/major version number + var/suite - //this group of variables can be null to represent a wild card - var/minor //The minor version - var/patch //The patch version - var/deprecated_patch //The legacy version + // This group of variables can be null to represent a wild card + /// The minor version number. null for wildcards + var/minor + /// The patch version number. null for wildcards + var/patch - var/raw_parameter //The unparsed parameter - var/deprefixed_parameter //The version only bit of raw_parameter + /// Legacy version number. Generally null + var/deprecated_patch -//if the tgs_version is a wildcard version + /// Unparsed string value + var/raw_parameter + /// String value minus prefix + var/deprefixed_parameter + +/** + * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards. + */ /datum/tgs_version/proc/Wildcard() return -//if the tgs_version equals some other_version +/** + * Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] equals some other version. + * + * other_version - The [/datum/tgs_version] to compare against. + */ /datum/tgs_version/proc/Equals(datum/tgs_version/other_version) return -//represents a merge of a GitHub pull request +/// Represents a merge of a GitHub pull request. /datum/tgs_revision_information/test_merge - var/number //pull request number - var/title //pull request title - var/body //pull request body - var/author //pull request github author - var/url //link to pull request html - var/pull_request_commit //commit of the pull request when it was merged - var/time_merged //timestamp of when the merge commit for the pull request was created - var/comment //optional comment left by the one who initiated the test merge + /// The pull request number. + var/number + /// The pull request title when it was merged. + var/title + /// The pull request body when it was merged. + var/body + /// The GitHub username of the pull request's author. + var/author + /// An http URL to the pull request. + var/url + /// The SHA of the pull request when that was merged. + var/pull_request_commit + /// ISO 8601 timestamp of when the pull request was merged. + var/time_merged + /// (Nullable) Comment left by the TGS user who initiated the merge.. + var/comment -//represents a connected chat channel +/// Represents a connected chat channel. /datum/tgs_chat_channel - var/id //internal channel representation - var/friendly_name //user friendly channel name - var/connection_name //the name of the configured chat connection - var/is_admin_channel //if the server operator has marked this channel for game admins only - var/is_private_channel //if this is a private chat channel - var/custom_tag //user defined string associated with channel + /// TGS internal channel ID. + var/id + /// User friendly name of the channel. + var/friendly_name + /// Name of the chat connection. This is the IRC server address or the Discord guild. + var/connection_name + /// [TRUE]/[FALSE] based on if the server operator has marked this channel for game admins only. + var/is_admin_channel + /// [TRUE]/[FALSE] if the channel is a private message channel for a [/datum/tgs_chat_user]. + var/is_private_channel + /// Tag string associated with the channel in TGS + var/custom_tag -//represents a chat user +// Represents a chat user /datum/tgs_chat_user - var/id //Internal user representation, requires channel to be unique - var/friendly_name //The user's public name - var/mention //The text to use to ping this user in a message - var/datum/tgs_chat_channel/channel //The /datum/tgs_chat_channel this user was from + /// TGS internal user ID. + var/id + // The user's display name. + var/friendly_name + // The string to use to ping this user in a message. + var/mention + /// The [/datum/tgs_chat_channel] the user was from + var/datum/tgs_chat_channel/channel -//user definable callback for handling events -//extra parameters may be specified depending on the event +/** + * User definable callback for handling TGS events. + * + * event_code - One of the TGS_EVENT_ defines. Extra parameters will be documented in each + */ /datum/tgs_event_handler/proc/HandleEvent(event_code, ...) set waitfor = FALSE return -//user definable chat command +/// User definable chat command /datum/tgs_chat_command - var/name = "" //the string to trigger this command on a chat bot. e.g. TGS3_BOT: do_this_command - var/help_text = "" //help text for this command - var/admin_only = FALSE //set to TRUE if this command should only be usable by registered chat admins + /// The string to trigger this command on a chat bot. e.g `@bot name ...` or `!tgs name ...` + var/name = "" + /// The help text displayed for this command + var/help_text = "" + /// If this command should be available to game administrators only + var/admin_only = FALSE -//override to implement command -//sender: The tgs_chat_user who send to command -//params: The trimmed string following the command name -//The return value will be stringified and sent to the appropriate chat +/** + * Process command activation. Should return a string to respond to the issuer with. + * + * sender - The [/datum/tgs_chat_user] who issued the command. + * params - The trimmed string following the command `/datum/tgs_chat_command/var/name]. + */ /datum/tgs_chat_command/proc/Run(datum/tgs_chat_user/sender, params) CRASH("[type] has no implementation for Run()") -//FUNCTIONS +// API FUNCTIONS -//Returns the respective supported /datum/tgs_version of the API +/// Returns the maximum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMaximumAPIVersion() return +/// Returns the minimum supported [/datum/tgs_version] of the DMAPI. /world/proc/TgsMinimumAPIVersion() return -//Returns TRUE if the world was launched under the server tools and the API matches, FALSE otherwise -//No function below this succeeds if it returns FALSE or if TgsNew() has yet to be called +/** + * Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise. + */ /world/proc/TgsAvailable() return -//Forces a hard reboot of BYOND by ending the process -//unlike del(world) clients will try to reconnect -//If the service has not requested a shutdown, the next server will take over +// No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called. + +/** + * Forces a hard reboot of DreamDaemon by ending the process. + * + * Unlike del(world) clients will try to reconnect. + * If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again + */ /world/proc/TgsEndProcess() return -//Send a message to non-admin connected chats -//message: The message to send -//admin_only: If TRUE, message will instead be sent to only admin connected chats -/world/proc/TgsTargetedChatBroadcast(message, admin_only) +/** + * Send a message to connected chats. + * + * message - The string to send. + * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. + */ +/world/proc/TgsTargetedChatBroadcast(message, admin_only = FALSE) return -//Send a private message to a specific user -//message: The message to send -//user: The /datum/tgs_chat_user to send to +/** + * Send a private message to a specific user. + * + * message - The string to send. + * user: The [/datum/tgs_chat_user] to PM. + */ /world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user) return -//The following functions will sleep if a call to TgsNew() is sleeping +// The following functions will sleep if a call to TgsNew() is sleeping -//Sends a message to connected game chats -//message: The message to send -//channels: optional channels to limit the broadcast to -/world/proc/TgsChatBroadcast(message, list/channels) +/** + * Send a message to connected chats that are flagged as game-related in TGS. + * + * message - The string to send. + * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. + */ +/world/proc/TgsChatBroadcast(message, list/channels = null) return -//Gets the current /datum/tgs_version of the server tools running the server +/// Returns the current [/datum/tgs_version] of TGS if it is running the server, null otherwise. /world/proc/TgsVersion() return -//Gets the current /datum/tgs_version of the DMAPI being used +/// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. /world/proc/TgsApiVersion() return -//Gets the name of the TGS instance running the game +/// Returns the name of the TGS instance running the game if TGS is present, null otherwise. /world/proc/TgsInstanceName() return -//Get the current `/datum/tgs_revision_information` +/// Return the current [/datum/tgs_revision_information] of the running server if TGS is present, null otherwise. /world/proc/TgsRevision() return -//Get the current BYOND security level +/// Returns the current BYOND security level as a TGS_SECURITY_ define if TGS is present, null otherwise. /world/proc/TgsSecurityLevel() return -//Gets a list of active `/datum/tgs_revision_information/test_merge`s +/// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. /world/proc/TgsTestMerges() return -//Gets a list of connected tgs_chat_channel +/// Returns a list of connected [/datum/tgs_chat_channel]s if TGS is present, null otherwise. /world/proc/TgsChatChannelInfo() return diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 919c4c879f..508b737474 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -15,6 +15,8 @@ var/textb = copytext(HTMLstring, 6, 8) return rgb(255 - hex2num(textr), 255 - hex2num(textg), 255 - hex2num(textb)) +//Better performant than an artisanal proc and more reliable than Turn(). From TGMC. +#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) ) //Returns location. Returns null if no location was found. /proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = FALSE, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0) /* diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 1aab96f85e..e038596151 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -242,15 +242,14 @@ GLOBAL_LIST_INIT(bitfields, list( "MOBILITY_RESIST" = MOBILITY_RESIST ), "combat_flags" = list( - "COMBAT_FLAG_COMBAT_TOGGLED" = COMBAT_FLAG_COMBAT_TOGGLED, "COMBAT_FLAG_SPRINT_TOGGLED" = COMBAT_FLAG_SPRINT_TOGGLED, - "COMBAT_FLAG_COMBAT_ACTIVE" = COMBAT_FLAG_COMBAT_ACTIVE, "COMBAT_FLAG_SPRINT_ACTIVE" = COMBAT_FLAG_SPRINT_ACTIVE, "COMBAT_FLAG_ATTEMPTING_CRAWL" = COMBAT_FLAG_ATTEMPTING_CRAWL, "COMBAT_FLAG_HARD_STAMCRIT" = COMBAT_FLAG_HARD_STAMCRIT, "COMBAT_FLAG_SOFT_STAMCRIT" = COMBAT_FLAG_SOFT_STAMCRIT, "COMBAT_FLAG_INTENTIONALLY_RESTING" = COMBAT_FLAG_INTENTIONALLY_RESTING, - "COMBAT_FLAG_RESISTING_REST" = COMBAT_FLAG_RESISTING_REST + "COMBAT_FLAG_RESISTING_REST" = COMBAT_FLAG_RESISTING_REST, + "COMBAT_FLAG_SPRINT_FORCED" = COMBAT_FLAG_SPRINT_FORCED ), "shield_flags" = list( "SHIELD_TRANSPARENT" = SHIELD_TRANSPARENT, diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 632904202d..30321f5546 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -89,7 +89,7 @@ GLOBAL_LIST_INIT(maintenance_loot, list( /obj/effect/spawner/lootdrop/welder_tools = 3, /obj/effect/spawner/lootdrop/low_tools = 5, /obj/item/relic = 3, - /obj/item/weaponcrafting/receiver = 2, + /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 2, /obj/item/clothing/head/cone = 2, /obj/item/grenade/smokebomb = 2, /obj/item/geiger_counter = 3, diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index 9638b040f9..8e2e0c3fb5 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -24,16 +24,6 @@ return -/client - var/list/atom/selected_target[2] - var/obj/item/active_mousedown_item = null - var/mouseParams = "" - var/mouseLocation = null - var/mouseObject = null - var/mouseControlObject = null - var/middragtime = 0 - var/atom/middragatom - /client/MouseDown(object, location, control, params) if (mouse_down_icon) mouse_pointer_icon = mouse_down_icon @@ -84,12 +74,6 @@ /obj/item/proc/onMouseUp(object, location, params, mob) return -/obj/item - var/canMouseDown = FALSE - -/obj/item/gun - var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds - /obj/item/gun/CanItemAutoclick(object, location, params) . = automatic @@ -108,16 +92,10 @@ mouseLocation = location mouseObject = object mouseControlObject = control - if(mob && LAZYLEN(mob.mousemove_intercept_objects)) - for(var/datum/D in mob.mousemove_intercept_objects) - D.onMouseMove(object, location, control, params) - if(!show_popup_menus && mob) //CIT CHANGE - passes onmousemove() to mobs - mob.onMouseMove(object, location, control, params) //CIT CHANGE - ditto + if(mob) + SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOUSEMOVE, object, location, control, params) ..() -/datum/proc/onMouseMove(object, location, control, params) - return - /client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params) var/list/L = params2list(params) if (L["middle"]) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 7c116cc606..3cedd92255 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -642,9 +642,6 @@ so as to remain in compliance with the most up-to-date laws." mymob.client.screen |= alert return 1 -/mob - var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly - /obj/screen/alert/Click(location, control, params) if(!usr || !usr.client) return diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 3cfa71e19d..d82f3e7cf5 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -1,7 +1,3 @@ - -/mob - var/list/screens = list() - /mob/proc/overlay_fullscreen(category, type, severity) var/obj/screen/fullscreen/screen = screens[category] if (!screen || screen.type != type) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index f054cb0c8e..57335a966e 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -114,8 +114,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list( return ..() -/mob - var/hud_type = /datum/hud /mob/proc/create_mob_hud() if(!client || hud_used) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index f281853b0f..9380cf98aa 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -246,13 +246,6 @@ using.screen_loc = ui_pull_resist using.hud = src static_inventory += using - - //CIT CHANGES - combat mode buttons - using = new /obj/screen/combattoggle() - using.icon = tg_ui_icon_to_cit_ui(ui_style) - using.screen_loc = ui_combat_toggle - using.hud = src - static_inventory += using //END OF CIT CHANGES using = new /obj/screen/human/toggle() diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index 25a49c8d6b..d8ef1c525a 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -1,16 +1,4 @@ -/client - var/list/parallax_layers - var/list/parallax_layers_cached - var/atom/movable/movingmob - var/turf/previous_turf - var/dont_animate_parallax //world.time of when we can state animate()ing parallax again - var/last_parallax_shift //world.time of last update - var/parallax_throttle = 0 //ds between updates - var/parallax_movedir = 0 - var/parallax_layers_max = 3 - var/parallax_animate_timer - /datum/hud/proc/create_parallax(mob/viewmob) var/mob/screenmob = viewmob || mymob var/client/C = screenmob.client diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 3ad0219391..e2c160503c 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -113,7 +113,7 @@ /obj/attacked_by(obj/item/I, mob/living/user) var/totitemdamage = I.force var/bad_trait - if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && iscarbon(user)) + if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) totitemdamage *= 0.5 bad_trait = SKILL_COMBAT_MODE //blacklist combat skills. if(I.used_skills && user.mind) @@ -155,9 +155,11 @@ /mob/living/proc/pre_attacked_by(obj/item/I, mob/living/user) . = I.force var/bad_trait - if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && iscarbon(user)) + if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) . *= 0.5 bad_trait = SKILL_COMBAT_MODE //blacklist combat skills. + if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) + . *= 1.5 if(!CHECK_MOBILITY(user, MOBILITY_STAND)) . *= 0.5 if(!user.mind || !I.used_skills) @@ -169,10 +171,6 @@ continue user.mind.auto_gain_experience(skill, I.skill_gain) -/mob/living/carbon/pre_attacked_by(obj/item/I, mob/living/user) - . = ..() - if(!(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) - . *= 1.5 // Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person. // Click parameters is the params string from byond Click() code, see that documentation. @@ -212,7 +210,7 @@ if(!user) return var/bad_trait - if(iscarbon(user) && !(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) + if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) . *= STAM_COST_NO_COMBAT_MULT bad_trait = SKILL_COMBAT_MODE if(used_skills && user.mind) diff --git a/code/datums/action.dm b/code/datums/action.dm index 00e7e0ad5d..0033df09d7 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -731,14 +731,6 @@ if(next_use_time > world.time) START_PROCESSING(SSfastprocess, src) - -//Stickmemes -/datum/action/item_action/stickmen - name = "Summon Stick Minions" - desc = "Allows you to summon faithful stickmen allies to aide you in battle." - icon_icon = 'icons/mob/actions/actions_minor_antag.dmi' - button_icon_state = "art_summon" - //surf_ss13 /datum/action/item_action/bhop name = "Activate Jump Boots" diff --git a/code/datums/components/combat_mode.dm b/code/datums/components/combat_mode.dm new file mode 100644 index 0000000000..b53d407162 --- /dev/null +++ b/code/datums/components/combat_mode.dm @@ -0,0 +1,217 @@ +/** + * Combat mode component. It makes the user face whichever atom the mouse pointer is hovering, + * amongst other things designed outside of this file, namely PvP and PvE stuff, hence the name. + * Can be toggled on and off by clicking the screen hud object or by pressing the assigned hotkey (default 'C') + */ +/datum/component/combat_mode + var/mode_flags = COMBAT_MODE_INACTIVE + var/combatmessagecooldown + var/lastmousedir + var/obj/screen/combattoggle/hud_icon + var/hud_loc + +/datum/component/combat_mode/Initialize(hud_loc = ui_combat_toggle) + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + var/mob/living/L = parent + + src.hud_loc = hud_loc + + RegisterSignal(L, SIGNAL_TRAIT(TRAIT_COMBAT_MODE_LOCKED), .proc/update_combat_lock) + RegisterSignal(L, COMSIG_TOGGLE_COMBAT_MODE, .proc/user_toggle_intentional_combat_mode) + RegisterSignal(L, COMSIG_DISABLE_COMBAT_MODE, .proc/safe_disable_combat_mode) + RegisterSignal(L, COMSIG_ENABLE_COMBAT_MODE, .proc/safe_enable_combat_mode) + RegisterSignal(L, COMSIG_MOB_DEATH, .proc/on_death) + RegisterSignal(L, COMSIG_MOB_CLIENT_LOGOUT, .proc/on_logout) + RegisterSignal(L, COMSIG_MOB_HUD_CREATED, .proc/on_mob_hud_created) + RegisterSignal(L, COMSIG_COMBAT_MODE_CHECK, .proc/check_flags) + + update_combat_lock() + + if(L.client) + on_mob_hud_created(L) + +/datum/component/combat_mode/Destroy() + if(parent) + safe_disable_combat_mode(parent) + if(hud_icon) + QDEL_NULL(hud_icon) + return ..() + +/// Creates the hud screen object. +/datum/component/combat_mode/proc/on_mob_hud_created(mob/source) + hud_icon = new + hud_icon.hud = source.hud_used + hud_icon.icon = tg_ui_icon_to_cit_ui(source.hud_used.ui_style) + hud_icon.screen_loc = hud_loc + source.hud_used.static_inventory += hud_icon + hud_icon.update_icon() + +/// Combat mode can be locked out, forcibly disabled by a status trait. +/datum/component/combat_mode/proc/update_combat_lock() + var/locked = HAS_TRAIT(parent, TRAIT_COMBAT_MODE_LOCKED) + var/desired = (mode_flags & COMBAT_MODE_TOGGLED) + var/actual = (mode_flags & COMBAT_MODE_ACTIVE) + if(actual) + if(locked) + disable_combat_mode(parent, FALSE, TRUE) + else if(!desired) + disable_combat_mode(parent, TRUE, TRUE) + else + if(desired && !locked) + enable_combat_mode(parent, FALSE, TRUE) + +/// Enables combat mode. Please use 'safe_enable_combat_mode' instead, if you wish to also enable the toggle flag. +/datum/component/combat_mode/proc/enable_combat_mode(mob/living/source, silent = TRUE, forced = TRUE, visible = FALSE, locked = FALSE, playsound = FALSE) + if(locked) + if(hud_icon) + hud_icon.combat_on = TRUE + hud_icon.update_icon() + return + if(mode_flags & COMBAT_MODE_ACTIVE) + return + mode_flags |= COMBAT_MODE_ACTIVE + mode_flags &= ~COMBAT_MODE_INACTIVE + SEND_SIGNAL(source, COMSIG_LIVING_COMBAT_ENABLED, forced) + if(!silent) + var/self_message = forced? "Your muscles reflexively tighten!" : "You drop into a combative stance!" + if(visible && (forced || world.time >= combatmessagecooldown)) + combatmessagecooldown = world.time + 10 SECONDS + if(!forced) + if(source.a_intent != INTENT_HELP) + source.visible_message("[source] [source.resting ? "tenses up" : "drops into a combative stance"].", self_message) + else + source.visible_message("[source] [pick("looks","seems","goes")] [pick("alert","attentive","vigilant")].") + else + source.visible_message("[source] drops into a combative stance!", self_message) + else + to_chat(source, self_message) + if(playsound) + source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! + RegisterSignal(source, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove) + RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move) + RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move) + if(hud_icon) + hud_icon.combat_on = TRUE + hud_icon.update_icon() + +/// Disables combat mode. Please use 'safe_disable_combat_mode' instead, if you wish to also disable the toggle flag. +/datum/component/combat_mode/proc/disable_combat_mode(mob/living/source, silent = TRUE, forced = TRUE, visible = FALSE, locked = FALSE, playsound = FALSE) + if(locked) + if(hud_icon) + hud_icon.combat_on = FALSE + hud_icon.update_icon() + return + if(!(mode_flags & COMBAT_MODE_ACTIVE)) + return + mode_flags &= ~COMBAT_MODE_ACTIVE + mode_flags |= COMBAT_MODE_INACTIVE + SEND_SIGNAL(source, COMSIG_LIVING_COMBAT_DISABLED, forced) + if(!silent) + var/self_message = forced? "Your muscles are forcibly relaxed!" : "You relax your stance." + if(visible) + source.visible_message("[source] relaxes [source.p_their()] stance.", self_message) + else + to_chat(source, self_message) + if(playsound) + source.playsound_local(source, 'sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the toggleon sound! + UnregisterSignal(source, list(COMSIG_MOB_CLIENT_MOUSEMOVE, COMSIG_MOVABLE_MOVED, COMSIG_MOB_CLIENT_MOVE)) + if(hud_icon) + hud_icon.combat_on = FALSE + hud_icon.update_icon() + +///Changes the user direction to (try) keep match the pointer. +/datum/component/combat_mode/proc/on_move(atom/movable/source, dir, atom/oldloc, forced) + var/mob/living/L = source + if(mode_flags & COMBAT_MODE_ACTIVE && L.client && lastmousedir && lastmousedir != dir) + L.setDir(lastmousedir, ismousemovement = TRUE) + +/// Added movement delay if moving backward. +/datum/component/combat_mode/proc/on_client_move(mob/source, client/client, direction, n, oldloc, added_delay) + if(oldloc != n && direction == REVERSE_DIR(source.dir)) + client.move_delay += added_delay*0.5 + +///Changes the user direction to (try) match the pointer. +/datum/component/combat_mode/proc/onMouseMove(mob/source, object, location, control, params) + if(source.client.show_popup_menus) + return + source.face_atom(object, TRUE) + lastmousedir = source.dir + +/// Toggles whether the user is intentionally in combat mode. THIS should be the proc you generally use! Has built in visual/to other player feedback, as well as an audible cue to ourselves. +/datum/component/combat_mode/proc/user_toggle_intentional_combat_mode(mob/living/source) + if(mode_flags & COMBAT_MODE_TOGGLED) + safe_disable_combat_mode(source) + else if(source.stat == CONSCIOUS && !(source.combat_flags & COMBAT_FLAG_HARD_STAMCRIT)) + safe_enable_combat_mode(source) + +/// Enables intentionally being in combat mode. Please try to use the COMSIG_COMBAT_MODE_CHECK signal for feedback when possible. +/datum/component/combat_mode/proc/safe_enable_combat_mode(mob/living/source, silent = FALSE, visible = TRUE) + if((mode_flags & COMBAT_MODE_TOGGLED) && (mode_flags & COMBAT_MODE_ACTIVE)) + return TRUE + mode_flags |= COMBAT_MODE_TOGGLED + enable_combat_mode(source, silent, FALSE, visible, HAS_TRAIT(source, TRAIT_COMBAT_MODE_LOCKED), TRUE) + if(source.client) + source.client.show_popup_menus = FALSE + if(iscarbon(source)) //I dislike this typecheck. It probably should be removed once that spoiled apple is componentized too. + var/mob/living/carbon/C = source + if(C.voremode) + C.disable_vore_mode() + return TRUE + +/// Disables intentionally being in combat mode. Please try to use the COMSIG_COMBAT_MODE_CHECK signal for feedback when possible. +/datum/component/combat_mode/proc/safe_disable_combat_mode(mob/living/source, silent = FALSE, visible = FALSE) + if(!(mode_flags & COMBAT_MODE_TOGGLED) && !(mode_flags & COMBAT_MODE_ACTIVE)) + return TRUE + mode_flags &= ~COMBAT_MODE_TOGGLED + disable_combat_mode(source, silent, FALSE, visible, !(mode_flags & COMBAT_MODE_ACTIVE), TRUE) + if(source.client) + source.client.show_popup_menus = TRUE + return TRUE + +/// Returns a field of flags that are contained in both the second arg and our bitfield variable. +/datum/component/combat_mode/proc/check_flags(mob/living/source, flags) + return mode_flags & (flags) + +/// Disables combat mode upon death. +/datum/component/combat_mode/proc/on_death(mob/living/source) + safe_disable_combat_mode(source) + +/// Disables combat mode upon logout +/datum/component/combat_mode/proc/on_logout(mob/living/source) + safe_disable_combat_mode(source) + +/// The screen button. +/obj/screen/combattoggle + name = "toggle combat mode" + icon = 'modular_citadel/icons/ui/screen_midnight.dmi' + icon_state = "combat_off" + var/mutable_appearance/flashy + var/combat_on = FALSE ///Wheter combat mode is enabled or not, so we don't have to store a reference. + +/obj/screen/combattoggle/Click() + if(hud && usr == hud.mymob) + SEND_SIGNAL(hud.mymob, COMSIG_TOGGLE_COMBAT_MODE) + +/obj/screen/combattoggle/update_icon_state() + var/mob/living/user = hud?.mymob + if(!user) + return + if(combat_on) + icon_state = "combat" + else if(HAS_TRAIT(user, TRAIT_COMBAT_MODE_LOCKED)) + icon_state = "combat_locked" + else + icon_state = "combat_off" + +/obj/screen/combattoggle/update_overlays() + . = ..() + var/mob/living/carbon/user = hud?.mymob + if(!(user?.client)) + return + + if(combat_on) + if(!flashy) + flashy = mutable_appearance('icons/mob/screen_gen.dmi', "togglefull_flash") + flashy.color = user.client.prefs.hud_toggle_color + . += flashy //TODO - beg lummox jr for the ability to force mutable appearances or images to be created rendering from their first frame of animation rather than being based entirely around the client's frame count diff --git a/code/datums/components/crafting/guncrafting.dm b/code/datums/components/crafting/guncrafting.dm index caf200446f..f332d53fc8 100644 --- a/code/datums/components/crafting/guncrafting.dm +++ b/code/datums/components/crafting/guncrafting.dm @@ -1,14 +1,7 @@ -//Gun crafting parts til they can be moved elsewhere - -// PARTS // +k// PARTS // /obj/item/weaponcrafting icon = 'icons/obj/improvised.dmi' -/obj/item/weaponcrafting/receiver - name = "modular receiver" - desc = "A prototype modular receiver and trigger assembly for a firearm." - icon_state = "receiver" - /obj/item/weaponcrafting/stock name = "rifle stock" desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood." @@ -19,3 +12,53 @@ name = "durathread string" desc = "A long piece of durathread with some resemblance to cable coil." icon_state = "durastring" + +//////////////////////////////// +// KAT IMPROVISED WEAPON PARTS// +//////////////////////////////// + +/obj/item/weaponcrafting/improvised_parts + name = "Eerie bunch of coloured dots." + desc = "You feel the urge to report to Central that the parent type of guncrafting, which should never appear in this reality, has appeared. Whatever that means." + icon = 'icons/obj/guns/gun_parts.dmi' + icon_state = "palette" + +// BARRELS + +/obj/item/weaponcrafting/improvised_parts/barrel_rifle + name = "rifle barrel" + desc = "A pipe with a diameter just the right size to fire 7.62 rounds out of." + icon_state = "barrel_rifle" + +/obj/item/weaponcrafting/improvised_parts/barrel_shotgun + name = "shotgun barrel" + desc = "A twenty bore shotgun barrel." + icon_state = "barrel_shotgun" + +// RECEIVERS + +/obj/item/weaponcrafting/improvised_parts/rifle_receiver + name = "bolt action receiver" + desc = "A crudely constructed receiver to create an improvised bolt-action breechloaded rifle." + icon_state = "receiver_rifle" + w_class = WEIGHT_CLASS_SMALL + +/obj/item/weaponcrafting/improvised_parts/shotgun_receiver + name = "break-action assembly" + desc = "An improvised receiver to create a break-action breechloaded shotgun." + icon_state = "receiver_shotgun" + w_class = WEIGHT_CLASS_SMALL + +// MISC + +/obj/item/weaponcrafting/improvised_parts/trigger_assembly + name = "firearm trigger assembly" + desc = "A modular trigger assembly with a firing pin, this can be used to make a whole bunch of improvised firearss." + icon_state = "trigger_assembly" + w_class = WEIGHT_CLASS_SMALL + +/obj/item/weaponcrafting/improvised_parts/wooden_body + name = "wooden firearm body" + desc = "A crudely fashioned wooden body to help keep higher calibre improvised weapons from blowing themselves apart." + icon_state = "wooden_body" + diff --git a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm index 21a160264a..7d608a55b2 100644 --- a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm +++ b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm @@ -251,8 +251,10 @@ /datum/crafting_recipe/ishotgun name = "Improvised Shotgun" result = /obj/item/gun/ballistic/revolver/doublebarrel/improvised - reqs = list(/obj/item/weaponcrafting/receiver = 1, - /obj/item/pipe = 1, + reqs = list(/obj/item/weaponcrafting/improvised_parts/barrel_shotgun = 1, + /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 1, + /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1, + /obj/item/weaponcrafting/improvised_parts/wooden_body = 1, /obj/item/weaponcrafting/stock = 1, /obj/item/stack/packageWrap = 5) tools = list(TOOL_SCREWDRIVER) @@ -261,10 +263,12 @@ subcategory = CAT_WEAPON /datum/crafting_recipe/irifle - name = "Improvised Rifle(7.62mm)" + name = "Improvised Rifle (7.62mm)" result = /obj/item/gun/ballistic/shotgun/boltaction/improvised - reqs = list(/obj/item/weaponcrafting/receiver = 1, - /obj/item/pipe = 2, + reqs = list(/obj/item/weaponcrafting/improvised_parts/barrel_rifle = 1, + /obj/item/weaponcrafting/improvised_parts/rifle_receiver = 1, + /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1, + /obj/item/weaponcrafting/improvised_parts/wooden_body = 1, /obj/item/weaponcrafting/stock = 1, /obj/item/stack/packageWrap = 5) tools = list(TOOL_SCREWDRIVER) @@ -394,3 +398,60 @@ time = 5 category = CAT_WEAPONRY subcategory = CAT_AMMO + +//////////////////// +// PARTS CRAFTING // +//////////////////// + +// BARRELS + +/datum/crafting_recipe/rifle_barrel + name = "Improvised Rifle Barrel" + result = /obj/item/weaponcrafting/improvised_parts/barrel_rifle + reqs = list(/obj/item/pipe = 2) + tools = list(TOOL_WELDER,TOOL_SAW) + time = 150 + category = CAT_WEAPONRY + subcategory = CAT_PARTS + +/datum/crafting_recipe/shotgun_barrel + name = "Improvised Shotgun Barrel" + result = /obj/item/weaponcrafting/improvised_parts/barrel_shotgun + reqs = list(/obj/item/pipe = 2) + tools = list(TOOL_WELDER,TOOL_SAW) + time = 150 + category = CAT_WEAPONRY + subcategory = CAT_PARTS + +// RECEIVERS + +/datum/crafting_recipe/rifle_receiver + name = "Improvised Rifle Receiver" + result = /obj/item/weaponcrafting/improvised_parts/rifle_receiver + reqs = list(/obj/item/stack/sheet/metal = 20) + tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) // Rifle is the easiest to craft and can be made at an autolathe, this is a very light kick in the shin for dual-wielding ishotguns. + time = 50 + category = CAT_WEAPONRY + subcategory = CAT_PARTS + +/datum/crafting_recipe/shotgun_receiver + name = "Improvised Shotgun Receiver" + result = /obj/item/weaponcrafting/improvised_parts/shotgun_receiver + reqs = list(/obj/item/stack/sheet/metal = 10, + /obj/item/stack/sheet/plasteel = 1) + tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) // Increased cost is to stop dual-wield alpha striking. ishotgun is a rvolver and can be duel-wielded + time = 50 + category = CAT_WEAPONRY + subcategory = CAT_PARTS + +// MISC + +/datum/crafting_recipe/trigger_assembly + name = "Trigger Assembly" + result = /obj/item/weaponcrafting/improvised_parts/trigger_assembly + reqs = list(/obj/item/stack/sheet/metal = 3, + /obj/item/assembly/igniter = 1) + tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) + time = 150 + category = CAT_WEAPONRY + subcategory = CAT_PARTS diff --git a/code/datums/components/decal.dm b/code/datums/components/decal.dm deleted file mode 100644 index 60317797a7..0000000000 --- a/code/datums/components/decal.dm +++ /dev/null @@ -1,77 +0,0 @@ -/datum/component/decal - dupe_mode = COMPONENT_DUPE_ALLOWED - can_transfer = TRUE - var/cleanable - var/description - var/mutable_appearance/pic - - var/first_dir // This only stores the dir arg from init - -/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description, _alpha=255) - if(!isatom(parent) || !generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha)) - return COMPONENT_INCOMPATIBLE - first_dir = _dir - description = _description - cleanable = _cleanable - - apply() - -/datum/component/decal/RegisterWithParent() - . = ..() - if(first_dir) - RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react) - if(cleanable) - RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react) - if(description) - RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine) - -/datum/component/decal/UnregisterFromParent() - . = ..() - UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE)) - -/datum/component/decal/Destroy() - remove() - return ..() - -/datum/component/decal/PreTransfer() - remove() - -/datum/component/decal/PostTransfer() - remove() - apply() - -/datum/component/decal/proc/generate_appearance(_icon, _icon_state, _dir, _layer, _color, _alpha) - if(!_icon || !_icon_state) - return FALSE - // It has to be made from an image or dir breaks because of a byond bug - var/temp_image = image(_icon, null, _icon_state, _layer, _dir) - pic = new(temp_image) - pic.color = _color - pic.alpha = _alpha - return TRUE - -/datum/component/decal/proc/apply(atom/thing) - var/atom/master = thing || parent - master.add_overlay(pic, TRUE) - if(isitem(master)) - addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE) - -/datum/component/decal/proc/remove(atom/thing) - var/atom/master = thing || parent - master.cut_overlay(pic, TRUE) - if(isitem(master)) - addtimer(CALLBACK(master, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE) - -/datum/component/decal/proc/rotate_react(datum/source, old_dir, new_dir) - if(old_dir == new_dir) - return - remove() - pic.dir = turn(pic.dir, dir2angle(old_dir) - dir2angle(new_dir)) - apply() - -/datum/component/decal/proc/clean_react(datum/source, strength) - if(strength >= cleanable) - qdel(src) - -/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list) - examine_list += description \ No newline at end of file diff --git a/code/datums/components/decals/blood.dm b/code/datums/components/decals/blood.dm deleted file mode 100644 index c8be6251b5..0000000000 --- a/code/datums/components/decals/blood.dm +++ /dev/null @@ -1,13 +0,0 @@ -/datum/component/decal/blood - dupe_mode = COMPONENT_DUPE_UNIQUE - -/datum/component/decal/blood/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_STRENGTH_BLOOD, _color, _layer=ABOVE_OBJ_LAYER) - if(!isitem(parent)) - return COMPONENT_INCOMPATIBLE - . = ..() - RegisterSignal(parent, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name) - -/datum/component/decal/blood/proc/get_examine_name(datum/source, mob/user, list/override) - var/atom/A = parent - - return COMPONENT_EXNAME_CHANGED diff --git a/code/datums/components/lockon_aiming.dm b/code/datums/components/lockon_aiming.dm index 045611ab9d..2f4401862d 100644 --- a/code/datums/components/lockon_aiming.dm +++ b/code/datums/components/lockon_aiming.dm @@ -47,14 +47,11 @@ if(icon_state) lock_icon_state = icon_state generate_lock_visuals() - var/mob/M = parent - LAZYOR(M.mousemove_intercept_objects, src) + RegisterSignal(parent, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove) START_PROCESSING(SSfastprocess, src) /datum/component/lockon_aiming/Destroy() - var/mob/M = parent clear_visuals() - LAZYREMOVE(M.mousemove_intercept_objects, src) STOP_PROCESSING(SSfastprocess, src) return ..() @@ -120,7 +117,7 @@ return LAZYREMOVE(immune_weakrefs, A.weak_reference) -/datum/component/lockon_aiming/onMouseMove(object,location,control,params) +/datum/component/lockon_aiming/proc/onMouseMove(object,location,control,params) var/mob/M = parent if(!istype(M) || !M.client) return diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm index 49e6b91c6d..53373de6d7 100644 --- a/code/datums/components/orbiter.dm +++ b/code/datums/components/orbiter.dm @@ -62,7 +62,9 @@ orbiters[orbiter] = TRUE orbiter.orbiting = src RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react) + var/matrix/initial_transform = matrix(orbiter.transform) + orbiters[orbiter] = initial_transform // Head first! if(pre_rotation) @@ -79,8 +81,6 @@ orbiter.SpinAnimation(rotation_speed, -1, clockwise, rotation_segments, parallel = FALSE) - //we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit - orbiter.transform = initial_transform orbiter.forceMove(get_turf(parent)) to_chat(orbiter, "Now orbiting [parent].") @@ -89,6 +89,8 @@ return UnregisterSignal(orbiter, COMSIG_MOVABLE_MOVED) orbiter.SpinAnimation(0, 0) + if(istype(orbiters[orbiter],/matrix)) //This is ugly. + orbiter.transform = orbiters[orbiter] orbiters -= orbiter orbiter.stop_orbit(src) orbiter.orbiting = null diff --git a/code/datums/components/phantomthief.dm b/code/datums/components/phantomthief.dm index 57ab75f7a3..6b7e7221c3 100644 --- a/code/datums/components/phantomthief.dm +++ b/code/datums/components/phantomthief.dm @@ -20,7 +20,7 @@ valid_slots = _valid_slots /datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(mob/living/user, was_forced = FALSE) - if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) + if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) user.remove_filter("phantomthief") else user.add_filter("phantomthief", 4, list(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, color = filter_color)) diff --git a/code/datums/components/summoning.dm b/code/datums/components/summoning.dm index 61718301b3..1d66cf9307 100644 --- a/code/datums/components/summoning.dm +++ b/code/datums/components/summoning.dm @@ -59,7 +59,7 @@ var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location) if(ishostile(L)) var/mob/living/simple_animal/hostile/H = L - H.friends += summoner // do not attack our summon boy + H.friends[summoner]++ // do not attack our summon boy spawned_mobs += L if(faction != null) L.faction = faction diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 747db3d6ce..ed5104e296 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -391,16 +391,6 @@ /mob/living/carbon/human/proc/hardset_dna(ui, list/mutation_index, newreal_name, newblood_type, datum/species/mrace, newfeatures) - if(newfeatures) - var/old_size = dna.features["body_size"] - dna.features = newfeatures - dna.update_body_size(old_size) - - if(mrace) - var/datum/species/newrace = new mrace.type - newrace.copy_properties_from(mrace) - set_species(newrace, icon_update=0) - if(newreal_name) real_name = newreal_name dna.generate_unique_enzymes() @@ -410,7 +400,17 @@ if(ui) dna.uni_identity = ui - updateappearance(icon_update=0) + updateappearance(icon_update=FALSE) + + if(newfeatures) + var/old_size = dna.features["body_size"] + dna.features = newfeatures + dna.update_body_size(old_size) + + if(mrace) + var/datum/species/newrace = new mrace.type + newrace.copy_properties_from(mrace) + set_species(newrace, icon_update=FALSE) if(LAZYLEN(mutation_index)) dna.mutation_index = mutation_index.Copy() diff --git a/code/datums/elements/decal.dm b/code/datums/elements/decal.dm new file mode 100644 index 0000000000..4bd482915a --- /dev/null +++ b/code/datums/elements/decal.dm @@ -0,0 +1,75 @@ +/datum/element/decal + element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH + id_arg_index = 2 + var/cleanable + var/description + var/mutable_appearance/pic + var/list/num_decals_per_atom + + var/first_dir // This stores the direction of the decal compared to the parent facing NORTH + +/datum/element/decal/Attach(datum/target, _icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description, _alpha=255) + . = ..() + if(. == ELEMENT_INCOMPATIBLE || !_icon || !_icon_state || !isatom(target)) + return ELEMENT_INCOMPATIBLE + var/atom/A = target + if(!pic) + // It has to be made from an image or dir breaks because of a byond bug + var/temp_image = image(_icon, null, _icon_state, _layer, _dir) + pic = new(temp_image) + pic.color = _color + pic.alpha = _alpha + first_dir = _dir + description = _description + cleanable = _cleanable + + LAZYINITLIST(num_decals_per_atom) + + if(!num_decals_per_atom[A]) + if(first_dir) + RegisterSignal(A, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react) + if(cleanable) + RegisterSignal(A, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react) + if(description) + RegisterSignal(A, COMSIG_PARENT_EXAMINE, .proc/examine) + + apply(A, TRUE) + + num_decals_per_atom[A]++ + +/datum/element/decal/Detach(datum/target) + var/atom/A = target + remove(A, A.dir) + UnregisterSignal(A, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE)) + LAZYREMOVE(num_decals_per_atom, A) + return ..() + +/datum/element/decal/proc/remove(atom/target, old_dir) + pic.dir = first_dir == NORTH ? target.dir : turn(first_dir, dir2angle(old_dir)) + for(var/i in 1 to num_decals_per_atom[target]) + target.cut_overlay(pic, TRUE) + if(isitem(target)) + addtimer(CALLBACK(target, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE) + +/datum/element/decal/proc/apply(atom/target, init = FALSE) + pic.dir = first_dir == NORTH ? target.dir : turn(first_dir, dir2angle(target.dir)) + if(init) + target.add_overlay(pic, TRUE) + else + for(var/i in 1 to num_decals_per_atom[target]) + target.add_overlay(pic, TRUE) + if(isitem(target)) + addtimer(CALLBACK(target, /obj/item/.proc/update_slot_icon), 0, TIMER_UNIQUE) + +/datum/element/decal/proc/rotate_react(datum/source, old_dir, new_dir) + if(old_dir == new_dir) + return + remove(source, old_dir) + apply(source) + +/datum/element/decal/proc/clean_react(datum/source, strength) + if(strength >= cleanable) + Detach(source) + +/datum/element/decal/proc/examine(datum/source, mob/user, list/examine_list) + examine_list += description diff --git a/code/datums/martial/_martial.dm b/code/datums/martial/_martial.dm index e54a80bd81..0877e4021a 100644 --- a/code/datums/martial/_martial.dm +++ b/code/datums/martial/_martial.dm @@ -39,11 +39,11 @@ /datum/martial_art/proc/damage_roll(mob/living/carbon/human/A, mob/living/carbon/human/D) //Here we roll for our damage to be added into the damage var in the various attack procs. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode. var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh) - if(!(D.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) + if(SEND_SIGNAL(D, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) damage *= 1.5 if(!CHECK_MOBILITY(A, MOBILITY_STAND)) damage *= 0.5 - if(!(A.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) + if(SEND_SIGNAL(A, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)) damage *= 0.25 return damage @@ -83,7 +83,7 @@ var/datum/martial_art/X = H.mind.default_martial_art X.teach(H) REMOVE_TRAIT(H, TRAIT_PUGILIST, MARTIAL_ARTIST_TRAIT) - + /datum/martial_art/proc/on_remove(mob/living/carbon/human/H) if(help_verb) H.verbs -= help_verb diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b7eac62e83..fb91edb2c9 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -97,9 +97,6 @@ if(current) // remove ourself from our old body's mind variable current.mind = null SStgui.on_transfer(current, new_character) - if(iscarbon(current)) - var/mob/living/carbon/C = current - C.disable_intentional_combat_mode(TRUE) if(key) if(new_character.key != key) //if we're transferring into a body with a key associated which is not ours diff --git a/code/datums/tgs_event_handler.dm b/code/datums/tgs_event_handler.dm index a3324121bf..731be64183 100644 --- a/code/datums/tgs_event_handler.dm +++ b/code/datums/tgs_event_handler.dm @@ -1,3 +1,6 @@ +/datum/tgs_event_handler/impl + var/datum/timedevent/reattach_timer + /datum/tgs_event_handler/impl/HandleEvent(event_code, ...) switch(event_code) if(TGS_EVENT_REBOOT_MODE_CHANGE) @@ -18,3 +21,19 @@ if(TGS_EVENT_DEPLOYMENT_COMPLETE) message_admins("TGS: Deployment complete!") to_chat(world, "Server updated, changes will be applied on the next round...") + if(TGS_EVENT_WATCHDOG_DETACH) + message_admins("TGS restarting...") + reattach_timer = addtimer(CALLBACK(src, .proc/LateOnReattach), 1 MINUTES) + if(TGS_EVENT_WATCHDOG_REATTACH) + var/datum/tgs_version/old_version = world.TgsVersion() + var/datum/tgs_version/new_version = args[2] + if(!old_version.Equals(new_version)) + to_chat(world, "TGS updated to v[old_version.deprefixed_parameter]") + else + message_admins("TGS: Back online") + if(reattach_timer) + deltimer(reattach_timer) + reattach_timer = null + +/datum/tgs_event_handler/impl/proc/LateOnReattach() + message_admins("Warning: TGS hasn't notified us of it coming back for a full minute! Is there a problem?") diff --git a/code/datums/wires/_wires.dm b/code/datums/wires/_wires.dm index a96e14d4d7..11e7e12bd8 100644 --- a/code/datums/wires/_wires.dm +++ b/code/datums/wires/_wires.dm @@ -11,9 +11,6 @@ if(A.attachable) return TRUE -/atom - var/datum/wires/wires = null - /atom/proc/attempt_wire_interaction(mob/user) if(!wires) return WIRE_INTERACTION_FAIL diff --git a/code/datums/wires/apc.dm b/code/datums/wires/apc.dm index 997c77aa51..19b2b8dda8 100644 --- a/code/datums/wires/apc.dm +++ b/code/datums/wires/apc.dm @@ -30,6 +30,7 @@ if(WIRE_POWER1, WIRE_POWER2) // Short for a long while. if(!A.shorted) A.shorted = TRUE + A.update() addtimer(CALLBACK(A, /obj/machinery/power/apc.proc/reset, wire), 1200) if(WIRE_IDSCAN) // Unlock for a little while. A.locked = FALSE @@ -49,6 +50,7 @@ else A.shorted = TRUE A.shock(usr, 50) + A.update() if(WIRE_AI) // Disable AI control. if(mend) A.aidisabled = FALSE diff --git a/code/game/area/areas/centcom.dm b/code/game/area/areas/centcom.dm index 1241b7a240..96b621acd8 100644 --- a/code/game/area/areas/centcom.dm +++ b/code/game/area/areas/centcom.dm @@ -32,7 +32,8 @@ /area/centcom/vip name = "VIP Zone" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - /area/centcom/winterball + +/area/centcom/winterball name = "winterball Zone" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 21f3102891..a83eaed9d3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -47,6 +47,8 @@ ///Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines. var/material_modifier = 1 + var/datum/wires/wires = null + var/icon/blood_splatter_icon var/list/fingerprints var/list/fingerprintshidden diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 2e5dae3e04..68a9c1ce07 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -36,6 +36,7 @@ targetitem = /obj/item/gun/energy/e_gun/hos difficulty = 10 excludefromjob = list("Head Of Security") + altitems = list(/obj/item/gun/ballistic/revolver/mws) /datum/objective_item/steal/handtele name = "a hand teleporter." diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm index e1fbb636c8..e97d276296 100644 --- a/code/game/gamemodes/sandbox/h_sandbox.dm +++ b/code/game/gamemodes/sandbox/h_sandbox.dm @@ -2,8 +2,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE) -/mob - var/datum/hSB/sandbox = null + /mob/proc/CanBuild() sandbox = new/datum/hSB sandbox.owner = src.ckey diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 67113fcf78..a2d3cccc35 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -70,14 +70,13 @@ if(W.amount < 5) to_chat(user, "You need at least five wooden planks to make a wall!") return - else - to_chat(user, "You start adding [I] to [src]...") - if(do_after(user, 50, target=src)) - W.use(5) - var/turf/T = get_turf(src) - T.PlaceOnTop(/turf/closed/wall/mineral/wood/nonmetal) - qdel(src) - return + to_chat(user, "You start adding [I] to [src]...") + if(do_after(user, 50, target=src)) + W.use(5) + var/turf/T = get_turf(src) + T.PlaceOnTop(/turf/closed/wall/mineral/wood/nonmetal) + qdel(src) + return return ..() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 4c12809184..2a45267c65 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -470,15 +470,15 @@ if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(lights && hasPower()) if(locked) - lights_overlay = get_airlock_overlay("lights_bolts", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + lights_overlay = get_airlock_overlay("lights_bolts", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) else if(emergency) - lights_overlay = get_airlock_overlay("lights_emergency", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + lights_overlay = get_airlock_overlay("lights_emergency", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay(notetype, note_overlay_file) @@ -496,18 +496,18 @@ else panel_overlay = get_airlock_overlay("panel_closed", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) - lights_overlay = get_airlock_overlay("lights_denied", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + lights_overlay = get_airlock_overlay("lights_denied", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay(notetype, note_overlay_file) if(AIRLOCK_EMAG) frame_overlay = get_airlock_overlay("closed", icon) - sparks_overlay = get_airlock_overlay("sparks", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + sparks_overlay = get_airlock_overlay("sparks", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(airlock_material) filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file) else @@ -518,9 +518,9 @@ else panel_overlay = get_airlock_overlay("panel_closed", overlays_file) if(obj_integrity < integrity_failure * max_integrity) - damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) else if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(welded) weld_overlay = get_airlock_overlay("welded", overlays_file) if(note) @@ -533,7 +533,7 @@ else filling_overlay = get_airlock_overlay("fill_closing", icon) if(lights && hasPower()) - lights_overlay = get_airlock_overlay("lights_closing", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + lights_overlay = get_airlock_overlay("lights_closing", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(panel_open) if(security_level) panel_overlay = get_airlock_overlay("panel_closing_protected", overlays_file) @@ -554,7 +554,7 @@ else panel_overlay = get_airlock_overlay("panel_open", overlays_file) if(obj_integrity < (0.75 * max_integrity)) - damag_overlay = get_airlock_overlay("sparks_open", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + damag_overlay = get_airlock_overlay("sparks_open", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(note) note_overlay = get_airlock_overlay("[notetype]_open", note_overlay_file) @@ -565,7 +565,7 @@ else filling_overlay = get_airlock_overlay("fill_opening", icon) if(lights && hasPower()) - lights_overlay = get_airlock_overlay("lights_opening", overlays_file, EMISSIVE_UNBLOCKABLE_LAYER, EMISSIVE_UNBLOCKABLE_PLANE) + lights_overlay = get_airlock_overlay("lights_opening", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) if(panel_open) if(security_level) panel_overlay = get_airlock_overlay("panel_opening_protected", overlays_file) @@ -577,11 +577,17 @@ cut_overlays() add_overlay(frame_overlay) add_overlay(filling_overlay) - add_overlay(lights_overlay) + if(lights_overlay) + add_overlay(lights_overlay) + var/mutable_appearance/lights_vis = mutable_appearance(lights_overlay.icon, lights_overlay.icon_state) + add_overlay(lights_vis) add_overlay(panel_overlay) add_overlay(weld_overlay) add_overlay(sparks_overlay) - add_overlay(damag_overlay) + if(damag_overlay) + add_overlay(damag_overlay) + var/mutable_appearance/damage_vis = mutable_appearance(damag_overlay.icon, damag_overlay.icon_state) + add_overlay(damage_vis) add_overlay(note_overlay) check_unres() diff --git a/code/game/machinery/doors/shutters.dm b/code/game/machinery/doors/shutters.dm index 87e8c8f6a7..362dde1157 100644 --- a/code/game/machinery/doors/shutters.dm +++ b/code/game/machinery/doors/shutters.dm @@ -53,7 +53,9 @@ if("opening") rad_insulation = 1 if("closing") - rad_insulation = 0.2 + rad_insulation = -0.5 + +// A 3x3 N2 SM setup won't irradiate you if you're behind the shutter at -0.9 insulation. If it starts to delam, it'll start irradiating you slowly. Keep the value between -0.1 to -0.9 /obj/machinery/door/poddoor/shutters/window name = "windowed shutters" diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm old mode 100755 new mode 100644 index 8545e6f35c..2fff2011c1 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -17,6 +17,8 @@ /obj/item/melee/baton, /obj/item/ammo_box/magazine/recharge, /obj/item/modular_computer, + /obj/item/ammo_casing/mws_batt, + /obj/item/ammo_box/magazine/mws_mag, /obj/item/twohanded/electrostaff, /obj/item/gun/ballistic/automatic/magrifle)) @@ -143,6 +145,29 @@ using_power = TRUE update_icon() return + + if(istype(charging, /obj/item/ammo_casing/mws_batt)) + var/obj/item/ammo_casing/mws_batt/R = charging + if(R.cell.charge < R.cell.maxcharge) + R.cell.give(R.cell.chargerate * recharge_coeff) + use_power(250 * recharge_coeff) + using_power = 1 + if(R.BB == null) + R.chargeshot() + update_icon(using_power) + + if(istype(charging, /obj/item/ammo_box/magazine/mws_mag)) + var/obj/item/ammo_box/magazine/mws_mag/R = charging + for(var/B in R.stored_ammo) + var/obj/item/ammo_casing/mws_batt/batt = B + if(batt.cell.charge < batt.cell.maxcharge) + batt.cell.give(batt.cell.chargerate * recharge_coeff) + use_power(250 * recharge_coeff) + using_power = 1 + if(batt.BB == null) + batt.chargeshot() + update_icon(using_power) + else return PROCESS_KILL diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index 5dbd18aa0c..25b262a146 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -46,4 +46,4 @@ var/turf/T = loc if(!istype(T)) //you know this will happen somehow CRASH("Turf decal initialized in an object/nullspace") - T.AddComponent(/datum/component/decal, icon, icon_state, dir, CLEAN_GOD, color, null, null, alpha) + T.AddElement(/datum/element/decal, icon, icon_state, turn(dir, -dir2angle(T.dir)), CLEAN_GOD, color, null, null, alpha) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2a4b6d7df5..55549f5fc4 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -138,6 +138,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) var/skill_difficulty = THRESHOLD_UNTRAINED //how difficult it's to use this item in general. var/skill_gain = DEF_SKILL_GAIN //base skill value gain from using this item. + var/canMouseDown = FALSE + + /obj/item/Initialize() if (attack_verb) @@ -420,14 +423,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) return usr.client.Click(src, src_location, src_control, params) var/list/directaccess = usr.DirectAccess() //This, specifically, is what requires the copypaste. If this were after the adjacency check, then it'd be impossible to use items in your inventory, among other things. //If this were before the above checks, then trying to click on items would act a little funky and signal overrides wouldn't work. - if(iscarbon(usr)) - var/mob/living/carbon/C = usr - if((C.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && ((C.CanReach(src) || (src in directaccess)) && (C.CanReach(over) || (over in directaccess)))) - if(!C.get_active_held_item()) - C.UnarmedAttack(src, TRUE) - if(C.get_active_held_item() == src) - melee_attack_chain(C, over) - return TRUE //returning TRUE as a "is this overridden?" flag + if(SEND_SIGNAL(usr, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE) && ((usr.CanReach(src) || (src in directaccess)) && (usr.CanReach(over) || (over in directaccess)))) + if(!usr.get_active_held_item()) + usr.UnarmedAttack(src, TRUE) + if(usr.get_active_held_item() == src) + melee_attack_chain(usr, over) + return TRUE //returning TRUE as a "is this overridden?" flag if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index b6be778456..c9a31a48c2 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -157,7 +157,7 @@ to_chat(user, "You need to get closer!") return if(use_paint(user) && isturf(F)) - F.AddComponent(/datum/component/decal, 'icons/turf/decals.dmi', stored_decal_total, stored_dir, CLEAN_STRONG, color, null, null, alpha) + F.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', stored_decal_total, turn(stored_dir, -dir2angle(F.dir)), CLEAN_STRONG, color, null, null, alpha) /obj/item/airlock_painter/decal/attack_self(mob/user) if((ink) && (ink.charges >= 1)) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 5b332cda46..7450cb937c 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -99,7 +99,7 @@ if(href_list["reset_radio_short"]) pai.unshort_radio() if(href_list["setlaws"]) - var/newlaws = stripped_multiline_input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", MAX_MESSAGE_LEN) + var/newlaws = stripped_multiline_input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", "", MAX_MESSAGE_LEN) if(newlaws && pai) pai.add_supplied_law(0,newlaws) if(href_list["toggle_holo"]) diff --git a/code/game/objects/items/implants/implant_abductor.dm b/code/game/objects/items/implants/implant_abductor.dm index 0c50beadea..e0765e7951 100644 --- a/code/game/objects/items/implants/implant_abductor.dm +++ b/code/game/objects/items/implants/implant_abductor.dm @@ -5,36 +5,30 @@ icon_state = "implant" activated = 1 var/obj/machinery/abductor/pad/home - var/cooldown = 30 + var/next_use = 0 /obj/item/implant/abductor/activate() . = ..() - if(cooldown == initial(cooldown)) + if(next_use <= world.time) home.Retrieve(imp_in,1) - cooldown = 0 - START_PROCESSING(SSobj, src) + next_use = world.time + 60 SECONDS else - to_chat(imp_in, "You must wait [30 - cooldown] seconds to use [src] again!") - -/obj/item/implant/abductor/process() - if(cooldown < initial(cooldown)) - cooldown++ - if(cooldown == initial(cooldown)) - STOP_PROCESSING(SSobj, src) + to_chat(imp_in, "You must wait [DisplayTimeText(next_use - world.time)] to use [src] again!") /obj/item/implant/abductor/implant(mob/living/target, mob/user) - if(..()) - var/obj/machinery/abductor/console/console - if(ishuman(target)) - var/datum/antagonist/abductor/A = target.mind.has_antag_datum(/datum/antagonist/abductor) - if(A) - console = get_abductor_console(A.team.team_number) - home = console.pad - - if(!home) - var/list/consoles = list() - for(var/obj/machinery/abductor/console/C in GLOB.machines) - consoles += C - console = pick(consoles) + . = ..() + if(!.) + return + var/obj/machinery/abductor/console/console + if(ishuman(target)) + var/datum/antagonist/abductor/A = target.mind.has_antag_datum(/datum/antagonist/abductor) + if(A) + console = get_abductor_console(A.team.team_number) home = console.pad - return TRUE + + if(!home) + var/list/consoles = list() + for(var/obj/machinery/abductor/console/C in GLOB.machines) + consoles += C + console = pick(consoles) + home = console.pad diff --git a/code/game/objects/items/miscellaneous.dm b/code/game/objects/items/miscellaneous.dm index c4bb8c594c..ae9ea6985c 100644 --- a/code/game/objects/items/miscellaneous.dm +++ b/code/game/objects/items/miscellaneous.dm @@ -115,6 +115,20 @@ new /obj/item/toy/crayon/spraycan(src) new /obj/item/clothing/shoes/sandal(src) +/obj/item/choice_beacon/hosgun + name = "personal weapon beacon" + desc = "Use this to summon your personal Head of Security issued firearm!" + +/obj/item/choice_beacon/hosgun/generate_display_names() + var/static/list/hos_gun_list + if(!hos_gun_list) + hos_gun_list = list() + var/list/templist = subtypesof(/obj/item/storage/secure/briefcase/hos/) //we have to convert type = name to name = type, how lovely! + for(var/V in templist) + var/atom/A = V + hos_gun_list[initial(A.name)] = A + return hos_gun_list + /obj/item/skub desc = "It's skub." name = "skub" diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 0843838d20..b9cde1664f 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -107,7 +107,7 @@ return TRUE /obj/item/shield/proc/user_shieldbash(mob/living/user, atom/target, harmful) - if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) //Combat mode has to be enabled for shield bashing + if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //Combat mode has to be enabled for shield bashing return FALSE if(!(shield_flags & SHIELD_CAN_BASH)) to_chat(user, "[src] can't be used to shield bash!") diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index f26f3587a4..6553cd2f7c 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -240,6 +240,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \ new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE),\ )), null, \ + new/datum/stack_recipe("wooden firearm body", /obj/item/weaponcrafting/improvised_parts/wooden_body, 10, time = 40), \ new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \ new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \ new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \ @@ -404,8 +405,6 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ resistance_flags = FLAMMABLE force = 0 throwforce = 0 - pull_effort = 90 - is_fabric = TRUE merge_type = /obj/item/stack/sheet/cloth /obj/item/stack/sheet/cloth/get_main_recipes() @@ -426,7 +425,7 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \ new/datum/stack_recipe("durathread beret", /obj/item/clothing/head/beret/durathread, 2, time = 40), \ new/datum/stack_recipe("durathread beanie", /obj/item/clothing/head/beanie/durathread, 2, time = 40), \ new/datum/stack_recipe("durathread bandana", /obj/item/clothing/mask/bandana/durathread, 1, time = 25), \ - new/datum/stack_recipe("durathread string", /obj/item/weaponcrafting/durathread_string, 1, time = 40) \ + new/datum/stack_recipe("durathread string", /obj/item/weaponcrafting/durathread_string, 1, time = 40), \ )) /obj/item/stack/sheet/durathread @@ -818,13 +817,12 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra max_amount = 80 singular_name = "raw cotton ball" icon_state = "sheet-cotton" - is_fabric = TRUE resistance_flags = FLAMMABLE force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/cotton - pull_effort = 30 - loom_result = /obj/item/stack/sheet/cloth + var/pull_effort = 30 + var/loom_result = /obj/item/stack/sheet/cloth /obj/item/stack/sheet/cotton/ten amount = 10 diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 378855707e..dfba533247 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -13,9 +13,6 @@ mats_per_stack = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity - var/is_fabric = FALSE //is this a valid material for the loom? - var/loom_result //result from pulling on the loom - var/pull_effort = 0 //amount of delay when pulling on the loom var/shard_type // the shard debris typepath left over by solar panels and windows etc. /obj/item/stack/sheet/Initialize(mapload, new_amount, merge) diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 5b7eb65d9b..d687702af5 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -382,14 +382,14 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bag" desc = "A bag for storing pills, patches, and bottles." - w_class = WEIGHT_CLASS_TINY + slot_flags = ITEM_SLOT_BELT|ITEM_SLOT_POCKET resistance_flags = FLAMMABLE /obj/item/storage/bag/chemistry/ComponentInitialize() . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) - STR.max_combined_w_class = 200 - STR.max_items = 50 + STR.storage_flags = STORAGE_FLAGS_VOLUME_DEFAULT + STR.max_volume = STORAGE_VOLUME_CHEMISTRY_BAG STR.insert_preposition = "in" STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/syringe/dart)) @@ -402,7 +402,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "biobag" desc = "A bag for the safe transportation and disposal of biowaste and other biological materials." - w_class = WEIGHT_CLASS_TINY + slot_flags = ITEM_SLOT_BELT|ITEM_SLOT_POCKET resistance_flags = FLAMMABLE /obj/item/storage/bag/bio/ComponentInitialize() diff --git a/code/game/objects/items/storage/firstaid.dm b/code/game/objects/items/storage/firstaid.dm index 092648ee3c..c7c0a711c8 100644 --- a/code/game/objects/items/storage/firstaid.dm +++ b/code/game/objects/items/storage/firstaid.dm @@ -224,7 +224,7 @@ . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.storage_flags = STORAGE_FLAGS_VOLUME_DEFAULT - STR.max_volume = 14 + STR.max_volume = STORAGE_VOLUME_PILL_BOTTLE STR.allow_quick_gather = TRUE STR.click_gather = TRUE STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/dice)) diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index ef70bd201d..0e9a9fda61 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -147,6 +147,35 @@ for(var/i = 0, i < STR.max_items - 2, i++) new /obj/item/stack/spacecash/c1000(src) +/obj/item/storage/secure/briefcase/mws_pack + name = "\improper \'MWS\' gun kit" + desc = "A storage case for a multi-purpose handgun. Variety hour!" + +/obj/item/storage/secure/briefcase/mws_pack/PopulateContents() + new /obj/item/gun/ballistic/revolver/mws(src) + new /obj/item/ammo_box/magazine/mws_mag(src) + for(var/path in subtypesof(/obj/item/ammo_casing/mws_batt)) + new path(src) + +/obj/item/storage/secure/briefcase/hos/mws_pack_hos + name = "\improper \'MWS\' gun kit" + desc = "A storage case for a multi-purpose handgun. Variety hour!" + +/obj/item/storage/secure/briefcase/hos/mws_pack_hos/PopulateContents() + new /obj/item/gun/ballistic/revolver/mws(src) + new /obj/item/ammo_box/magazine/mws_mag(src) + new /obj/item/ammo_casing/mws_batt/lethal(src) + new /obj/item/ammo_casing/mws_batt/lethal(src) + new /obj/item/ammo_casing/mws_batt/stun(src) + new /obj/item/ammo_casing/mws_batt/stun(src) + new /obj/item/ammo_casing/mws_batt/ion(src) + +/obj/item/storage/secure/briefcase/hos/multiphase_box + name = "\improper X-01 Multiphase energy gun box" + desc = "A storage case for a high-tech energy firearm." + +/obj/item/storage/secure/briefcase/hos/multiphase_box/PopulateContents() + new /obj/item/gun/energy/e_gun/hos(src) // ----------------------------- // Secure Safe diff --git a/code/game/objects/items/tools/saw.dm b/code/game/objects/items/tools/saw.dm new file mode 100644 index 0000000000..aab59c00be --- /dev/null +++ b/code/game/objects/items/tools/saw.dm @@ -0,0 +1,47 @@ +/obj/item/hatchet/saw + name = "handsaw" + desc = "A very sharp handsaw, it's compact." + icon = 'icons/obj/tools.dmi' + icon_state = "saw" + item_state = "sawhandle_greyscale" + lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi' + tool_behaviour = TOOL_SAW + force = 10 + throwforce = 8 + throw_speed = 3 + throw_range = 5 + custom_materials = list(/datum/material/iron = 5000) + attack_verb = list("sawed", "sliced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' + sharpness = IS_SHARP + var/random_color = TRUE //code taken from screwdrivers.dm; cool handles are cool. + var/static/list/saw_colors = list( + "blue" = rgb(24, 97, 213), + "red" = rgb(255, 0, 0), + "pink" = rgb(213, 24, 141), + "brown" = rgb(160, 82, 18), + "green" = rgb(14, 127, 27), + "cyan" = rgb(24, 162, 213), + "yellow" = rgb(255, 165, 0) + ) + +/obj/item/hatchet/saw/Initialize() + . = ..() + if(random_color) + icon_state = "sawhandle_greyscale" + var/our_color = pick(saw_colors) + add_atom_colour(saw_colors[our_color], FIXED_COLOUR_PRIORITY) + update_icon() + if(prob(75)) + pixel_y = rand(-8, 8) + +/obj/item/hatchet/saw/update_overlays() + . = ..() + if(!random_color) //icon override + return + var/mutable_appearance/base_overlay = mutable_appearance(icon, "sawblade") + base_overlay.appearance_flags = RESET_COLOR + . += base_overlay + +// END \ No newline at end of file diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index ff59b85332..bc0c1328af 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -777,6 +777,7 @@ var/cooldown = 0 var/obj/machinery/computer/holodeck/holo = null // Holodeck cards should not be infinite var/list/cards = list() + var/original_size = 52 /obj/item/toy/cards/deck/Initialize() . = ..() @@ -834,11 +835,11 @@ /obj/item/toy/cards/deck/update_icon_state() switch(cards.len) - if(27 to INFINITY) + if(INFINITY to original_size/2) icon_state = "deck_[deckstyle]_full" - if(11 to 27) + if(original_size/2 to original_size/4) icon_state = "deck_[deckstyle]_half" - if(1 to 11) + if(original_size/4 to 1) icon_state = "deck_[deckstyle]_low" else icon_state = "deck_[deckstyle]_empty" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index e5c50af782..9f4da351fa 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -76,12 +76,13 @@ new /obj/item/storage/box/flashbangs(src) new /obj/item/shield/riot/tele(src) new /obj/item/storage/belt/security/full(src) - new /obj/item/gun/energy/e_gun/hos(src) + new /obj/item/choice_beacon/hosgun(src) new /obj/item/flashlight/seclite(src) new /obj/item/pinpointer/nuke(src) new /obj/item/circuitboard/machine/techfab/department/security(src) new /obj/item/storage/photo_album/HoS(src) new /obj/item/clothing/suit/hooded/wintercoat/hos(src) + /obj/structure/closet/secure_closet/warden name = "\proper warden's locker" req_access = list(ACCESS_ARMORY) diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm index ad128b01c2..164e597117 100644 --- a/code/game/objects/structures/loom.dm +++ b/code/game/objects/structures/loom.dm @@ -21,21 +21,21 @@ return TRUE ///Handles the weaving. -/obj/structure/loom/proc/weave(obj/item/stack/sheet/S, mob/user) - if(!istype(S) || !S.is_fabric) +/obj/structure/loom/proc/weave(obj/item/stack/sheet/cotton/W, mob/user) + if(!istype(W)) return FALSE if(!anchored) user.show_message("The loom needs to be wrenched down.", MSG_VISUAL) return FALSE - if(S.amount < FABRIC_PER_SHEET) - user.show_message("You need at least [FABRIC_PER_SHEET] units of fabric before using this.", 1) + if(W.amount < FABRIC_PER_SHEET) + user.show_message("You need at least [FABRIC_PER_SHEET] units of fabric before using this.", MSG_VISUAL) return FALSE - user.show_message("You start weaving \the [S.name] through the loom..", MSG_VISUAL) - if(S.use_tool(src, user, S.pull_effort)) - if(S.amount >= FABRIC_PER_SHEET) - new S.loom_result(drop_location()) - S.use(FABRIC_PER_SHEET) - user.show_message("You weave \the [S.name] into a workable fabric.", MSG_VISUAL) + user.show_message("You start weaving \the [W.name] through the loom..", MSG_VISUAL) + if(W.use_tool(src, user, W.pull_effort)) + if(W.amount >= FABRIC_PER_SHEET) + new W.loom_result(drop_location()) + W.use(FABRIC_PER_SHEET) + user.show_message("You weave \the [W.name] into a workable fabric.", MSG_VISUAL) return TRUE #undef FABRIC_PER_SHEET \ No newline at end of file diff --git a/code/game/turfs/simulated/floor/plating/misc_plating.dm b/code/game/turfs/simulated/floor/plating/misc_plating.dm index 23e32ebfe3..5323db001f 100644 --- a/code/game/turfs/simulated/floor/plating/misc_plating.dm +++ b/code/game/turfs/simulated/floor/plating/misc_plating.dm @@ -198,8 +198,7 @@ /turf/open/floor/plating/ice/smooth icon_state = "smooth" smooth = SMOOTH_MORE | SMOOTH_BORDER - canSmoothWith = list(/turf/open/floor/plating/ice/smooth, /turf/open/floor/plating/ice) - /turf/open/floor/plating/ice/colder + canSmoothWith = list(/turf/open/floor/plating/ice/smooth, /turf/open/floor/plating/ice, /turf/open/floor/plating/ice/colder) /turf/open/floor/plating/ice/colder temperature = 140 diff --git a/code/modules/admin/view_variables/debug_variables.dm b/code/modules/admin/view_variables/debug_variables.dm index 23f85cba15..5116cd5cd6 100644 --- a/code/modules/admin/view_variables/debug_variables.dm +++ b/code/modules/admin/view_variables/debug_variables.dm @@ -1,4 +1,5 @@ #define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing ) +/// Get displayed variable in VV variable list /proc/debug_variable(name, value, level, datum/D, sanitize = TRUE) //if D is a list, name will be index, and value will be assoc value. var/header if(D) @@ -35,6 +36,19 @@ else if (isfile(value)) item = "[VV_HTML_ENCODE(name)] = '[value]'" + else if(istype(value, /matrix)) // Needs to be before datum + var/matrix/M = value + item = {"[VV_HTML_ENCODE(name)] = + + + + +
  + + + +
[M.a][M.d]0
[M.b][M.e]0
[M.c][M.f]1
 
"} //TODO link to modify_transform wrapper for all matrices + else if (istype(value, /datum)) var/datum/DV = value if ("[DV]" != "[DV.type]") //if the thing as a name var, lets use it. diff --git a/code/modules/admin/view_variables/view_variables.dm b/code/modules/admin/view_variables/view_variables.dm index a85b4ff1a3..abe445589f 100644 --- a/code/modules/admin/view_variables/view_variables.dm +++ b/code/modules/admin/view_variables/view_variables.dm @@ -96,16 +96,7 @@ [title] - +