Merge branch 'master' into clockcultrework_v2

This commit is contained in:
Dan-Neposh
2021-01-14 19:51:15 -05:00
1152 changed files with 31093 additions and 24256 deletions
+1
View File
@@ -171,6 +171,7 @@
#define ORGAN_SLOT_HEART_AID "heartdrive"
#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop"
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
#define ORGAN_SLOT_BRAIN_ROBOT_RADSHIELDING "brain_robot_radshielding"
#define ORGAN_SLOT_TAIL "tail"
#define ORGAN_SLOT_PENIS "penis"
#define ORGAN_SLOT_WOMB "womb"
+3
View File
@@ -162,3 +162,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL);\
else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\
x.appearance_flags &= ~KEEP_TOGETHER
/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
#define MAX_BITFLAG_DIGITS 8
+1 -1
View File
@@ -7,4 +7,4 @@
}\
##Path/CanProcCall(procname){\
return FALSE;\
}
}
+1 -1
View File
@@ -11,4 +11,4 @@
and most importantly,
how to undo your changes if you screw it up.
- Sayu
*/
*/
+2 -1
View File
@@ -35,8 +35,9 @@
#define R_SPAWN (1<<12)
#define R_AUTOLOGIN (1<<13)
#define R_DBRANKS (1<<14)
#define R_SENSITIVE (1<<15)
#define R_DEFAULT R_AUTOLOGIN
#define R_DEFAULT R_AUTOLOGIN | R_SENSITIVE
#define R_EVERYTHING ALL //the sum of all other rank permissions, used for +EVERYTHING
+1
View File
@@ -70,6 +70,7 @@
///Heretics --
#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic))
#define IS_HERETIC_MONSTER(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic_monster))
#define PATH_SIDE "Side"
+1 -1
View File
@@ -115,7 +115,7 @@
#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8.
#define LOW_PRESSURE_DAMAGE 8 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
#define COLD_SLOWDOWN_FACTOR 35 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
//PIPES
//Atmos pipe limits
+1 -1
View File
@@ -10,4 +10,4 @@
#define CINEMATIC_NUKE_NO_CORE 10
#define CINEMATIC_NUKE_FAR 11
#define CINEMATIC_NUKE_CLOWNOP 12
#define CINEMATIC_CULT_NUKE 13
#define CINEMATIC_CULT_NUKE 13
+14
View File
@@ -114,3 +114,17 @@
//special species definitions
#define MINIMUM_MUTANT_COLOR "#202020" //this is how dark players mutant parts and skin can be
//defines for different matrix sections
#define MATRIX_RED "red"
#define MATRIX_GREEN "green"
#define MATRIX_BLUE "blue"
#define MATRIX_RED_GREEN "red_green"
#define MATRIX_RED_BLUE "red_blue"
#define MATRIX_GREEN_BLUE "green_blue"
#define MATRIX_ALL "red_green_blue"
#define MATRIX_NONE "none"
//defines for the two colour schemes, advanced and old
#define OLD_CHARACTER_COLORING "old_color_system"
#define ADVANCED_CHARACTER_COLORING "advanced_color_system"
+1 -1
View File
@@ -96,4 +96,4 @@ GLOBAL_LIST_EMPTY(all_clockwork_rites) //a list containing all clockwork rites.
#define ARK_SCREAM_COOLDOWN 300 //This much time has to pass between instances of the Ark taking damage before it will "scream" again
#define PRISM_DELAY_DURATION 1200 //how long prolonging prisms delay the shuttle for; defaults to 2 minutes
#define PRISM_DELAY_DURATION 1200 //how long prolonging prisms delay the shuttle for; defaults to 2 minutes
+8
View File
@@ -11,6 +11,12 @@
#define STAMINA "stamina"
#define BRAIN "brain"
//Toxins damage 'typeflag' - is this normal toxins damage or does it have to do with systems corruption (ROBOTIC_ORGANISM species trait)
#define TOX_DEFAULT 1 //For normal toxins damage / healing (toxins, etc), adjustToxLoss() defaults to this
#define TOX_SYSCORRUPT 2 //For toxins damage causing adverse effects to robotic organisms, up to and including fatal corruption, or healing that damage
#define TOX_OMNI 3 //For tox damage / healing that affects both organics and robotic organisms. Used by very few things, e.g. aheals / by default setToxLoss()
//bitflag damage defines used for suicide_act
#define BRUTELOSS (1<<0)
#define FIRELOSS (1<<1)
@@ -75,6 +81,8 @@
//stamina stuff
/// crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit
#define STAMINA_CRIT 140
/// Threshold for leaving stamina critical
#define STAMINA_CRIT_REMOVAL_THRESHOLD 100
/// Threshold under for which you are unable to draw from stamina health to replace stamina buffer
#define STAMINA_NO_OVERDRAW_THRESHOLD 100
+1 -1
View File
@@ -10,7 +10,7 @@
/// Usage for eyestabbing with a screwdriver
#define STAMINA_COST_ITEM_EYESTAB 7.5
/// Usage for shoving yourself off the ground instantly
#define STAMINA_COST_SHOVE_UP 10
#define STAMINA_COST_SHOVE_UP 15
//items total mass, used to calculate their attacks' stamina costs. If not defined, the cost will be (w_class * 1.25)
#define TOTAL_MASS_TINY_ITEM 1.25
+1 -1
View File
@@ -41,4 +41,4 @@
#define BANISH_FUNERAL_GARB "funeral"
#define LORE 1
#define LAW 2
#define LAW 2
+1 -1
View File
@@ -20,4 +20,4 @@
#define DEFAULT_TOOLTIP "6:-29,5:-2"
//misc
#define SOULS_TO_REVIVE 3
#define BLOODCULT_EYE "f00"
#define BLOODCULT_EYE "f00"
+1 -1
View File
@@ -82,4 +82,4 @@
/// combat mode is active.
#define COMBAT_MODE_ACTIVE (1<<1)
/// combat mode is not active
#define COMBAT_MODE_INACTIVE (1<<2)
#define COMBAT_MODE_INACTIVE (1<<2)
+1 -1
View File
@@ -13,4 +13,4 @@
#define RemoveElement(arguments...) _RemoveElement(list(##arguments))
/// A wrapper for _AddComponent that allows us to pretend we're using normal named arguments
#define AddComponent(arguments...) _AddComponent(list(##arguments))
#define AddComponent(arguments...) _AddComponent(list(##arguments))
+21 -2
View File
@@ -136,11 +136,15 @@
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
/////////////////
//This signal return value bitflags can be found in __DEFINES/misc.dm
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" //called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
/////////////////
/// Called from orbit component: (atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin"
/// Called from orbit component: (atom/movable/orbiter, refreshing)
#define COMSIG_ATOM_ORBIT_END "atom_orbit_end"
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
@@ -490,6 +494,17 @@
#define COMPONENT_PROGRAM_INSTALLED 1 //Installation successful
#define COMPONENT_PROGRAM_NOT_INSTALLED 2 //Installation failed, but there are still nanites
#define COMSIG_NANITE_SYNC "nanite_sync" //(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component
/// Checks if a nanite component is able to be controlled by console
#define COMSIG_NANITE_CHECK_CONSOLE_LOCK "is_console_locked"
/// Checks if a nanite component is able to be interfaced with by a host with innate nanite control
#define COMSIG_NANITE_CHECK_HOST_LOCK "is_host_locked"
/// Checks if a nanite component is able to be overwritten by viral replica
#define COMSIG_NANITE_CHECK_VIRAL_PREVENTION "is_virus_locked"
#define NANITE_CHANGES_LOCKED 1
// Internal signals that programs register to and respond with to not require for loops
#define COMSIG_NANITE_INTERNAL_CONSOLE_LOCK_CHECK "naniteiconsolelocked"
#define COMSIG_NANITE_INTERNAL_HOST_LOCK_CHECK "naniteihostlocked"
#define COMSIG_NANITE_INTERNAL_VIRAL_PREVENTION_CHECK "naniteiviruslocked"
// /datum/component/storage signals
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
@@ -525,3 +540,7 @@
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob)
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)
// twitch plays
/// Returns direction: (wipe_votes)
#define COMSIG_TWITCH_PLAYS_MOVEMENT_DATA "twitch_plays_movement_data"
+1 -1
View File
@@ -1,4 +1,4 @@
#define EXPORT_CARGO 1
#define EXPORT_EMAG 2
#define EXPORT_CONTRABAND 4
#define EXPORT_PIRATE 8
#define EXPORT_PIRATE 8
+1 -1
View File
@@ -2,4 +2,4 @@
#define AFFIX_SUFFIX (1 << 1)
#define AFFIX_GOOD (1 << 0)
#define AFFIX_EVIL (1 << 1)
#define AFFIX_EVIL (1 << 1)
+2
View File
@@ -188,6 +188,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define islandmine(A) (istype(A, /obj/effect/mine))
#define issupplypod(A) (istype(A, /obj/structure/closet/supplypod))
#define isammocasing(A) (istype(A, /obj/item/ammo_casing))
#define isidcard(I) (istype(I, /obj/item/card/id))
+14 -1
View File
@@ -55,6 +55,9 @@
//donator items
#define LOADOUT_CATEGORY_DONATOR "Donator"
//unlockable items
#define LOADOUT_CATEGORY_UNLOCKABLE "Unlockable"
//how many prosthetics can we have
#define MAXIMUM_LOADOUT_PROSTHETICS 2
@@ -66,4 +69,14 @@
#define LOADOUT_LIMB_PROSTHETIC "Prosthetic"
#define LOADOUT_LIMB_AMPUTATED "Amputated"
#define LOADOUT_LIMBS list(LOADOUT_LIMB_NORMAL,LOADOUT_LIMB_PROSTHETIC,LOADOUT_LIMB_AMPUTATED) //you can amputate your legs/arms though
#define LOADOUT_LIMBS list(LOADOUT_LIMB_NORMAL,LOADOUT_LIMB_PROSTHETIC,LOADOUT_LIMB_AMPUTATED) //you can amputate your legs/arms though
//loadout saving/loading specific defines
#define MAXIMUM_LOADOUT_SAVES 5
#define LOADOUT_ITEM "loadout_item"
#define LOADOUT_COLOR "loadout_color"
//loadout item flags
#define LOADOUT_CAN_NAME (1<<0) //renaming items
#define LOADOUT_CAN_DESCRIPTION (1<<1) //adding a custom description to items
#define LOADOUT_CAN_COLOR_POLYCHROMIC (1<<2)
+1 -1
View File
@@ -120,4 +120,4 @@
#define CLONEPOD_GET_MIND 1
#define CLONEPOD_POLL_MIND 2
#define CLONEPOD_NO_MIND 3
#define CLONEPOD_NO_MIND 3
+1 -1
View File
@@ -12,4 +12,4 @@
#define MATERIAL_ADD_PREFIX (1<<1)
#define MATERIAL_AFFECT_STATISTICS (1<<2)
#define MATERIAL_SOURCE(mat) "[mat.name]_material"
#define MATERIAL_SOURCE(mat) "[mat.name]_material"
+1 -1
View File
@@ -26,4 +26,4 @@
//Misc medals
#define MEDAL_METEOR "Your Life Before Your Eyes"
#define MEDAL_PULSE "Jackpot"
#define MEDAL_TIMEWASTE "Overextended The Joke"
#define MEDAL_TIMEWASTE "Overextended The Joke"
+1 -1
View File
@@ -8,4 +8,4 @@
#define MARTIALART_KRAVMAGA "krav maga"
#define MARTIALART_CQC "CQC"
#define MARTIALART_PLASMAFIST "plasma fist"
#define MARTIALART_RISINGBASS "rising bass"
#define MARTIALART_RISINGBASS "rising bass"
+1 -1
View File
@@ -1,3 +1,3 @@
#define CHECKBOX_NONE 0
#define CHECKBOX_GROUP 1
#define CHECKBOX_TOGGLE 2
#define CHECKBOX_TOGGLE 2
+1
View File
@@ -159,6 +159,7 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
#define BLOOD_COLOR_LIZARD "#db004D"
#define BLOOD_COLOR_UNIVERSAL "#db3300"
#define BLOOD_COLOR_BUG "#a37c0f"
#define BLOOD_COLOR_PLANT "#3d610e"
//suit sensors: sensor_mode defines
+4 -1
View File
@@ -48,6 +48,8 @@
#define MOB_EPIC (1 << 7) // Megafauna
#define MOB_REPTILE (1 << 8)
#define MOB_SPIRIT (1 << 9)
/// Mobs that otherwise support nanites
#define MOB_NANITES (1 << 10)
// Organ defines for carbon mobs
#define ORGAN_ORGANIC 1
@@ -56,9 +58,10 @@
#define BODYPART_ORGANIC 1
#define BODYPART_ROBOTIC 2
#define BODYPART_HYBRID 3
#define BODYPART_NANITES 4
#define HYBRID_BODYPART_DAMAGE_THRESHHOLD 25 //How much damage has to be suffered until the damage threshhold counts as passed
#define HYBRID_BODYPART_THESHHOLD_MINDAMAGE 15 //Which damage value this limb cannot be healed out of via easy nonsurgical means if the threshhold has been passed, state resets if damage value goes below mindamage.
#define HYBRID_BODYPART_THESHHOLD_MINDAMAGE 10 //Which damage value this limb cannot be healed out of via easy nonsurgical means if the threshhold has been passed, state resets if damage value goes below mindamage.
#define BODYPART_NOT_DISABLED 0
#define BODYPART_DISABLED_DAMAGE 1
+29
View File
@@ -0,0 +1,29 @@
// helpers
// sources
/// Species
#define ABILITY_SOURCE_SPECIES "species"
/// Changeling
#define ABILITY_SOURCE_CHANGELING "changeling"
// abilities
/// Full customization and transformation of mutantparts/hair/sprite accessories/etc - excludes name by default
#define INNATE_ABILITY_HUMANOID_CUSTOMIZATION "humanoid_customization"
/// Slime blobform
#define INNATE_ABILITY_SLIME_BLOBFORM "slime_blobform"
/// limb regrowth
#define INNATE_ABILITY_LIMB_REGROWTH "limb_regrowth"
/// ability properties
// customization/body change
/// is this silent?
#define PROPERTY_CUSTOMIZATION_SILENT "silent"
// blobform
/// Blobform color
#define PROPERTY_BLOBFORM_COLOR "color"
// limb regrwoth
/// limb regrowth usage type
#define PROPERTY_LIMB_REGROWTH_USAGE_TYPE "cost"
/// blood
#define REGROWTH_USES_BLOOD "blood"
+2
View File
@@ -18,6 +18,8 @@ Ask ninjanomnom if they're around
#define RAD_BURN_THRESHOLD 1000 // Applied radiation must be over this to burn
#define RAD_MOB_SAFE 500 // How much stored radiation in a mob with no ill effects
#define RAD_DEFAULT_ROBOT_SAFE 250 // Like above, except for robotic carbons. Far more susceptible to corruption from radiation.
#define RAD_UPGRADED_ROBOT_SAFE 750 // If the robot has been upgraded via an implant, their radiation threshold is raised to be somewhat above that of organics.
#define RAD_MOB_HAIRLOSS 800 // How much stored radiation to check for hair loss
+1 -1
View File
@@ -4,4 +4,4 @@
#define ROCKPAPERSCISSORS_LOSE "lose"
#define ROCKPAPERSCISSORS_WIN "win"
#define ROCKPAPERSCISSORS_TIE "tie"
#define ROCKPAPERSCISSORS_NOT_DECIDED "not_decided"
#define ROCKPAPERSCISSORS_NOT_DECIDED "not_decided"
+1
View File
@@ -40,6 +40,7 @@
//#define ROLE_MONSTERHUNTER "monster hunter" Disabled for now
#define ROLE_GHOSTCAFE "ghostcafe"
#define ROLE_MINOR_ANTAG "minorantag"
#define ROLE_RESPAWN "respawnsystem"
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
//(in game days played) to play that role
+1
View File
@@ -5,6 +5,7 @@
#define SPECIES_ANDROID "android"
#define SPECIES_ANGEL "angel"
#define SPECIES_MAMMAL "mammal"
#define SPECIES_MAMMAL_SYNTHETIC "mammal_synthetic"
#define SPECIES_ARACHNID "arachnid"
#define SPECIES_INSECT "insect"
#define SPECIES_DULLAHAN "dullahan"
+3 -4
View File
@@ -40,6 +40,9 @@
#define STATUS_EFFECT_DETERMINED /datum/status_effect/determined //currently in a combat high from being seriously wounded
#define STATUS_EFFECT_MANTRA /datum/status_effect/mantra // a toggled self buff that makes you stronger and more resilient, but drains stamina over time
#define STATUS_EFFECT_ASURA /datum/status_effect/asura // like a weaker version of mantra, drains HP instead of stamina and has no armor
/////////////
// DEBUFFS //
/////////////
@@ -102,10 +105,6 @@
#define STATUS_EFFECT_FAKE_VIRUS /datum/status_effect/fake_virus //gives you fluff messages for cough, sneeze, headache, etc but without an actual virus
#define STATUS_EFFECT_BREASTS_ENLARGEMENT /datum/status_effect/chem/breast_enlarger //Applied slowdown due to the ominous bulk.
#define STATUS_EFFECT_PENIS_ENLARGEMENT /datum/status_effect/chem/penis_enlarger //More applied slowdown, just like the above.
#define STATUS_EFFECT_NO_COMBAT_MODE /datum/status_effect/no_combat_mode //Wont allow combat mode and will disable it
#define STATUS_EFFECT_MESMERIZE /datum/status_effect/mesmerize //Just reskinned no_combat_mode
+61 -61
View File
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
#define TGS_DMAPI_VERSION "5.2.7"
#define TGS_DMAPI_VERSION "5.2.10"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
@@ -67,7 +67,7 @@
#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
/// When the repository test merges. 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
@@ -117,22 +117,22 @@
//REQUIRED HOOKS
/**
* 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].
*/
* 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/var/sleep_offline] to make this happen so ensure no changes are made to it while this call is running.
* Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184
* 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].
*/
* 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.
* Afterwards, consider explicitly setting it to what you want to avoid this BYOND bug: http://www.byond.com/forum/post/2575184
* 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
@@ -140,8 +140,8 @@
#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/proc/Reboot].
*/
* Call this at the beginning of [world/proc/Reboot].
*/
/world/proc/TgsReboot()
return
@@ -175,36 +175,36 @@
var/deprefixed_parameter
/**
* Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards.
*/
* Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards.
*/
/datum/tgs_version/proc/Wildcard()
return
/**
* Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] equals some other version.
*
* other_version - The [/datum/tgs_version] to compare against.
*/
* 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.
/datum/tgs_revision_information/test_merge
/// The pull request number.
/// The test merge number.
var/number
/// The pull request title when it was merged.
/// The test merge source's title when it was merged.
var/title
/// The pull request body when it was merged.
/// The test merge source's body when it was merged.
var/body
/// The GitHub username of the pull request's author.
/// The Username of the test merge source's author.
var/author
/// An http URL to the pull request.
/// An http URL to the test merge source.
var/url
/// The SHA of the pull request when that was merged.
/// The SHA of the test merge when that was merged.
var/pull_request_commit
/// ISO 8601 timestamp of when the pull request was merged.
/// ISO 8601 timestamp of when the test merge was created on TGS.
var/time_merged
/// (Nullable) Comment left by the TGS user who initiated the merge..
/// Optional comment left by the TGS user who initiated the merge.
var/comment
/// Represents a connected chat channel.
@@ -234,10 +234,10 @@
var/datum/tgs_chat_channel/channel
/**
* User definable callback for handling TGS events.
*
* event_code - One of the TGS_EVENT_ defines. Extra parameters will be documented in each
*/
* 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
@@ -252,11 +252,11 @@
var/admin_only = FALSE
/**
* 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].
*/
* 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()")
@@ -271,48 +271,48 @@
return
/**
* Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise.
*/
* Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise.
*/
/world/proc/TgsAvailable()
return
// 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
*/
* 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 connected chats.
*
* message - The string to send.
* admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies.
*/
* 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 string to send.
* user: The [/datum/tgs_chat_user] to PM.
*/
* 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
/**
* 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.
*/
* 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
+1 -1
View File
@@ -32,4 +32,4 @@
url_encode(json_encode(list( \
"type" = type, \
"payload" = payload, \
))))
))))
+9 -1
View File
@@ -118,6 +118,8 @@
#define TRAIT_NOLIMBDISABLE "no_limb_disable"
#define TRAIT_EASYLIMBDISABLE "easy_limb_disable"
#define TRAIT_TOXINLOVER "toxinlover"
#define TRAIT_ROBOTIC_ORGANISM "robotic_organism"
#define TRAIT_ROBOT_RADSHIELDING "robot_radshielding"
#define TRAIT_NOBREATH "no_breath"
#define TRAIT_ANTIMAGIC "anti_magic"
#define TRAIT_HOLY "holy"
@@ -203,7 +205,7 @@
#define TRAIT_THERMAL_VISION "thermal_vision"
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
#define TRAIT_NO_INTERNALS "no-internals"
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
#define TRAIT_TOXIC_ALCOHOL "alcohol_intolerance"
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
#define TRAIT_FAST_PUMP "fast_pump"
#define TRAIT_NO_PROCESS_FOOD "no-process-food" // You don't get benefits from nutriment, nor nutrition from reagent consumables
@@ -211,6 +213,10 @@
#define TRAIT_NO_STAMINA_BUFFER_REGENERATION "block_stamina_buffer_regen" /// Prevents stamina buffer regeneration
#define TRAIT_NO_STAMINA_REGENERATION "block_stamina_regen" /// Prevents stamina regeneration
#define TRAIT_ARMOR_BROKEN "armor_broken" //acts as if you are wearing no clothing when taking damage, does not affect non-clothing sources of protection
/// forces update_density to make us not dense
#define TRAIT_LIVING_NO_DENSITY "living_no_density"
/// forces us to not render our overlays
#define TRAIT_HUMAN_NO_RENDER "human_no_render"
// mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
@@ -307,6 +313,7 @@
#define LOCKED_HELMET_TRAIT "locked-helmet"
#define NINJA_SUIT_TRAIT "ninja-suit"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
#define ROBOT_RADSHIELDING_IMPLANT_TRAIT "robot-radshielding-implant"
#define MARTIAL_ARTIST_TRAIT "martial_artist"
#define SLEEPING_CARP_TRAIT "sleeping_carp"
#define RISING_BASS_TRAIT "rising_bass"
@@ -318,6 +325,7 @@
#define MEGAFAUNA_TRAIT "megafauna"
#define DEATHSQUAD_TRAIT "deathsquad"
#define SLIMEPUDDLE_TRAIT "slimepuddle"
#define CORRUPTED_SYSTEM "corrupted-system"
/// This trait is added by the active directional block system.
#define ACTIVE_BLOCK_TRAIT "active_block"
/// This trait is added by the parry system.
+1 -1
View File
@@ -3,4 +3,4 @@
#define CHANGETURF_FORCEOP 4
#define CHANGETURF_SKIP 8 // A flag for PlaceOnTop to just instance the new turf instead of calling ChangeTurf. Used for uninitialized turfs NOTHING ELSE
#define CHANGETURF_INHERIT_AIR 16 // Inherit air from previous turf. Implies CHANGETURF_IGNORE_AIR
#define CHANGETURF_RECALC_ADJACENT 32 //Immediately recalc adjacent atmos turfs instead of queuing.
#define CHANGETURF_RECALC_ADJACENT 32 //Immediately recalc adjacent atmos turfs instead of queuing.
+1 -1
View File
@@ -6,4 +6,4 @@
//Car trait flags
#define CAN_KIDNAP 1
#define CAN_KIDNAP 1
-4
View File
@@ -86,10 +86,6 @@
if (CONFIG_GET(flag/log_attack))
WRITE_LOG(GLOB.world_attack_log, "ATTACK: [text]")
/proc/log_wounded(text)
if (CONFIG_GET(flag/log_attack))
WRITE_LOG(GLOB.world_attack_log, "WOUND: [text]")
/proc/log_manifest(ckey, datum/mind/mind,mob/body, latejoin = FALSE)
if (CONFIG_GET(flag/log_manifest))
WRITE_LOG(GLOB.world_manifest_log, "[ckey] \\ [body.real_name] \\ [mind.assigned_role] \\ [mind.special_role ? mind.special_role : "NONE"] \\ [latejoin ? "LATEJOIN":"ROUNDSTART"]")
+27 -7
View File
@@ -46,6 +46,33 @@
I = getPAIHologramIcon(I)
return I
//Prompts this client for custom holoform parameters.
/proc/user_interface_custom_holoform(client/C)
var/datum/preferences/target_prefs = C.prefs
if(target_prefs.path)
var/list/characters = list()
var/savefile/S = new /savefile(target_prefs.path)
if(S)
var/name
var/max_save_slots = C.prefs.max_save_slots
for(var/i=1, i<=max_save_slots, i++)
S.cd = "/character[i]"
S["real_name"] >> name
if(name)
characters[name] = i
var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters
if(chosen_name)
if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
to_chat(C.mob, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
return
target_prefs = new(C)
if(!target_prefs.load_character(characters[chosen_name], TRUE))
target_prefs = C.prefs
ASSERT(target_prefs)
//In the future, maybe add custom path allowances a la admin create outfit but for now..
return generate_custom_holoform_from_prefs(target_prefs, null, null, TRUE, TRUE)
//Errors go to user.
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, mob/user)
if(user)
@@ -53,10 +80,3 @@
to_chat(user, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
return
return generate_custom_holoform_from_prefs(prefs, null, null, TRUE, TRUE)
//Prompts this client for custom holoform parameters.
/proc/user_interface_custom_holoform(client/C)
var/datum/preferences/target_prefs = C.prefs
ASSERT(target_prefs)
//In the future, maybe add custom path allowances a la admin create outfit but for now..
return generate_custom_holoform_from_prefs_safe(target_prefs, C.mob)
+15
View File
@@ -1235,3 +1235,18 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico
var/icon/I = getFlatIcon(thing)
return icon2html(I, target, sourceonly = sourceonly)
/* Gives the result RGB of a RGB string after a matrix transformation. No alpha.
* Input: rr, rg, rb, gr, gg, gb, br, bg, bb, cr, cg, cb
* Output: RGB string
*/
/proc/RGBMatrixTransform(list/color, list/cm)
ASSERT(cm.len >= 9)
if(cm.len < 12) // fill in the rest
for(var/i in 1 to (12 - cm.len))
cm += 0
if(!islist(color))
color = ReadRGB(color)
color[1] = color[1] * cm[1] + color[2] * cm[2] + color[3] * cm[3] + cm[10] * 255
color[2] = color[1] * cm[4] + color[2] * cm[5] + color[3] * cm[6] + cm[11] * 255
color[3] = color[1] * cm[7] + color[2] * cm[8] + color[3] * cm[9] + cm[12] * 255
return rgb(color[1], color[2], color[3])
+7 -1
View File
@@ -176,4 +176,10 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro
offset = (y-1)*4
for(x in 1 to 4)
output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y==5?B[x+16]:0), 0.001)
return output
return output
/**
* Assembles a color matrix, defaulting to identity
*/
/proc/rgb_construct_color_matrix(rr = 1, rg, rb, gr, gg = 1, gb, br, bg, bb = 1, cr, cg, cb)
return list(rr, rg, rb, gr, gg, gb, br, bg, bb, cr, cg, cb)
+1 -1
View File
@@ -94,4 +94,4 @@
chosen_id = input(user, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
return chosen_id
return chosen_id
+5 -2
View File
@@ -238,8 +238,11 @@
CHECK_TICK
SSdbcore.SetRoundEnd()
//Collects persistence features
if(mode.allow_persistence_save)
SSpersistence.CollectData()
if(mode.station_was_nuked)
SSpersistence.station_was_destroyed = TRUE
if(!mode.allow_persistence_save)
SSpersistence.station_persistence_save_disabled = TRUE
SSpersistence.CollectData()
//stop collecting feedback during grifftime
SSblackbox.Seal()
+2
View File
@@ -13,6 +13,7 @@
var/err_file = ""
var/static/list/interpreters = list("[MS_WINDOWS]" = "cmd /c", "[UNIX]" = "sh -c")
var/interpreter = interpreters["[world.system_type]"]
log_subsystem("SHELL", "Executing command [command]")
if(interpreter)
for(var/seo_id in shelleo_ids)
if(!shelleo_ids[seo_id])
@@ -36,6 +37,7 @@
else
CRASH("Operating System: [world.system_type] not supported") // If you encounter this error, you are encouraged to update this proc with support for the new operating system
. = list(errorcode, stdout, stderr)
log_subsystem("SHELL", "Finished execution: [errorcode], [stdout], [stderr]")
#undef SHELLEO_NAME
#undef SHELLEO_ERR
#undef SHELLEO_OUT
+1 -1
View File
@@ -16,4 +16,4 @@
SI.associative = associative
SI.binarySort(fromIndex, toIndex, fromIndex)
return L
return L
+1 -1
View File
@@ -16,4 +16,4 @@
SI.associative = associative
SI.mergeSort(fromIndex, toIndex)
return L
return L
+1 -1
View File
@@ -17,4 +17,4 @@
SI.associative = associative
SI.timSort(fromIndex, toIndex)
return L
return L
+1 -1
View File
@@ -29,4 +29,4 @@ GLOBAL_LIST_EMPTY(whitelisted_species_list)
/proc/log_looc(text)
if (CONFIG_GET(flag/log_ooc))
WRITE_FILE(GLOB.world_game_log, "\[[TIME_STAMP("hh:mm:ss", FALSE)]]LOOC: [text]")
WRITE_FILE(GLOB.world_game_log, "\[[TIME_STAMP("hh:mm:ss", FALSE)]]LOOC: [text]")
+2
View File
@@ -225,6 +225,8 @@
. += "[seperator]AUTOLOGIN"
if(rights & R_DBRANKS)
. += "[seperator]DBRANKS"
if(rights & R_SENSITIVE)
. += "[seperator]SENSITIVE"
if(!.)
. = "NONE"
return .
+1 -1
View File
@@ -40,4 +40,4 @@ GLOBAL_LIST_EMPTY(typelistkeys)
for (var/saving in savings)
to_chat(world, "Savings for [saving]: [savings[saving]] lists, [saveditems[saving]] items")
#endif
#endif
+1 -1
View File
@@ -54,4 +54,4 @@
return locate(T.x + V.x, T.y + V.y, z)
/proc/atoms2vector(var/atom/A, var/atom/B)
return new /datum/vector((B.x - A.x), (B.y - A.y)) // Vector from A -> B
return new /datum/vector((B.x - A.x), (B.y - A.y)) // Vector from A -> B
+2 -1
View File
@@ -67,7 +67,8 @@ GLOBAL_LIST_INIT(bitfields, list(
"SOUNDS" = R_SOUNDS,
"SPAWN" = R_SPAWN,
"AUTOLOGIN" = R_AUTOLOGIN,
"DBRANKS" = R_DBRANKS
"DBRANKS" = R_DBRANKS,
"SENSITIVE" = R_SENSITIVE
),
"interaction_flags_atom" = list(
"INTERACT_ATOM_REQUIRES_ANCHORED" = INTERACT_ATOM_REQUIRES_ANCHORED,
+1 -1
View File
@@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(wisdoms, world.file2list("strings/wisdoms.txt"))
//LANGUAGE CHARACTER CUSTOMIZATION
GLOBAL_LIST_INIT(speech_verbs, list("default","says","gibbers", "states", "chitters", "chimpers", "declares", "bellows", "buzzes" ,"beeps", "chirps", "clicks", "hisses" ,"poofs" , "puffs", "rattles", "mewls" ,"barks", "blorbles", "squeaks", "squawks", "flutters", "warbles"))
GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc))
GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc, "xeno tongue" = /obj/item/organ/tongue/alien))
//SPECIES BODYPART LISTS
//locked parts are those that your picked species requires to have
+2 -1
View File
@@ -9,5 +9,6 @@ GLOBAL_LIST_INIT(loadout_categories, list(
LOADOUT_CATEGORY_SHOES = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_GLOVES = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_GLASSES = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_DONATOR = LOADOUT_SUBCATEGORIES_NONE
LOADOUT_CATEGORY_DONATOR = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_UNLOCKABLE = LOADOUT_SUBCATEGORIES_NONE
))
+1 -1
View File
@@ -131,4 +131,4 @@ GLOBAL_LIST_INIT(ratking_coins, list(//Coins: Used by the regal rat mob when spa
/obj/item/coin/iron,
/obj/item/coin/silver,
/obj/item/coin/plastic,
/obj/item/coin/titanium))
/obj/item/coin/titanium))
+1 -1
View File
@@ -1 +1 @@
GLOBAL_LIST_EMPTY(commendations)
GLOBAL_LIST_EMPTY(commendations)
+3 -1
View File
@@ -52,6 +52,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
"TRAIT_EASYLIMBDISABLE" = TRAIT_EASYLIMBDISABLE,
"TRAIT_TOXINLOVER" = TRAIT_TOXINLOVER,
"TRAIT_ROBOTIC_ORGANISM" = TRAIT_ROBOTIC_ORGANISM,
"TRAIT_ROBOT_RADSHIELDING" = TRAIT_ROBOT_RADSHIELDING,
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
"TRAIT_HOLY" = TRAIT_HOLY,
@@ -102,7 +104,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_AUTO_CATCH_ITEM" = TRAIT_AUTO_CATCH_ITEM,
"TRAIT_FREESPRINT" = TRAIT_FREESPRINT,
"TRAIT_NO_INTERNALS" = TRAIT_NO_INTERNALS,
"TRAIT_NO_ALCOHOL" = TRAIT_NO_ALCOHOL,
"TRAIT_TOXIC_ALCOHOL" = TRAIT_TOXIC_ALCOHOL,
"TRAIT_MUTATION_STASIS" = TRAIT_MUTATION_STASIS,
"TRAIT_HEAVY_SLEEPER" = TRAIT_HEAVY_SLEEPER,
"TRAIT_LIGHT_STEP" = TRAIT_LIGHT_STEP,
+1 -1
View File
@@ -34,4 +34,4 @@ function dropdowns() {
}
}
}
"}
"}
+2 -3
View File
@@ -24,7 +24,7 @@
* Common mob click code
*/
/mob/proc/CommonClickOn(atom/A, params)
SHOULD_NOT_SLEEP(TRUE)
//SHOULD_NOT_SLEEP(TRUE)
if(mob_transforming)
return
if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, params) & COMSIG_MOB_CANCEL_CLICKON)
@@ -34,7 +34,7 @@
FlushCurrentAction()
else
DiscardCurrentAction()
/*
Standard mob ClickOn()
Handles exceptions: Buildmode, middle click, modified clicks, mech actions
@@ -49,7 +49,6 @@
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
*/
/mob/proc/ClickOn(atom/A, params)
SHOULD_NOT_SLEEP(TRUE)
if(check_click_intercept(params,A))
return
+1 -1
View File
@@ -87,4 +87,4 @@
S.screen_loc = screen_l
screen += S
screen += S
+1 -1
View File
@@ -36,7 +36,7 @@
return . | A.attack_hand(src, intent, .)
/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, attackchain_flags)
SHOULD_NOT_SLEEP(TRUE)
//SHOULD_NOT_SLEEP(TRUE)
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
add_fingerprint(user)
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
@@ -388,15 +388,26 @@ Example config:
var/list/probabilities = Get(/datum/config_entry/keyed_list/storyteller_weight)
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
var/list/min_player_counts = Get(/datum/config_entry/keyed_list/storyteller_min_players)
var/list/storyteller_min_chaos = Get(/datum/config_entry/keyed_list/storyteller_min_chaos)
var/list/storyteller_max_chaos = Get(/datum/config_entry/keyed_list/storyteller_max_chaos)
for(var/T in storyteller_cache)
var/datum/dynamic_storyteller/S = T
var/config_tag = initial(S.config_tag)
if(!config_tag)
continue
var/probability = (config_tag in probabilities) ? probabilities[config_tag] : initial(S.weight)
var/min_players = (config_tag in min_player_counts) ? min_player_counts[config_tag] : initial(S.min_players)
if(probability <= 0)
continue
if(length(GLOB.player_list) < min_players)
continue
if(!Get(/datum/config_entry/flag/no_storyteller_threat_removal))
var/min_chaos = (probabilities in storyteller_min_chaos) ? storyteller_min_chaos[config_tag] : initial(S.min_chaos)
var/max_chaos = (probabilities in storyteller_max_chaos) ? storyteller_max_chaos[config_tag] : initial(S.max_chaos)
if(SSpersistence.average_dynamic_threat < min_chaos)
continue
if(SSpersistence.average_dynamic_threat > max_chaos)
continue
if(SSpersistence.saved_storytellers.len == repeated_mode_adjust.len)
var/name = initial(S.name)
var/recent_round = min(SSpersistence.saved_storytellers.Find(name),3)
@@ -1,5 +1,7 @@
/datum/config_entry/flag/dynamic_voting
/datum/config_entry/flag/no_storyteller_threat_removal
/datum/config_entry/number/dynamic_high_pop_limit
config_entry_value = 55
min_val = 1
@@ -67,6 +69,9 @@
/datum/config_entry/number/dynamic_third_rule_high_pop_requirement
config_entry_value = 70
/datum/config_entry/number/dynamic_threat_baseline
config_entry_value = 50
/datum/config_entry/number_list/dynamic_hijack_requirements
/datum/config_entry/number/dynamic_hijack_high_population_requirement
@@ -74,7 +79,7 @@
/datum/config_entry/number/dynamic_hijack_cost
config_entry_value = 5
/datum/config_entry/number/dynamic_glorious_death_cost
config_entry_value = 5
@@ -96,3 +101,11 @@
/datum/config_entry/keyed_list/storyteller_min_players
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/storyteller_min_chaos
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/storyteller_max_chaos
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
@@ -566,3 +566,20 @@
config_entry_value = 0.333
min_val = 0
integer = FALSE
/// Amount of dirtyness tiles need to spawn dirt.
/datum/config_entry/number/turf_dirt_threshold
config_entry_value = 100
min_val = 1
integer = TRUE
/// Alpha dirt starts at
/datum/config_entry/number/dirt_alpha_starting
config_entry_value = 127
max_val = 255
min_val = 0
integer = TRUE
/// Dirtyness multiplier for making turfs dirty
/datum/config_entry/number/turf_dirty_multiplier
config_entry_value = 1
@@ -172,8 +172,6 @@
/datum/config_entry/string/hostedby
/datum/config_entry/flag/norespawn
/datum/config_entry/flag/guest_jobban
/datum/config_entry/flag/usewhitelist
@@ -0,0 +1,20 @@
/// Whether or not to use the persistence system for cleanable objects
/datum/config_entry/flag/persistent_debris
config_entry_value = FALSE
/// Whether or not to nuke all roundstart debris that isn't due to persistence if the above is true
/datum/config_entry/flag/persistent_debris_only
config_entry_value = TRUE
/// Max amount of objects to store, total
/datum/config_entry/number/persistent_debris_global_max
config_entry_value = 10000
integer = TRUE
/// Max amount of objects to store per type
/datum/config_entry/number/persistent_debris_type_max
config_entry_value = 2000
integer = TRUE
/// Wipe dirty stuff on nuke
/datum/config_entry/flag/persistent_debris_wipe_on_nuke
@@ -0,0 +1,47 @@
/// Allows usage of respawn system
/datum/config_entry/flag/respawns_enabled
config_entry_value = FALSE
/// Minutes before allowing respawns.
/datum/config_entry/number/respawn_delay
config_entry_value = 15.0
integer = FALSE
/// Minutes before allowing respawn, if user cryo'd.
/datum/config_entry/number/respawn_delay_cryo
config_entry_value = 5.0
integer = FALSE
/// Allows respawning as non-assistant. Overrides all others of this type.
/datum/config_entry/flag/allow_non_assistant_respawn
config_entry_value = FALSE
/// Allows respawning as a combat role, defined as security/head.
/datum/config_entry/flag/allow_combat_role_respawn
config_entry_value = FALSE
/// Allows respawning as the same character as a previous life
/datum/config_entry/flag/allow_same_character_respawn
config_entry_value = FALSE
/// Observing penalizes for respawns, not just joining.
/datum/config_entry/flag/respawn_penalty_includes_observe
config_entry_value = FALSE
/// Minutes from roundstart before someone can respawn
/datum/config_entry/number/respawn_minimum_delay_roundstart
config_entry_value = 30.0
integer = FALSE
/// Gamemode config tags that are banned from respawning
/datum/config_entry/keyed_list/respawn_chaos_gamemodes
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/respawn_chaos_gamemodes/ValidateListEntry(key_name, key_value)
. = ..()
return . && (key_name in config.modes)
/datum/config_entry/keyed_list/respawn_chaos_gamemodes/preprocess_key(key)
. = ..()
return lowertext(key)
+1 -1
View File
@@ -5,4 +5,4 @@
var/discord_url = "hfdksjhfa.com"
var/discord_password
var/announce_watchlist = 0
var/announce_adminhelps = 0
var/announce_adminhelps = 0
+1 -1
View File
@@ -97,4 +97,4 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
/datum/controller/failsafe/stat_entry(msg)
msg = "Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"
return msg
return msg
+1 -1
View File
@@ -33,4 +33,4 @@ SUBSYSTEM_DEF(adjacent_air)
if(MC_TICK_CHECK)
break
else
CHECK_TICK
CHECK_TICK
+1 -1
View File
@@ -37,4 +37,4 @@ SUBSYSTEM_DEF(autotransfer)
else
SSshuttle.autoEnd()
#undef NO_MAXVOTES_CAP
#undef NO_MAXVOTES_CAP
+8 -7
View File
@@ -115,18 +115,22 @@ SUBSYSTEM_DEF(garbage)
lastlevel = level
for (var/refID in queue)
if (!refID)
//We do this rather then for(var/refID in queue) because that sort of for loop copies the whole list.
//Normally this isn't expensive, but the gc queue can grow to 40k items, and that gets costly/causes overrun.
for (var/i in 1 to length(queue))
var/list/L = queue[i]
if (length(L) < 2)
count++
if (MC_TICK_CHECK)
return
continue
var/GCd_at_time = queue[refID]
var/GCd_at_time = L[1]
if(GCd_at_time > cut_off_time)
break // Everything else is newer, skip them
count++
var/refID = L[2]
var/datum/D
D = locate(refID)
@@ -202,10 +206,7 @@ SUBSYSTEM_DEF(garbage)
D.gc_destroyed = gctime
var/list/queue = queues[level]
if (queue[refid])
queue -= refid // Removing any previous references that were GC'd so that the current object will be at the end of the list.
queue[refid] = gctime
queue[++queue.len] = list(gctime, refid) // not += for byond reasons
#ifdef LEGACY_REFERENCE_TRACKING
/datum/controller/subsystem/garbage/proc/add_type_to_findref(type)
+10 -28
View File
@@ -6,6 +6,12 @@ SUBSYSTEM_DEF(input)
priority = FIRE_PRIORITY_INPUT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
/// KEEP THIS UP TO DATE!
var/static/list/all_macrosets = list(
SKIN_MACROSET_HOTKEYS,
SKIN_MACROSET_CLASSIC_HOTKEYS,
SKIN_MACROSET_CLASSIC_INPUT
)
/// Classic mode input focused macro set. Manually set because we can't define ANY or ANY+UP for classic.
var/static/list/macroset_classic_input
/// Classic mode map focused macro set. Manually set because it needs to be clientside and go to macroset_classic_input.
@@ -51,11 +57,6 @@ SUBSYSTEM_DEF(input)
// let's play the ascii game of A to Z (UPPERCASE)
for(var/i in 65 to 90)
classic_ctrl_override_keys += ascii2text(i)
// let's play the game of clientside bind overrides!
classic_ctrl_override_keys -= list("T", "O", "M", "L")
macroset_classic_input["Ctrl+T"] = "say"
macroset_classic_input["Ctrl+O"] = "ooc"
macroset_classic_input["Ctrl+L"] = "looc"
// let's play the list iteration game x2
for(var/key in classic_ctrl_override_keys)
// make sure to double double quote to ensure things are treated as a key combo instead of addition/semicolon logic.
@@ -67,20 +68,6 @@ SUBSYSTEM_DEF(input)
// FINALLY, WE CAN DO SOMETHING MORE NORMAL FOR THE SNOWFLAKE-BUT-LESS KEYSET.
// HAHA - SIKE. Because of BYOND weirdness (tl;dr not specifically binding this way results in potentially duplicate chatboxes when
// conflicts occur with something like say indicator vs say), we're going to snowflake this anyways
var/list/hard_binds = list(
"O" = "ooc",
"T" = "say",
"L" = "looc",
"M" = "me"
)
var/list/hard_bind_anti_collision = list()
var/list/anti_collision_modifiers = list("Ctrl", "Alt", "Shift", "Ctrl+Alt", "Ctrl+Shift", "Alt+Shift", "Ctrl+Alt+Shift")
for(var/key in hard_binds)
for(var/modifier in anti_collision_modifiers)
hard_bind_anti_collision["[modifier]+[key]"] = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
macroset_classic_hotkey = list(
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
@@ -89,9 +76,6 @@ SUBSYSTEM_DEF(input)
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
)
macroset_classic_hotkey |= hard_binds
macroset_classic_hotkey |= hard_bind_anti_collision
// And finally, the modern set.
macroset_hotkey = list(
"Any" = "\"KeyDown \[\[*\]\]\"",
@@ -101,24 +85,22 @@ SUBSYSTEM_DEF(input)
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
)
macroset_hotkey |= hard_binds
macroset_hotkey |= hard_bind_anti_collision
// Badmins just wanna have fun ♪
/datum/controller/subsystem/input/proc/refresh_client_macro_sets()
var/list/clients = GLOB.clients
for(var/i in 1 to clients.len)
var/client/user = clients[i]
user.set_macros()
user.update_movement_keys()
user.full_macro_assert()
/datum/controller/subsystem/input/fire()
set waitfor = FALSE
var/list/clients = GLOB.clients // Let's sing the list cache song
for(var/i in 1 to clients.len)
var/client/C = clients[i]
C.keyLoop()
#define NONSENSICAL_VERB "NONSENSICAL_VERB_THAT_DOES_NOTHING"
/// *sigh
/client/verb/NONSENSICAL_VERB_THAT_DOES_NOTHING()
set name = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
set name = "NONSENSICAL_VERB_THAT_DOES_NOTHING"
set hidden = TRUE
+19 -3
View File
@@ -670,11 +670,12 @@ SUBSYSTEM_DEF(job)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
if(the_mob.client && the_mob.client.prefs && (the_mob.client.prefs.chosen_gear && the_mob.client.prefs.chosen_gear.len))
var/list/chosen_gear = the_mob.client.prefs.loadout_data["SAVE_[the_mob.client.prefs.loadout_slot]"]
if(the_mob.client && the_mob.client.prefs && (chosen_gear && chosen_gear.len))
if(!ishuman(M))//no silicons allowed
return
for(var/i in the_mob.client.prefs.chosen_gear)
var/datum/gear/G = i
for(var/i in chosen_gear)
var/datum/gear/G = istext(i[LOADOUT_ITEM]) ? text2path(i[LOADOUT_ITEM]) : i[LOADOUT_ITEM]
G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)]
if(!G)
continue
@@ -690,6 +691,21 @@ SUBSYSTEM_DEF(job)
if(!permitted)
continue
var/obj/item/I = new G.path
if(I && length(i[LOADOUT_COLOR])) //handle loadout colors
//handle polychromic items
if((G.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC) && length(G.loadout_initial_colors))
var/datum/element/polychromic/polychromic = I.comp_lookup["item_worn_overlays"] //stupid way to do it but GetElement does not work for this
if(polychromic && istype(polychromic))
var/list/polychromic_entry = polychromic.colors_by_atom[I]
if(polychromic_entry)
if(polychromic.suits_with_helmet_typecache[I.type]) //is this one of those toggleable hood/helmet things?
polychromic.connect_helmet(I,i[LOADOUT_COLOR])
polychromic.colors_by_atom[I] = i[LOADOUT_COLOR]
I.update_icon()
else
//handle non-polychromic items (they only have one color)
I.add_atom_colour(i[LOADOUT_COLOR][1], FIXED_COLOUR_PRIORITY)
I.update_icon()
if(!M.equip_to_slot_if_possible(I, G.slot, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
if(iscarbon(M))
var/mob/living/carbon/C = M
+14
View File
@@ -41,6 +41,8 @@ SUBSYSTEM_DEF(mapping)
var/datum/space_level/transit
var/datum/space_level/empty_space
var/num_of_res_levels = 1
/// Lookup for zlevel to station z. text = num.
var/list/z_to_station_z_index
var/stat_map_name = "Loading..."
@@ -259,6 +261,16 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
return parsed_maps
/datum/controller/subsystem/mapping/proc/setup_station_z_index()
z_to_station_z_index = list()
var/sz = 1
var/cz = station_start
if(islist(config.map_file))
for(var/map in config.map_file)
z_to_station_z_index["[cz++]"] = sz++
else
z_to_station_z_index["[station_start]"] = 1
/datum/controller/subsystem/mapping/proc/loadWorld()
//if any of these fail, something has gone horribly, HORRIBLY, wrong
var/list/FailedZs = list()
@@ -271,6 +283,8 @@ SUBSYSTEM_DEF(mapping)
INIT_ANNOUNCE("Loading [config.map_name]...")
LoadGroup(FailedZs, "Station", config.map_path, config.map_file, config.traits, ZTRAITS_STATION, FALSE, config.orientation)
setup_station_z_index()
if(SSdbcore.Connect())
var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
query_round_map_name.Execute()
+1 -1
View File
@@ -35,4 +35,4 @@ SUBSYSTEM_DEF(minor_mapping)
if(locate(/obj/structure/cable) in T)
exposed_wires += T
return shuffle(exposed_wires)
return shuffle(exposed_wires)
@@ -5,18 +5,14 @@ SUBSYSTEM_DEF(persistence)
name = "Persistence"
init_order = INIT_ORDER_PERSISTENCE
flags = SS_NO_FIRE
var/list/satchel_blacklist = list() //this is a typecache
var/list/new_secret_satchels = list() //these are objects
var/list/old_secret_satchels = list()
/// Marks if the station got horribly destroyed
var/station_was_destroyed = FALSE
/// Marks if persistence save should be disabled
var/station_persistence_save_disabled = FALSE
var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list()
var/list/saved_modes = list(1,2,3)
var/list/saved_dynamic_rules = list(list(),list(),list())
var/list/saved_storytellers = list("foo","bar","baz")
var/list/average_dynamic_threat = 50
var/list/saved_maps
var/list/saved_trophies = list()
var/list/spawned_objects = list()
var/list/antag_rep = list()
var/list/antag_rep_change = list()
@@ -28,62 +24,81 @@ SUBSYSTEM_DEF(persistence)
var/list/paintings = list()
/datum/controller/subsystem/persistence/Initialize()
LoadSatchels()
LoadPoly()
LoadChiselMessages()
LoadTrophies()
LoadRecentModes()
LoadRecentStorytellers()
LoadRecentRulesets()
LoadRecentMaps()
LoadPhotoPersistence()
LoadServerPersistence()
LoadGamePersistence()
var/map_persistence_path = get_map_persistence_path()
if(map_persistence_path)
LoadMapPersistence()
return ..()
/**
* Gets the persistence path of the current map.
*/
/datum/controller/subsystem/persistence/proc/get_map_persistence_path()
ASSERT(SSmapping.config)
if(!SSmapping.config.persistence_key || (SSmapping.config.persistence_key == "NO_PERSIST"))
return null
return "data/persistence/[ckey(SSmapping.config.persistence_key)]"
/datum/controller/subsystem/persistence/proc/CollectData()
SaveServerPersistence()
if(station_persistence_save_disabled)
return
SaveGamePersistence()
var/map_persistence_path = get_map_persistence_path()
if(map_persistence_path)
SaveMapPersistence()
/**
* Loads persistent data relevant to the server: Configurations, past gamemodes, votes, antag rep, etc
*/
/datum/controller/subsystem/persistence/proc/LoadServerPersistence()
for(var/client/C in GLOB.clients)
LoadSavedVote(C.ckey)
if(CONFIG_GET(flag/use_antag_rep))
LoadAntagReputation()
LoadRandomizedRecipes()
LoadPanicBunker()
return ..()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
var/placed_satchel = 0
var/path
/**
* Saves persistent data relevant to the server: Configurations, past gamemodes, votes, antag rep, etc
*/
/datum/controller/subsystem/persistence/proc/SaveServerPersistence()
if(CONFIG_GET(flag/use_antag_rep))
CollectAntagReputation()
SaveRandomizedRecipes()
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/json = list()
if(fexists(json_file))
json = json_decode(file2text(json_file))
/**
* Loads persistent data relevant to the game in general: Photos, etc
*
* Legacy map persistence systems also use this.
*/
/datum/controller/subsystem/persistence/proc/LoadGamePersistence()
LoadChiselMessages()
LoadPhotoPersistence()
LoadPaintings()
old_secret_satchels = json["data"]
var/obj/item/storage/backpack/satchel/flat/F
if(old_secret_satchels && old_secret_satchels.len >= 10) //guards against low drop pools assuring that one player cannot reliably find his own gear.
var/pos = rand(1, old_secret_satchels.len)
F = new()
old_secret_satchels.Cut(pos, pos+1 % old_secret_satchels.len)
F.x = old_secret_satchels[pos]["x"]
F.y = old_secret_satchels[pos]["y"]
F.z = SSmapping.station_start
path = text2path(old_secret_satchels[pos]["saved_obj"])
/**
* Saves persistent data relevant to the game in general: Photos, etc
*
* Legacy map persistence systems also use this.
*/
/datum/controller/subsystem/persistence/proc/SaveGamePersistence()
CollectChiselMessages()
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
SavePaintings()
SaveScars()
if(F)
if(isfloorturf(F.loc) && !isplatingturf(F.loc))
F.hide(1)
if(ispath(path))
var/spawned_item = new path(F)
spawned_objects[spawned_item] = TRUE
placed_satchel++
var/free_satchels = 0
for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,SSmapping.station_start), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,SSmapping.station_start)))) //Nontrivially expensive but it's roundstart only
if(isfloorturf(T) && !isplatingturf(T))
new /obj/item/storage/backpack/satchel/flat/secret(T)
free_satchels++
if((free_satchels + placed_satchel) == 10) //ten tiles, more than enough to kill anything that moves
break
/**
* Loads persistent data relevant to the current map: Objects, etc.
*/
/datum/controller/subsystem/persistence/proc/LoadMapPersistence()
return
/datum/controller/subsystem/persistence/proc/LoadPoly()
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.alive_mob_list)
twitterize(P.speech_buffer, "polytalk")
break //Who's been duping the bird?!
/**
* Saves persistent data relevant to the current map: Objects, etc.
*/
/datum/controller/subsystem/persistence/proc/SaveMapPersistence()
return
/datum/controller/subsystem/persistence/proc/LoadChiselMessages()
var/list/saved_messages = list()
@@ -130,63 +145,6 @@ SUBSYSTEM_DEF(persistence)
log_world("Loaded [saved_messages.len] engraved messages on map [SSmapping.config.map_name]")
/datum/controller/subsystem/persistence/proc/LoadTrophies()
if(fexists("data/npc_saves/TrophyItems.sav")) //legacy compatability to convert old format to new
var/savefile/S = new /savefile("data/npc_saves/TrophyItems.sav")
var/saved_json
S >> saved_json
if(!saved_json)
return
saved_trophies = json_decode(saved_json)
fdel("data/npc_saves/TrophyItems.sav")
else
var/json_file = file("data/npc_saves/TrophyItems.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_trophies = json["data"]
SetUpTrophies(saved_trophies.Copy())
/datum/controller/subsystem/persistence/proc/LoadRecentModes()
var/json_file = file("data/RecentModes.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_modes = json["data"]
/datum/controller/subsystem/persistence/proc/LoadRecentRulesets()
var/json_file = file("data/RecentRulesets.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_dynamic_rules = json["data"]
/datum/controller/subsystem/persistence/proc/LoadRecentStorytellers()
var/json_file = file("data/RecentStorytellers.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_storytellers = json["data"]
if(saved_storytellers.len > 3)
average_dynamic_threat = saved_storytellers[4]
saved_storytellers.len = 3
/datum/controller/subsystem/persistence/proc/LoadRecentMaps()
var/json_file = file("data/RecentMaps.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_maps = json["maps"]
/datum/controller/subsystem/persistence/proc/LoadAntagReputation()
var/json = file2text(FILE_ANTAG_REP)
@@ -207,59 +165,6 @@ SUBSYSTEM_DEF(persistence)
return
saved_votes[ckey] = json["data"]
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
if (T.showpiece)
continue
T.added_roundstart = TRUE
var/trophy_data = pick_n_take(trophy_items)
if(!islist(trophy_data))
continue
var/list/chosen_trophy = trophy_data
if(!chosen_trophy || isemptylist(chosen_trophy)) //Malformed
continue
var/path = text2path(chosen_trophy["path"]) //If the item no longer exist, this returns null
if(!path)
continue
T.showpiece = new /obj/item/showpiece_dummy(T, path)
T.trophy_message = chosen_trophy["message"]
T.placer_key = chosen_trophy["placer_key"]
T.update_icon()
/datum/controller/subsystem/persistence/proc/CollectData()
CollectChiselMessages()
CollectSecretSatchels()
CollectTrophies()
CollectRoundtype()
if(istype(SSticker.mode, /datum/game_mode/dynamic))
var/datum/game_mode/dynamic/mode = SSticker.mode
CollectStoryteller(mode)
CollectRulesets(mode)
RecordMaps()
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
if(CONFIG_GET(flag/use_antag_rep))
CollectAntagReputation()
SaveRandomizedRecipes()
SavePanicBunker()
SavePaintings()
SaveScars()
/datum/controller/subsystem/persistence/proc/LoadPanicBunker()
var/bunker_path = file("data/bunker_passthrough.json")
if(fexists(bunker_path))
var/list/json = json_decode(file2text(bunker_path))
GLOB.bunker_passthrough = json["data"]
for(var/ckey in GLOB.bunker_passthrough)
if(daysSince(GLOB.bunker_passthrough[ckey]) >= CONFIG_GET(number/max_bunker_days))
GLOB.bunker_passthrough -= ckey
/datum/controller/subsystem/persistence/proc/GetPhotoAlbums()
var/album_path = file("data/photo_albums.json")
if(fexists(album_path))
@@ -329,35 +234,6 @@ SUBSYSTEM_DEF(persistence)
WRITE_FILE(frame_path, frame_json)
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar))
var/list/satchels_to_add = list()
for(var/A in new_secret_satchels)
var/obj/item/storage/backpack/satchel/flat/F = A
if(QDELETED(F) || F.z != SSmapping.station_start || F.invisibility != INVISIBILITY_MAXIMUM)
continue
var/list/savable_obj = list()
for(var/obj/O in F)
if(is_type_in_typecache(O, satchel_blacklist) || (O.flags_1 & ADMIN_SPAWNED_1))
continue
if(O.persistence_replacement)
savable_obj += O.persistence_replacement
else
savable_obj += O.type
if(isemptylist(savable_obj))
continue
var/list/data = list()
data["x"] = F.x
data["y"] = F.y
data["saved_obj"] = pick(savable_obj)
satchels_to_add += list(data)
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/file_data = list()
fdel(json_file)
file_data["data"] = old_secret_satchels + satchels_to_add
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectChiselMessages()
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
@@ -373,84 +249,6 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/SaveChiselMessage(obj/structure/chisel_message/M)
saved_messages += list(M.pack()) // dm eats one list
/datum/controller/subsystem/persistence/proc/CollectTrophies()
var/json_file = file("data/npc_saves/TrophyItems.json")
var/list/file_data = list()
file_data["data"] = remove_duplicate_trophies(saved_trophies)
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/SavePanicBunker()
var/json_file = file("data/bunker_passthrough.json")
var/list/file_data = list()
file_data["data"] = GLOB.bunker_passthrough
fdel(json_file)
WRITE_FILE(json_file,json_encode(file_data))
/datum/controller/subsystem/persistence/proc/remove_duplicate_trophies(list/trophies)
var/list/ukeys = list()
. = list()
for(var/trophy in trophies)
var/tkey = "[trophy["path"]]-[trophy["message"]]"
if(ukeys[tkey])
continue
else
. += list(trophy)
ukeys[tkey] = TRUE
/datum/controller/subsystem/persistence/proc/SaveTrophy(obj/structure/displaycase/trophy/T)
if(!T.added_roundstart && T.showpiece)
var/list/data = list()
data["path"] = T.showpiece.type
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)
/datum/controller/subsystem/persistence/proc/CollectRoundtype()
saved_modes[3] = saved_modes[2]
saved_modes[2] = saved_modes[1]
saved_modes[1] = SSticker.mode.config_tag
var/json_file = file("data/RecentModes.json")
var/list/file_data = list()
file_data["data"] = saved_modes
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectStoryteller(var/datum/game_mode/dynamic/mode)
saved_storytellers.len = 3
saved_storytellers[3] = saved_storytellers[2]
saved_storytellers[2] = saved_storytellers[1]
saved_storytellers[1] = mode.storyteller.name
average_dynamic_threat = (mode.threat_average + average_dynamic_threat) / 2
var/json_file = file("data/RecentStorytellers.json")
var/list/file_data = list()
file_data["data"] = saved_storytellers + average_dynamic_threat
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectRulesets(var/datum/game_mode/dynamic/mode)
saved_dynamic_rules[3] = saved_dynamic_rules[2]
saved_dynamic_rules[2] = saved_dynamic_rules[1]
saved_dynamic_rules[1] = list()
for(var/r in mode.executed_rules)
var/datum/dynamic_ruleset/rule = r
saved_dynamic_rules[1] += rule.config_tag
var/json_file = file("data/RecentRulesets.json")
var/list/file_data = list()
file_data["data"] = saved_dynamic_rules
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/RecordMaps()
saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]")
var/json_file = file("data/RecentMaps.json")
var/list/file_data = list()
file_data["maps"] = saved_maps
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectAntagReputation()
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
@@ -0,0 +1,177 @@
/**
* Persistence for cleanable debris.
*/
/datum/controller/subsystem/persistence
/// tracks if we already loaded debris. Unlike everything else, this can actually be a major problem if some badmin procs it twice.
var/loaded_debris = FALSE
/datum/controller/subsystem/persistence/LoadMapPersistence()
. = ..()
if(CONFIG_GET(flag/persistent_debris))
LoadMapDebris()
/datum/controller/subsystem/persistence/SaveMapPersistence()
. = ..()
if(CONFIG_GET(flag/persistent_debris))
SaveMapDebris()
/datum/controller/subsystem/persistence/proc/LoadMapDebris()
if(CONFIG_GET(flag/persistent_debris_only))
wipe_existing_debris()
if(!fexists("[get_map_persistence_path()]/debris.json"))
return
if(loaded_debris)
return
loaded_debris = TRUE
var/list/allowed_turf_typecache = typecacheof(/turf/open) - typecacheof(/turf/open/space)
var/list/allowed_z_cache = list()
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
allowed_z_cache[num2text(z)] = TRUE
var/list/data = json_decode(file2text("[get_map_persistence_path()]/debris.json"))
var/list/z_lookup = list()
var/loaded = 0
var/list/loaded_by_type = list()
var/nopath = 0
var/badloc = 0
var/noturf = 0
/// reverse it
for(var/z in SSmapping.z_to_station_z_index)
var/sz = SSmapping.z_to_station_z_index[z]
z_lookup[num2text(sz)] = text2num(z)
for(var/z in data)
var/actual_z = z_lookup[z]
var/list/L1 = data[z]
for(var/x in L1)
var/list/L2 = data[z][x]
for(var/y in L2)
var/turf/tile = locate(text2num(x), text2num(y), actual_z)
if(!tile)
noturf++
continue
var/list/objects = data[z][x][y]
for(var/_L in objects)
var/list/objdata
var/path
if(islist(_L))
objdata = _L
path = text2path(objdata["__PATH__"])
else
path = text2path(_L)
objdata = objects[_L]
if(!path)
nopath++
continue
if(!IsValidDebrisLocation(tile, allowed_turf_typecache, allowed_z_cache, path, TRUE))
badloc++
continue
var/obj/effect/decal/cleanable/instantiated = new path(tile)
loaded_by_type[path] += 1
loaded++
if(objdata)
instantiated.PersistenceLoad(objdata)
var/list/bytype = list()
for(var/path in loaded_by_type)
bytype += "[path] - [loaded_by_type[path]]"
subsystem_log(
{"Debris loading completed:
Errors:
No path: [nopath]
Invalid location: [badloc]
No turf on map: [noturf]
Total loaded: [loaded]
By type:
[bytype.Join("\n")]"}
)
/datum/controller/subsystem/persistence/proc/SaveMapDebris()
if(fexists("[get_map_persistence_path()]/debris.json"))
fdel("[get_map_persistence_path()]/debris.json")
if(CONFIG_GET(flag/persistent_debris_wipe_on_nuke) && station_was_destroyed)
return // local janitor cheers on nukeop team to save some work
var/list/data = list()
var/list/z_lookup = SSmapping.z_to_station_z_index
var/list/debris = RelevantPersistentDebris()
var/obj/effect/decal/cleanable/saving
var/global_max = CONFIG_GET(number/persistent_debris_global_max)
var/type_max = CONFIG_GET(number/persistent_debris_type_max)
var/stored = 0
var/list/stored_by_type = list()
for(var/i in debris)
saving = i
var/list/serializing = list()
var/path = saving.PersistenceSave(serializing)
if(!path)
continue
if(stored_by_type[path] > type_max)
continue
var/text_z = num2text(z_lookup[num2text(saving.z)])
var/text_y = num2text(saving.y)
var/text_x = num2text(saving.x)
LAZYINITLIST(data[text_z])
LAZYINITLIST(data[text_z][text_x])
LAZYINITLIST(data[text_z][text_x][text_y])
if(saving.persistence_allow_stacking)
serializing["__PATH__"] = path
data[text_z][text_x][text_y] += list(serializing)
else
data[text_z][text_x][text_y][path] = serializing
stored++
if(stored > global_max)
var/w = "Persistent debris saving globally aborted due to global max >= [global_max]. Either janitors never do their jobs or something is wrong."
message_admins(w)
subsystem_log(w)
return
stored_by_type[path] = stored_by_type[path]? stored_by_type[path] + 1 : 1
if(stored_by_type[path] > type_max)
var/w = "Persistent debris saving aborted for type [path] due to type max >= [global_max]. Either janitors never do their jobs or something is wrong."
message_admins(w)
subsystem_log(w)
var/list/bytype = list()
for(var/path in stored_by_type)
bytype += "[path] - [stored_by_type[path]]"
subsystem_log(
{"Debris saving completed:
Total: [stored]
By type:
[bytype.Join("\n")]"}
)
WRITE_FILE(file("[get_map_persistence_path()]/debris.json"), json_encode(data))
/datum/controller/subsystem/persistence/proc/IsValidDebrisLocation(turf/tile, list/allowed_typecache, list/allowed_zcache, obj/effect/decal/cleanable/type, loading = FALSE)
if(!allowed_typecache[tile.type])
return FALSE
var/area/A = tile.loc
if(!A.persistent_debris_allowed)
return FALSE
if(!allowed_zcache[num2text(tile.z)])
return FALSE
if(loading)
if(!initial(type.persistence_allow_stacking))
var/obj/effect/decal/cleanable/C = locate(type) in tile
if(!QDELETED(C))
return FALSE
// Saving verifies allow stacking in the save proc.
for(var/obj/structure/window/W in tile)
if(W.fulltile)
return FALSE
return TRUE
/datum/controller/subsystem/persistence/proc/wipe_existing_debris()
var/list/existing = RelevantPersistentDebris()
QDEL_LIST(existing)
/datum/controller/subsystem/persistence/proc/RelevantPersistentDebris()
var/list/allowed_turf_typecache = typecacheof(/turf/open) - typecacheof(/turf/open/space)
var/list/allowed_z_cache = list()
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
allowed_z_cache[num2text(z)] = TRUE
. = list()
for(var/obj/effect/decal/cleanable/C in world)
if(!C.loc || QDELETED(C))
continue
if(!C.persistent)
continue
if(!IsValidDebrisLocation(C.loc, allowed_turf_typecache, allowed_z_cache, C.type, FALSE))
continue
. += C
@@ -0,0 +1,26 @@
/**
* Persists panic bunker whitelisting for a configured period of time
*/
/datum/controller/subsystem/persistence/LoadServerPersistence()
. = ..()
LoadPanicBunker()
/datum/controller/subsystem/persistence/SaveServerPersistence()
. = ..()
SavePanicBunker()
/datum/controller/subsystem/persistence/proc/LoadPanicBunker()
var/bunker_path = file("data/bunker_passthrough.json")
if(fexists(bunker_path))
var/list/json = json_decode(file2text(bunker_path))
GLOB.bunker_passthrough = json["data"]
for(var/ckey in GLOB.bunker_passthrough)
if(daysSince(GLOB.bunker_passthrough[ckey]) >= CONFIG_GET(number/max_bunker_days))
GLOB.bunker_passthrough -= ckey
/datum/controller/subsystem/persistence/proc/SavePanicBunker()
var/json_file = file("data/bunker_passthrough.json")
var/list/file_data = list()
file_data["data"] = GLOB.bunker_passthrough
fdel(json_file)
WRITE_FILE(json_file,json_encode(file_data))
@@ -0,0 +1,11 @@
/**
* Persists poly messages across rounds
*/
/datum/controller/subsystem/persistence/LoadGamePersistence()
. = ..()
LoadPoly()
/datum/controller/subsystem/persistence/proc/LoadPoly()
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.alive_mob_list)
twitterize(P.speech_buffer, "polytalk")
break //Who's been duping the bird?!
@@ -0,0 +1,107 @@
/**
* Stores recently played gamemodes, maps, etc.
*/
/datum/controller/subsystem/persistence
var/list/saved_modes = list(1,2,3)
var/list/saved_dynamic_rules = list(list(),list(),list())
var/list/saved_storytellers = list("foo","bar","baz")
var/list/average_dynamic_threat = 50
var/list/saved_maps
/datum/controller/subsystem/persistence/SaveServerPersistence()
. = ..()
CollectRoundtype()
if(istype(SSticker.mode, /datum/game_mode/dynamic))
var/datum/game_mode/dynamic/mode = SSticker.mode
CollectStoryteller(mode)
CollectRulesets(mode)
RecordMaps()
/datum/controller/subsystem/persistence/LoadServerPersistence()
. = ..()
LoadRecentModes()
LoadRecentStorytellers()
LoadRecentRulesets()
LoadRecentMaps()
/datum/controller/subsystem/persistence/proc/CollectRoundtype()
saved_modes[3] = saved_modes[2]
saved_modes[2] = saved_modes[1]
saved_modes[1] = SSticker.mode.config_tag
var/json_file = file("data/RecentModes.json")
var/list/file_data = list()
file_data["data"] = saved_modes
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectStoryteller(var/datum/game_mode/dynamic/mode)
saved_storytellers.len = 3
saved_storytellers[3] = saved_storytellers[2]
saved_storytellers[2] = saved_storytellers[1]
saved_storytellers[1] = mode.storyteller.name
average_dynamic_threat = (mode.max_threat + average_dynamic_threat) / 2
var/json_file = file("data/RecentStorytellers.json")
var/list/file_data = list()
file_data["data"] = saved_storytellers + average_dynamic_threat
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectRulesets(var/datum/game_mode/dynamic/mode)
saved_dynamic_rules[3] = saved_dynamic_rules[2]
saved_dynamic_rules[2] = saved_dynamic_rules[1]
saved_dynamic_rules[1] = list()
for(var/r in mode.executed_rules)
var/datum/dynamic_ruleset/rule = r
saved_dynamic_rules[1] += rule.config_tag
var/json_file = file("data/RecentRulesets.json")
var/list/file_data = list()
file_data["data"] = saved_dynamic_rules
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/RecordMaps()
saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]")
var/json_file = file("data/RecentMaps.json")
var/list/file_data = list()
file_data["maps"] = saved_maps
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/LoadRecentModes()
var/json_file = file("data/RecentModes.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_modes = json["data"]
/datum/controller/subsystem/persistence/proc/LoadRecentRulesets()
var/json_file = file("data/RecentRulesets.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_dynamic_rules = json["data"]
/datum/controller/subsystem/persistence/proc/LoadRecentStorytellers()
var/json_file = file("data/RecentStorytellers.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_storytellers = json["data"]
if(saved_storytellers.len > 3)
average_dynamic_threat = saved_storytellers[4]
saved_storytellers.len = 3
/datum/controller/subsystem/persistence/proc/LoadRecentMaps()
var/json_file = file("data/RecentMaps.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_maps = json["maps"]
@@ -0,0 +1,79 @@
/**
* Secret satchel persistence - allows storing of items in underfloor satchels that's loaded later.
*/
/datum/controller/subsystem/persistence
var/list/satchel_blacklist = list() //this is a typecache
var/list/new_secret_satchels = list() //these are objects
var/list/old_secret_satchels = list()
/datum/controller/subsystem/persistence/LoadGamePersistence()
. = ..()
LoadSatchels()
/datum/controller/subsystem/persistence/SaveGamePersistence()
. = ..()
CollectSecretSatchels()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
var/placed_satchel = 0
var/path
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/json = list()
if(fexists(json_file))
json = json_decode(file2text(json_file))
old_secret_satchels = json["data"]
var/obj/item/storage/backpack/satchel/flat/F
if(old_secret_satchels && old_secret_satchels.len >= 10) //guards against low drop pools assuring that one player cannot reliably find his own gear.
var/pos = rand(1, old_secret_satchels.len)
F = new()
old_secret_satchels.Cut(pos, pos+1 % old_secret_satchels.len)
F.x = old_secret_satchels[pos]["x"]
F.y = old_secret_satchels[pos]["y"]
F.z = SSmapping.station_start
path = text2path(old_secret_satchels[pos]["saved_obj"])
if(F)
if(isfloorturf(F.loc) && !isplatingturf(F.loc))
F.hide(1)
if(ispath(path))
var/spawned_item = new path(F)
spawned_objects[spawned_item] = TRUE
placed_satchel++
var/free_satchels = 0
for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,SSmapping.station_start), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,SSmapping.station_start)))) //Nontrivially expensive but it's roundstart only
if(isfloorturf(T) && !isplatingturf(T))
new /obj/item/storage/backpack/satchel/flat/secret(T)
free_satchels++
if((free_satchels + placed_satchel) == 10) //ten tiles, more than enough to kill anything that moves
break
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar))
var/list/satchels_to_add = list()
for(var/A in new_secret_satchels)
var/obj/item/storage/backpack/satchel/flat/F = A
if(QDELETED(F) || F.z != SSmapping.station_start || F.invisibility != INVISIBILITY_MAXIMUM)
continue
var/list/savable_obj = list()
for(var/obj/O in F)
if(is_type_in_typecache(O, satchel_blacklist) || (O.flags_1 & ADMIN_SPAWNED_1))
continue
if(O.persistence_replacement)
savable_obj += O.persistence_replacement
else
savable_obj += O.type
if(isemptylist(savable_obj))
continue
var/list/data = list()
data["x"] = F.x
data["y"] = F.y
data["saved_obj"] = pick(savable_obj)
satchels_to_add += list(data)
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/file_data = list()
fdel(json_file)
file_data["data"] = old_secret_satchels + satchels_to_add
WRITE_FILE(json_file, json_encode(file_data))
@@ -0,0 +1,84 @@
/**
* Stores trophies in curator display cases
*/
/datum/controller/subsystem/persistence
var/list/saved_trophies = list()
/datum/controller/subsystem/persistence/LoadGamePersistence()
. = ..()
LoadTrophies()
/datum/controller/subsystem/persistence/SaveGamePersistence()
. = ..()
CollectTrophies()
/datum/controller/subsystem/persistence/proc/LoadTrophies()
if(fexists("data/npc_saves/TrophyItems.sav")) //legacy compatability to convert old format to new
var/savefile/S = new /savefile("data/npc_saves/TrophyItems.sav")
var/saved_json
S >> saved_json
if(!saved_json)
return
saved_trophies = json_decode(saved_json)
fdel("data/npc_saves/TrophyItems.sav")
else
var/json_file = file("data/npc_saves/TrophyItems.json")
if(!fexists(json_file))
return
var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_trophies = json["data"]
SetUpTrophies(saved_trophies.Copy())
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
if (T.showpiece)
continue
T.added_roundstart = TRUE
var/trophy_data = pick_n_take(trophy_items)
if(!islist(trophy_data))
continue
var/list/chosen_trophy = trophy_data
if(!chosen_trophy || isemptylist(chosen_trophy)) //Malformed
continue
var/path = text2path(chosen_trophy["path"]) //If the item no longer exist, this returns null
if(!path)
continue
T.showpiece = new /obj/item/showpiece_dummy(T, path)
T.trophy_message = chosen_trophy["message"]
T.placer_key = chosen_trophy["placer_key"]
T.update_icon()
/datum/controller/subsystem/persistence/proc/CollectTrophies()
var/json_file = file("data/npc_saves/TrophyItems.json")
var/list/file_data = list()
file_data["data"] = remove_duplicate_trophies(saved_trophies)
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/remove_duplicate_trophies(list/trophies)
var/list/ukeys = list()
. = list()
for(var/trophy in trophies)
var/tkey = "[trophy["path"]]-[trophy["message"]]"
if(ukeys[tkey])
continue
else
. += list(trophy)
ukeys[tkey] = TRUE
/datum/controller/subsystem/persistence/proc/SaveTrophy(obj/structure/displaycase/trophy/T)
if(!T.added_roundstart && T.showpiece)
var/list/data = list()
data["path"] = T.showpiece.type
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)
@@ -19,4 +19,4 @@ PROCESSING_SUBSYSTEM_DEF(nanites)
if(!force && !check_hardware(backup))
return
if(backup.cloud_id == cloud_id)
return backup
return backup
+1 -1
View File
@@ -14,4 +14,4 @@ PROCESSING_SUBSYSTEM_DEF(radiation)
var/atom/master = contamination.parent
SSblackbox.record_feedback("tally", "contaminated", 1, master.type)
var/msg = "has become contamintaed with enough radiation to contaminate other objects. || Source: [contamination.source] || Strength: [contamination.strength]"
master.investigate_log(msg, INVESTIGATE_RADIATION)
master.investigate_log(msg, INVESTIGATE_RADIATION)
+5
View File
@@ -371,6 +371,11 @@ SUBSYSTEM_DEF(ticker)
if(player.ready == PLAYER_READY_TO_PLAY && player.mind)
GLOB.joined_player_list += player.ckey
player.create_character(FALSE)
if(player.new_character && player.client && player.client.prefs) // we cannot afford a runtime, ever
LAZYOR(player.client.prefs.slots_joined_as, player.client.prefs.default_slot)
LAZYOR(player.client.prefs.characters_joined_as, player.new_character.real_name)
else
stack_trace("WARNING: Either a player did not have a new_character, did not have a client, or did not have preferences. This is VERY bad.")
else
player.new_player_panel()
CHECK_TICK
+1 -1
View File
@@ -492,7 +492,7 @@ SUBSYSTEM_DEF(vote)
if("dynamic")
GLOB.master_mode = "dynamic"
var/list/probabilities = CONFIG_GET(keyed_list/storyteller_weight)
for(var/T in config.storyteller_cache)
for(var/T in config.get_runnable_storytellers())
var/datum/dynamic_storyteller/S = T
var/probability = ((initial(S.config_tag) in probabilities) ? probabilities[initial(S.config_tag)] : initial(S.weight))
if(probability > 0)
+4
View File
@@ -2,6 +2,7 @@
#define AB_CHECK_STUN 2
#define AB_CHECK_LYING 4
#define AB_CHECK_CONSCIOUS 8
#define AB_CHECK_ALIVE 16
/datum/action
var/name = "Generic Action"
@@ -115,6 +116,9 @@
if(check_flags & AB_CHECK_CONSCIOUS)
if(owner.stat)
return FALSE
if(check_flags & AB_CHECK_ALIVE)
if(owner.stat == DEAD)
return FALSE
return TRUE
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
+1 -1
View File
@@ -263,4 +263,4 @@
popleft(speak_dejavu) //Remove the oldest
speak_dejavu += speech_args[SPEECH_MESSAGE]
else
speak_dejavu += speech_args[SPEECH_MESSAGE]
speak_dejavu += speech_args[SPEECH_MESSAGE]
+9 -9
View File
@@ -1,9 +1,9 @@
# Datum Component System (DCS)
## Concept
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a `SendSignal()` call. Now every component that want's to can also know about this happening.
See [this thread](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=22674) for an introduction to the system as a whole.
### See/Define signals and their arguments in [__DEFINES\components.dm](..\..\__DEFINES\components.dm)
# Datum Component System (DCS)
## Concept
Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a `SendSignal()` call. Now every component that want's to can also know about this happening.
See [this thread](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=22674) for an introduction to the system as a whole.
### See/Define signals and their arguments in [__DEFINES\components.dm](..\..\__DEFINES\components.dm)
@@ -451,4 +451,4 @@
if(istype(I, /obj/item/stack/sheet/glass))
if(do_after(user,10, target = src))
new next_step(user.loc, 1)
qdel(src)
qdel(src)
@@ -95,4 +95,4 @@
name = "Handmade Glasses"
desc = "Handmade glasses that have not been polished at all making them useless. Selling them could still be worth a few credits."
icon = 'icons/obj/glass_ware.dmi'
icon_state = "frames_2"
icon_state = "frames_2"
@@ -172,11 +172,11 @@
///////////////////
/datum/crafting_recipe/upgraded_gauze
name = "Improved Gauze"
name = "Sterilized Gauze"
result = /obj/item/stack/medical/gauze/adv/one
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
/datum/reagent/space_cleaner/sterilizine = 10)
/datum/reagent/space_cleaner/sterilizine = 5)
category = CAT_MISC
subcategory = CAT_TOOL
@@ -184,7 +184,7 @@
name = "Suture Pack"
result = /obj/item/stack/medical/suture/five
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
reqs = list(/obj/item/stack/medical/gauze/adv = 1,
/datum/reagent/medicine/styptic_powder = 10)
category = CAT_MISC
subcategory = CAT_TOOL
@@ -193,7 +193,7 @@
name = "Regenerative Mesh"
result = /obj/item/stack/medical/mesh/five
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
reqs = list(/obj/item/stack/medical/gauze/adv = 1,
/datum/reagent/medicine/silver_sulfadiazine = 10)
category = CAT_MISC
subcategory = CAT_TOOL
@@ -40,7 +40,7 @@
/datum/crafting_recipe/floorbot
name = "Floorbot"
result = /mob/living/simple_animal/bot/floorbot
reqs = list(/obj/item/storage/toolbox/mechanical = 1,
reqs = list(/obj/item/storage/toolbox = 1,
/obj/item/stack/tile/plasteel = 1,
/obj/item/assembly/prox_sensor = 1,
/obj/item/bodypart/r_arm/robot = 1)
@@ -95,4 +95,4 @@
reqs = list(/obj/item/aicard = 1,
/obj/item/reagent_containers/food/snacks/grown/pumpkin = 1,
/obj/item/stack/cable_coil = 5)
category = CAT_ROBOT
category = CAT_ROBOT
@@ -72,6 +72,52 @@
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bokken
name = "Training Bokken"
result = /obj/item/melee/bokken
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/bokken_blade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/leather = 1)
time = 60
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bokken_steelwood
name = "Training Steelwood Bokken"
result = /obj/item/melee/bokken/steelwood
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/bokken_steelblade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/leather = 1)
time = 60
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/wakibokken
name = "Training Wakizashi Bokken"
result = /obj/item/melee/bokken/waki
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/wakibokken_blade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/wakibokken_steelwood
name = "Training Wakizashi Steelwood Bokken"
result = /obj/item/melee/bokken/waki/steelwood
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/wakibokken_steelblade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bola
name = "Bola"
result = /obj/item/restraints/legcuffs/bola
@@ -248,7 +294,7 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ishotgun
/datum/crafting_recipe/ishotgun
name = "Improvised Shotgun"
result = /obj/item/gun/ballistic/revolver/doublebarrel/improvised
reqs = list(/obj/item/pipe = 2, // putting a large amount of meaningless timegates by forcing people to turn base resources into upgraded resources kinda sucks
@@ -434,3 +480,51 @@
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
// BOKKEN CRAFTING
/datum/crafting_recipe/bokken_blade
name = "Training Bokken Blade"
result = /obj/item/bokken_blade
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 5)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/wakibokken_blade
name = "Training Wakizashi Bokken Blade"
result = /obj/item/wakibokken_blade
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/bokken_steelblade
name = "Training Ironwood Bokken Blade"
result = /obj/item/bokken_steelblade
tools = list(/obj/item/hatchet, TOOL_WELDER)
reqs = list(/obj/item/grown/log/steel = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/wakibokken_steelblade
name = "Training Wakizashi Ironwood Bokken Blade"
result = /obj/item/wakibokken_steelblade
tools = list(/obj/item/hatchet, TOOL_WELDER)
reqs = list(/obj/item/grown/log/steel = 1)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/bokken_hilt
name = "Training Bokken hilt"
result = /obj/item/bokken_hilt
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 5,
/obj/item/stack/sheet/cloth = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
+1 -1
View File
@@ -67,4 +67,4 @@
/datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName)
var/obj/item/master = comp.parent
comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality)
return "vampiric [newName]"
return "vampiric [newName]"
+1 -1
View File
@@ -36,4 +36,4 @@
if(isliving(target))
var/mob/living/L = target
L.adjust_fire_stacks(fire_stacks)
L.IgniteMob()
L.IgniteMob()
+1 -1
View File
@@ -41,4 +41,4 @@
RegisterSignal(H, COMSIG_HUMAN_DISARM_HIT, .proc/Knockoff, TRUE)
/datum/component/knockoff/proc/OnDropped(datum/source, mob/living/M)
UnregisterSignal(M, COMSIG_HUMAN_DISARM_HIT)
UnregisterSignal(M, COMSIG_HUMAN_DISARM_HIT)

Some files were not shown because too many files have changed in this diff Show More