Merge branch 'master' into upstream-merge-37598
This commit is contained in:
@@ -56,6 +56,8 @@
|
||||
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
|
||||
#define FIRE_GROWTH_RATE 40000 //For small fires
|
||||
#define PLASMA_MINIMUM_BURN_TEMPERATURE (100+T0C)
|
||||
#define PLASMA_UPPER_TEMPERATURE (1370+T0C)
|
||||
#define PLASMA_OXYGEN_FULLBURN 10
|
||||
|
||||
//GASES
|
||||
#define MIN_TOXIC_GAS_DAMAGE 1
|
||||
|
||||
@@ -86,6 +86,10 @@
|
||||
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" //from base of atom/movable/unbuckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_THROW "movable_throw" //from base of atom/movable/throw_at(): (datum/thrownthing, spin)
|
||||
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" //from base of atom/movable/onTransitZ(): (old_z, new_z)
|
||||
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
// /obj signals
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
|
||||
@@ -138,11 +142,14 @@
|
||||
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items.
|
||||
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location.
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into)
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
|
||||
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
|
||||
|
||||
/*******Non-Signal Component Related Defines*******/
|
||||
|
||||
//Redirection component init flags
|
||||
#define REDIRECT_TRANSFER_WITH_TURF 1
|
||||
|
||||
//Arch
|
||||
#define ARCH_PROB "probability" //Probability for each item
|
||||
#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount
|
||||
|
||||
@@ -11,54 +11,22 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define DF_VAR_EDITED (1<<1)
|
||||
|
||||
//FLAGS BITMASK
|
||||
#define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
|
||||
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
|
||||
#define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
|
||||
#define NOBLUDGEON_1 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define MASKINTERNALS_1 (1<<3) // mask allows internals
|
||||
#define HEAR_1 (1<<4) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
|
||||
#define CHECK_RICOCHET_1 (1<<5) // Projectiels will check ricochet on things impacted that have this.
|
||||
#define CONDUCT_1 (1<<6) // conducts electricity (metal etc.)
|
||||
#define ABSTRACT_1 (1<<7) // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
|
||||
#define HEAR_1 (1<<3) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
|
||||
#define CHECK_RICOCHET_1 (1<<4) // Projectiels will check ricochet on things impacted that have this.
|
||||
#define CONDUCT_1 (1<<5) // conducts electricity (metal etc.)
|
||||
#define ABSTRACT_1 (1<<6) // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
|
||||
#define NODECONSTRUCT_1 (1<<7) // For machines and structures that should not break into parts, eg, holodeck stuff
|
||||
#define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay
|
||||
#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving
|
||||
#define DROPDEL_1 (1<<10) // When dropped, it calls qdel on itself
|
||||
#define PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
#define NO_EMP_WIRES_1 (1<<12)
|
||||
#define HOLOGRAM_1 (1<<13)
|
||||
#define TESLA_IGNORE_1 (1<<14) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
|
||||
#define NOSLIP_1 (1<<10) //prevents from slipping on wet floors, in space etc
|
||||
|
||||
// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT_1 (1<<12) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define THICKMATERIAL_1 (1<<13) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define DROPDEL_1 (1<<14) // When dropped, it calls qdel on itself
|
||||
#define PREVENT_CLICK_UNDER_1 (1<<15) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
|
||||
/* Secondary atom flags, for the flags_2 var, denoted with a _2 */
|
||||
|
||||
#define SLOWS_WHILE_IN_HAND_2 (1<<0)
|
||||
#define NO_EMP_WIRES_2 (1<<1)
|
||||
#define HOLOGRAM_2 (1<<2)
|
||||
#define FROZEN_2 (1<<3)
|
||||
#define BANG_PROTECT_2 (1<<6)
|
||||
|
||||
// An item worn in the ear slot with HEALS_EARS will heal your ears each
|
||||
// Life() tick, even if normally your ears would be too damaged to heal.
|
||||
#define HEALS_EARS_2 (1<<7)
|
||||
|
||||
// A mob with OMNITONGUE has no restriction in the ability to speak
|
||||
// languages that they know. So even if they wouldn't normally be able to
|
||||
// through mob or tongue restrictions, this flag allows them to ignore
|
||||
// those restrictions.
|
||||
#define OMNITONGUE_2 (1<<8)
|
||||
|
||||
// TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define TESLA_IGNORE_2 (1<<9)
|
||||
|
||||
// Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
#define NO_MAT_REDEMPTION_2 (1<<10)
|
||||
|
||||
// LAVA_PROTECT used on the flags_2 variable for both SUIT and HEAD items, and stops lava damage. Must be present in both to stop lava damage.
|
||||
#define LAVA_PROTECT_2 (1<<11)
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT_1 (1<<0)
|
||||
@@ -67,7 +35,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define NO_DEATHRATTLE_1 (1<<4) // Do not notify deadchat about any deaths that occur on this turf.
|
||||
#define NO_RUINS_1 (1<<5) //Blocks ruins spawning on the turf
|
||||
#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf
|
||||
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
|
||||
@@ -14,76 +14,76 @@
|
||||
#define STORAGE_VIEW_DEPTH 2
|
||||
|
||||
//ITEM INVENTORY SLOT BITMASKS
|
||||
#define SLOT_OCLOTHING (1<<0)
|
||||
#define SLOT_ICLOTHING (1<<1)
|
||||
#define SLOT_GLOVES (1<<2)
|
||||
#define SLOT_EYES (1<<3)
|
||||
#define SLOT_EARS (1<<4)
|
||||
#define SLOT_MASK (1<<5)
|
||||
#define SLOT_HEAD (1<<6)
|
||||
#define SLOT_FEET (1<<7)
|
||||
#define SLOT_ID (1<<8)
|
||||
#define SLOT_BELT (1<<9)
|
||||
#define SLOT_BACK (1<<10)
|
||||
#define SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
|
||||
#define SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
|
||||
#define SLOT_NECK (1<<13)
|
||||
#define ITEM_SLOT_OCLOTHING (1<<0)
|
||||
#define ITEM_SLOT_ICLOTHING (1<<1)
|
||||
#define ITEM_SLOT_GLOVES (1<<2)
|
||||
#define ITEM_SLOT_EYES (1<<3)
|
||||
#define ITEM_SLOT_EARS (1<<4)
|
||||
#define ITEM_SLOT_MASK (1<<5)
|
||||
#define ITEM_SLOT_HEAD (1<<6)
|
||||
#define ITEM_SLOT_FEET (1<<7)
|
||||
#define ITEM_SLOT_ID (1<<8)
|
||||
#define ITEM_SLOT_BELT (1<<9)
|
||||
#define ITEM_SLOT_BACK (1<<10)
|
||||
#define ITEM_SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
|
||||
#define ITEM_SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
|
||||
#define ITEM_SLOT_NECK (1<<13)
|
||||
|
||||
//SLOTS
|
||||
#define slot_back 1
|
||||
#define slot_wear_mask 2
|
||||
#define slot_handcuffed 3
|
||||
#define slot_hands 4 //wherever you provide a slot for hands you provide slot_hands
|
||||
//slot_hands as a slot will pick ANY available hand
|
||||
#define slot_belt 5
|
||||
#define slot_wear_id 6
|
||||
#define slot_ears 7
|
||||
#define slot_glasses 8
|
||||
#define slot_gloves 9
|
||||
#define slot_neck 10
|
||||
#define slot_head 11
|
||||
#define slot_shoes 12
|
||||
#define slot_wear_suit 13
|
||||
#define slot_w_uniform 14
|
||||
#define slot_l_store 15
|
||||
#define slot_r_store 16
|
||||
#define slot_s_store 17
|
||||
#define slot_in_backpack 18
|
||||
#define slot_legcuffed 19
|
||||
#define slot_generic_dextrous_storage 20
|
||||
#define SLOT_BACK 1
|
||||
#define SLOT_WEAR_MASK 2
|
||||
#define SLOT_HANDCUFFED 3
|
||||
#define SLOT_HANDS 4 //wherever you provide a slot for hands you provide SLOT_HANDS
|
||||
//SLOT_HANDS as a slot will pick ANY available hand
|
||||
#define SLOT_BELT 5
|
||||
#define SLOT_WEAR_ID 6
|
||||
#define SLOT_EARS 7
|
||||
#define SLOT_GLASSES 8
|
||||
#define SLOT_GLOVES 9
|
||||
#define SLOT_NECK 10
|
||||
#define SLOT_HEAD 11
|
||||
#define SLOT_SHOES 12
|
||||
#define SLOT_WEAR_SUIT 13
|
||||
#define SLOT_W_UNIFORM 14
|
||||
#define SLOT_L_STORE 15
|
||||
#define SLOT_R_STORE 16
|
||||
#define SLOT_S_STORE 17
|
||||
#define SLOT_IN_BACKPACK 18
|
||||
#define SLOT_LEGCUFFED 19
|
||||
#define SLOT_GENERC_DEXTROUS_STORAGE 20
|
||||
|
||||
#define slots_amt 20 // Keep this up to date!
|
||||
#define SLOTS_AMT 20 // Keep this up to date!
|
||||
|
||||
//I hate that this has to exist
|
||||
/proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above)
|
||||
. = 0
|
||||
switch(slotdefine)
|
||||
if(slot_back)
|
||||
. = SLOT_BACK
|
||||
if(slot_wear_mask)
|
||||
. = SLOT_MASK
|
||||
if(slot_neck)
|
||||
. = SLOT_NECK
|
||||
if(slot_belt)
|
||||
. = SLOT_BELT
|
||||
if(slot_wear_id)
|
||||
. = SLOT_ID
|
||||
if(slot_ears)
|
||||
. = SLOT_EARS
|
||||
if(slot_glasses)
|
||||
. = SLOT_EYES
|
||||
if(slot_gloves)
|
||||
. = SLOT_GLOVES
|
||||
if(slot_head)
|
||||
. = SLOT_HEAD
|
||||
if(slot_shoes)
|
||||
. = SLOT_FEET
|
||||
if(slot_wear_suit)
|
||||
. = SLOT_OCLOTHING
|
||||
if(slot_w_uniform)
|
||||
. = SLOT_ICLOTHING
|
||||
if(slot_l_store, slot_r_store)
|
||||
. = SLOT_POCKET
|
||||
if(SLOT_BACK)
|
||||
. = ITEM_SLOT_BACK
|
||||
if(SLOT_WEAR_MASK)
|
||||
. = ITEM_SLOT_MASK
|
||||
if(SLOT_NECK)
|
||||
. = ITEM_SLOT_NECK
|
||||
if(SLOT_BELT)
|
||||
. = ITEM_SLOT_BELT
|
||||
if(SLOT_WEAR_ID)
|
||||
. = ITEM_SLOT_ID
|
||||
if(SLOT_EARS)
|
||||
. = ITEM_SLOT_EARS
|
||||
if(SLOT_GLASSES)
|
||||
. = ITEM_SLOT_EYES
|
||||
if(SLOT_GLOVES)
|
||||
. = ITEM_SLOT_GLOVES
|
||||
if(SLOT_HEAD)
|
||||
. = ITEM_SLOT_HEAD
|
||||
if(SLOT_SHOES)
|
||||
. = ITEM_SLOT_FEET
|
||||
if(SLOT_WEAR_SUIT)
|
||||
. = ITEM_SLOT_OCLOTHING
|
||||
if(SLOT_W_UNIFORM)
|
||||
. = ITEM_SLOT_ICLOTHING
|
||||
if(SLOT_L_STORE, SLOT_R_STORE)
|
||||
. = ITEM_SLOT_POCKET
|
||||
|
||||
|
||||
//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define PLANE_SPACE -95
|
||||
#define PLANE_SPACE_PARALLAX -90
|
||||
|
||||
#define FLOOR_PLANE -2
|
||||
#define GAME_PLANE -1
|
||||
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
|
||||
#define SPACE_LAYER 1.8
|
||||
|
||||
@@ -378,7 +378,7 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define BEAT_SLOW 2
|
||||
#define BEAT_NONE 0
|
||||
|
||||
//http://www.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
|
||||
//https://secure.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
|
||||
#define MOUSE_OPACITY_TRANSPARENT 0
|
||||
#define MOUSE_OPACITY_ICON 1
|
||||
#define MOUSE_OPACITY_OPAQUE 2
|
||||
@@ -445,3 +445,8 @@ GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
|
||||
#define NO_INIT_PARAMETER "no-init"
|
||||
|
||||
#define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
|
||||
// Used by PDA and cartridge code to reduce repetitiveness of spritesheets
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
//Filters
|
||||
#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA")
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
// Roundstart trait system
|
||||
|
||||
#define MAX_TRAITS 6 //The maximum amount of traits one character can have at roundstart
|
||||
#define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart
|
||||
|
||||
// AI Toggles
|
||||
#define AI_CAMERA_LUMINOSITY 5
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart?
|
||||
#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing?
|
||||
#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI.
|
||||
#define FROZEN (1<<8)
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
@@ -18,3 +19,14 @@
|
||||
#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips
|
||||
#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips
|
||||
#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use.
|
||||
#define SLOWS_WHILE_IN_HAND (1<<4)
|
||||
#define NO_MAT_REDEMPTION (1<<5) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
|
||||
#define LAVAPROTECT (1<<0)
|
||||
#define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define MASKINTERNALS (1<<3) // mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#define EXP_TYPE_ANTAG "Antag"
|
||||
#define EXP_TYPE_SPECIAL "Special"
|
||||
#define EXP_TYPE_GHOST "Ghost"
|
||||
#define EXP_TYPE_ADMIN "Admin"
|
||||
|
||||
//Flags in the players table in the db
|
||||
#define DB_FLAG_EXEMPT 1
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
// /tg/station 13 server tools API
|
||||
#define SERVICE_API_VERSION_STRING "3.2.0.2"
|
||||
|
||||
//CONFIGURATION
|
||||
//use this define if you want to do configuration outside of this file
|
||||
#ifndef SERVER_TOOLS_EXTERNAL_CONFIGURATION
|
||||
//Comment this out once you've filled in the below
|
||||
#error /tg/station server tools interface unconfigured
|
||||
|
||||
//Required interfaces (fill in with your codebase equivalent):
|
||||
|
||||
//create a global variable named `Name` and set it to `Value`
|
||||
//These globals must not be modifiable from anywhere outside of the server tools
|
||||
#define SERVER_TOOLS_DEFINE_AND_SET_GLOBAL(Name, Value)
|
||||
//Read the value in the global variable `Name`
|
||||
#define SERVER_TOOLS_READ_GLOBAL(Name)
|
||||
//Set the value in the global variable `Name` to `Value`
|
||||
#define SERVER_TOOLS_WRITE_GLOBAL(Name, Value)
|
||||
//display an announcement `message` from the server to all players
|
||||
#define SERVER_TOOLS_WORLD_ANNOUNCE(message)
|
||||
//Write a string `message` to a server log
|
||||
#define SERVER_TOOLS_LOG(message)
|
||||
//Notify current in-game administrators of a string `event`
|
||||
#define SERVER_TOOLS_NOTIFY_ADMINS(event)
|
||||
//The current amount of connected clients
|
||||
#define SERVER_TOOLS_CLIENT_COUNT
|
||||
#endif
|
||||
|
||||
//Required hooks:
|
||||
|
||||
//Put this somewhere in /world/New() that is always run
|
||||
#define SERVER_TOOLS_ON_NEW ServiceInit()
|
||||
//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified
|
||||
#define SERVER_TOOLS_ON_TOPIC var/service_topic_return = ServiceCommand(params2list(T)); if(service_topic_return) return service_topic_return
|
||||
//Put at the beginning of world/Reboot(reason)
|
||||
#define SERVER_TOOLS_ON_REBOOT ServiceReboot()
|
||||
|
||||
//Optional callable functions:
|
||||
|
||||
//Returns the string version of the API
|
||||
#define SERVER_TOOLS_API_VERSION ServiceAPIVersion()
|
||||
//Returns TRUE if the world was launched under the server tools and the API matches, FALSE otherwise
|
||||
//No function below this succeed if this is FALSE
|
||||
#define SERVER_TOOLS_PRESENT RunningService()
|
||||
//Gets the current version of the service running the server
|
||||
#define SERVER_TOOLS_VERSION ServiceVersion()
|
||||
//Forces a hard reboot of BYOND by ending the process
|
||||
//unlike del(world) clients will try to reconnect
|
||||
//If the service has not requested a shutdown, the world will reboot shortly after
|
||||
#define SERVER_TOOLS_REBOOT_BYOND world.ServiceEndProcess()
|
||||
/*
|
||||
Gets the list of any testmerged github pull requests
|
||||
|
||||
"[PR Number]" => list(
|
||||
"title" -> PR title
|
||||
"commit" -> Full hash of commit merged
|
||||
"author" -> Github username of the author of the PR
|
||||
)
|
||||
*/
|
||||
#define SERVER_TOOLS_PR_LIST GetTestMerges()
|
||||
//Sends a message to connected game chats
|
||||
#define SERVER_TOOLS_CHAT_BROADCAST(message) world.ChatBroadcast(message)
|
||||
//Sends a message to connected admin chats
|
||||
#define SERVER_TOOLS_RELAY_BROADCAST(message) world.AdminBroadcast(message)
|
||||
|
||||
//IMPLEMENTATION
|
||||
|
||||
#define REBOOT_MODE_NORMAL 0
|
||||
#define REBOOT_MODE_HARD 1
|
||||
#define REBOOT_MODE_SHUTDOWN 2
|
||||
|
||||
#define SERVICE_WORLD_PARAM "server_service"
|
||||
#define SERVICE_VERSION_PARAM "server_service_version"
|
||||
#define SERVICE_INSTANCE_PARAM "server_instance"
|
||||
#define SERVICE_PR_TEST_JSON "prtestjob.json"
|
||||
#define SERVICE_INTERFACE_DLL "TGDreamDaemonBridge.dll"
|
||||
#define SERVICE_INTERFACE_FUNCTION "DDEntryPoint"
|
||||
|
||||
#define SERVICE_CMD_HARD_REBOOT "hard_reboot"
|
||||
#define SERVICE_CMD_GRACEFUL_SHUTDOWN "graceful_shutdown"
|
||||
#define SERVICE_CMD_WORLD_ANNOUNCE "world_announce"
|
||||
#define SERVICE_CMD_LIST_CUSTOM "list_custom_commands"
|
||||
#define SERVICE_CMD_API_COMPATIBLE "api_compat"
|
||||
#define SERVICE_CMD_PLAYER_COUNT "client_count"
|
||||
|
||||
#define SERVICE_CMD_PARAM_KEY "serviceCommsKey"
|
||||
#define SERVICE_CMD_PARAM_COMMAND "command"
|
||||
#define SERVICE_CMD_PARAM_SENDER "sender"
|
||||
#define SERVICE_CMD_PARAM_CUSTOM "custom"
|
||||
|
||||
#define SERVICE_JSON_PARAM_HELPTEXT "help_text"
|
||||
#define SERVICE_JSON_PARAM_ADMINONLY "admin_only"
|
||||
#define SERVICE_JSON_PARAM_REQUIREDPARAMETERS "required_parameters"
|
||||
|
||||
#define SERVICE_REQUEST_KILL_PROCESS "killme"
|
||||
#define SERVICE_REQUEST_IRC_BROADCAST "irc"
|
||||
#define SERVICE_REQUEST_IRC_ADMIN_CHANNEL_MESSAGE "send2irc"
|
||||
#define SERVICE_REQUEST_WORLD_REBOOT "worldreboot"
|
||||
#define SERVICE_REQUEST_API_VERSION "api_ver"
|
||||
|
||||
#define SERVICE_RETURN_SUCCESS "SUCCESS"
|
||||
|
||||
/*
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2017 Jordan Brown
|
||||
|
||||
Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
@@ -1,7 +1,7 @@
|
||||
//Update this whenever the db schema changes
|
||||
//make sure you add an update to the schema_version stable in the db changelog
|
||||
#define DB_MAJOR_VERSION 4
|
||||
#define DB_MINOR_VERSION 1
|
||||
#define DB_MINOR_VERSION 2
|
||||
|
||||
//Timing subsystem
|
||||
//Don't run if there is an identical unique timer active
|
||||
@@ -56,7 +56,7 @@
|
||||
#define INIT_ORDER_RESEARCH 14
|
||||
#define INIT_ORDER_EVENTS 13
|
||||
#define INIT_ORDER_JOBS 12
|
||||
#define INIT_ORDER_TRAITS 11
|
||||
#define INIT_ORDER_QUIRKS 11
|
||||
#define INIT_ORDER_TICKER 10
|
||||
#define INIT_ORDER_MAPPING 9
|
||||
#define INIT_ORDER_NETWORKS 8
|
||||
@@ -82,6 +82,7 @@
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
|
||||
#define FIRE_PRIORITY_PING 10
|
||||
#define FIRE_PRIORITY_IDLE_NPC 10
|
||||
#define FIRE_PRIORITY_SERVER_MAINT 10
|
||||
#define FIRE_PRIORITY_RESEARCH 10
|
||||
|
||||
19
code/__DEFINES/tgs.config.dm
Normal file
19
code/__DEFINES/tgs.config.dm
Normal file
@@ -0,0 +1,19 @@
|
||||
#define TGS_EXTERNAL_CONFIGURATION
|
||||
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value) GLOBAL_VAR_INIT(##Name, ##Value); GLOBAL_PROTECT(##Name)
|
||||
#define TGS_READ_GLOBAL(Name) GLOB.##Name
|
||||
#define TGS_WRITE_GLOBAL(Name, Value) GLOB.##Name = ##Value
|
||||
#define TGS_WORLD_ANNOUNCE(message) to_chat(world, "<span class='boldannounce'>[html_encode(##message)]</span>")
|
||||
#define TGS_INFO_LOG(message) log_world("TGS: Info: [##message]")
|
||||
#define TGS_ERROR_LOG(message) log_world("TGS: Error: [##message]")
|
||||
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
|
||||
#define TGS_CLIENT_COUNT GLOB.clients.len
|
||||
#define TGS_PROTECT_DATUM(Path)\
|
||||
##Path/can_vv_get(var_name){\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/vv_edit_var(var_name, var_value){\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/CanProcCall(procname){\
|
||||
return FALSE;\
|
||||
}
|
||||
202
code/__DEFINES/tgs.dm
Normal file
202
code/__DEFINES/tgs.dm
Normal file
@@ -0,0 +1,202 @@
|
||||
//tgstation-server DMAPI
|
||||
|
||||
//All functions and datums outside this document are subject to change with any version and should not be relied on
|
||||
|
||||
//CONFIGURATION
|
||||
|
||||
//create this define if you want to do configuration outside of this file
|
||||
#ifndef TGS_EXTERNAL_CONFIGURATION
|
||||
|
||||
//Comment this out once you've filled in the below
|
||||
#error TGS API unconfigured
|
||||
|
||||
//Required interfaces (fill in with your codebase equivalent):
|
||||
|
||||
//create a global variable named `Name` and set it to `Value`
|
||||
//These globals must not be modifiable from anywhere outside of the server tools
|
||||
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value)
|
||||
|
||||
//Read the value in the global variable `Name`
|
||||
#define TGS_READ_GLOBAL(Name)
|
||||
|
||||
//Set the value in the global variable `Name` to `Value`
|
||||
#define TGS_WRITE_GLOBAL(Name, Value)
|
||||
|
||||
//Disallow ANYONE from reflecting a given `path`, security measure to prevent in-game priveledge escalation
|
||||
#define TGS_PROTECT_DATUM(Path)
|
||||
|
||||
//display an announcement `message` from the server to all players
|
||||
#define TGS_WORLD_ANNOUNCE(message)
|
||||
|
||||
//Notify current in-game administrators of a string `event`
|
||||
#define TGS_NOTIFY_ADMINS(event)
|
||||
|
||||
//Write an info `message` to a server log
|
||||
#define TGS_INFO_LOG(message)
|
||||
|
||||
//Write an error `message` to a server log
|
||||
#define TGS_ERROR_LOG(message)
|
||||
|
||||
//Get the number of connected /clients
|
||||
#define TGS_CLIENT_COUNT
|
||||
|
||||
#endif
|
||||
|
||||
//EVENT CODES
|
||||
|
||||
//TODO
|
||||
|
||||
//REQUIRED HOOKS
|
||||
|
||||
//Call this somewhere in /world/New() that is always run
|
||||
//event_handler: optional user defined event handler. The default behaviour is to broadcast the event in english to all connected admin channels
|
||||
/world/proc/TgsNew(datum/tgs_event_handler/event_handler)
|
||||
return
|
||||
|
||||
//Call this when your initializations are complete and your game is ready to play before any player interactions happen
|
||||
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
|
||||
/world/proc/TgsInitializationComplete()
|
||||
return
|
||||
|
||||
//Put this somewhere in /world/Topic(T, Addr, Master, Keys) that is always run before T is modified
|
||||
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(T); if(tgs_topic_return) return tgs_topic_return
|
||||
|
||||
//Call this at the beginning of world/Reboot(reason)
|
||||
/world/proc/TgsReboot()
|
||||
return
|
||||
|
||||
//DATUM DEFINITIONS
|
||||
//unless otherwise specified all datums defined here should be considered read-only, warranty void if written
|
||||
|
||||
//represents git revision information about the current world build
|
||||
/datum/tgs_revision_information
|
||||
var/commit //full sha of compiled commit
|
||||
var/origin_commit //full sha of last known remote commit. This may be null if the TGS repository is not currently tracking a remote branch
|
||||
|
||||
//represents a merge of a GitHub pull request
|
||||
/datum/tgs_revision_information/test_merge
|
||||
var/number //pull request number
|
||||
var/title //pull request title
|
||||
var/body //pull request body
|
||||
var/author //pull request github author
|
||||
var/url //link to pull request html
|
||||
var/pull_request_commit //commit of the pull request when it was merged
|
||||
var/time_merged //timestamp of when the merge commit for the pull request was created
|
||||
var/comment //optional comment left by the one who initiated the test merge
|
||||
|
||||
//represents a connected chat channel
|
||||
/datum/tgs_chat_channel
|
||||
var/id //internal channel representation
|
||||
var/friendly_name //user friendly channel name
|
||||
var/server_name //server name the channel resides on
|
||||
var/provider_name //chat provider for the channel
|
||||
var/is_admin_channel //if the server operator has marked this channel for game admins only
|
||||
var/is_private_channel //if this is a private chat channel
|
||||
|
||||
//represents a chat user
|
||||
/datum/tgs_chat_user
|
||||
var/id //Internal user representation
|
||||
var/friendly_name //The user's public name
|
||||
var/mention //The text to use to ping this user in a message
|
||||
var/datum/tgs_chat_channel/channel //The /datum/tgs_chat_channel this user was from
|
||||
|
||||
//user definable callback for handling events
|
||||
/datum/tgs_event_handler/proc/HandleEvent(event_code)
|
||||
return
|
||||
|
||||
//user definable chat command
|
||||
/datum/tgs_chat_command
|
||||
var/name = "" //the string to trigger this command on a chat bot. e.g. TGS3_BOT: do_this_command
|
||||
var/help_text = "" //help text for this command
|
||||
var/admin_only = FALSE //set to TRUE if this command should only be usable by registered chat admins
|
||||
|
||||
//override to implement command
|
||||
//sender: The tgs_chat_user who send to command
|
||||
//params: The trimmed string following the command name
|
||||
//The return value will be stringified and sent to the appropriate chat
|
||||
/datum/tgs_chat_command/proc/Run(datum/tgs_chat_user/sender, params)
|
||||
CRASH("[type] has no implementation for Run()")
|
||||
|
||||
//FUNCTIONS
|
||||
|
||||
//Returns the respective string version of the API
|
||||
/world/proc/TgsMaximumAPIVersion()
|
||||
return
|
||||
|
||||
/world/proc/TgsMinimumAPIVersion()
|
||||
return
|
||||
|
||||
//Gets the current version of the server tools running the server
|
||||
/world/proc/TgsVersion()
|
||||
return
|
||||
|
||||
//Returns TRUE if the world was launched under the server tools and the API matches, FALSE otherwise
|
||||
//No function below this succeeds if it returns FALSE
|
||||
/world/proc/TgsAvailable()
|
||||
return
|
||||
|
||||
/world/proc/TgsInstanceName()
|
||||
return
|
||||
|
||||
//Get the current `/datum/tgs_revision_information`
|
||||
/world/proc/TgsRevision()
|
||||
return
|
||||
|
||||
//Gets a list of active `/datum/tgs_revision_information/test_merge`s
|
||||
/world/proc/TgsTestMerges()
|
||||
return
|
||||
|
||||
//Forces a hard reboot of BYOND by ending the process
|
||||
//unlike del(world) clients will try to reconnect
|
||||
//If the service has not requested a shutdown, the next server will take over
|
||||
/world/proc/TgsEndProcess()
|
||||
return
|
||||
|
||||
//Gets a list of connected tgs_chat_channel
|
||||
/world/proc/TgsChatChannelInfo()
|
||||
return
|
||||
|
||||
//Sends a message to connected game chats
|
||||
//message: The message to send
|
||||
//channels: optional channels to limit the broadcast to
|
||||
/world/proc/TgsChatBroadcast(message, list/channels)
|
||||
return
|
||||
|
||||
//Send a message to non-admin connected chats
|
||||
//message: The message to send
|
||||
//admin_only: If TRUE, message will instead be sent to only admin connected chats
|
||||
/world/proc/TgsTargetedChatBroadcast(message, admin_only)
|
||||
return
|
||||
|
||||
//Send a private message to a specific user
|
||||
//message: The message to send
|
||||
//user: The /datum/tgs_chat_user to send to
|
||||
/world/proc/TgsChatPrivateMessage(message, datum/tgs_chat_user/user)
|
||||
return
|
||||
|
||||
/*
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2017 Jordan Brown
|
||||
|
||||
Permission is hereby granted, free of charge,
|
||||
to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom
|
||||
the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
||||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
@@ -68,6 +68,7 @@
|
||||
#define MAGIC_TRAIT "magic"
|
||||
#define TRAUMA_TRAIT "trauma"
|
||||
#define SPECIES_TRAIT "species"
|
||||
#define ORGAN_TRAIT "organ"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
|
||||
// unique trait sources, still defines
|
||||
|
||||
@@ -128,6 +128,9 @@
|
||||
/proc/log_qdel(text)
|
||||
WRITE_LOG(GLOB.world_qdel_log, "QDEL: [text]")
|
||||
|
||||
/proc/log_query_debug(text)
|
||||
WRITE_LOG(GLOB.query_debug_log, "SQL: [text]")
|
||||
|
||||
/* Log to both DD and the logfile. */
|
||||
/proc/log_world(text)
|
||||
WRITE_LOG(GLOB.world_runtime_log, text)
|
||||
|
||||
@@ -1072,19 +1072,19 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
// Used to make the frozen item visuals for Freon.
|
||||
if(resistance_flags & FREEZE_PROOF)
|
||||
return
|
||||
if(!(flags_2 & FROZEN_2))
|
||||
if(!(obj_flags & FROZEN))
|
||||
name = "frozen [name]"
|
||||
add_atom_colour(GLOB.freon_color_matrix, TEMPORARY_COLOUR_PRIORITY)
|
||||
alpha -= 25
|
||||
flags_2 |= FROZEN_2
|
||||
obj_flags |= FROZEN
|
||||
|
||||
//Assumes already frozed
|
||||
/obj/proc/make_unfrozen()
|
||||
if(flags_2 & FROZEN_2)
|
||||
if(obj_flags & FROZEN)
|
||||
name = replacetext(name, "frozen ", "")
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, GLOB.freon_color_matrix)
|
||||
alpha += 25
|
||||
flags_2 &= ~FROZEN_2
|
||||
obj_flags &= ~FROZEN
|
||||
|
||||
|
||||
//Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
|
||||
@@ -188,55 +188,55 @@
|
||||
/mob/living/carbon/human/p_they(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_their(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_them(capitalized, temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_have(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_are(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_were(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_do(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/p_s(temp_gender)
|
||||
var/list/obscured = check_obscured_slots()
|
||||
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
|
||||
if((slot_w_uniform in obscured) && skipface)
|
||||
if((SLOT_W_UNIFORM in obscured) && skipface)
|
||||
temp_gender = PLURAL
|
||||
return ..()
|
||||
|
||||
@@ -290,19 +290,26 @@
|
||||
parts += "[GLOB.TAB]<i>Nobody died this shift!</i>"
|
||||
return parts.Join("<br>")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/show_roundend_report(client/C,common_report, popcount)
|
||||
var/list/report_parts = list()
|
||||
|
||||
report_parts += personal_report(C, popcount)
|
||||
report_parts += common_report
|
||||
/client/proc/roundend_report_file()
|
||||
return "data/roundend_reports/[ckey].html"
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/show_roundend_report(client/C, previous = FALSE)
|
||||
var/datum/browser/roundend_report = new(C, "roundend")
|
||||
roundend_report.width = 800
|
||||
roundend_report.height = 600
|
||||
roundend_report.set_content(report_parts.Join())
|
||||
var/content
|
||||
var/filename = C.roundend_report_file()
|
||||
if(!previous)
|
||||
var/list/report_parts = list(personal_report(C), GLOB.common_report)
|
||||
content = report_parts.Join()
|
||||
C.verbs -= /client/proc/show_previous_roundend_report
|
||||
fdel(filename)
|
||||
text2file(content, filename)
|
||||
else
|
||||
content = file2text(filename)
|
||||
roundend_report.set_content(content)
|
||||
roundend_report.stylesheets = list()
|
||||
roundend_report.add_stylesheet("roundend",'html/browser/roundend.css')
|
||||
|
||||
roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css')
|
||||
roundend_report.open(0)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount)
|
||||
@@ -327,8 +334,6 @@
|
||||
else
|
||||
parts += "<div class='panel stationborder'>"
|
||||
parts += "<br>"
|
||||
if(!GLOB.survivor_report)
|
||||
GLOB.survivor_report = survivor_report(popcount)
|
||||
parts += GLOB.survivor_report
|
||||
parts += "</div>"
|
||||
|
||||
@@ -336,8 +341,9 @@
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/display_report(popcount)
|
||||
GLOB.common_report = build_roundend_report()
|
||||
GLOB.survivor_report = survivor_report(popcount)
|
||||
for(var/client/C in GLOB.clients)
|
||||
show_roundend_report(C,GLOB.common_report, popcount)
|
||||
show_roundend_report(C, FALSE)
|
||||
give_show_report_button(C)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -359,7 +365,7 @@
|
||||
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
|
||||
borg_num--
|
||||
if(robo.mind)
|
||||
robolist += "<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>)[robo.stat ? " <span class='redtext'>(Deactivated)</span>" : ""][borg_num ?", ":""]<br>"
|
||||
robolist += "<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>)[robo.stat == DEAD ? " <span class='redtext'>(Deactivated)</span>" : ""][borg_num ?", ":""]<br>"
|
||||
parts += "[robolist]"
|
||||
if(!borg_spacer)
|
||||
borg_spacer = TRUE
|
||||
@@ -458,7 +464,7 @@
|
||||
|
||||
/datum/action/report/Trigger()
|
||||
if(owner && GLOB.common_report && SSticker.current_state == GAME_STATE_FINISHED)
|
||||
SSticker.show_roundend_report(owner.client,GLOB.common_report)
|
||||
SSticker.show_roundend_report(owner.client, FALSE)
|
||||
|
||||
/datum/action/report/IsAvailable()
|
||||
return 1
|
||||
|
||||
@@ -698,7 +698,7 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
var/macro = lowertext(copytext(string, next_backslash + 1, next_space))
|
||||
var/rest = next_backslash > leng ? "" : copytext(string, next_space + 1)
|
||||
|
||||
//See http://www.byond.com/docs/ref/info.html#/DM/text/macros
|
||||
//See https://secure.byond.com/docs/ref/info.html#/DM/text/macros
|
||||
switch(macro)
|
||||
//prefixes/agnostic
|
||||
if("the")
|
||||
@@ -766,4 +766,3 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
return "twelfth"
|
||||
else
|
||||
return "[number]\th"
|
||||
|
||||
@@ -400,25 +400,25 @@
|
||||
|
||||
/proc/slot2body_zone(slot)
|
||||
switch(slot)
|
||||
if(slot_back, slot_wear_suit, slot_w_uniform, slot_belt, slot_wear_id)
|
||||
if(SLOT_BACK, SLOT_WEAR_SUIT, SLOT_W_UNIFORM, SLOT_BELT, SLOT_WEAR_ID)
|
||||
return BODY_ZONE_CHEST
|
||||
|
||||
if(slot_gloves, slot_hands, slot_handcuffed)
|
||||
if(SLOT_GLOVES, SLOT_HANDS, SLOT_HANDCUFFED)
|
||||
return pick(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)
|
||||
|
||||
if(slot_head, slot_neck, slot_neck, slot_ears)
|
||||
if(SLOT_HEAD, SLOT_NECK, SLOT_NECK, SLOT_EARS)
|
||||
return BODY_ZONE_HEAD
|
||||
|
||||
if(slot_wear_mask)
|
||||
if(SLOT_WEAR_MASK)
|
||||
return BODY_ZONE_PRECISE_MOUTH
|
||||
|
||||
if(slot_glasses)
|
||||
if(SLOT_GLASSES)
|
||||
return BODY_ZONE_PRECISE_EYES
|
||||
|
||||
if(slot_shoes)
|
||||
if(SLOT_SHOES)
|
||||
return pick(BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_L_FOOT)
|
||||
|
||||
if(slot_legcuffed)
|
||||
if(SLOT_LEGCUFFED)
|
||||
return pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
|
||||
//adapted from http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#define MIN_COMPILER_VERSION 512
|
||||
#if DM_VERSION < MIN_COMPILER_VERSION
|
||||
//Don't forget to update this part
|
||||
#error Your version of BYOND is too out-of-date to compile this project. Go to byond.com/download and update.
|
||||
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
|
||||
#error You need version 512 or higher
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION,
|
||||
"ON_BLUEPRINTS" = ON_BLUEPRINTS,
|
||||
"UNIQUE_RENAME" = UNIQUE_RENAME,
|
||||
"USES_TGUI" = USES_TGUI
|
||||
"USES_TGUI" = USES_TGUI,
|
||||
"FROZEN" = FROZEN,
|
||||
),
|
||||
"datum_flags" = list(
|
||||
"DF_USE_TAG" = DF_USE_TAG,
|
||||
@@ -40,7 +41,9 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"BEING_REMOVED" = BEING_REMOVED,
|
||||
"IN_INVENTORY" = IN_INVENTORY,
|
||||
"FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE,
|
||||
"NEEDS_PERMIT" = NEEDS_PERMIT
|
||||
"NEEDS_PERMIT" = NEEDS_PERMIT,
|
||||
"SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND,
|
||||
"NO_MAT_REDEMPTION" = NO_MAT_REDEMPTION,
|
||||
),
|
||||
"admin_flags" = list(
|
||||
"BUILDMODE" = R_BUILDMODE,
|
||||
@@ -106,28 +109,24 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"REAGENT_NOREACT" = REAGENT_NOREACT
|
||||
),
|
||||
"flags_1" = list(
|
||||
"STOPSPRESSUREDMAGE_1 / NOJAUNT_1 (turfs)" = STOPSPRESSUREDMAGE_1,
|
||||
"NOJAUNT_1" = NOJAUNT_1,
|
||||
"NODROP_1 / UNUSED_TRANSIT_TURF_1 (turfs)" = NODROP_1,
|
||||
"NOBLUDGEON_1 / CAN_BE_DIRTY_1 (turfs)" = NOBLUDGEON_1,
|
||||
"MASKINTERNALS_1" = MASKINTERNALS_1,
|
||||
"HEAR_1 / NO_DEATHRATTLE_1 (turfs)" = HEAR_1,
|
||||
"CHECK_RICOCHET_1 / NO_RUINS_1 (turfs)" = CHECK_RICOCHET_1,
|
||||
"CONDUCT_1 / NO_LAVA_GEN_1" = CONDUCT_1,
|
||||
"ABSTRACT_1" = ABSTRACT_1,
|
||||
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
|
||||
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
|
||||
"NOSLIP_1" = NOSLIP_1
|
||||
"HOLOGRAM_1" = HOLOGRAM_1,
|
||||
"TESLA_IGNORE_1" = TESLA_IGNORE_1
|
||||
),
|
||||
"flags_2" = list(
|
||||
"SLOWS_WHILE_IN_HAND_2" = SLOWS_WHILE_IN_HAND_2,
|
||||
"NO_EMP_WIRES_2" = NO_EMP_WIRES_2,
|
||||
"HOLOGRAM_2" = HOLOGRAM_2,
|
||||
"FRONZE_2" = FROZEN_2,
|
||||
"BANG_PROTECT_2" = BANG_PROTECT_2,
|
||||
"HEALS_EARS_2" = HEALS_EARS_2,
|
||||
"OMNITONGUE_2" = OMNITONGUE_2,
|
||||
"TESLA_IGNORE_2" = TESLA_IGNORE_2,
|
||||
"NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2,
|
||||
"LAVA_PROTECT_2" = LAVA_PROTECT_2
|
||||
)
|
||||
"clothing_flags" = list(
|
||||
"LAVAPROTECT" = LAVAPROTECT,
|
||||
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
|
||||
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
|
||||
"MASKINTERNALS" = MASKINTERNALS,
|
||||
"NOSLIP" = NOSLIP,
|
||||
"THICKMATERIAL" = THICKMATERIAL,
|
||||
)
|
||||
))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GLOBAL_REAL(config, /datum/controller/configuration)
|
||||
|
||||
GLOBAL_DATUM_INIT(revdata, /datum/getrev, new)
|
||||
GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
|
||||
GLOBAL_VAR(host)
|
||||
GLOBAL_VAR(station_name)
|
||||
|
||||
@@ -10,3 +10,5 @@ GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living))
|
||||
GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure)))
|
||||
|
||||
GLOBAL_LIST_INIT(typecache_shuttle_area, typecacheof(/area/shuttle))
|
||||
|
||||
GLOBAL_LIST_INIT(typecache_clothing, typecacheof(/obj/item/clothing))
|
||||
|
||||
@@ -20,6 +20,8 @@ GLOBAL_VAR(world_pda_log)
|
||||
GLOBAL_PROTECT(world_pda_log)
|
||||
GLOBAL_VAR(world_manifest_log)
|
||||
GLOBAL_PROTECT(world_manifest_log)
|
||||
GLOBAL_VAR(query_debug_log)
|
||||
GLOBAL_PROTECT(query_debug_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(bombers)
|
||||
GLOBAL_PROTECT(bombers)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
inv_box.icon_state = "suit_storage"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_storage
|
||||
inv_box.slot_id = slot_generic_dextrous_storage
|
||||
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -17,7 +17,7 @@
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_drone_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
static_inventory += inv_box
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_generic_dextrous_storage
|
||||
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/guardian/Communicate()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
|
||||
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
|
||||
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
|
||||
var/list/inv_slots[slots_amt] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||
var/list/inv_slots[SLOTS_AMT] // /obj/screen/inventory objects, ordered by their slot ID.
|
||||
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
@@ -196,7 +196,9 @@
|
||||
screenmob.client.screen -= infodisplay
|
||||
|
||||
for(var/thing in plane_masters)
|
||||
screenmob.client.screen += plane_masters[thing]
|
||||
var/obj/screen/plane_master/PM = plane_masters[thing]
|
||||
PM.backdrop(screenmob)
|
||||
screenmob.client.screen += PM
|
||||
|
||||
hud_version = display_hud_version
|
||||
persistent_inventory_update(screenmob)
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "i_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_w_uniform
|
||||
inv_box.slot_id = SLOT_W_UNIFORM
|
||||
inv_box.icon_state = "uniform"
|
||||
inv_box.screen_loc = ui_iclothing
|
||||
toggleable_inventory += inv_box
|
||||
@@ -147,7 +147,7 @@
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "o_clothing"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.slot_id = slot_wear_suit
|
||||
inv_box.slot_id = SLOT_WEAR_SUIT
|
||||
inv_box.icon_state = "suit"
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
@@ -171,7 +171,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "id"
|
||||
inv_box.screen_loc = ui_id
|
||||
inv_box.slot_id = slot_wear_id
|
||||
inv_box.slot_id = SLOT_WEAR_ID
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -179,7 +179,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
inv_box.screen_loc = ui_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
inv_box.slot_id = SLOT_WEAR_MASK
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -187,7 +187,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
inv_box.screen_loc = ui_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
inv_box.slot_id = SLOT_NECK
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -195,7 +195,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.slot_id = slot_back
|
||||
inv_box.slot_id = SLOT_BACK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -203,7 +203,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage1
|
||||
inv_box.slot_id = slot_l_store
|
||||
inv_box.slot_id = SLOT_L_STORE
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -211,7 +211,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "pocket"
|
||||
inv_box.screen_loc = ui_storage2
|
||||
inv_box.slot_id = slot_r_store
|
||||
inv_box.slot_id = SLOT_R_STORE
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -219,7 +219,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "suit_storage"
|
||||
inv_box.screen_loc = ui_sstore1
|
||||
inv_box.slot_id = slot_s_store
|
||||
inv_box.slot_id = SLOT_S_STORE
|
||||
static_inventory += inv_box
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
@@ -254,7 +254,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "gloves"
|
||||
inv_box.screen_loc = ui_gloves
|
||||
inv_box.slot_id = slot_gloves
|
||||
inv_box.slot_id = SLOT_GLOVES
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -262,7 +262,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "glasses"
|
||||
inv_box.screen_loc = ui_glasses
|
||||
inv_box.slot_id = slot_glasses
|
||||
inv_box.slot_id = SLOT_GLASSES
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -270,7 +270,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "ears"
|
||||
inv_box.screen_loc = ui_ears
|
||||
inv_box.slot_id = slot_ears
|
||||
inv_box.slot_id = SLOT_EARS
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -278,7 +278,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
inv_box.screen_loc = ui_head
|
||||
inv_box.slot_id = slot_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -286,7 +286,7 @@
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "shoes"
|
||||
inv_box.screen_loc = ui_shoes
|
||||
inv_box.slot_id = slot_shoes
|
||||
inv_box.slot_id = SLOT_SHOES
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
@@ -295,7 +295,7 @@
|
||||
inv_box.icon_state = "belt"
|
||||
// inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_belt
|
||||
inv_box.slot_id = slot_belt
|
||||
inv_box.slot_id = SLOT_BELT
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
|
||||
@@ -1,155 +1,155 @@
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
action_intent = new /obj/screen/act_intent()
|
||||
action_intent.icon = ui_style
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
action_intent.screen_loc = ui_acti
|
||||
static_inventory += action_intent
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m" //extra wide!
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "mask"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = slot_wear_mask
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_neck
|
||||
inv_box.slot_id = slot_neck
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_head
|
||||
inv_box.slot_id = slot_head
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_monkey_back
|
||||
inv_box.slot_id = slot_back
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = ui_style
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
infodisplay += healths
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/monkey/M = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(M.back)
|
||||
M.back.screen_loc = ui_monkey_back
|
||||
M.client.screen += M.back
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
M.client.screen += M.wear_mask
|
||||
if(M.wear_neck)
|
||||
M.wear_neck.screen_loc = ui_monkey_neck
|
||||
M.client.screen += M.wear_neck
|
||||
if(M.head)
|
||||
M.head.screen_loc = ui_monkey_head
|
||||
M.client.screen += M.head
|
||||
else
|
||||
if(M.back)
|
||||
M.back.screen_loc = null
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = null
|
||||
if(M.head)
|
||||
M.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = ui_hand_position(M.get_held_index_of_item(I))
|
||||
M.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = null
|
||||
M.client.screen -= I
|
||||
|
||||
/mob/living/carbon/monkey/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style))
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
action_intent = new /obj/screen/act_intent()
|
||||
action_intent.icon = ui_style
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
action_intent.screen_loc = ui_acti
|
||||
static_inventory += action_intent
|
||||
|
||||
using = new /obj/screen/mov_intent()
|
||||
using.icon = ui_style
|
||||
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_1_m" //extra wide!
|
||||
using.screen_loc = ui_swaphand_position(owner,1)
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
using.icon_state = "swap_2"
|
||||
using.screen_loc = ui_swaphand_position(owner,2)
|
||||
static_inventory += using
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "mask"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "mask"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_mask
|
||||
inv_box.slot_id = SLOT_WEAR_MASK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "neck"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "neck"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_neck
|
||||
inv_box.slot_id = SLOT_NECK
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "head"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "head"
|
||||
// inv_box.icon_full = "template"
|
||||
inv_box.screen_loc = ui_monkey_head
|
||||
inv_box.slot_id = SLOT_HEAD
|
||||
static_inventory += inv_box
|
||||
|
||||
inv_box = new /obj/screen/inventory()
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.screen_loc = ui_monkey_back
|
||||
inv_box.slot_id = SLOT_BACK
|
||||
static_inventory += inv_box
|
||||
|
||||
throw_icon = new /obj/screen/throw_catch()
|
||||
throw_icon.icon = ui_style
|
||||
throw_icon.screen_loc = ui_drop_throw
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
infodisplay += healths
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.update_icon(mymob)
|
||||
static_inventory += zone_select
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += using
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
if(inv.slot_id)
|
||||
inv.hud = src
|
||||
inv_slots[inv.slot_id] = inv
|
||||
inv.update_icon()
|
||||
|
||||
/datum/hud/monkey/persistent_inventory_update()
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/carbon/monkey/M = mymob
|
||||
|
||||
if(hud_shown)
|
||||
if(M.back)
|
||||
M.back.screen_loc = ui_monkey_back
|
||||
M.client.screen += M.back
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
M.client.screen += M.wear_mask
|
||||
if(M.wear_neck)
|
||||
M.wear_neck.screen_loc = ui_monkey_neck
|
||||
M.client.screen += M.wear_neck
|
||||
if(M.head)
|
||||
M.head.screen_loc = ui_monkey_head
|
||||
M.client.screen += M.head
|
||||
else
|
||||
if(M.back)
|
||||
M.back.screen_loc = null
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = null
|
||||
if(M.head)
|
||||
M.head.screen_loc = null
|
||||
|
||||
if(hud_version != HUD_STYLE_NOHUD)
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = ui_hand_position(M.get_held_index_of_item(I))
|
||||
M.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in M.held_items)
|
||||
I.screen_loc = null
|
||||
M.client.screen -= I
|
||||
|
||||
/mob/living/carbon/monkey/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style))
|
||||
|
||||
@@ -167,6 +167,8 @@
|
||||
/datum/hud/proc/update_parallax()
|
||||
var/client/C = mymob.client
|
||||
var/turf/posobj = get_turf(C.eye)
|
||||
if(!posobj)
|
||||
return
|
||||
var/area/areaobj = posobj.loc
|
||||
|
||||
// Update the movement direction of the parallax if necessary (for shuttles)
|
||||
|
||||
@@ -12,16 +12,27 @@
|
||||
/obj/screen/plane_master/proc/Hide(override)
|
||||
alpha = override || hide_alpha
|
||||
|
||||
//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928
|
||||
//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928
|
||||
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
|
||||
/obj/screen/plane_master/proc/backdrop(mob/mymob)
|
||||
|
||||
/obj/screen/plane_master/floor
|
||||
name = "floor plane master"
|
||||
plane = FLOOR_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/game_world
|
||||
name = "game world plane master"
|
||||
plane = GAME_PLANE
|
||||
appearance_flags = PLANE_MASTER //should use client color
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
|
||||
filters = list()
|
||||
if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion)
|
||||
filters += AMBIENT_OCCLUSION
|
||||
|
||||
/obj/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
plane = LIGHTING_PLANE
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
var/obj/item/clothing/mask/M = C.wear_mask
|
||||
if(M.mask_adjusted) // if mask on face but pushed down
|
||||
M.adjustmask(C) // adjust it back
|
||||
if( !(M.flags_1 & MASKINTERNALS_1) )
|
||||
if( !(M.clothing_flags & MASKINTERNALS) )
|
||||
to_chat(C, "<span class='warning'>You are not wearing an internals mask!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if(slot == slot_hands)
|
||||
if(slot == SLOT_HANDS)
|
||||
return
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/datum/config_entry/string/address
|
||||
config_entry_value = "localhost"
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
|
||||
/datum/config_entry/number/port
|
||||
config_entry_value = 3306
|
||||
min_val = 0
|
||||
@@ -24,3 +24,8 @@
|
||||
|
||||
/datum/config_entry/string/feedback_tableprefix
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/number/query_debug_log_timeout
|
||||
config_entry_value = 70
|
||||
min_val = 1
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
@@ -199,11 +199,14 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// Sort subsystems by display setting for easy access.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_display)
|
||||
// Set world options.
|
||||
if(sleep_offline_after_initializations)
|
||||
world.sleep_offline = TRUE
|
||||
world.fps = CONFIG_GET(number/fps)
|
||||
var/initialized_tod = REALTIMEOFDAY
|
||||
|
||||
world.TgsInitializationComplete()
|
||||
if(sleep_offline_after_initializations)
|
||||
world.sleep_offline = TRUE
|
||||
sleep(1)
|
||||
|
||||
if(sleep_offline_after_initializations && CONFIG_GET(flag/resume_after_initializations))
|
||||
world.sleep_offline = FALSE
|
||||
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10
|
||||
|
||||
@@ -29,7 +29,8 @@ SUBSYSTEM_DEF(air)
|
||||
var/list/obj/machinery/atmos_machinery = list()
|
||||
var/list/pipe_init_dirs_cache = list()
|
||||
|
||||
|
||||
//atmos singletons
|
||||
var/list/gas_reactions = list()
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/active_super_conductivity = list()
|
||||
|
||||
@@ -6,9 +6,10 @@ SUBSYSTEM_DEF(assets)
|
||||
var/list/preload = list()
|
||||
|
||||
/datum/controller/subsystem/assets/Initialize(timeofday)
|
||||
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
|
||||
var/datum/asset/A = new type()
|
||||
A.register()
|
||||
for(var/type in typesof(/datum/asset))
|
||||
var/datum/asset/A = type
|
||||
if (type != initial(A._abstract))
|
||||
get_asset_datum(type)
|
||||
|
||||
preload = cache.Copy() //don't preload assets generated during the round
|
||||
|
||||
|
||||
@@ -231,10 +231,24 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
|
||||
to_chat(usr, "<span class='danger'>A SQL error occurred during this operation, check the server logs.</span>")
|
||||
|
||||
/datum/DBQuery/proc/Execute(sql_query = sql, cursor_handler = default_cursor, log_error = TRUE)
|
||||
var/start_time
|
||||
var/timeout = CONFIG_GET(number/query_debug_log_timeout)
|
||||
if(timeout)
|
||||
start_time = REALTIMEOFDAY
|
||||
Close()
|
||||
. = _dm_db_execute(_db_query, sql_query, db_connection._db_con, cursor_handler, null)
|
||||
if(!. && log_error)
|
||||
log_sql("[ErrorMsg()] | Query used: [sql]")
|
||||
if(timeout)
|
||||
if((REALTIMEOFDAY - start_time) > timeout)
|
||||
log_query_debug("Query execution started at [start_time]")
|
||||
log_query_debug("Query execution ended at [REALTIMEOFDAY]")
|
||||
log_query_debug("Possible slow query timeout detected.")
|
||||
log_query_debug("Query used: [sql]")
|
||||
slow_query_check()
|
||||
|
||||
/datum/DBQuery/proc/slow_query_check()
|
||||
message_admins("HEY! A database query may have timed out. Did the server just hang? <a href='?_src_=holder;[HrefToken()];slowquery=yes'>\[YES\]</a>|<a href='?_src_=holder;[HrefToken()];slowquery=no'>\[NO\]</a>")
|
||||
|
||||
/datum/DBQuery/proc/NextRow()
|
||||
return _dm_db_next_row(_db_query,item,conversions)
|
||||
|
||||
32
code/controllers/subsystem/ping.dm
Normal file
32
code/controllers/subsystem/ping.dm
Normal file
@@ -0,0 +1,32 @@
|
||||
SUBSYSTEM_DEF(ping)
|
||||
name = "Ping"
|
||||
priority = FIRE_PRIORITY_PING
|
||||
wait = 3 SECONDS
|
||||
flags = SS_NO_INIT
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/ping/stat_entry()
|
||||
..("P:[GLOB.clients.len]")
|
||||
|
||||
|
||||
/datum/controller/subsystem/ping/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while (currentrun.len)
|
||||
var/client/C = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
|
||||
if (!C || !C.chatOutput || !C.chatOutput.loaded)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
continue
|
||||
|
||||
// softPang isn't handled anywhere but it'll always reset the opts.lastPang.
|
||||
C.chatOutput.ehjax_send(data = C.is_afk(29) ? "softPang" : "pang")
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
34
code/controllers/subsystem/processing/quirks.dm
Normal file
34
code/controllers/subsystem/processing/quirks.dm
Normal file
@@ -0,0 +1,34 @@
|
||||
//Used to process and handle roundstart quirks
|
||||
// - Quirk strings are used for faster checking in code
|
||||
// - Quirk datums are stored and hold different effects, as well as being a vector for applying trait string
|
||||
PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
name = "Quirks"
|
||||
init_order = INIT_ORDER_QUIRKS
|
||||
flags = SS_BACKGROUND
|
||||
wait = 10
|
||||
runlevels = RUNLEVEL_GAME
|
||||
|
||||
var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/
|
||||
var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad
|
||||
var/list/quirk_objects = list() //A list of all quirk objects in the game, since some may process
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/Initialize(timeofday)
|
||||
if(!quirks.len)
|
||||
SetupQuirks()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/SetupQuirks()
|
||||
for(var/V in subtypesof(/datum/quirk))
|
||||
var/datum/quirk/T = V
|
||||
quirks[initial(T.name)] = T
|
||||
quirk_points[initial(T.name)] = initial(T.value)
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/AssignQuirks(mob/living/user, client/cli, spawn_effects)
|
||||
GenerateQuirks(cli)
|
||||
for(var/V in cli.prefs.character_quirks)
|
||||
user.add_quirk(V, spawn_effects)
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/GenerateQuirks(client/user)
|
||||
if(user.prefs.character_quirks.len)
|
||||
return
|
||||
user.prefs.character_quirks = user.prefs.all_quirks
|
||||
@@ -55,8 +55,8 @@ SUBSYSTEM_DEF(server_maint)
|
||||
co.ehjax_send(data = "roundrestart")
|
||||
if(server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[server]")
|
||||
if(SERVER_TOOLS_PRESENT)
|
||||
SSblackbox.record_feedback("text", "server_tools", 1, SERVER_TOOLS_VERSION)
|
||||
SSblackbox.record_feedback("text", "server_tools_api", 1, SERVER_TOOLS_API_VERSION)
|
||||
var/tgsversion = world.TgsVersion()
|
||||
if(tgsversion)
|
||||
SSblackbox.record_feedback("text", "server_tools", 1, tgsversion)
|
||||
|
||||
#undef PING_BUFFER_TIME
|
||||
|
||||
@@ -158,7 +158,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
|
||||
to_chat(world, "<span class='boldnotice'>Welcome to [station_name()]!</span>")
|
||||
if(CONFIG_GET(flag/irc_announce_new_game))
|
||||
SERVER_TOOLS_CHAT_BROADCAST("New round starting on [SSmapping.config.map_name]!")
|
||||
world.TgsTargetedChatBroadcast("New round starting on [SSmapping.config.map_name]!", FALSE)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
//Everyone who wants to be an observer is now spawned
|
||||
create_observers()
|
||||
@@ -391,7 +391,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(player.mind.assigned_role != player.mind.special_role)
|
||||
SSjob.EquipRank(N, player.mind.assigned_role, 0)
|
||||
if(CONFIG_GET(flag/roundstart_traits))
|
||||
SStraits.AssignTraits(player, N.client, TRUE)
|
||||
SSquirks.AssignQuirks(player, N.client, TRUE)
|
||||
CHECK_TICK
|
||||
if(captainless)
|
||||
for(var/mob/dead/new_player/N in GLOB.player_list)
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
H.attack_self(owner)
|
||||
return
|
||||
var/obj/item/I = target
|
||||
if(owner.can_equip(I, slot_hands))
|
||||
if(owner.can_equip(I, SLOT_HANDS))
|
||||
owner.temporarilyRemoveItemFromInventory(I)
|
||||
owner.put_in_hands(I)
|
||||
I.attack_self(owner)
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
to_chat(owner, "<span class='warning'>You feel really lonely...</span>")
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You're going mad with loneliness!</span>")
|
||||
owner.hallucination += 20
|
||||
owner.hallucination += 30
|
||||
|
||||
if(5)
|
||||
if(!high_stress)
|
||||
|
||||
78
code/datums/components/armor_plate.dm
Normal file
78
code/datums/components/armor_plate.dm
Normal file
@@ -0,0 +1,78 @@
|
||||
/datum/component/armor_plate
|
||||
var/amount = 0
|
||||
var/maxamount = 3
|
||||
var/upgrade_item = /obj/item/stack/sheet/animalhide/goliath_hide
|
||||
var/datum/armor/added_armor = list("melee" = 10)
|
||||
var/upgrade_name
|
||||
|
||||
/datum/component/armor_plate/Initialize(_maxamount,obj/item/_upgrade_item,datum/armor/_added_armor)
|
||||
if(!isobj(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/applyplate)
|
||||
RegisterSignal(COMSIG_PARENT_PREQDELETED, .proc/dropplates)
|
||||
|
||||
if(_maxamount)
|
||||
maxamount = _maxamount
|
||||
if(_upgrade_item)
|
||||
upgrade_item = _upgrade_item
|
||||
if(_added_armor)
|
||||
if(islist(_added_armor))
|
||||
added_armor = getArmor(arglist(_added_armor))
|
||||
else if (istype(_added_armor, /datum/armor))
|
||||
added_armor = _added_armor
|
||||
else
|
||||
stack_trace("Invalid type [_added_armor.type] passed as _armor_item argument to armorplate component")
|
||||
else
|
||||
added_armor = getArmor(arglist(added_armor))
|
||||
var/obj/item/typecast = upgrade_item
|
||||
upgrade_name = initial(typecast.name)
|
||||
|
||||
/datum/component/armor_plate/proc/examine(mob/user)
|
||||
//upgrade_item could also be typecast here instead
|
||||
if(ismecha(parent))
|
||||
if(amount)
|
||||
if(amount < maxamount)
|
||||
to_chat(user, "<span class='notice'>Its armor is enhanced with [amount] [upgrade_name].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It's wearing a fearsome carapace entirely composed of [upgrade_name] - its pilot must be an experienced monster hunter.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It has attachment points for strapping monster hide on for added protection.</span>")
|
||||
else
|
||||
if(amount)
|
||||
to_chat(user, "<span class='notice'>It has been strengthened with [amount]/[maxamount] [upgrade_name].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It can be strengthened with up to [maxamount] [upgrade_name].</span>")
|
||||
|
||||
/datum/component/armor_plate/proc/applyplate(obj/item/I, mob/user, params)
|
||||
if(!istype(I,upgrade_item))
|
||||
return
|
||||
if(amount >= maxamount)
|
||||
to_chat(user, "<span class='warning'>You can't improve [parent] any further!</span>")
|
||||
return
|
||||
|
||||
if(istype(I,/obj/item/stack))
|
||||
I.use(1)
|
||||
else
|
||||
if(length(I.contents))
|
||||
to_chat(user, "<span class='warning'>[I] cannot be used for armoring while there's something inside!</span>")
|
||||
return
|
||||
qdel(I)
|
||||
|
||||
var/obj/O = parent
|
||||
amount++
|
||||
O.armor = O.armor.attachArmor(added_armor)
|
||||
|
||||
if(ismecha(O))
|
||||
var/obj/mecha/R = O
|
||||
R.update_icon()
|
||||
to_chat(user, "<span class='info'>You strengthen [R], improving its resistance against melee, bullet and laser damage.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>You strengthen [O], improving its resistance against melee attacks.</span>")
|
||||
|
||||
|
||||
/datum/component/armor_plate/proc/dropplates(force)
|
||||
if(ismecha(parent)) //items didn't drop the plates before and it causes erroneous behavior for the time being with collapsible helmets
|
||||
for(var/i in 1 to amount)
|
||||
new upgrade_item(get_turf(parent))
|
||||
@@ -64,18 +64,22 @@
|
||||
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing || AM.floating)
|
||||
return FALSE
|
||||
//Flies right over the chasm
|
||||
if(isliving(AM))
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.buckled) //middle statement to prevent infinite loops just in case!
|
||||
var/mob/buckled_to = M.buckled
|
||||
if((!ismob(M.buckled) || (buckled_to.buckled != M)) && !droppable(M.buckled))
|
||||
return FALSE
|
||||
if(M.is_flying())
|
||||
return FALSE
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.belt, /obj/item/wormhole_jaunter))
|
||||
var/obj/item/wormhole_jaunter/J = H.belt
|
||||
//To freak out any bystanders
|
||||
H.visible_message("<span class='boldwarning'>[H] falls into [parent]!</span>")
|
||||
J.chasm_react(H)
|
||||
return FALSE
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.belt, /obj/item/wormhole_jaunter))
|
||||
var/obj/item/wormhole_jaunter/J = H.belt
|
||||
//To freak out any bystanders
|
||||
H.visible_message("<span class='boldwarning'>[H] falls into [parent]!</span>")
|
||||
J.chasm_react(H)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/component/chasm/proc/drop(atom/movable/AM)
|
||||
|
||||
30
code/datums/components/earhealing.dm
Normal file
30
code/datums/components/earhealing.dm
Normal file
@@ -0,0 +1,30 @@
|
||||
// An item worn in the ear slot with this component will heal your ears each
|
||||
// Life() tick, even if normally your ears would be too damaged to heal.
|
||||
|
||||
/datum/component/earhealing
|
||||
var/mob/living/carbon/wearer
|
||||
|
||||
/datum/component/earhealing/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/equippedChanged)
|
||||
|
||||
/datum/component/earhealing/proc/equippedChanged(mob/living/carbon/user, slot)
|
||||
if (slot == SLOT_EARS && istype(user))
|
||||
if (!wearer)
|
||||
START_PROCESSING(SSobj, src)
|
||||
wearer = user
|
||||
else
|
||||
if (wearer)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
wearer = null
|
||||
|
||||
/datum/component/earhealing/process()
|
||||
if (!wearer)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
if(!wearer.has_trait(TRAIT_DEAF))
|
||||
var/obj/item/organ/ears/ears = wearer.getorganslot(ORGAN_SLOT_EARS)
|
||||
if (ears)
|
||||
ears.deaf = max(ears.deaf - 1, (ears.ear_damage < UNHEALING_EAR_DAMAGE ? 0 : 1)) // Do not clear deafness while above the unhealing ear damage threshold
|
||||
ears.ear_damage = max(ears.ear_damage - 0.1, 0)
|
||||
11
code/datums/components/earprotection.dm
Normal file
11
code/datums/components/earprotection.dm
Normal file
@@ -0,0 +1,11 @@
|
||||
/datum/component/wearertargeting/earprotection
|
||||
signals = list(COMSIG_CARBON_SOUNDBANG)
|
||||
mobtype = /mob/living/carbon
|
||||
|
||||
/datum/component/wearertargeting/earprotection/Initialize(_valid_slots)
|
||||
. = ..()
|
||||
valid_slots = _valid_slots
|
||||
callback = CALLBACK(src, .proc/reducebang)
|
||||
|
||||
/datum/component/wearertargeting/earprotection/proc/reducebang(list/reflist)
|
||||
reflist[1]--
|
||||
@@ -15,16 +15,18 @@
|
||||
var/sheet_type
|
||||
var/list/materials
|
||||
var/show_on_examine
|
||||
var/disable_attackby
|
||||
var/list/allowed_typecache
|
||||
var/last_inserted_id
|
||||
var/precise_insertion = FALSE
|
||||
var/datum/callback/precondition
|
||||
var/datum/callback/after_insert
|
||||
|
||||
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition, datum/callback/_after_insert)
|
||||
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition, datum/callback/_after_insert, _disable_attackby)
|
||||
materials = list()
|
||||
max_amount = max(0, max_amt)
|
||||
show_on_examine = _show_on_examine
|
||||
disable_attackby = _disable_attackby
|
||||
if(allowed_types)
|
||||
allowed_typecache = typecacheof(allowed_types)
|
||||
precondition = _precondition
|
||||
@@ -43,17 +45,20 @@
|
||||
materials[id] = new mat_path()
|
||||
|
||||
/datum/component/material_container/proc/OnExamine(mob/user)
|
||||
for(var/I in materials)
|
||||
var/datum/material/M = materials[I]
|
||||
var/amt = amount(M.id)
|
||||
if(amt)
|
||||
to_chat(user, "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>")
|
||||
if(show_on_examine)
|
||||
for(var/I in materials)
|
||||
var/datum/material/M = materials[I]
|
||||
var/amt = amount(M.id)
|
||||
if(amt)
|
||||
to_chat(user, "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>")
|
||||
|
||||
/datum/component/material_container/proc/OnAttackBy(obj/item/I, mob/living/user)
|
||||
var/list/tc = allowed_typecache
|
||||
if(disable_attackby)
|
||||
return
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
return
|
||||
if((I.flags_2 & (HOLOGRAM_2 | NO_MAT_REDEMPTION_2)) || (tc && !is_type_in_typecache(I, tc)))
|
||||
if((I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION) || (tc && !is_type_in_typecache(I, tc)))
|
||||
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
|
||||
return
|
||||
. = COMPONENT_NO_AFTERATTACK
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
/datum/component/redirect
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
|
||||
/datum/component/redirect/Initialize(list/signals, datum/callback/_callback)
|
||||
/datum/component/redirect/Initialize(list/signals, datum/callback/_callback, flags=NONE)
|
||||
//It's not our job to verify the right signals are registered here, just do it.
|
||||
if(!LAZYLEN(signals) || !istype(_callback))
|
||||
warning("signals are [list2params(signals)], callback is [_callback]]")
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(flags & REDIRECT_TRANSFER_WITH_TURF && isturf(parent))
|
||||
RegisterSignal(COMSIG_TURF_CHANGE, .proc/turf_change)
|
||||
RegisterSignal(signals, _callback)
|
||||
|
||||
/datum/component/redirect/proc/turf_change(path, new_baseturfs, flags, list/transfers)
|
||||
transfers += src
|
||||
|
||||
@@ -28,13 +28,7 @@
|
||||
CRASH("Unable to find a blobstart landmark")
|
||||
|
||||
var/atom/movable/AM = parent
|
||||
if(ismob(AM.loc))
|
||||
var/mob/M = AM.loc
|
||||
M.transferItemToLoc(AM, targetturf, TRUE) //nodrops disks when?
|
||||
else if(AM.loc.SendSignal(COMSIG_CONTAINS_STORAGE))
|
||||
AM.loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, targetturf, TRUE)
|
||||
else
|
||||
AM.forceMove(targetturf)
|
||||
AM.forceMove(targetturf)
|
||||
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
|
||||
return targetturf
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
slave.refresh_mob_views()
|
||||
|
||||
/datum/component/storage/concrete/emp_act(severity)
|
||||
if(emp_shielded)
|
||||
return
|
||||
var/atom/real_location = real_location()
|
||||
for(var/i in real_location)
|
||||
var/atom/A = i
|
||||
|
||||
@@ -87,7 +87,8 @@
|
||||
RegisterSignal(COMSIG_ATOM_ATTACK_PAW, .proc/on_attack_hand)
|
||||
RegisterSignal(COMSIG_ATOM_EMP_ACT, .proc/emp_act)
|
||||
RegisterSignal(COMSIG_ATOM_ATTACK_GHOST, .proc/show_to_ghost)
|
||||
RegisterSignal(COMSIG_ATOM_EXITED, .proc/_removal_reset)
|
||||
RegisterSignal(COMSIG_ATOM_ENTERED, .proc/refresh_mob_views)
|
||||
RegisterSignal(COMSIG_ATOM_EXITED, .proc/_remove_and_refresh)
|
||||
|
||||
RegisterSignal(COMSIG_ITEM_PRE_ATTACK, .proc/preattack_intercept)
|
||||
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/attack_self)
|
||||
@@ -232,13 +233,15 @@
|
||||
stoplag(1)
|
||||
qdel(progress)
|
||||
|
||||
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress)
|
||||
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE)
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/item/I in things)
|
||||
things -= I
|
||||
if(I.loc != real_location)
|
||||
continue
|
||||
remove_from_storage(I, target)
|
||||
if(trigger_on_found && I.on_found())
|
||||
return FALSE
|
||||
if(TICK_CHECK)
|
||||
progress.update(progress.goal - length(things))
|
||||
return TRUE
|
||||
@@ -367,10 +370,10 @@
|
||||
. = TRUE //returns TRUE if any mobs actually got a close(M) call
|
||||
|
||||
/datum/component/storage/proc/emp_act(severity)
|
||||
var/atom/A = parent
|
||||
if(!isliving(A.loc) && !emp_shielded)
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
master.emp_act(severity)
|
||||
if(emp_shielded)
|
||||
return
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
master.emp_act(severity)
|
||||
|
||||
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
|
||||
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
|
||||
@@ -400,6 +403,10 @@
|
||||
return FALSE
|
||||
return master._removal_reset(thing)
|
||||
|
||||
/datum/component/storage/proc/_remove_and_refresh(atom/movable/thing)
|
||||
_removal_reset(thing)
|
||||
refresh_mob_views()
|
||||
|
||||
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the new_location target, if that is null it's being deleted
|
||||
/datum/component/storage/proc/remove_from_storage(atom/movable/AM, atom/new_location)
|
||||
if(!istype(AM))
|
||||
@@ -453,23 +460,24 @@
|
||||
return FALSE
|
||||
handle_item_insertion(I, FALSE, M)
|
||||
|
||||
/datum/component/storage/proc/return_inv()
|
||||
. = list()
|
||||
. += contents()
|
||||
for(var/i in contents())
|
||||
var/atom/a = i
|
||||
GET_COMPONENT_FROM(STR, /datum/component/storage, a)
|
||||
if(STR)
|
||||
. += STR.return_inv()
|
||||
/datum/component/storage/proc/return_inv(recursive)
|
||||
var/list/ret = list()
|
||||
ret |= contents()
|
||||
if(recursive)
|
||||
for(var/i in ret.Copy())
|
||||
var/atom/A = i
|
||||
A.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE)
|
||||
return ret
|
||||
|
||||
/datum/component/storage/proc/contents() //ONLY USE IF YOU NEED TO COPY CONTENTS OF REAL LOCATION, COPYING IS NOT AS FAST AS DIRECT ACCESS!
|
||||
var/atom/real_location = real_location()
|
||||
return real_location.contents.Copy()
|
||||
|
||||
/datum/component/storage/proc/signal_return_inv(list/interface)
|
||||
//Abuses the fact that lists are just references, or something like that.
|
||||
/datum/component/storage/proc/signal_return_inv(list/interface, recursive = TRUE)
|
||||
if(!islist(interface))
|
||||
return FALSE
|
||||
interface |= return_inv()
|
||||
interface |= return_inv(recursive)
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/proc/mousedrop_onto(atom/over_object, mob/M)
|
||||
|
||||
26
code/datums/components/wearertargeting.dm
Normal file
26
code/datums/components/wearertargeting.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
// A dummy parent type used for easily making components that target an item's wearer rather than the item itself.
|
||||
|
||||
/datum/component/wearertargeting
|
||||
var/datum/component/mobhook
|
||||
var/list/valid_slots = list()
|
||||
var/list/signals = list()
|
||||
var/datum/callback/callback = CALLBACK(GLOBAL_PROC, .proc/pass)
|
||||
var/mobtype = /mob/living
|
||||
|
||||
/datum/component/wearertargeting/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/checkMobHook)
|
||||
|
||||
/datum/component/wearertargeting/Destroy()
|
||||
QDEL_NULL(mobhook)
|
||||
return ..()
|
||||
|
||||
/datum/component/wearertargeting/proc/checkMobHook(mob/user, slot)
|
||||
if ((slot in valid_slots) && istype(user, mobtype))
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, signals, callback)
|
||||
else
|
||||
QDEL_NULL(mobhook)
|
||||
@@ -117,7 +117,7 @@
|
||||
decrease = max(0, decrease)
|
||||
if((is_wet() & TURF_WET_ICE) && t > T0C) //Ice melts into water!
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.flags_2 & FROZEN_2)
|
||||
if(O.obj_flags & FROZEN)
|
||||
O.make_unfrozen()
|
||||
add_wet(TURF_WET_WATER, max_time_left())
|
||||
dry(TURF_WET_ICE)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/datum/proc/CanProcCall(procname)
|
||||
return TRUE
|
||||
|
||||
/datum/proc/can_vv_get(var_name)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(passed && isobj(slot_w_uniform))
|
||||
Cl = slot_w_uniform
|
||||
if(passed && isobj(SLOT_W_UNIFORM))
|
||||
Cl = SLOT_W_UNIFORM
|
||||
passed = prob((Cl.permeability_coefficient*100) - 1)
|
||||
if(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
|
||||
@@ -55,7 +55,7 @@ Bonus
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
if(prob(base_message_chance) && !suppress_warning)
|
||||
to_chat(M, "<span class='warning'>[pick("You feel nauseous.", "You feel like you're going to throw up!")]</span>")
|
||||
to_chat(M, "<span class='warning'>[pick("You feel nauseated.", "You feel like you're going to throw up!")]</span>")
|
||||
else
|
||||
vomit(M)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
to_chat(H, "<span class='warning'>You feel dizzy.</span>")
|
||||
H.confused += 6
|
||||
if(prob(3))
|
||||
to_chat(H, "<span class='warning'>You feel [pick("full", "nauseous", "sweaty", "weak", "tired", "short on breath", "uneasy")].</span>")
|
||||
to_chat(H, "<span class='warning'>You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].</span>")
|
||||
if(3 to 4)
|
||||
if(!sound)
|
||||
H.playsound_local(H, 'sound/health/slowbeat.ogg',40,0, channel = CHANNEL_HEARTBEAT)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
permeability_mod = 1
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
process_dead = TRUE
|
||||
|
||||
/datum/disease/rhumba_beat/stage_act()
|
||||
..()
|
||||
|
||||
@@ -61,19 +61,19 @@ STI KALY - blind
|
||||
if(!istype(H.head, /obj/item/clothing/head/wizard))
|
||||
if(!H.dropItemToGround(H.head))
|
||||
qdel(H.head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(H), SLOT_HEAD)
|
||||
return
|
||||
if(prob(chance))
|
||||
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe))
|
||||
if(!H.dropItemToGround(H.wear_suit))
|
||||
qdel(H.wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(H), SLOT_WEAR_SUIT)
|
||||
return
|
||||
if(prob(chance))
|
||||
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal/magic))
|
||||
if(!H.dropItemToGround(H.shoes))
|
||||
qdel(H.shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(H), SLOT_SHOES)
|
||||
return
|
||||
else
|
||||
var/mob/living/carbon/H = affected_mob
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/date
|
||||
|
||||
/datum/getrev/New()
|
||||
testmerge = SERVER_TOOLS_PR_LIST
|
||||
testmerge = world.TgsTestMerges()
|
||||
log_world("Running /tg/ revision:")
|
||||
var/list/logs = world.file2list(".git/logs/HEAD")
|
||||
if(logs)
|
||||
@@ -21,7 +21,8 @@
|
||||
log_world(commit)
|
||||
for(var/line in testmerge)
|
||||
if(line)
|
||||
var/tmcommit = testmerge[line]["commit"]
|
||||
var/datum/tgs_revision_information/test_merge/tm = line
|
||||
var/tmcommit = tm.commit
|
||||
log_world("Test merge active of PR #[line] commit [tmcommit]")
|
||||
SSblackbox.record_feedback("nested tally", "testmerged_prs", 1, list("[line]", "[tmcommit]"))
|
||||
if(originmastercommit)
|
||||
@@ -34,11 +35,12 @@
|
||||
return ""
|
||||
. = header ? "The following pull requests are currently test merged:<br>" : ""
|
||||
for(var/line in testmerge)
|
||||
var/cm = testmerge[line]["commit"]
|
||||
var/details = ": '" + html_encode(testmerge[line]["title"]) + "' by " + html_encode(testmerge[line]["author"]) + " at commit " + html_encode(copytext(cm, 1, min(length(cm), 7)))
|
||||
var/datum/tgs_revision_information/test_merge/tm = line
|
||||
var/cm = tm.pull_request_commit
|
||||
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext(cm, 1, min(length(cm), 11)))
|
||||
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
|
||||
continue
|
||||
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[line]\">#[line][details]</a><br>"
|
||||
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a><br>"
|
||||
|
||||
/client/verb/showrevinfo()
|
||||
set category = "OOC"
|
||||
@@ -54,13 +56,12 @@
|
||||
to_chat(src, GLOB.revdata.GetTestMergeInfo())
|
||||
prefix = "Based off origin/master commit: "
|
||||
var/pc = GLOB.revdata.originmastercommit
|
||||
to_chat(src, "[prefix]<a href=\"[CONFIG_GET(string/githuburl)]/commit/[pc]\">[copytext(pc, 1, min(length(pc), 7))]</a>")
|
||||
to_chat(src, "[prefix]<a href=\"[CONFIG_GET(string/githuburl)]/commit/[pc]\">[copytext(pc, 1, min(length(pc), 11))]</a>")
|
||||
else
|
||||
to_chat(src, "Master revision unknown")
|
||||
to_chat(src, "Revision: [GLOB.revdata.commit]")
|
||||
if(SERVER_TOOLS_PRESENT)
|
||||
to_chat(src, "Server tools version: [SERVER_TOOLS_VERSION]")
|
||||
to_chat(src, "Server tools API version: [SERVER_TOOLS_API_VERSION]")
|
||||
if(world.TgsAvailable())
|
||||
to_chat(src, "Server tools version: [world.TgsVersion()]")
|
||||
to_chat(src, "<b>Current Informational Settings:</b>")
|
||||
to_chat(src, "Protect Authority Roles From Traitor: [CONFIG_GET(flag/protect_roles_from_antagonist)]")
|
||||
to_chat(src, "Protect Assistant Role From Traitor: [CONFIG_GET(flag/protect_assistant_from_antagonist)]")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/item/clothing/gloves/boxing/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == slot_gloves)
|
||||
if(slot == SLOT_GLOVES)
|
||||
var/mob/living/carbon/human/H = user
|
||||
style.teach(H,1)
|
||||
return
|
||||
@@ -62,6 +62,6 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(slot_gloves) == src)
|
||||
if(H.get_item_by_slot(SLOT_GLOVES) == src)
|
||||
style.remove(H)
|
||||
return
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
/obj/item/clothing/gloves/krav_maga/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == slot_gloves)
|
||||
if(slot == SLOT_GLOVES)
|
||||
var/mob/living/carbon/human/H = user
|
||||
style.teach(H,1)
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(slot_gloves) == src)
|
||||
if(H.get_item_by_slot(SLOT_GLOVES) == src)
|
||||
style.remove(H)
|
||||
|
||||
/obj/item/clothing/gloves/krav_maga/sec//more obviously named, given to sec
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate."
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = SLOT_BACK
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force_unwielded = 10
|
||||
force_wielded = 24
|
||||
throwforce = 20
|
||||
|
||||
@@ -448,7 +448,7 @@
|
||||
/obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == slot_belt)
|
||||
if(slot == SLOT_BELT)
|
||||
var/mob/living/carbon/human/H = user
|
||||
style.teach(H,1)
|
||||
return
|
||||
@@ -457,6 +457,6 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.get_item_by_slot(slot_belt) == src)
|
||||
if(H.get_item_by_slot(SLOT_BELT) == src)
|
||||
style.remove(H)
|
||||
return
|
||||
|
||||
@@ -39,31 +39,31 @@
|
||||
|
||||
//Start with uniform,suit,backpack for additional slots
|
||||
if(uniform)
|
||||
H.equip_to_slot_or_del(new uniform(H),slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new uniform(H),SLOT_W_UNIFORM)
|
||||
if(suit)
|
||||
H.equip_to_slot_or_del(new suit(H),slot_wear_suit)
|
||||
H.equip_to_slot_or_del(new suit(H),SLOT_WEAR_SUIT)
|
||||
if(back)
|
||||
H.equip_to_slot_or_del(new back(H),slot_back)
|
||||
H.equip_to_slot_or_del(new back(H),SLOT_BACK)
|
||||
if(belt)
|
||||
H.equip_to_slot_or_del(new belt(H),slot_belt)
|
||||
H.equip_to_slot_or_del(new belt(H),SLOT_BELT)
|
||||
if(gloves)
|
||||
H.equip_to_slot_or_del(new gloves(H),slot_gloves)
|
||||
H.equip_to_slot_or_del(new gloves(H),SLOT_GLOVES)
|
||||
if(shoes)
|
||||
H.equip_to_slot_or_del(new shoes(H),slot_shoes)
|
||||
H.equip_to_slot_or_del(new shoes(H),SLOT_SHOES)
|
||||
if(head)
|
||||
H.equip_to_slot_or_del(new head(H),slot_head)
|
||||
H.equip_to_slot_or_del(new head(H),SLOT_HEAD)
|
||||
if(mask)
|
||||
H.equip_to_slot_or_del(new mask(H),slot_wear_mask)
|
||||
H.equip_to_slot_or_del(new mask(H),SLOT_WEAR_MASK)
|
||||
if(neck)
|
||||
H.equip_to_slot_or_del(new neck(H),slot_neck)
|
||||
H.equip_to_slot_or_del(new neck(H),SLOT_NECK)
|
||||
if(ears)
|
||||
H.equip_to_slot_or_del(new ears(H),slot_ears)
|
||||
H.equip_to_slot_or_del(new ears(H),SLOT_EARS)
|
||||
if(glasses)
|
||||
H.equip_to_slot_or_del(new glasses(H),slot_glasses)
|
||||
H.equip_to_slot_or_del(new glasses(H),SLOT_GLASSES)
|
||||
if(id)
|
||||
H.equip_to_slot_or_del(new id(H),slot_wear_id)
|
||||
H.equip_to_slot_or_del(new id(H),SLOT_WEAR_ID)
|
||||
if(suit_store)
|
||||
H.equip_to_slot_or_del(new suit_store(H),slot_s_store)
|
||||
H.equip_to_slot_or_del(new suit_store(H),SLOT_S_STORE)
|
||||
|
||||
if(accessory)
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
@@ -79,16 +79,16 @@
|
||||
|
||||
if(!visualsOnly) // Items in pockets or backpack don't show up on mob's icon.
|
||||
if(l_pocket)
|
||||
H.equip_to_slot_or_del(new l_pocket(H),slot_l_store)
|
||||
H.equip_to_slot_or_del(new l_pocket(H),SLOT_L_STORE)
|
||||
if(r_pocket)
|
||||
H.equip_to_slot_or_del(new r_pocket(H),slot_r_store)
|
||||
H.equip_to_slot_or_del(new r_pocket(H),SLOT_R_STORE)
|
||||
if(backpack_contents)
|
||||
for(var/path in backpack_contents)
|
||||
var/number = backpack_contents[path]
|
||||
if(!isnum(number))//Default to 1
|
||||
number = 1
|
||||
for(var/i in 1 to number)
|
||||
H.equip_to_slot_or_del(new path(H),slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new path(H),SLOT_IN_BACKPACK)
|
||||
|
||||
if(!H.head && toggle_helmet && istype(H.wear_suit, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
|
||||
/datum/radiation_wave/process()
|
||||
master_turf = get_step(master_turf, move_dir)
|
||||
if(!master_turf)
|
||||
qdel(src)
|
||||
return
|
||||
steps++
|
||||
var/list/atoms = get_rad_atoms()
|
||||
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
//every trait in this folder should be coded around being applied on spawn
|
||||
//these are NOT "mob traits" like GOTTAGOFAST, but exist as a medium to apply them and other different effects
|
||||
/datum/trait
|
||||
var/name = "Test Trait"
|
||||
var/desc = "This is a test trait."
|
||||
//every quirk in this folder should be coded around being applied on spawn
|
||||
//these are NOT "mob quirks" like GOTTAGOFAST, but exist as a medium to apply them and other different effects
|
||||
/datum/quirk
|
||||
var/name = "Test Quirk"
|
||||
var/desc = "This is a test quirk."
|
||||
var/value = 0
|
||||
var/human_only = TRUE
|
||||
var/gain_text
|
||||
var/lose_text
|
||||
var/medical_record_text //This text will appear on medical records for the trait. Not yet implemented
|
||||
var/mood_trait = FALSE //if true, this trait affects mood and is unavailable if moodlets are disabled
|
||||
var/mood_quirk = FALSE //if true, this quirk affects mood and is unavailable if moodlets are disabled
|
||||
var/mob_trait //if applicable, apply and remove this mob trait
|
||||
var/mob/living/trait_holder
|
||||
var/mob/living/quirk_holder
|
||||
|
||||
/datum/trait/New(mob/living/trait_mob, spawn_effects)
|
||||
/datum/quirk/New(mob/living/quirk_mob, spawn_effects)
|
||||
..()
|
||||
if(!trait_mob || (human_only && !ishuman(trait_mob)) || trait_mob.has_trait_datum(type))
|
||||
if(!quirk_mob || (human_only && !ishuman(quirk_mob)) || quirk_mob.has_quirk(type))
|
||||
qdel(src)
|
||||
trait_holder = trait_mob
|
||||
SStraits.trait_objects += src
|
||||
to_chat(trait_holder, gain_text)
|
||||
trait_holder.roundstart_traits += src
|
||||
quirk_holder = quirk_mob
|
||||
SSquirks.quirk_objects += src
|
||||
to_chat(quirk_holder, gain_text)
|
||||
quirk_holder.roundstart_quirks += src
|
||||
if(mob_trait)
|
||||
trait_holder.add_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
START_PROCESSING(SStraits, src)
|
||||
quirk_holder.add_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
START_PROCESSING(SSquirks, src)
|
||||
add()
|
||||
if(spawn_effects)
|
||||
on_spawn()
|
||||
addtimer(CALLBACK(src, .proc/post_add), 30)
|
||||
|
||||
/datum/trait/Destroy()
|
||||
STOP_PROCESSING(SStraits, src)
|
||||
/datum/quirk/Destroy()
|
||||
STOP_PROCESSING(SSquirks, src)
|
||||
remove()
|
||||
if(trait_holder)
|
||||
to_chat(trait_holder, lose_text)
|
||||
trait_holder.roundstart_traits -= src
|
||||
if(quirk_holder)
|
||||
to_chat(quirk_holder, lose_text)
|
||||
quirk_holder.roundstart_quirks -= src
|
||||
if(mob_trait)
|
||||
trait_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT, TRUE)
|
||||
SStraits.trait_objects -= src
|
||||
quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT, TRUE)
|
||||
SSquirks.quirk_objects -= src
|
||||
return ..()
|
||||
|
||||
/datum/trait/proc/transfer_mob(mob/living/to_mob)
|
||||
trait_holder.roundstart_traits -= src
|
||||
to_mob.roundstart_traits += src
|
||||
/datum/quirk/proc/transfer_mob(mob/living/to_mob)
|
||||
quirk_holder.roundstart_quirks -= src
|
||||
to_mob.roundstart_quirks += src
|
||||
if(mob_trait)
|
||||
trait_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
to_mob.add_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
trait_holder = to_mob
|
||||
quirk_holder = to_mob
|
||||
on_transfer()
|
||||
|
||||
/datum/trait/proc/add() //special "on add" effects
|
||||
/datum/trait/proc/on_spawn() //these should only trigger when the character is being created for the first time, i.e. roundstart/latejoin
|
||||
/datum/trait/proc/remove() //special "on remove" effects
|
||||
/datum/trait/proc/on_process() //process() has some special checks, so this is the actual process
|
||||
/datum/trait/proc/post_add() //for text, disclaimers etc. given after you spawn in with the trait
|
||||
/datum/trait/proc/on_transfer() //code called when the trait is transferred to a new mob
|
||||
/datum/quirk/proc/add() //special "on add" effects
|
||||
/datum/quirk/proc/on_spawn() //these should only trigger when the character is being created for the first time, i.e. roundstart/latejoin
|
||||
/datum/quirk/proc/remove() //special "on remove" effects
|
||||
/datum/quirk/proc/on_process() //process() has some special checks, so this is the actual process
|
||||
/datum/quirk/proc/post_add() //for text, disclaimers etc. given after you spawn in with the trait
|
||||
/datum/quirk/proc/on_transfer() //code called when the trait is transferred to a new mob
|
||||
|
||||
/datum/trait/process()
|
||||
if(QDELETED(trait_holder))
|
||||
trait_holder = null
|
||||
/datum/quirk/process()
|
||||
if(QDELETED(quirk_holder))
|
||||
quirk_holder = null
|
||||
qdel(src)
|
||||
return
|
||||
if(trait_holder.stat == DEAD)
|
||||
if(quirk_holder.stat == DEAD)
|
||||
return
|
||||
on_process()
|
||||
|
||||
/mob/living/proc/get_trait_string(medical) //helper string. gets a string of all the traits the mob has
|
||||
var/list/dat = list()
|
||||
if(!medical)
|
||||
for(var/V in roundstart_traits)
|
||||
var/datum/trait/T = V
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
dat += T.name
|
||||
if(!dat.len)
|
||||
return "None"
|
||||
return dat.Join(", ")
|
||||
else
|
||||
for(var/V in roundstart_traits)
|
||||
var/datum/trait/T = V
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
dat += T.medical_record_text
|
||||
if(!dat.len)
|
||||
return "None"
|
||||
return dat.Join("<br>")
|
||||
|
||||
/mob/living/proc/cleanse_trait_datums() //removes all trait datums
|
||||
for(var/V in roundstart_traits)
|
||||
var/datum/trait/T = V
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
qdel(T)
|
||||
|
||||
/mob/living/proc/transfer_trait_datums(mob/living/to_mob)
|
||||
for(var/V in roundstart_traits)
|
||||
var/datum/trait/T = V
|
||||
for(var/V in roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
T.transfer_mob(to_mob)
|
||||
|
||||
/*
|
||||
@@ -96,7 +96,7 @@
|
||||
Commented version of Nearsighted to help you add your own traits
|
||||
Use this as a guideline
|
||||
|
||||
/datum/trait/nearsighted
|
||||
/datum/quirk/nearsighted
|
||||
name = "Nearsighted"
|
||||
///The trait's name
|
||||
|
||||
@@ -116,11 +116,11 @@ Use this as a guideline
|
||||
medical_record_text = "Subject has permanent nearsightedness."
|
||||
///These three are self-explanatory
|
||||
|
||||
/datum/trait/nearsighted/on_spawn()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/nearsighted/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H))
|
||||
H.put_in_hands(glasses)
|
||||
H.equip_to_slot(glasses, slot_glasses)
|
||||
H.equip_to_slot(glasses, SLOT_GLASSES)
|
||||
H.regenerate_icons()
|
||||
|
||||
//This whole proc is called automatically
|
||||
@@ -130,3 +130,5 @@ Use this as a guideline
|
||||
//If you don't need any special effects like spawning glasses, then you don't need an add()
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//predominantly positive traits
|
||||
//this file is named weirdly so that positive traits are listed above negative ones
|
||||
|
||||
/datum/trait/alcohol_tolerance
|
||||
/datum/quirk/alcohol_tolerance
|
||||
name = "Alcohol Tolerance"
|
||||
desc = "You become drunk more slowly and suffer fewer drawbacks from alcohol."
|
||||
value = 1
|
||||
@@ -11,25 +11,25 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/apathetic
|
||||
/datum/quirk/apathetic
|
||||
name = "Apathetic"
|
||||
desc = "You just don't care as much as other people. That's nice to have in a place like this, I guess."
|
||||
value = 1
|
||||
mood_trait = TRUE
|
||||
mood_quirk = TRUE
|
||||
|
||||
/datum/trait/apathetic/add()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
|
||||
/datum/quirk/apathetic/add()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
|
||||
if(mood)
|
||||
mood.mood_modifier = 0.8
|
||||
|
||||
/datum/trait/apathetic/remove()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
|
||||
/datum/quirk/apathetic/remove()
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, quirk_holder)
|
||||
if(mood)
|
||||
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers.
|
||||
|
||||
|
||||
|
||||
/datum/trait/freerunning
|
||||
/datum/quirk/freerunning
|
||||
name = "Freerunning"
|
||||
desc = "You're great at quick moves! You can climb tables more quickly."
|
||||
value = 2
|
||||
@@ -39,16 +39,16 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/jolly
|
||||
/datum/quirk/jolly
|
||||
name = "Jolly"
|
||||
desc = "You sometimes just feel happy, for no reason at all."
|
||||
value = 1
|
||||
mob_trait = TRAIT_JOLLY
|
||||
mood_trait = TRUE
|
||||
mood_quirk = TRUE
|
||||
|
||||
|
||||
|
||||
/datum/trait/light_step
|
||||
/datum/quirk/light_step
|
||||
name = "Light Step"
|
||||
desc = "You walk with a gentle step, making stepping on sharp objects quieter and less painful."
|
||||
value = 1
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/night_vision
|
||||
/datum/quirk/night_vision
|
||||
name = "Night Vision"
|
||||
desc = "You can see slightly more clearly in full darkness than most people."
|
||||
value = 1
|
||||
@@ -66,8 +66,8 @@
|
||||
gain_text = "<span class='notice'>The shadows seem a little less dark.</span>"
|
||||
lose_text = "<span class='danger'>Everything seems a little darker.</span>"
|
||||
|
||||
/datum/trait/night_vision/on_spawn()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/night_vision/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/organ/eyes/eyes = H.getorgan(/obj/item/organ/eyes)
|
||||
if(!eyes || eyes.lighting_alpha)
|
||||
return
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/selfaware
|
||||
/datum/quirk/selfaware
|
||||
name = "Self-Aware"
|
||||
desc = "You know your body well, and can accurately assess the extent of your wounds."
|
||||
value = 2
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/skittish
|
||||
/datum/quirk/skittish
|
||||
name = "Skittish"
|
||||
desc = "You can conceal yourself in danger. Ctrl-shift-click a closed locker to jump into it, as long as you have access."
|
||||
value = 2
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/spiritual
|
||||
/datum/quirk/spiritual
|
||||
name = "Spiritual"
|
||||
desc = "You're in tune with the gods, and your prayers may be more likely to be heard. Or not."
|
||||
value = 1
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/voracious
|
||||
/datum/quirk/voracious
|
||||
name = "Voracious"
|
||||
desc = "Nothing gets between you and your food. You eat twice as fast as everyone else!"
|
||||
value = 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//predominantly negative traits
|
||||
|
||||
/datum/trait/blooddeficiency
|
||||
/datum/quirk/blooddeficiency
|
||||
name = "Acute Blood Deficiency"
|
||||
desc = "Your body can't produce enough blood to sustain itself."
|
||||
value = -2
|
||||
@@ -8,12 +8,12 @@
|
||||
lose_text = "<span class='notice'>You feel vigorous again.</span>"
|
||||
medical_record_text = "Patient requires regular treatment for blood loss due to low production of blood."
|
||||
|
||||
/datum/trait/blooddeficiency/on_process()
|
||||
trait_holder.blood_volume -= 0.275
|
||||
/datum/quirk/blooddeficiency/on_process()
|
||||
quirk_holder.blood_volume -= 0.275
|
||||
|
||||
|
||||
|
||||
/datum/trait/depression
|
||||
/datum/quirk/depression
|
||||
name = "Depression"
|
||||
desc = "You sometimes just hate life."
|
||||
mob_trait = TRAIT_DEPRESSION
|
||||
@@ -21,22 +21,22 @@
|
||||
gain_text = "<span class='danger'>You start feeling depressed.</span>"
|
||||
lose_text = "<span class='notice'>You no longer feel depressed.</span>" //if only it were that easy!
|
||||
medical_record_text = "Patient has a severe mood disorder causing them to experience sudden moments of sadness."
|
||||
mood_trait = TRUE
|
||||
mood_quirk = TRUE
|
||||
|
||||
|
||||
|
||||
/datum/trait/family_heirloom
|
||||
/datum/quirk/family_heirloom
|
||||
name = "Family Heirloom"
|
||||
desc = "You are the current owner of an heirloom. passed down for generations. You have to keep it safe!"
|
||||
value = -1
|
||||
mood_trait = TRUE
|
||||
mood_quirk = TRUE
|
||||
var/obj/item/heirloom
|
||||
var/where_text
|
||||
|
||||
/datum/trait/family_heirloom/on_spawn()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/family_heirloom/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/heirloom_type
|
||||
switch(trait_holder.mind.assigned_role)
|
||||
switch(quirk_holder.mind.assigned_role)
|
||||
if("Clown")
|
||||
heirloom_type = /obj/item/bikehorn/golden
|
||||
if("Mime")
|
||||
@@ -56,35 +56,35 @@
|
||||
/obj/item/toy/cards/deck,
|
||||
/obj/item/lighter,
|
||||
/obj/item/dice/d20)
|
||||
heirloom = new heirloom_type(get_turf(trait_holder))
|
||||
heirloom = new heirloom_type(get_turf(quirk_holder))
|
||||
var/list/slots = list(
|
||||
"in your backpack" = slot_in_backpack,
|
||||
"in your left pocket" = slot_l_store,
|
||||
"in your right pocket" = slot_r_store
|
||||
"in your backpack" = SLOT_IN_BACKPACK,
|
||||
"in your left pocket" = SLOT_L_STORE,
|
||||
"in your right pocket" = SLOT_R_STORE
|
||||
)
|
||||
var/where = H.equip_in_one_of_slots(heirloom, slots)
|
||||
if(!where)
|
||||
where = "at your feet"
|
||||
if(where == "in your backpack")
|
||||
H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H)
|
||||
else if(where == "in your backpack")
|
||||
H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H)
|
||||
where_text = "<span class='boldnotice'>There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!</span>"
|
||||
|
||||
/datum/trait/family_heirloom/post_add()
|
||||
to_chat(trait_holder, where_text)
|
||||
var/list/family_name = splittext(trait_holder.real_name, " ")
|
||||
/datum/quirk/family_heirloom/post_add()
|
||||
to_chat(quirk_holder, where_text)
|
||||
var/list/family_name = splittext(quirk_holder.real_name, " ")
|
||||
heirloom.name = "\improper [family_name[family_name.len]] family [heirloom.name]"
|
||||
|
||||
/datum/trait/family_heirloom/on_process()
|
||||
if(heirloom in trait_holder.GetAllContents())
|
||||
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
|
||||
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom)
|
||||
/datum/quirk/family_heirloom/on_process()
|
||||
if(heirloom in quirk_holder.GetAllContents())
|
||||
quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
|
||||
quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom)
|
||||
else
|
||||
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom")
|
||||
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing)
|
||||
quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom")
|
||||
quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing)
|
||||
|
||||
|
||||
|
||||
/datum/trait/heavy_sleeper
|
||||
/datum/quirk/heavy_sleeper
|
||||
name = "Heavy Sleeper"
|
||||
desc = "You sleep like a rock! Whenever you're put to sleep, you sleep for a little bit longer."
|
||||
value = -1
|
||||
@@ -93,20 +93,20 @@
|
||||
lose_text = "<span class='notice'>You feel awake again.</span>"
|
||||
medical_record_text = "Patient has abnormal sleep study results and is difficult to wake up."
|
||||
|
||||
/datum/trait/brainproblems
|
||||
/datum/quirk/brainproblems
|
||||
name = "Brain Tumor"
|
||||
desc = "You have a little friend in your brain that is slowly destroying it. Better bring some mannitol!"
|
||||
value = -2
|
||||
value = -3
|
||||
gain_text = "<span class='danger'>You feel smooth.</span>"
|
||||
lose_text = "<span class='notice'>You feel wrinkled again.</span>"
|
||||
medical_record_text = "Patient has a tumor in their brain that is slowly driving them to brain death."
|
||||
|
||||
/datum/trait/brainproblems/on_process()
|
||||
trait_holder.adjustBrainLoss(0.2)
|
||||
/datum/quirk/brainproblems/on_process()
|
||||
quirk_holder.adjustBrainLoss(0.2)
|
||||
|
||||
|
||||
|
||||
/datum/trait/nearsighted //t. errorage
|
||||
/datum/quirk/nearsighted //t. errorage
|
||||
name = "Nearsighted"
|
||||
desc = "You are nearsighted without prescription glasses, but spawn with a pair."
|
||||
value = -1
|
||||
@@ -114,40 +114,40 @@
|
||||
lose_text = "<span class='notice'>You start seeing faraway things normally again.</span>"
|
||||
medical_record_text = "Patient requires prescription glasses in order to counteract nearsightedness."
|
||||
|
||||
/datum/trait/nearsighted/add()
|
||||
trait_holder.become_nearsighted(ROUNDSTART_TRAIT)
|
||||
/datum/quirk/nearsighted/add()
|
||||
quirk_holder.become_nearsighted(ROUNDSTART_TRAIT)
|
||||
|
||||
/datum/trait/nearsighted/on_spawn()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/nearsighted/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H))
|
||||
H.put_in_hands(glasses)
|
||||
H.equip_to_slot(glasses, slot_glasses)
|
||||
H.equip_to_slot(glasses, SLOT_GLASSES)
|
||||
H.regenerate_icons() //this is to remove the inhand icon, which persists even if it's not in their hands
|
||||
|
||||
|
||||
|
||||
/datum/trait/nyctophobia
|
||||
/datum/quirk/nyctophobia
|
||||
name = "Nyctophobia"
|
||||
desc = "As far as you can remember, you've always been afraid of the dark. While in the dark without a light source, you instinctually act careful, and constantly feel a sense of dread."
|
||||
value = -1
|
||||
|
||||
/datum/trait/nyctophobia/on_process()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/nyctophobia/on_process()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
if(H.dna.species.id in list("shadow", "nightmare"))
|
||||
return //we're tied with the dark, so we don't get scared of it; don't cleanse outright to avoid cheese
|
||||
var/turf/T = get_turf(trait_holder)
|
||||
var/turf/T = get_turf(quirk_holder)
|
||||
var/lums = T.get_lumcount()
|
||||
if(lums <= 0.2)
|
||||
if(trait_holder.m_intent == MOVE_INTENT_RUN)
|
||||
to_chat(trait_holder, "<span class='warning'>Easy, easy, take it slow... you're in the dark...</span>")
|
||||
trait_holder.toggle_move_intent()
|
||||
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "nyctophobia", /datum/mood_event/nyctophobia)
|
||||
if(quirk_holder.m_intent == MOVE_INTENT_RUN)
|
||||
to_chat(quirk_holder, "<span class='warning'>Easy, easy, take it slow... you're in the dark...</span>")
|
||||
quirk_holder.toggle_move_intent()
|
||||
quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "nyctophobia", /datum/mood_event/nyctophobia)
|
||||
else
|
||||
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "nyctophobia")
|
||||
quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "nyctophobia")
|
||||
|
||||
|
||||
|
||||
/datum/trait/nonviolent
|
||||
/datum/quirk/nonviolent
|
||||
name = "Pacifist"
|
||||
desc = "The thought of violence makes you sick. So much so, in fact, that you can't hurt anyone."
|
||||
value = -2
|
||||
@@ -156,14 +156,14 @@
|
||||
lose_text = "<span class='notice'>You think you can defend yourself again.</span>"
|
||||
medical_record_text = "Patient is unusually pacifistic and cannot bring themselves to cause physical harm."
|
||||
|
||||
/datum/trait/nonviolent/on_process()
|
||||
if(trait_holder.mind && LAZYLEN(trait_holder.mind.antag_datums))
|
||||
to_chat(trait_holder, "<span class='boldannounce'>Your antagonistic nature has caused you to renounce your pacifism.</span>")
|
||||
/datum/quirk/nonviolent/on_process()
|
||||
if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums))
|
||||
to_chat(quirk_holder, "<span class='boldannounce'>Your antagonistic nature has caused you to renounce your pacifism.</span>")
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/datum/trait/poor_aim
|
||||
/datum/quirk/poor_aim
|
||||
name = "Poor Aim"
|
||||
desc = "You're terrible with guns and can't line up a straight shot to save your life. Dual-wielding is right out."
|
||||
value = -1
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/prosopagnosia
|
||||
/datum/quirk/prosopagnosia
|
||||
name = "Prosopagnosia"
|
||||
desc = "You have a mental disorder that prevents you from being able to recognize faces at all."
|
||||
value = -1
|
||||
@@ -181,41 +181,41 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/prosthetic_limb
|
||||
/datum/quirk/prosthetic_limb
|
||||
name = "Prosthetic Limb"
|
||||
desc = "An accident caused you to lose one of your limbs. Because of this, you now have a random prosthetic!"
|
||||
value = -1
|
||||
var/slot_string = "limb"
|
||||
|
||||
/datum/trait/prosthetic_limb/on_spawn()
|
||||
/datum/quirk/prosthetic_limb/on_spawn()
|
||||
var/limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/bodypart/old_part = H.get_bodypart(limb_slot)
|
||||
var/obj/item/bodypart/prosthetic
|
||||
switch(limb_slot)
|
||||
if(BODY_ZONE_L_ARM)
|
||||
prosthetic = new/obj/item/bodypart/l_arm/robot/surplus(trait_holder)
|
||||
prosthetic = new/obj/item/bodypart/l_arm/robot/surplus(quirk_holder)
|
||||
slot_string = "left arm"
|
||||
if(BODY_ZONE_R_ARM)
|
||||
prosthetic = new/obj/item/bodypart/r_arm/robot/surplus(trait_holder)
|
||||
prosthetic = new/obj/item/bodypart/r_arm/robot/surplus(quirk_holder)
|
||||
slot_string = "right arm"
|
||||
if(BODY_ZONE_L_LEG)
|
||||
prosthetic = new/obj/item/bodypart/l_leg/robot/surplus(trait_holder)
|
||||
prosthetic = new/obj/item/bodypart/l_leg/robot/surplus(quirk_holder)
|
||||
slot_string = "left leg"
|
||||
if(BODY_ZONE_R_LEG)
|
||||
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(trait_holder)
|
||||
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder)
|
||||
slot_string = "right leg"
|
||||
prosthetic.replace_limb(H)
|
||||
qdel(old_part)
|
||||
H.regenerate_icons()
|
||||
|
||||
/datum/trait/prosthetic_limb/post_add()
|
||||
to_chat(trait_holder, "<span class='boldannounce'>Your [slot_string] has been replaced with a surplus prosthetic. It is fragile and will easily come apart under duress. Additionally, \
|
||||
/datum/quirk/prosthetic_limb/post_add()
|
||||
to_chat(quirk_holder, "<span class='boldannounce'>Your [slot_string] has been replaced with a surplus prosthetic. It is fragile and will easily come apart under duress. Additionally, \
|
||||
you need to use a welding tool and cables to repair it, instead of bruise packs and ointment.</span>")
|
||||
|
||||
|
||||
|
||||
/datum/trait/insanity
|
||||
/datum/quirk/insanity
|
||||
name = "Reality Dissociation Syndrome"
|
||||
desc = "You suffer from a severe disorder that causes very vivid hallucinations. Mindbreaker toxin can suppress its effects, and you are immune to mindbreaker's hallucinogenic properties. <b>This is not a license to grief.</b>"
|
||||
value = -2
|
||||
@@ -224,32 +224,25 @@
|
||||
lose_text = "<span class='notice'>You feel in tune with the world again.</span>"
|
||||
medical_record_text = "Patient suffers from acute Reality Dissociation Syndrome and experiences vivid hallucinations."
|
||||
|
||||
/datum/trait/insanity/on_process()
|
||||
if(trait_holder.reagents.has_reagent("mindbreaker"))
|
||||
trait_holder.hallucination = 0
|
||||
/datum/quirk/insanity/on_process()
|
||||
if(quirk_holder.reagents.has_reagent("mindbreaker"))
|
||||
quirk_holder.hallucination = 0
|
||||
return
|
||||
if(prob(2)) //we'll all be mad soon enough
|
||||
madness()
|
||||
|
||||
/datum/quirk/insanity/proc/madness()
|
||||
quirk_holder.hallucination += rand(10, 25)
|
||||
|
||||
/datum/trait/insanity/proc/madness(mad_fools)
|
||||
set waitfor = FALSE
|
||||
if(!mad_fools)
|
||||
mad_fools = prob(20)
|
||||
if(mad_fools)
|
||||
var/hallucination_type = pick(subtypesof(/datum/hallucination/rds))
|
||||
new hallucination_type (trait_holder, FALSE)
|
||||
else
|
||||
trait_holder.hallucination += rand(10, 50)
|
||||
|
||||
/datum/trait/insanity/post_add() //I don't /think/ we'll need this but for newbies who think "roleplay as insane" = "license to kill" it's probably a good thing to have
|
||||
if(!trait_holder.mind || trait_holder.mind.special_role)
|
||||
/datum/quirk/insanity/post_add() //I don't /think/ we'll need this but for newbies who think "roleplay as insane" = "license to kill" it's probably a good thing to have
|
||||
if(!quirk_holder.mind || quirk_holder.mind.special_role)
|
||||
return
|
||||
to_chat(trait_holder, "<span class='big bold info'>Please note that your dissociation syndrome does NOT give you the right to attack people or otherwise cause any interference to \
|
||||
to_chat(quirk_holder, "<span class='big bold info'>Please note that your dissociation syndrome does NOT give you the right to attack people or otherwise cause any interference to \
|
||||
the round. You are not an antagonist, and the rules will treat you the same as other crewmembers.</span>")
|
||||
|
||||
|
||||
|
||||
/datum/trait/social_anxiety
|
||||
/datum/quirk/social_anxiety
|
||||
name = "Social Anxiety"
|
||||
desc = "Talking to people is very difficult for you, and you often stutter or even lock up."
|
||||
value = -1
|
||||
@@ -258,12 +251,12 @@
|
||||
medical_record_text = "Patient is usually anxious in social encounters and prefers to avoid them."
|
||||
var/dumb_thing = TRUE
|
||||
|
||||
/datum/trait/social_anxiety/on_process()
|
||||
/datum/quirk/social_anxiety/on_process()
|
||||
var/nearby_people = 0
|
||||
for(var/mob/living/carbon/human/H in view(5, trait_holder))
|
||||
for(var/mob/living/carbon/human/H in view(5, quirk_holder))
|
||||
if(H.client)
|
||||
nearby_people++
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
if(prob(2 + nearby_people))
|
||||
H.stuttering = max(3, H.stuttering)
|
||||
else if(prob(min(3, nearby_people)) && !H.silent)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//traits with no real impact that can be taken freely
|
||||
//MAKE SURE THESE DO NOT MAJORLY IMPACT GAMEPLAY. those should be positive or negative traits.
|
||||
|
||||
/datum/trait/no_taste
|
||||
/datum/quirk/no_taste
|
||||
name = "Ageusia"
|
||||
desc = "You can't taste anything! Toxic food will still poison you."
|
||||
value = 0
|
||||
@@ -12,75 +12,75 @@
|
||||
|
||||
|
||||
|
||||
/datum/trait/pineapple_liker
|
||||
/datum/quirk/pineapple_liker
|
||||
name = "Ananas Affinity"
|
||||
desc = "You find yourself greatly enjoying fruits of the ananas genus. You can't seem to ever get enough of their sweet goodness!"
|
||||
value = 0
|
||||
gain_text = "<span class='notice'>You feel an intense craving for pineapple.</span>"
|
||||
lose_text = "<span class='notice'>Your feelings towards pineapples seem to return to a lukewarm state.</span>"
|
||||
|
||||
/datum/trait/pineapple_liker/add()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/pineapple_liker/add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
species.liked_food |= PINEAPPLE
|
||||
|
||||
/datum/trait/pineapple_liker/remove()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/pineapple_liker/remove()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
species.liked_food &= ~PINEAPPLE
|
||||
|
||||
/datum/trait/pineapple_hater
|
||||
/datum/quirk/pineapple_hater
|
||||
name = "Ananas Aversion"
|
||||
desc = "You find yourself greatly detesting fruits of the ananas genus. Serious, how the hell can anyone say these things are good? And what kind of madman would even dare putting it on a pizza!?"
|
||||
value = 0
|
||||
gain_text = "<span class='notice'>You find yourself pondering what kind of idiot actually enjoys pineapples...</span>"
|
||||
lose_text = "<span class='notice'>Your feelings towards pineapples seem to return to a lukewarm state.</span>"
|
||||
|
||||
/datum/trait/pineapple_hater/add()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/pineapple_hater/add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
species.disliked_food |= PINEAPPLE
|
||||
|
||||
/datum/trait/pineapple_hater/remove()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/pineapple_hater/remove()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
species.disliked_food &= ~PINEAPPLE
|
||||
|
||||
/datum/trait/deviant_tastes
|
||||
/datum/quirk/deviant_tastes
|
||||
name = "Deviant Tastes"
|
||||
desc = "You dislike food that most people enjoy, and find delicious what they don't."
|
||||
value = 0
|
||||
gain_text = "<span class='notice'>You start craving something that tastes strange.</span>"
|
||||
lose_text = "<span class='notice'>You feel like eating normal food again.</span>"
|
||||
|
||||
/datum/trait/deviant_tastes/add()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/deviant_tastes/add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
var/liked = species.liked_food
|
||||
species.liked_food = species.disliked_food
|
||||
species.disliked_food = liked
|
||||
|
||||
/datum/trait/deviant_tastes/remove()
|
||||
var/mob/living/carbon/human/H = trait_holder
|
||||
/datum/quirk/deviant_tastes/remove()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/datum/species/species = H.dna.species
|
||||
species.liked_food = initial(species.liked_food)
|
||||
species.disliked_food = initial(species.disliked_food)
|
||||
|
||||
|
||||
|
||||
/datum/trait/monochromatic
|
||||
/datum/quirk/monochromatic
|
||||
name = "Monochromacy"
|
||||
desc = "You suffer from full colorblindness, and perceive nearly the entire world in blacks and whites."
|
||||
value = 0
|
||||
medical_record_text = "Patient is afflicted with almost complete color blindness."
|
||||
|
||||
/datum/trait/monochromatic/add()
|
||||
trait_holder.add_client_colour(/datum/client_colour/monochrome)
|
||||
/datum/quirk/monochromatic/add()
|
||||
quirk_holder.add_client_colour(/datum/client_colour/monochrome)
|
||||
|
||||
/datum/trait/monochromatic/post_add()
|
||||
if(trait_holder.mind.assigned_role == "Detective")
|
||||
to_chat(trait_holder, "<span class='boldannounce'>Mmm. Nothing's ever clear on this station. It's all shades of gray...</span>")
|
||||
trait_holder.playsound_local(trait_holder, 'sound/ambience/ambidet1.ogg', 50, FALSE)
|
||||
/datum/quirk/monochromatic/post_add()
|
||||
if(quirk_holder.mind.assigned_role == "Detective")
|
||||
to_chat(quirk_holder, "<span class='boldannounce'>Mmm. Nothing's ever clear on this station. It's all shades of gray...</span>")
|
||||
quirk_holder.playsound_local(quirk_holder, 'sound/ambience/ambidet1.ogg', 50, FALSE)
|
||||
|
||||
/datum/trait/monochromatic/remove()
|
||||
trait_holder.remove_client_colour(/datum/client_colour/monochrome)
|
||||
/datum/quirk/monochromatic/remove()
|
||||
quirk_holder.remove_client_colour(/datum/client_colour/monochrome)
|
||||
|
||||
@@ -1,102 +1,102 @@
|
||||
/datum/verbs
|
||||
var/name
|
||||
var/list/children
|
||||
var/datum/verbs/parent
|
||||
var/list/verblist
|
||||
var/abstract = FALSE
|
||||
|
||||
//returns the master list for verbs of a type
|
||||
/datum/verbs/proc/GetList()
|
||||
CRASH("Abstract verblist for [type]")
|
||||
|
||||
//do things for each entry in Generate_list
|
||||
//return value sets Generate_list[verbpath]
|
||||
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
|
||||
return entry
|
||||
|
||||
/datum/verbs/New()
|
||||
var/mainlist = GetList()
|
||||
var/ourentry = mainlist[type]
|
||||
children = list()
|
||||
verblist = list()
|
||||
if (ourentry)
|
||||
if (!islist(ourentry)) //some of our childern already loaded
|
||||
qdel(src)
|
||||
CRASH("Verb double load: [type]")
|
||||
Add_children(ourentry)
|
||||
|
||||
mainlist[type] = src
|
||||
|
||||
Load_verbs(type, typesof("[type]/verb"))
|
||||
|
||||
var/datum/verbs/parent = mainlist[parent_type]
|
||||
if (!parent)
|
||||
mainlist[parent_type] = list(src)
|
||||
else if (islist(parent))
|
||||
parent += src
|
||||
else
|
||||
parent.Add_children(list(src))
|
||||
|
||||
/datum/verbs/proc/Set_parent(datum/verbs/_parent)
|
||||
parent = _parent
|
||||
if (abstract)
|
||||
parent.Add_children(children)
|
||||
var/list/verblistoftypes = list()
|
||||
for(var/thing in verblist)
|
||||
LAZYADD(verblistoftypes[verblist[thing]], thing)
|
||||
|
||||
for(var/verbparenttype in verblistoftypes)
|
||||
parent.Load_verbs(verbparenttype, verblistoftypes[verbparenttype])
|
||||
|
||||
/datum/verbs/proc/Add_children(list/kids)
|
||||
if (abstract && parent)
|
||||
parent.Add_children(kids)
|
||||
return
|
||||
|
||||
for(var/thing in kids)
|
||||
var/datum/verbs/item = thing
|
||||
item.Set_parent(src)
|
||||
if (!item.abstract)
|
||||
children += item
|
||||
|
||||
/datum/verbs/proc/Load_verbs(verb_parent_type, list/verbs)
|
||||
if (abstract && parent)
|
||||
parent.Load_verbs(verb_parent_type, verbs)
|
||||
return
|
||||
|
||||
for (var/verbpath in verbs)
|
||||
verblist[verbpath] = verb_parent_type
|
||||
|
||||
/datum/verbs/proc/Generate_list(...)
|
||||
. = list()
|
||||
if (length(children))
|
||||
for (var/thing in children)
|
||||
var/datum/verbs/child = thing
|
||||
var/list/childlist = child.Generate_list(arglist(args))
|
||||
if (childlist)
|
||||
var/childname = "[child]"
|
||||
if (childname == "[child.type]")
|
||||
var/list/tree = splittext(childname, "/")
|
||||
childname = tree[tree.len]
|
||||
.[child.type] = "parent=[url_encode(type)];name=[url_encode(childname)]"
|
||||
. += childlist
|
||||
|
||||
for (var/thing in verblist)
|
||||
var/atom/verb/verbpath = thing
|
||||
if (!verbpath)
|
||||
stack_trace("Bad VERB in [type] verblist: [english_list(verblist)]")
|
||||
var/list/entry = list()
|
||||
entry["parent"] = "[type]"
|
||||
entry["name"] = verbpath.desc
|
||||
if (copytext(verbpath.name,1,2) == "@")
|
||||
entry["command"] = copytext(verbpath.name,2)
|
||||
else
|
||||
entry["command"] = replacetext(verbpath.name, " ", "-")
|
||||
|
||||
.[verbpath] = HandleVerb(arglist(list(entry, verbpath) + args))
|
||||
|
||||
/world/proc/LoadVerbs(verb_type)
|
||||
if(!ispath(verb_type, /datum/verbs) || verb_type == /datum/verbs)
|
||||
CRASH("Invalid verb_type: [verb_type]")
|
||||
for (var/typepath in subtypesof(verb_type))
|
||||
new typepath()
|
||||
/datum/verbs
|
||||
var/name
|
||||
var/list/children
|
||||
var/datum/verbs/parent
|
||||
var/list/verblist
|
||||
var/abstract = FALSE
|
||||
|
||||
//returns the master list for verbs of a type
|
||||
/datum/verbs/proc/GetList()
|
||||
CRASH("Abstract verblist for [type]")
|
||||
|
||||
//do things for each entry in Generate_list
|
||||
//return value sets Generate_list[verbpath]
|
||||
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
|
||||
return entry
|
||||
|
||||
/datum/verbs/New()
|
||||
var/mainlist = GetList()
|
||||
var/ourentry = mainlist[type]
|
||||
children = list()
|
||||
verblist = list()
|
||||
if (ourentry)
|
||||
if (!islist(ourentry)) //some of our childern already loaded
|
||||
qdel(src)
|
||||
CRASH("Verb double load: [type]")
|
||||
Add_children(ourentry)
|
||||
|
||||
mainlist[type] = src
|
||||
|
||||
Load_verbs(type, typesof("[type]/verb"))
|
||||
|
||||
var/datum/verbs/parent = mainlist[parent_type]
|
||||
if (!parent)
|
||||
mainlist[parent_type] = list(src)
|
||||
else if (islist(parent))
|
||||
parent += src
|
||||
else
|
||||
parent.Add_children(list(src))
|
||||
|
||||
/datum/verbs/proc/Set_parent(datum/verbs/_parent)
|
||||
parent = _parent
|
||||
if (abstract)
|
||||
parent.Add_children(children)
|
||||
var/list/verblistoftypes = list()
|
||||
for(var/thing in verblist)
|
||||
LAZYADD(verblistoftypes[verblist[thing]], thing)
|
||||
|
||||
for(var/verbparenttype in verblistoftypes)
|
||||
parent.Load_verbs(verbparenttype, verblistoftypes[verbparenttype])
|
||||
|
||||
/datum/verbs/proc/Add_children(list/kids)
|
||||
if (abstract && parent)
|
||||
parent.Add_children(kids)
|
||||
return
|
||||
|
||||
for(var/thing in kids)
|
||||
var/datum/verbs/item = thing
|
||||
item.Set_parent(src)
|
||||
if (!item.abstract)
|
||||
children += item
|
||||
|
||||
/datum/verbs/proc/Load_verbs(verb_parent_type, list/verbs)
|
||||
if (abstract && parent)
|
||||
parent.Load_verbs(verb_parent_type, verbs)
|
||||
return
|
||||
|
||||
for (var/verbpath in verbs)
|
||||
verblist[verbpath] = verb_parent_type
|
||||
|
||||
/datum/verbs/proc/Generate_list(...)
|
||||
. = list()
|
||||
if (length(children))
|
||||
for (var/thing in children)
|
||||
var/datum/verbs/child = thing
|
||||
var/list/childlist = child.Generate_list(arglist(args))
|
||||
if (childlist)
|
||||
var/childname = "[child]"
|
||||
if (childname == "[child.type]")
|
||||
var/list/tree = splittext(childname, "/")
|
||||
childname = tree[tree.len]
|
||||
.[child.type] = "parent=[url_encode(type)];name=[childname]"
|
||||
. += childlist
|
||||
|
||||
for (var/thing in verblist)
|
||||
var/atom/verb/verbpath = thing
|
||||
if (!verbpath)
|
||||
stack_trace("Bad VERB in [type] verblist: [english_list(verblist)]")
|
||||
var/list/entry = list()
|
||||
entry["parent"] = "[type]"
|
||||
entry["name"] = verbpath.desc
|
||||
if (copytext(verbpath.name,1,2) == "@")
|
||||
entry["command"] = copytext(verbpath.name,2)
|
||||
else
|
||||
entry["command"] = replacetext(verbpath.name, " ", "-")
|
||||
|
||||
.[verbpath] = HandleVerb(arglist(list(entry, verbpath) + args))
|
||||
|
||||
/world/proc/LoadVerbs(verb_type)
|
||||
if(!ispath(verb_type, /datum/verbs) || verb_type == /datum/verbs)
|
||||
CRASH("Invalid verb_type: [verb_type]")
|
||||
for (var/typepath in subtypesof(verb_type))
|
||||
new typepath()
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
/datum/weather/floor_is_lava/weather_act(mob/living/L)
|
||||
if(issilicon(L))
|
||||
return
|
||||
if(istype(L.buckled, /obj/structure/bed))
|
||||
return
|
||||
for(var/obj/structure/O in L.loc)
|
||||
if(O.density || (L in O.buckled_mobs && istype(O, /obj/structure/bed)))
|
||||
if(O.density)
|
||||
return
|
||||
if(L.loc.density)
|
||||
return
|
||||
|
||||
@@ -120,8 +120,12 @@
|
||||
require_comms_key = TRUE
|
||||
|
||||
/datum/world_topic/namecheck/Run(list/input)
|
||||
var/datum/server_tools_command/namecheck/NC = new
|
||||
return NC.Run(input["sender"], input["namecheck"])
|
||||
//Oh this is a hack, someone refactor the functionality out of the chat command PLS
|
||||
var/datum/tgs_chat_command/namecheck/NC = new
|
||||
var/datum/tgs_chat_user/user = new
|
||||
user.friendly_name = input["sender"]
|
||||
user.mention = user.friendly_name
|
||||
return NC.Run(user, input["namecheck"])
|
||||
|
||||
/datum/world_topic/adminwho
|
||||
keyword = "adminwho"
|
||||
@@ -136,7 +140,7 @@
|
||||
/datum/world_topic/status/Run(list/input)
|
||||
. = list()
|
||||
.["version"] = GLOB.game_version
|
||||
.["mode"] = GLOB.master_mode
|
||||
.["mode"] = "hidden" //CIT CHANGE - hides the gamemode in topic() calls to prevent meta'ing the gamemode
|
||||
.["respawn"] = config ? !CONFIG_GET(flag/norespawn) : FALSE
|
||||
.["enter"] = GLOB.enter_allowed
|
||||
.["vote"] = CONFIG_GET(flag/allow_vote_mode)
|
||||
@@ -164,9 +168,16 @@
|
||||
.["security_level"] = get_security_level()
|
||||
.["round_duration"] = SSticker ? round((world.time-SSticker.round_start_time)/10) : 0
|
||||
// Amount of world's ticks in seconds, useful for calculating round duration
|
||||
|
||||
//Time dilation stats.
|
||||
.["time_dilation_current"] = SStime_track.time_dilation_current
|
||||
.["time_dilation_avg"] = SStime_track.time_dilation_avg
|
||||
.["time_dilation_avg_slow"] = SStime_track.time_dilation_avg_slow
|
||||
.["time_dilation_avg_fast"] = SStime_track.time_dilation_avg_fast
|
||||
|
||||
if(SSshuttle && SSshuttle.emergency)
|
||||
.["shuttle_mode"] = SSshuttle.emergency.mode
|
||||
// Shuttle status, see /__DEFINES/stat.dm
|
||||
.["shuttle_timer"] = SSshuttle.emergency.timeLeft()
|
||||
// Shuttle timer, in seconds
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon = 'icons/turf/areas.dmi'
|
||||
icon_state = "unknown"
|
||||
layer = AREA_LAYER
|
||||
plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE.
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
@@ -518,4 +519,4 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
|
||||
// A hook so areas can modify the incoming args
|
||||
/area/proc/PlaceOnTopReact(list/new_baseturfs, turf/fake_turf_type, flags)
|
||||
return flags
|
||||
return flags
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
var/level = 2
|
||||
|
||||
var/flags_1 = NONE
|
||||
var/flags_2 = NONE
|
||||
var/interaction_flags_atom = NONE
|
||||
var/container_type = NONE
|
||||
var/admin_spawned = 0 //was this spawned by an admin? used for stat tracking stuff.
|
||||
@@ -223,7 +222,7 @@
|
||||
|
||||
/atom/proc/emp_act(severity)
|
||||
SendSignal(COMSIG_ATOM_EMP_ACT, severity)
|
||||
if(istype(wires) && !(flags_2 & NO_EMP_WIRES_2))
|
||||
if(istype(wires) && !(flags_1 & NO_EMP_WIRES_1))
|
||||
wires.emp_pulse()
|
||||
|
||||
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega"))
|
||||
GLOBAL_LIST_INIT(slots, list("head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store"))
|
||||
GLOBAL_LIST_INIT(slot2slot, list("head" = slot_head, "wear_mask" = slot_wear_mask, "neck" = slot_neck, "back" = slot_back, "wear_suit" = slot_wear_suit, "w_uniform" = slot_w_uniform, "shoes" = slot_shoes, "belt" = slot_belt, "gloves" = slot_gloves, "glasses" = slot_glasses, "ears" = slot_ears, "wear_id" = slot_wear_id, "s_store" = slot_s_store))
|
||||
GLOBAL_LIST_INIT(slot2slot, list("head" = SLOT_HEAD, "wear_mask" = SLOT_WEAR_MASK, "neck" = SLOT_NECK, "back" = SLOT_BACK, "wear_suit" = SLOT_WEAR_SUIT, "w_uniform" = SLOT_W_UNIFORM, "shoes" = SLOT_SHOES, "belt" = SLOT_BELT, "gloves" = SLOT_GLOVES, "glasses" = SLOT_GLASSES, "ears" = SLOT_EARS, "wear_id" = SLOT_WEAR_ID, "s_store" = SLOT_S_STORE))
|
||||
GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "wear_mask" = /obj/item/clothing/mask/changeling, "back" = /obj/item/changeling, "wear_suit" = /obj/item/clothing/suit/changeling, "w_uniform" = /obj/item/clothing/under/changeling, "shoes" = /obj/item/clothing/shoes/changeling, "belt" = /obj/item/changeling, "gloves" = /obj/item/clothing/gloves/changeling, "glasses" = /obj/item/clothing/glasses/changeling, "ears" = /obj/item/changeling, "wear_id" = /obj/item/changeling, "s_store" = /obj/item/changeling))
|
||||
GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our this objective to all lings
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ Credit where due:
|
||||
L.equipOutfit(/datum/outfit/servant_of_ratvar)
|
||||
var/obj/item/clockwork/slab/S = new
|
||||
var/slot = "At your feet"
|
||||
var/list/slots = list("In your left pocket" = slot_l_store, "In your right pocket" = slot_r_store, "In your backpack" = slot_in_backpack, "On your belt" = slot_belt)
|
||||
var/list/slots = list("In your left pocket" = SLOT_L_STORE, "In your right pocket" = SLOT_R_STORE, "In your backpack" = SLOT_IN_BACKPACK, "On your belt" = SLOT_BELT)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
slot = H.equip_in_one_of_slots(S, slots)
|
||||
@@ -211,7 +211,7 @@ Credit where due:
|
||||
to_chat(L, "<span class='bold large_brass'>There is a paper in your backpack! It'll tell you if anything's changed, as well as what to expect.</span>")
|
||||
to_chat(L, "<span class='alloy'>[slot] is a <b>clockwork slab</b>, a multipurpose tool used to construct machines and invoke ancient words of power. If this is your first time \
|
||||
as a servant, you can find a concise tutorial in the Recollection category of its interface.</span>")
|
||||
to_chat(L, "<span class='alloy italics'>If you want more information, you can find a wiki link here!</span> https://tgstation13.org/wiki/Clockwork_Cult")
|
||||
to_chat(L, "<span class='alloy italics'>If you want more information, you can read <a href=\"https://tgstation13.org/wiki/Clockwork_Cult\">the wiki page</a> to learn more.</span>")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -43,17 +43,17 @@
|
||||
if(!H.w_uniform || H.dropItemToGround(H.w_uniform))
|
||||
C = new /obj/item/clothing/under/rank/clown(H)
|
||||
C.flags_1 |= NODROP_1 //mwahaha
|
||||
H.equip_to_slot_or_del(C, slot_w_uniform)
|
||||
H.equip_to_slot_or_del(C, SLOT_W_UNIFORM)
|
||||
|
||||
if(!H.shoes || H.dropItemToGround(H.shoes))
|
||||
C = new /obj/item/clothing/shoes/clown_shoes(H)
|
||||
C.flags_1 |= NODROP_1
|
||||
H.equip_to_slot_or_del(C, slot_shoes)
|
||||
H.equip_to_slot_or_del(C, SLOT_SHOES)
|
||||
|
||||
if(!H.wear_mask || H.dropItemToGround(H.wear_mask))
|
||||
C = new /obj/item/clothing/mask/gas/clown_hat(H)
|
||||
C.flags_1 |= NODROP_1
|
||||
H.equip_to_slot_or_del(C, slot_wear_mask)
|
||||
H.equip_to_slot_or_del(C, SLOT_WEAR_MASK)
|
||||
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia, TRAUMA_RESILIENCE_LOBOTOMY, "clowns") //MWA HA HA
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/item/clothing/shoes/clown_shoes/combat
|
||||
name = "combat clown shoes"
|
||||
desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeek at 100% capacity."
|
||||
flags_1 = NOSLIP_1
|
||||
clothing_flags = NOSLIP
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50)
|
||||
strip_delay = 70
|
||||
@@ -209,7 +209,7 @@
|
||||
if(!istype(M.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(M.wear_mask, /obj/item/clothing/mask/gas/mime) )
|
||||
if(!M.wear_mask || M.dropItemToGround(M.wear_mask))
|
||||
var/obj/item/clothing/mask/fakemoustache/sticky/the_stash = new /obj/item/clothing/mask/fakemoustache/sticky()
|
||||
M.equip_to_slot_or_del(the_stash, slot_wear_mask, TRUE, TRUE, TRUE, TRUE)
|
||||
M.equip_to_slot_or_del(the_stash, SLOT_WEAR_MASK, TRUE, TRUE, TRUE, TRUE)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky
|
||||
var/unstick_time = 600
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
if(tc)
|
||||
var/obj/item/radio/uplink/U = new uplink_type(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, slot_in_backpack)
|
||||
H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
W.implant(H)
|
||||
@@ -171,7 +171,7 @@
|
||||
mask = /obj/item/clothing/mask/gas/syndicate
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/syndi
|
||||
r_pocket = /obj/item/tank/internals/emergency_oxygen/engi
|
||||
internals_slot = slot_r_store
|
||||
internals_slot = SLOT_R_STORE
|
||||
belt = /obj/item/storage/belt/military
|
||||
r_hand = /obj/item/gun/ballistic/automatic/shotgun/bulldog
|
||||
backpack_contents = list(/obj/item/storage/box/syndie=1,\
|
||||
|
||||
@@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
if(receiver && receiver.current)
|
||||
if(ishuman(receiver.current))
|
||||
var/mob/living/carbon/human/H = receiver.current
|
||||
var/list/slots = list("backpack" = slot_in_backpack)
|
||||
var/list/slots = list("backpack" = SLOT_IN_BACKPACK)
|
||||
for(var/eq_path in special_equipment)
|
||||
var/obj/O = new eq_path
|
||||
H.equip_in_one_of_slots(O, slots)
|
||||
@@ -712,6 +712,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
var/min_lings = 3 //Minimum amount of lings for this team objective to be possible
|
||||
var/escape_objective_compatible = FALSE
|
||||
|
||||
/datum/objective/changeling_team_objective/proc/prepare()
|
||||
return FALSE
|
||||
|
||||
//Impersonate department
|
||||
//Picks as many people as it can from a department (Security,Engineer,Medical,Science)
|
||||
@@ -724,6 +726,19 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
var/department_string = ""
|
||||
|
||||
|
||||
/datum/objective/changeling_team_objective/impersonate_department/prepare()
|
||||
var/result = FALSE
|
||||
if(command_staff_only)
|
||||
result = get_heads()
|
||||
else
|
||||
result = get_department_staff()
|
||||
if(result)
|
||||
update_explanation_text()
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/objective/changeling_team_objective/impersonate_department/proc/get_department_staff()
|
||||
department_minds = list()
|
||||
department_real_names = list()
|
||||
@@ -756,9 +771,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
|
||||
if(!department_minds.len)
|
||||
log_game("[type] has failed to find department staff, and has removed itself. the round will continue normally")
|
||||
owner.objectives -= src
|
||||
qdel(src)
|
||||
return
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/objective/changeling_team_objective/impersonate_department/proc/get_heads()
|
||||
@@ -785,19 +799,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
|
||||
if(!department_minds.len)
|
||||
log_game("[type] has failed to find department heads, and has removed itself. the round will continue normally")
|
||||
owner.objectives -= src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
/datum/objective/changeling_team_objective/impersonate_department/New(var/text)
|
||||
..()
|
||||
if(command_staff_only)
|
||||
get_heads()
|
||||
else
|
||||
get_department_staff()
|
||||
|
||||
update_explanation_text()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/objective/changeling_team_objective/impersonate_department/update_explanation_text()
|
||||
@@ -862,9 +865,6 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
//A subtype of impersonate_department
|
||||
//This subtype always picks as many command staff as it can (HoS,HoP,Cap,CE,CMO,RD)
|
||||
//and tasks the lings with killing and replacing them
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
name = "a hand teleporter."
|
||||
targetitem = /obj/item/hand_tele
|
||||
difficulty = 5
|
||||
excludefromjob = list("Captain")
|
||||
excludefromjob = list("Captain", "Research Director")
|
||||
|
||||
/datum/objective_item/steal/jetpack
|
||||
name = "the Captain's jetpack."
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "ai-slipper0"
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
anchored = TRUE
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
return examine(user)
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, se, mindref, datum/species/mrace, list/features, factions, list/traits)
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, se, mindref, datum/species/mrace, list/features, factions, list/quirks)
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
if(mess || attempting)
|
||||
@@ -203,7 +203,7 @@
|
||||
if(H)
|
||||
H.faction |= factions
|
||||
|
||||
for(var/V in traits)
|
||||
for(var/V in quirks)
|
||||
new V(H)
|
||||
|
||||
H.set_cloned_appearance()
|
||||
@@ -399,7 +399,7 @@
|
||||
QDEL_IN(mob_occupant, 40)
|
||||
|
||||
/obj/machinery/clonepod/relaymove(mob/user)
|
||||
container_resist()
|
||||
container_resist(user)
|
||||
|
||||
/obj/machinery/clonepod/container_resist(mob/living/user)
|
||||
if(user.stat == CONSCIOUS)
|
||||
|
||||
@@ -291,6 +291,7 @@
|
||||
/obj/machinery/computer/arcade/battle/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
to_chat(user, "<span class='warning'>A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!</span>")
|
||||
temp = "If you die in the game, you die for real!"
|
||||
player_hp = 30
|
||||
player_mp = 10
|
||||
@@ -506,9 +507,9 @@
|
||||
if(ORION_TRAIL_ILLNESS)
|
||||
var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS
|
||||
if(severity == 1)
|
||||
to_chat(M, "<span class='userdanger'>You suddenly feel slightly nauseous.</span>" )
|
||||
to_chat(M, "<span class='userdanger'>You suddenly feel slightly nauseated.</span>" )
|
||||
if(severity == 2)
|
||||
to_chat(usr, "<span class='userdanger'>You suddenly feel extremely nauseous and hunch over until it passes.</span>")
|
||||
to_chat(usr, "<span class='userdanger'>You suddenly feel extremely nauseated and hunch over until it passes.</span>")
|
||||
M.Stun(60)
|
||||
if(severity >= 3) //you didn't pray hard enough
|
||||
to_chat(M, "<span class='warning'>An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.</span>")
|
||||
@@ -614,7 +615,7 @@
|
||||
L.Stun(200, ignore_canstun = TRUE) //you can't run :^)
|
||||
var/S = new /obj/singularity/academy(usr.loc)
|
||||
addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50)
|
||||
QDEL_IN(src, 50)
|
||||
QDEL_IN(S, 50)
|
||||
else
|
||||
event = null
|
||||
turns += 1
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
if(pod.occupant)
|
||||
continue //how though?
|
||||
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["traits"]))
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"]))
|
||||
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
records -= R
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
else if(pod.occupant)
|
||||
temp = "<font class='bad'>Cloning cycle already in progress.</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
else if(pod.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["features"], C.fields["factions"], C.fields["traits"]))
|
||||
else if(pod.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["features"], C.fields["factions"], C.fields["quirks"]))
|
||||
temp = "[C.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
records.Remove(C)
|
||||
@@ -473,10 +473,10 @@
|
||||
R.fields["blood_type"] = dna.blood_type
|
||||
R.fields["features"] = dna.features
|
||||
R.fields["factions"] = mob_occupant.faction
|
||||
R.fields["traits"] = list()
|
||||
for(var/V in mob_occupant.roundstart_traits)
|
||||
var/datum/trait/T = V
|
||||
R.fields["traits"] += T.type
|
||||
R.fields["quirks"] = list()
|
||||
for(var/V in mob_occupant.roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
R.fields["quirks"] += T.type
|
||||
|
||||
if (!isnull(mob_occupant.mind)) //Save that mind so traitors can continue traitoring after cloning.
|
||||
R.fields["mind"] = "[REF(mob_occupant.mind)]"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/obj/machinery/computer/communications/process()
|
||||
if(..())
|
||||
if(state != STATE_STATUSDISPLAY && state != STATE_CALLSHUTTLE && state != STATE_PURCHASE)
|
||||
if(state != STATE_STATUSDISPLAY && state != STATE_CALLSHUTTLE && state != STATE_PURCHASE && state != STATE_VIEWMESSAGE)
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
|
||||
@@ -140,14 +140,22 @@
|
||||
return locate(/obj/structure/gulag_beacon)
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/proc/teleport(mob/user)
|
||||
log_game("[user]([user.ckey] teleported [prisoner]([prisoner.ckey]) to the Labor Camp ([beacon.x], [beacon.y], [beacon.z]) for [id.goal] points.")
|
||||
if(!id) //incase the ID was removed after the transfer timer was set.
|
||||
say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!")
|
||||
return
|
||||
var/id_goal_not_set
|
||||
if(!id.goal)
|
||||
id_goal_not_set = TRUE
|
||||
id.goal = default_goal
|
||||
say("[id]'s ID card goal defaulting to [id.goal] points.")
|
||||
log_game("[user]([user.ckey] teleported [prisoner]([prisoner.ckey]) to the Labor Camp ([beacon.x], [beacon.y], [beacon.z]) for [id_goal_not_set ? "default goal of ":""][id.goal] points.")
|
||||
teleporter.handle_prisoner(id, temporary_record)
|
||||
playsound(loc, 'sound/weapons/emitter.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
|
||||
prisoner.forceMove(get_turf(beacon))
|
||||
prisoner.Knockdown(40) // small travel dizziness
|
||||
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
|
||||
new /obj/effect/particle_effect/sparks(prisoner.loc)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
|
||||
playsound(src, "sparks", 50, 1)
|
||||
if(teleporter.locked)
|
||||
teleporter.locked = FALSE
|
||||
teleporter.toggle_open()
|
||||
|
||||
@@ -174,25 +174,26 @@
|
||||
|
||||
else
|
||||
var/list/S = power_station.linked_stations
|
||||
if(!S.len)
|
||||
to_chat(user, "<span class='alert'>No connected stations located.</span>")
|
||||
return
|
||||
for(var/obj/machinery/teleport/station/R in S)
|
||||
if(is_eligible(R))
|
||||
if(is_eligible(R) && R.teleporter_hub)
|
||||
var/area/A = get_area(R)
|
||||
L[avoid_assoc_duplicate_keys(A.name, areaindex)] = R
|
||||
if(!L.len)
|
||||
to_chat(user, "<span class='alert'>No active connected stations located.</span>")
|
||||
return
|
||||
var/desc = input("Please select a station to lock in.", "Locking Computer") as null|anything in L
|
||||
target = L[desc]
|
||||
if(target)
|
||||
var/obj/machinery/teleport/station/trg = target
|
||||
trg.linked_stations |= power_station
|
||||
trg.stat &= ~NOPOWER
|
||||
if(trg.teleporter_hub)
|
||||
trg.teleporter_hub.stat &= ~NOPOWER
|
||||
trg.teleporter_hub.update_icon()
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
var/obj/machinery/teleport/station/target_station = L[desc]
|
||||
if(!target_station || !target_station.teleporter_hub)
|
||||
return
|
||||
target = target_station.teleporter_hub
|
||||
target_station.linked_stations |= power_station
|
||||
target_station.stat &= ~NOPOWER
|
||||
if(target_station.teleporter_hub)
|
||||
target_station.teleporter_hub.stat &= ~NOPOWER
|
||||
target_station.teleporter_hub.update_icon()
|
||||
if(target_station.teleporter_console)
|
||||
target_station.teleporter_console.stat &= ~NOPOWER
|
||||
target_station.teleporter_console.update_icon()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
||||
var/turf/T = get_turf(AM)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "box_0"
|
||||
density = TRUE
|
||||
max_integrity = 250
|
||||
var/obj/item/circuitboard/circuit = null
|
||||
var/obj/item/circuitboard/machine/circuit = null
|
||||
var/state = 1
|
||||
|
||||
/obj/structure/frame/examine(user)
|
||||
@@ -165,6 +165,13 @@
|
||||
icon_state = "box_1"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/wrench) && !circuit.needs_anchored)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
anchored = !anchored
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
var/component_check = 1
|
||||
for(var/R in req_components)
|
||||
|
||||
@@ -323,12 +323,12 @@
|
||||
return
|
||||
else
|
||||
return
|
||||
else if(user.hallucinating() && ishuman(user) && prob(4) && !operating)
|
||||
else if(user.hallucinating() && ishuman(user) && prob(1) && !operating)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(G.siemens_coefficient)//not insulated
|
||||
hallucinate_shock(H)
|
||||
new /datum/hallucination/shock(H)
|
||||
return
|
||||
if (cyclelinkedairlock)
|
||||
if (!shuttledocked && !emergency && !cyclelinkedairlock.shuttledocked && !cyclelinkedairlock.emergency && allowed(user))
|
||||
@@ -338,34 +338,6 @@
|
||||
addtimer(CALLBACK(cyclelinkedairlock, .proc/close), 2)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/airlock/proc/hallucinate_shock(mob/living/user)
|
||||
var/image/shock_image = image(user, user, dir = user.dir)
|
||||
var/image/electrocution_skeleton_anim = image('icons/mob/human.dmi', user, icon_state = "electrocuted_base", layer=ABOVE_MOB_LAYER)
|
||||
shock_image.color = rgb(0,0,0)
|
||||
shock_image.override = TRUE
|
||||
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART
|
||||
|
||||
to_chat(user, "<span class='userdanger'>You feel a powerful shock course through your body!</span>")
|
||||
if(user.client)
|
||||
user.client.images |= shock_image
|
||||
user.client.images |= electrocution_skeleton_anim
|
||||
addtimer(CALLBACK(src, .proc/reset_hallucinate_shock_animation, user, shock_image, electrocution_skeleton_anim), 40)
|
||||
user.playsound_local(get_turf(src), "sparks", 100, 1)
|
||||
user.staminaloss += 50
|
||||
user.Stun(40)
|
||||
user.jitteriness += 1000
|
||||
user.do_jitter_animation(user.jitteriness)
|
||||
addtimer(CALLBACK(src, .proc/hallucinate_shock_drop, user), 20)
|
||||
|
||||
/obj/machinery/door/airlock/proc/reset_hallucinate_shock_animation(mob/living/user, shock_image, electrocution_skeleton_anim)
|
||||
if(user.client)
|
||||
user.client.images.Remove(shock_image)
|
||||
user.client.images.Remove(electrocution_skeleton_anim)
|
||||
|
||||
/obj/machinery/door/airlock/proc/hallucinate_shock_drop(mob/living/user)
|
||||
user.jitteriness = max(user.jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
user.Knockdown(60)
|
||||
|
||||
/obj/machinery/door/airlock/proc/isElectrified()
|
||||
if(src.secondsElectrified != NOT_ELECTRIFIED)
|
||||
return TRUE
|
||||
@@ -1098,10 +1070,8 @@
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/airlockforced.ogg', 30, 1)
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 150)
|
||||
else if(autoclose && !normalspeed)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 15)
|
||||
if(autoclose)
|
||||
autoclose_in(normalspeed ? 150 : 15)
|
||||
|
||||
if(!density)
|
||||
return TRUE
|
||||
@@ -1134,7 +1104,7 @@
|
||||
if(safe)
|
||||
for(var/atom/movable/M in get_turf(src))
|
||||
if(M.density && M != src) //something is blocking the door
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 60)
|
||||
autoclose_in(60)
|
||||
return
|
||||
|
||||
if(forced < 2)
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
for(var/atom/movable/M in get_turf(src))
|
||||
if(M.density && M != src) //something is blocking the door
|
||||
if(autoclose)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), 60)
|
||||
autoclose_in(60)
|
||||
return
|
||||
|
||||
operating = TRUE
|
||||
@@ -326,6 +326,9 @@
|
||||
if(!QDELETED(src) && !density && !operating && !locked && !welded && autoclose)
|
||||
close()
|
||||
|
||||
/obj/machinery/door/proc/autoclose_in(wait)
|
||||
addtimer(CALLBACK(src, .proc/autoclose), wait, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE)
|
||||
|
||||
/obj/machinery/door/proc/requiresID()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -144,9 +144,7 @@
|
||||
else
|
||||
close()
|
||||
|
||||
/obj/machinery/door/firedoor/interact(mob/user)
|
||||
if(!issilicon(user))
|
||||
return TRUE
|
||||
/obj/machinery/door/firedoor/attack_ai(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(welded || operating || stat & NOPOWER)
|
||||
return TRUE
|
||||
@@ -156,6 +154,9 @@
|
||||
close()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/firedoor/attack_robot(mob/user)
|
||||
return attack_ai(user)
|
||||
|
||||
/obj/machinery/door/firedoor/attack_alien(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(welded)
|
||||
@@ -355,8 +356,7 @@
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] removes the wires from [src].</span>", \
|
||||
"<span class='notice'>You remove the wiring from [src], exposing the circuit board.</span>")
|
||||
var/obj/item/stack/cable_coil/B = new(get_turf(src))
|
||||
B.amount = 5
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||
constructionStep = CONSTRUCTION_GUTTED
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/obj/machinery/droneDispenser/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE)
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, list(/obj/item/stack))
|
||||
materials.insert_amount(starting_amount)
|
||||
materials.precise_insertion = TRUE
|
||||
using_materials = list(MAT_METAL=metal_cost, MAT_GLASS=glass_cost)
|
||||
|
||||
@@ -32,6 +32,7 @@ Possible to do for anyone motivated enough:
|
||||
desc = "It's a floor-mounted device for projecting holographic images."
|
||||
icon_state = "holopad0"
|
||||
layer = LOW_OBJ_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
flags_1 = HEAR_1
|
||||
anchored = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
@@ -66,7 +67,7 @@ Possible to do for anyone motivated enough:
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
on_network = FALSE
|
||||
var/proximity_range = 1
|
||||
|
||||
|
||||
/obj/machinery/holopad/tutorial/Initialize(mapload)
|
||||
. = ..()
|
||||
if(proximity_range)
|
||||
@@ -86,7 +87,7 @@ Possible to do for anyone motivated enough:
|
||||
replay_stop()
|
||||
else if(disk && disk.record)
|
||||
replay_start()
|
||||
|
||||
|
||||
/obj/machinery/holopad/tutorial/HasProximity(atom/movable/AM)
|
||||
if (!isliving(AM))
|
||||
return
|
||||
@@ -487,7 +488,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(QDELETED(user) || user.incapacitated() || !user.client)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
//Can we display holos there
|
||||
//Area check instead of line of sight check because this is a called a lot if AI wants to move around.
|
||||
/obj/machinery/holopad/proc/validate_location(turf/T,check_los = FALSE)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "It's useful for igniting plasma."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "igniter0"
|
||||
plane = FLOOR_PLANE
|
||||
var/id = null
|
||||
var/on = FALSE
|
||||
anchored = TRUE
|
||||
@@ -12,7 +13,7 @@
|
||||
max_integrity = 300
|
||||
armor = list("melee" = 50, "bullet" = 30, "laser" = 70, "energy" = 50, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
|
||||
/obj/machinery/igniter/on
|
||||
on = TRUE
|
||||
icon_state = "igniter1"
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "blpad-remote"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
var/sending = TRUE
|
||||
var/obj/machinery/launchpad/briefcase/pad
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user