Merge remote-tracking branch 'upstream/master' into slime-legs

This commit is contained in:
Timothy Teakettle
2020-12-28 17:22:53 +00:00
1080 changed files with 54402 additions and 21299 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))
+11
View File
@@ -490,6 +490,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.
+7 -5
View File
@@ -1,7 +1,7 @@
#define CURRENT_LIVING_PLAYERS 1
#define CURRENT_LIVING_ANTAGS 2
#define CURRENT_DEAD_PLAYERS 3
#define CURRENT_OBSERVERS 4
#define CURRENT_OBSERVERS 4
#define NO_ASSASSIN (1<<0)
#define WAROPS_ALWAYS_ALLOWED (1<<1)
@@ -9,9 +9,11 @@
#define FORCE_IF_WON (1<<3)
#define USE_PREV_ROUND_WEIGHTS (1<<4)
#define ONLY_RULESET (1<<0)
#define HIGHLANDER_RULESET (1<<1)
#define TRAITOR_RULESET (1<<2)
#define MINOR_RULESET (1<<3)
#define ONLY_RULESET (1<<0)
#define HIGHLANDER_RULESET (1<<1)
#define TRAITOR_RULESET (1<<2)
#define MINOR_RULESET (1<<3)
#define FAKE_ANTAG_RULESET (1<<4)
#define ALWAYS_MAX_WEIGHT_RULESET (1<<5)
#define RULESET_STOP_PROCESSING 1
+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)
+3 -1
View File
@@ -125,7 +125,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define isbot(A) (istype(A, /mob/living/simple_animal/bot))
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
#define isshade(A) (istype(A, /mob/living/simple_animal/hostile/construct/shade))
#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))
@@ -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))
+11 -1
View File
@@ -66,4 +66,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
+3
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,6 +58,7 @@
#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.
+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"
+3 -1
View File
@@ -78,7 +78,9 @@
#define EXP_TYPE_ADMIN "Admin"
//Flags in the players table in the db
#define DB_FLAG_EXEMPT 1
#define DB_FLAG_EXEMPT (1<<0)
#define DB_FLAG_AGE_CONFIRMATION_INCOMPLETE (1<<1)
#define DB_FLAG_AGE_CONFIRMATION_COMPLETE (1<<2)
#define DEFAULT_CYBORG_NAME "Default Cyborg Name"
+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
+7 -1
View File
@@ -76,8 +76,14 @@
#define LINGHIVE_LINK 3
//whether the emote is visible or audible.
// Requires sight
#define EMOTE_VISIBLE 1
// Requires hearing
#define EMOTE_AUDIBLE 2
// Requires sight or hearing
#define EMOTE_BOTH 3
// Always able to be seen
#define EMOTE_OMNI 4
//Don't set this very much higher then 1024 unless you like inviting people in to dos your server with message spam
#define MAX_MESSAGE_LEN 2048 //Citadel edit: What's the WORST that could happen?
@@ -89,4 +95,4 @@
// Audio/Visual Flags. Used to determine what sense are required to notice a message.
#define MSG_VISUAL (1<<0)
#define MSG_AUDIBLE (1<<1)
#define MSG_AUDIBLE (1<<1)
+4
View File
@@ -5,6 +5,7 @@
#define SPECIES_ANDROID "android"
#define SPECIES_ANGEL "angel"
#define SPECIES_MAMMAL "mammal"
#define SPECIES_ARACHNID "arachnid"
#define SPECIES_INSECT "insect"
#define SPECIES_DULLAHAN "dullahan"
#define SPECIES_DWARF "dwarf"
@@ -33,7 +34,9 @@
#define SPECIES_SYNTH "synth"
#define SPECIES_SYNTH_MIL "military_synth"
#define SPECIES_VAMPIRE "vampire"
#define SPECIES_VAMPIRE_WEAK "vampire_roundstart"
#define SPECIES_XENOHYBRID "xeno"
#define SPECIES_ZOMBIE "zombie"
// Species Category Defines ---------------------
@@ -45,6 +48,7 @@
#define SPECIES_CATEGORY_PLANT "plant"
#define SPECIES_CATEGORY_ROBOT "robotic"
#define SPECIES_CATEGORY_JELLY "jelly"
#define SPECIES_CATEGORY_LIZARD "lizard"
#define SPECIES_CATEGORY_SHADOW "shadow"
#define SPECIES_CATEGORY_SKELETON "skeleton"
#define SPECIES_CATEGORY_UNDEAD "undead"
+54 -51
View File
@@ -1,6 +1,6 @@
// tgstation-server DMAPI
#define TGS_DMAPI_VERSION "5.2.1"
#define TGS_DMAPI_VERSION "5.2.9"
// All functions and datums outside this document are subject to change with any version and should not be relied on.
@@ -95,6 +95,8 @@
#define TGS_EVENT_WATCHDOG_SHUTDOWN 15
/// Before the watchdog detaches for a TGS update/restart. No parameters.
#define TGS_EVENT_WATCHDOG_DETACH 16
// We don't actually implement this value as the DMAPI can never receive it
// #define TGS_EVENT_WATCHDOG_LAUNCH 17
// OTHER ENUMS
@@ -115,21 +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.
* 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
@@ -137,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
@@ -172,16 +175,16 @@
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
@@ -231,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
@@ -249,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()")
@@ -268,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, \
))))
))))
+13 -5
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,15 +205,18 @@
#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
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good...
/// Prevents stamina buffer regeneration
#define TRAIT_NO_STAMINA_BUFFER_REGENERATION "block_stamina_buffer_regen"
/// Prevents stamina regeneration
#define TRAIT_NO_STAMINA_REGENERATION "block_stamina_regen"
#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)
@@ -308,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"
@@ -319,8 +325,10 @@
#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.
#define ACTIVE_PARRY_TRAIT "active_parry"
#define STICKY_NODROP "sticky-nodrop" //sticky nodrop sounds like a bad soundcloud rapper's name
#define TRAIT_SACRIFICED "sacrificed" //Makes sure that people cant be cult sacrificed twice.
+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
+7 -7
View File
@@ -1,9 +1,9 @@
#define PLURALITY_VOTING 0
#define APPROVAL_VOTING 1
#define SCHULZE_VOTING 2
#define SCORE_VOTING 3
#define MAJORITY_JUDGEMENT_VOTING 4
#define INSTANT_RUNOFF_VOTING 5
#define PLURALITY_VOTING "PLURALITY"
#define APPROVAL_VOTING "APPROVAL"
#define SCHULZE_VOTING "SCHULZE"
#define SCORE_VOTING "SCORE"
#define MAJORITY_JUDGEMENT_VOTING "MAJORITY_JUDGEMENT"
#define INSTANT_RUNOFF_VOTING "IRV"
#define SHOW_RESULTS (1<<0)
#define SHOW_VOTES (1<<1)
@@ -26,4 +26,4 @@ GLOBAL_LIST_INIT(display_vote_settings, list(\
"Ongoing Votes" = SHOW_VOTES,
"Winner" = SHOW_WINNER,
"Abstainers" = SHOW_ABSTENTION
))
))
+21 -9
View File
@@ -46,17 +46,29 @@
I = getPAIHologramIcon(I)
return I
//Errors go to user.
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, mob/user)
if(user)
if(user.client.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
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
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_safe(target_prefs, C.mob)
return generate_custom_holoform_from_prefs(target_prefs, null, null, TRUE, TRUE)
+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
+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
@@ -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)
+4 -1
View File
@@ -13,6 +13,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NEARSIGHT" = TRAIT_NEARSIGHT,
"TRAIT_FAT" = TRAIT_FAT,
"TRAIT_HUSK" = TRAIT_HUSK,
"TRAIT_SACRIFICED" = TRAIT_SACRIFICED,
"TRAIT_NOCLONE" = TRAIT_NOCLONE,
"TRAIT_CLUMSY" = TRAIT_CLUMSY,
"TRAIT_CHUNKYFINGERS" = TRAIT_CHUNKYFINGERS,
@@ -51,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,
@@ -101,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)
@@ -27,7 +27,10 @@
/datum/config_entry/New()
if(type == abstract_type)
CRASH("Abstract config entry [type] instatiated!")
name = lowertext(type2top(type))
if(!name)
name = lowertext(type2top(type))
else
name = lowertext(name)
if(islist(config_entry_value))
var/list/L = config_entry_value
default = L.Copy()
@@ -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
@@ -230,6 +230,7 @@
/datum/config_entry/keyed_list/multiplicative_movespeed
key_mode = KEY_MODE_TYPE
value_mode = VALUE_MODE_NUM
abstract_type = /datum/config_entry/keyed_list/multiplicative_movespeed
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
. = ..()
@@ -242,6 +243,7 @@
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/keyed_list/multiplicative_movespeed/normal
name = "multiplicative_movespeed"
config_entry_value = list( //DEFAULTS
/mob/living/simple_animal = 1,
/mob/living/silicon/pai = 1,
@@ -252,6 +254,7 @@
)
/datum/config_entry/keyed_list/multiplicative_movespeed/floating
name = "multiplicative_movespeed_floating"
config_entry_value = list(
/mob/living = 0,
/mob/living/carbon/alien/humanoid = 0,
@@ -506,21 +509,21 @@
//Body size configs, the feature will be disabled if both min and max have the same value.
/datum/config_entry/number/body_size_min
config_entry_value = RESIZE_DEFAULT_SIZE
config_entry_value = 0.9
min_val = 0.1 //to avoid issues with zeros and negative values.
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
/datum/config_entry/number/body_size_max
config_entry_value = RESIZE_DEFAULT_SIZE
config_entry_value = 1.25
min_val = RESIZE_DEFAULT_SIZE
integer = FALSE
//Pun-Pun movement slowdown given to characters with a body size smaller than this value,
//Penalties given to characters with a body size smaller than this value,
//to compensate for their smaller hitbox.
//To disable, just make sure the value is lower than 'body_size_min'
/datum/config_entry/number/threshold_body_size_slowdown
config_entry_value = RESIZE_DEFAULT_SIZE * 0.85
/datum/config_entry/number/threshold_body_size_penalty
config_entry_value = RESIZE_DEFAULT_SIZE
min_val = 0
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
@@ -528,8 +531,8 @@
//multiplicative slowdown multiplier. See 'dna.update_body_size' for the operation.
//doesn't apply to floating or crawling mobs
/datum/config_entry/number/body_size_slowdown_multiplier
config_entry_value = 0.25
min_val = 0.1 //To encourage folks to disable the slowdown through the above config instead.
config_entry_value = 0
min_val = 0
integer = FALSE
//Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
@@ -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
@@ -290,7 +288,7 @@
/datum/config_entry/flag/tgstyle_maprotation
/datum/config_entry/string/map_vote_type
config_entry_value = "SCORE"
config_entry_value = APPROVAL_VOTING
/datum/config_entry/number/maprotatechancedelta
config_entry_value = 0.75
@@ -327,6 +325,9 @@
/datum/config_entry/number/notify_new_player_account_age // how long do we notify admins of a new byond account
min_val = 0
/datum/config_entry/flag/age_verification //are we using the automated age verification which asks users if they're 18+?
config_entry_value = TRUE
/datum/config_entry/flag/irc_first_connection_alert // do we notify the irc channel when somebody is connecting for the first time?
/datum/config_entry/flag/check_randomizer
@@ -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
+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
+17 -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,19 @@ 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)
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
+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)
+1 -1
View File
@@ -422,7 +422,7 @@ SUBSYSTEM_DEF(persistence)
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
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
@@ -50,17 +50,20 @@ PROCESSING_SUBSYSTEM_DEF(circuit)
/obj/item/electronic_assembly/simple,
/obj/item/electronic_assembly/hook,
/obj/item/electronic_assembly/pda,
/obj/item/electronic_assembly/dildo,
/obj/item/electronic_assembly/small/default,
/obj/item/electronic_assembly/small/cylinder,
/obj/item/electronic_assembly/small/scanner,
/obj/item/electronic_assembly/small/hook,
/obj/item/electronic_assembly/small/box,
/obj/item/electronic_assembly/small/dildo,
/obj/item/electronic_assembly/medium/default,
/obj/item/electronic_assembly/medium/box,
/obj/item/electronic_assembly/medium/clam,
/obj/item/electronic_assembly/medium/medical,
/obj/item/electronic_assembly/medium/gun,
/obj/item/electronic_assembly/medium/radio,
/obj/item/electronic_assembly/medium/dildo,
/obj/item/electronic_assembly/large/default,
/obj/item/electronic_assembly/large/scope,
/obj/item/electronic_assembly/large/terminal,
@@ -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)
+15 -8
View File
@@ -45,22 +45,29 @@ SUBSYSTEM_DEF(statpanels)
var/list/vote_arry = list(
list("Vote active!", "There is currently a vote running. Question: [SSvote.question]")
) //see the MC on how this works.
if(!(SSvote.vote_system in list(PLURALITY_VOTING, APPROVAL_VOTING)))
if(!(SSvote.vote_system in list(PLURALITY_VOTING, APPROVAL_VOTING, SCHULZE_VOTING, INSTANT_RUNOFF_VOTING)))
vote_arry[++vote_arry.len] += list("STATPANEL VOTING DISABLED!", "The current vote system is not supported by statpanel rendering. Please vote manually by opening the vote popup using the action button or chat link.", "disabled")
//does not return.
else
vote_arry[++vote_arry.len] += list("Time Left:", " [round(SSvote.end_time - world.time)] seconds")
vote_arry[++vote_arry.len] += list("Time Left:", " [DisplayTimeText(SSvote.end_time - world.time)] seconds")
vote_arry[++vote_arry.len] += list("Choices:", "")
for(var/choice in SSvote.choice_statclicks)
var/choice_id = SSvote.choice_statclicks[choice]
var/ivotedforthis = FALSE
if(target.ckey)
switch(SSvote.vote_system)
if(APPROVAL_VOTING)
ivotedforthis = SSvote.voted[target.ckey] && (text2num(choice_id) in SSvote.voted[usr.ckey])
if(PLURALITY_VOTING)
ivotedforthis = (SSvote.voted[target.ckey] == text2num(choice_id))
vote_arry[++vote_arry.len] += list(ivotedforthis ? "\[X\]" : "\[ \]", choice, "[REF(SSvote)];vote=[choice_id];statpannel=1")
if(PLURALITY_VOTING, APPROVAL_VOTING)
var/ivotedforthis = FALSE
if(SSvote.vote_system == APPROVAL_VOTING)
ivotedforthis = SSvote.voted[target.ckey] && (text2num(choice_id) in SSvote.voted[target.ckey])
else
ivotedforthis = (SSvote.voted[target.ckey] == text2num(choice_id))
vote_arry[++vote_arry.len] += list(ivotedforthis ? "\[X\]" : "\[ \]", choice, "[REF(SSvote)];vote=[choice_id];statpannel=1")
if(SCHULZE_VOTING, INSTANT_RUNOFF_VOTING)
var/list/vote = SSvote.voted[target.ckey]
var/vote_position = " "
if(vote)
vote_position = vote.Find(text2num(choice_id))
vote_arry[++vote_arry.len] += list("\[[vote_position]\]", choice, "[REF(SSvote)];vote=[choice_id];statpannel=1")
var/vote_str = url_encode(json_encode(vote_arry))
target << output("[vote_str]", "statbrowser:update_voting")
else
+6 -12
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
@@ -482,18 +487,7 @@ SUBSYSTEM_DEF(ticker)
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
else
var/vote_type = CONFIG_GET(string/map_vote_type)
switch(vote_type)
if("PLURALITY")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS)
if("APPROVAL")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = APPROVAL_VOTING)
if("IRV")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = INSTANT_RUNOFF_VOTING)
if("SCORE")
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = MAJORITY_JUDGEMENT_VOTING)
else
SSvote.initiate_vote("map","server", display = SHOW_RESULTS)
// fallback
SSvote.initiate_vote("map","server", display = SHOW_RESULTS, votesystem = vote_type)
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
return current_state >= GAME_STATE_PLAYING
+3 -3
View File
@@ -52,7 +52,7 @@ SUBSYSTEM_DEF(traumas)
"doctors" = typecacheof(list(/mob/living/simple_animal/bot/medbot)),
"the supernatural" = typecacheof(list(/mob/living/simple_animal/hostile/construct,
/mob/living/simple_animal/hostile/clockwork, /mob/living/simple_animal/drone/cogscarab,
/mob/living/simple_animal/revenant, /mob/living/simple_animal/shade)),
/mob/living/simple_animal/revenant, /mob/living/simple_animal/hostile/construct/shade)),
"aliens" = typecacheof(list(/mob/living/carbon/alien, /mob/living/simple_animal/slime)),
"conspiracies" = typecacheof(list(/mob/living/simple_animal/bot/secbot, /mob/living/simple_animal/bot/ed209, /mob/living/simple_animal/drone,
/mob/living/simple_animal/pet/penguin)),
@@ -158,8 +158,8 @@ SUBSYSTEM_DEF(traumas)
/obj/item/clothing/head/frenchberet, /obj/item/clothing/suit/suspenders, /obj/item/reagent_containers/food/drinks/bottle/bottleofnothing,
/obj/item/storage/backpack/mime, /obj/item/reagent_containers/food/snacks/grown/banana/mime,
/obj/item/grown/bananapeel/mimanapeel, /obj/item/cartridge/virus/mime, /obj/item/clothing/shoes/sneakers/mime,
/obj/item/bedsheet/mime, /obj/item/reagent_containers/food/snacks/burger/mime, /obj/item/clothing/head/beret, /obj/item/clothing/mask/gas/sexymime,
/obj/item/clothing/under/rank/civilian/mime/sexy, /obj/item/toy/figure/mime, /obj/item/toy/crayon/mime, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced, /obj/mecha/combat/reticence)),
/obj/item/bedsheet/mime, /obj/item/reagent_containers/food/snacks/burger/mime, /obj/item/clothing/head/beret,
/obj/item/toy/figure/mime, /obj/item/toy/crayon/mime, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced, /obj/mecha/combat/reticence)),
"cats" = typecacheof(list(/obj/item/organ/ears/cat, /obj/item/organ/tail/cat, /obj/item/laser_pointer, /obj/item/toy/cattoy, /obj/item/clothing/head/kitty,
/obj/item/clothing/head/collectable/kitty, /obj/item/melee/chainofcommand/tailwhip/kitty, /obj/item/stack/sheet/animalhide/cat)),
+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)
+6 -9
View File
@@ -25,18 +25,15 @@
/datum/accent/abductor/modify_speech(list/speech_args, datum/source)
var/message = speech_args[SPEECH_MESSAGE]
var/mob/living/carbon/human/user = source
var/mob/living/carbon/user = source
var/obj/item/organ/tongue/abductor/A = user.getorgan(/obj/item/organ/tongue/abductor)
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
user.log_talk(message, LOG_SAY, tag="abductor")
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
if(!T || T.type != type)
for(var/mob/living/carbon/C in GLOB.alive_mob_list)
var/obj/item/organ/tongue/abductor/T = C.getorgan(/obj/item/organ/tongue/abductor)
if(!T || T.mothership != A.mothership)
continue
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(/datum/antagonist/abductor)
if(!A || !(H.mind in A.team.members))
continue
to_chat(H, rendered)
to_chat(C, rendered)
for(var/mob/M in GLOB.dead_mob_list)
var/link = FOLLOW_LINK(M, user)
to_chat(M, "[link] [rendered]")
+8 -1
View File
@@ -174,7 +174,7 @@
M.ghostize(can_reenter_corpse = TRUE, voluntary = TRUE)
/datum/action/proc/OnUpdatedIcon()
UpdateButtonIcon()
addtimer(CALLBACK(src, .proc/UpdateButtonIcon), 1) //Hopefully runs after new icon overlays have been compiled.
//Presets for item actions
/datum/action/item_action
@@ -273,6 +273,13 @@
if(istype(H))
H.toggle_welding_screen(owner)
/datum/action/item_action/toggle_welding_screen/plasmaman
/datum/action/item_action/toggle_welding_screen/plasmaman/Trigger()
var/obj/item/clothing/head/helmet/space/plasmaman/H = target
if(istype(H))
H.toggle_welding_screen(owner)
/datum/action/item_action/toggle_headphones
name = "Toggle Headphones"
desc = "UNTZ UNTZ UNTZ"
+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"
@@ -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
@@ -248,7 +248,7 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ishotgun // smaller and more versatile gun requires some better materials
/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
@@ -408,7 +408,7 @@
/datum/crafting_recipe/rifle_receiver
name = "Improvised Rifle Receiver"
result = /obj/item/weaponcrafting/improvised_parts/rifle_receiver
reqs = list(/obj/item/stack/sheet/metal = 15) // you can carry multiple shotguns
reqs = list(/obj/item/stack/sheet/metal = 15)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 25
category = CAT_WEAPONRY
@@ -417,10 +417,9 @@
/datum/crafting_recipe/shotgun_receiver
name = "Improvised Shotgun Receiver"
result = /obj/item/weaponcrafting/improvised_parts/shotgun_receiver
reqs = list(/obj/item/stack/sheet/metal = 15,
/obj/item/stack/sheet/plasteel = 1) // requires access or hacking since shotgun is better
reqs = list(/obj/item/stack/sheet/metal = 10) // shotgun does less damage than the rifle and can't 1shot but is more portable
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 25
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
@@ -432,6 +431,6 @@
reqs = list(/obj/item/stack/sheet/metal = 3,
/obj/item/assembly/igniter = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 25
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)
+1 -1
View File
@@ -31,4 +31,4 @@
UnregisterSignal(thing, COMSIG_MOVABLE_PRE_THROW)
/datum/component/magnetic_catch/proc/throw_react(datum/source, list/arguments)
return COMPONENT_CANCEL_THROW
return COMPONENT_CANCEL_THROW
+115 -14
View File
@@ -17,6 +17,44 @@
var/stealth = FALSE //if TRUE, does not appear on HUDs and health scans
var/diagnostics = TRUE //if TRUE, displays program list when scanned by nanite scanners
/// Delete ourselves when we're depleted.
var/qdel_self_on_depletion = TRUE
/// Allow deletion
var/can_be_deleted = TRUE
/// Whether or not we can survive no cloud syncing without errors
var/requires_cloud_sync = TRUE
/// Permanent programs - can never be deleted. does not count towards max_programs.
var/list/datum/nanite_program/permanent_programs = list()
// Vulnerabilities
/// EMP flat deletion upper
var/emp_flat_deletion_upper = 35
/// EMP flat deletion lower
var/emp_flat_deletion_lower = 20
/// EMP percent deletion upper
var/emp_percent_deletion_upper = 0.35
/// EMP percent deletion lower
var/emp_percent_deletion_lower = 0.30
/// EMP severity multiplier, capping to 0 to 100
var/emp_severity_mod = 1
/// EMP severity div for cloudsync reset chance
var/emp_desync_mod = 0.25
/// Shock flat deletion upper
var/shock_flat_deletion_upper = 45
/// Shock flat deletion lower
var/shock_flat_deletion_lower = 25
/// Shock percent deletion upper
var/shock_percent_deletion_upper = 0.25
/// Shock percent deletion lower
var/shock_percent_deletion_lower = 0.20
/// minor shock deletion lower
var/minor_shock_deletion_lower = 5
/// minor shock deletion upper
var/minor_shock_deletion_upper = 15
/datum/component/nanites/Initialize(amount = 100, cloud = 0)
if(!isliving(parent) && !istype(parent, /datum/nanite_cloud_backup))
return COMPONENT_INCOMPATIBLE
@@ -55,6 +93,9 @@
RegisterSignal(parent, COMSIG_NANITE_ADD_PROGRAM, .proc/add_program)
RegisterSignal(parent, COMSIG_NANITE_SCAN, .proc/nanite_scan)
RegisterSignal(parent, COMSIG_NANITE_SYNC, .proc/sync)
RegisterSignal(parent, COMSIG_NANITE_CHECK_CONSOLE_LOCK, .proc/check_console_locking)
RegisterSignal(parent, COMSIG_NANITE_CHECK_HOST_LOCK, .proc/check_host_lockout)
RegisterSignal(parent, COMSIG_NANITE_CHECK_VIRAL_PREVENTION, .proc/check_viral_prevention)
if(isliving(parent))
RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, .proc/on_emp)
@@ -118,13 +159,63 @@
next_sync = world.time + NANITE_SYNC_DELAY
set_nanite_bar()
/**
* Called when nanites are depleted.
* Deletes ourselves by default.
*/
/datum/component/nanites/proc/nanites_depleted()
if(qdel_self_on_depletion)
delete_nanites()
/**
* Used to rid ourselves
*/
/datum/component/nanites/proc/delete_nanites()
qdel(src)
if(can_be_deleted)
qdel(src)
/**
* Adds permanent programs
*
* WARNING: Has no sanity checks. Make sure you know what you are doing! (make sure programs do not conflict)
*/
/datum/component/nanites/proc/add_permanent_program(list/program, immutable = FALSE)
if(!islist(program))
program = list(program)
for(var/i in program)
if(i in permanent_programs)
continue
var/datum/nanite_program/P = i
permanent_programs += P
if(immutable)
P.immutable = TRUE
for(var/e in programs)
var/datum/nanite_program/E = e
if(E.unique && (E.type == P.type))
qdel(e)
programs += P
/**
* Checks if we can block out console modification
*/
/datum/component/nanites/proc/check_console_locking()
return SEND_SIGNAL(src, COMSIG_NANITE_INTERNAL_CONSOLE_LOCK_CHECK)
/**
* Checks if we can lock out host internal conscious modification
*/
/datum/component/nanites/proc/check_host_lockout()
return SEND_SIGNAL(src, COMSIG_NANITE_INTERNAL_HOST_LOCK_CHECK)
/**
* Checks if we can block out viral replica
*/
/datum/component/nanites/proc/check_viral_prevention()
return SEND_SIGNAL(src, COMSIG_NANITE_INTERNAL_VIRAL_PREVENTION_CHECK)
//Syncs the nanite component to another, making it so programs are the same with the same programming (except activation status)
/datum/component/nanites/proc/sync(datum/signal_source, datum/component/nanites/source, full_overwrite = TRUE, copy_activation = FALSE)
var/list/programs_to_remove = programs.Copy()
var/list/programs_to_remove = programs.Copy() - permanent_programs
var/list/programs_to_add = source.programs.Copy()
for(var/X in programs)
var/datum/nanite_program/NP = X
@@ -151,7 +242,7 @@
sync(null, cloud_copy)
return
//Without cloud syncing nanites can accumulate errors and/or defects
if(prob(8) && programs.len)
if(prob(8) && programs.len && requires_cloud_sync)
var/datum/nanite_program/NP = pick(programs)
NP.software_error()
@@ -159,8 +250,11 @@
for(var/X in programs)
var/datum/nanite_program/NP = X
if(NP.unique && NP.type == new_program.type)
qdel(NP)
if(programs.len >= max_programs)
if(NP in permanent_programs)
return COMPONENT_PROGRAM_NOT_INSTALLED
else
qdel(NP)
if((programs.len - length(permanent_programs)) >= max_programs)
return COMPONENT_PROGRAM_NOT_INSTALLED
if(source_program)
source_program.copy_programming(new_program)
@@ -177,7 +271,7 @@
/datum/component/nanites/proc/adjust_nanites(datum/source, amount)
nanite_volume = clamp(nanite_volume + amount, 0, max_nanites)
if(nanite_volume <= 0) //oops we ran out
qdel(src)
nanites_depleted()
/datum/component/nanites/proc/set_nanite_bar(remove = FALSE)
var/image/holder = host_mob.hud_list[DIAG_NANITE_FULL_HUD]
@@ -191,28 +285,28 @@
holder.icon_state = "nanites[nanite_percent]"
/datum/component/nanites/proc/on_emp(datum/source, severity)
nanite_volume *= (rand(60, 90) * 0.01) //Lose 10-40% of nanites
adjust_nanites(null, -(rand(5, 50))) //Lose 5-50 flat nanite volume
if(prob(40/severity))
severity *= emp_severity_mod
var/loss = (severity / 100) * (rand(emp_percent_deletion_lower, emp_percent_deletion_upper) * nanite_volume) + rand(emp_flat_deletion_lower, emp_flat_deletion_upper)
adjust_nanites(null, -loss)
if(prob(severity * emp_desync_mod))
cloud_id = 0
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_emp(severity)
/datum/component/nanites/proc/on_shock(datum/source, shock_damage, siemens_coeff = 1, flags = NONE)
if(shock_damage < 1)
return
if(!HAS_TRAIT_NOT_FROM(host_mob, TRAIT_SHOCKIMMUNE, "nanites"))//Another shock protection must protect nanites too, but nanites protect only host
nanite_volume *= (rand(45, 80) * 0.01) //Lose 20-55% of nanites
adjust_nanites(null, -(rand(5, 50))) //Lose 5-50 flat nanite volume
var/loss = (rand(shock_percent_deletion_lower, shock_percent_deletion_upper) * nanite_volume) + rand(shock_flat_deletion_lower, shock_flat_deletion_upper)
adjust_nanites(null, -loss)
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_shock(shock_damage)
/datum/component/nanites/proc/on_minor_shock(datum/source)
adjust_nanites(null, -(rand(5, 15))) //Lose 5-15 flat nanite volume
adjust_nanites(null, -(rand(minor_shock_deletion_lower, minor_shock_deletion_upper))) //Lose 5-15 flat nanite volume
for(var/X in programs)
var/datum/nanite_program/NP = X
NP.on_minor_shock()
@@ -237,7 +331,7 @@
NP.receive_comm_signal(comm_code, comm_message, comm_source)
/datum/component/nanites/proc/check_viable_biotype()
if(!(host_mob.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD)))
if(!(host_mob.mob_biotypes & (MOB_ORGANIC|MOB_UNDEAD|MOB_NANITES)))
qdel(src) //bodytype no longer sustains nanites
/datum/component/nanites/proc/check_access(datum/source, obj/O)
@@ -378,3 +472,10 @@
id++
mob_programs += list(mob_program)
data["mob_programs"] = mob_programs
/**
* Subtype that doesn't erase itself from running out
*/
/datum/component/nanites/permanent
qdel_self_on_depletion = FALSE
can_be_deleted = FALSE
+5 -3
View File
@@ -55,7 +55,7 @@
var/mob/living/shooter
/datum/component/pellet_cloud/Initialize(projectile_type=/obj/item/shrapnel, magnitude=5)
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent))
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent))
return COMPONENT_INCOMPATIBLE
if(magnitude < 1)
@@ -66,7 +66,7 @@
if(isammocasing(parent))
num_pellets = magnitude
else if(isgrenade(parent) || islandmine(parent))
else if(isgrenade(parent) || islandmine(parent) || issupplypod(parent))
radius = magnitude
/datum/component/pellet_cloud/Destroy(force, silent)
@@ -86,9 +86,11 @@
RegisterSignal(parent, COMSIG_GRENADE_PRIME, .proc/create_blast_pellets)
else if(islandmine(parent))
RegisterSignal(parent, COMSIG_MINE_TRIGGERED, .proc/create_blast_pellets)
else if(issupplypod(parent))
RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, .proc/create_blast_pellets)
/datum/component/pellet_cloud/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED))
UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED, COMSIG_SUPPLYPOD_LANDED))
/**
* create_casing_pellets() is for directed pellet clouds for ammo casings that have multiple pellets (buckshot and scatter lasers for instance)
+1 -1
View File
@@ -39,4 +39,4 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.physiology.damage_resistance += 100
..()
..()
+1 -1
View File
@@ -22,4 +22,4 @@
grill_marks.Blend(icon('icons/obj/kitchen.dmi', "grillmarks"), ICON_MULTIPLY) //adds grill marks and the remaining white areas become transparent
sizzling = new(grill_marks)
sizzling.alpha = sizzlealpha
food.add_overlay(sizzling)
food.add_overlay(sizzling)
+1 -1
View File
@@ -53,4 +53,4 @@
spawned_mobs += L
L.nest = src
L.faction = src.faction
P.visible_message("<span class='danger'>[L] [spawn_text] [P].</span>")
P.visible_message("<span class='danger'>[L] [spawn_text] [P].</span>")

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