Merge branch 'master' into upstream-merge-37665

This commit is contained in:
LetterJay
2018-05-23 10:14:10 -05:00
committed by GitHub
608 changed files with 10289 additions and 8565 deletions
+2
View File
@@ -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
+4
View File
@@ -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)
+9 -42
View File
@@ -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
+62 -62
View File
@@ -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.
+1 -1
View File
@@ -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
+12
View File
@@ -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.
-128
View File
@@ -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
View File
@@ -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
View 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
View 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.
*/
+1
View File
@@ -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
+3
View File
@@ -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)
+4 -4
View File
@@ -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,
+30 -8
View File
@@ -36,6 +36,9 @@
/datum/proc/p_s(temp_gender) //is this a descriptive proc name, or what?
. = "s"
/datum/proc/p_es(temp_gender)
. = "es"
//like clients, which do have gender.
/client/p_they(capitalized, temp_gender)
if(!temp_gender)
@@ -107,6 +110,12 @@
if(temp_gender != PLURAL && temp_gender != NEUTER)
. = "s"
/client/p_es(temp_gender)
if(!temp_gender)
temp_gender = gender
if(temp_gender != PLURAL && temp_gender != NEUTER)
. = "es"
//mobs(and atoms but atoms don't really matter write your own proc overrides) also have gender!
/mob/p_they(capitalized, temp_gender)
if(!temp_gender)
@@ -184,59 +193,72 @@
if(temp_gender != PLURAL)
. = "s"
/mob/p_es(temp_gender)
if(!temp_gender)
temp_gender = gender
if(temp_gender != PLURAL)
. = "es"
//humans need special handling, because they can have their gender hidden
/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 ..()
/mob/living/carbon/human/p_es(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)
temp_gender = PLURAL
return ..()
+18 -12
View File
@@ -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
@@ -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
+1 -2
View File
@@ -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"
+7 -7
View File
@@ -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/
+1 -1
View File
@@ -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
+16 -17
View File
@@ -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 -1
View File
@@ -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)
+2
View File
@@ -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))
+2
View File
@@ -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)
+2 -2
View File
@@ -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))
+1 -1
View File
@@ -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()
+4 -2
View File
@@ -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)
+15 -15
View File
@@ -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()
+155 -155
View File
@@ -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))
+2
View File
@@ -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)
+2 -1
View File
@@ -12,7 +12,7 @@
/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)
@@ -29,6 +29,7 @@
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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+5 -2
View File
@@ -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
+2 -1
View File
@@ -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()
+14
View File
@@ -243,10 +243,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
View 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
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+13 -9
View File
@@ -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
View 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
View 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]--
+1 -1
View File
@@ -58,7 +58,7 @@
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 -1
View File
@@ -208,7 +208,7 @@
var/atom/movable/AM = parent
AM.unbuckle_mob(user)
user.Knockdown(60)
user.visible_message("<span class='warning'>[AM] pushes [user] off of them!</span>")
user.visible_message("<span class='warning'>[AM] pushes [user] off of [AM.p_them()]!</span>")
/datum/component/riding/cyborg
@@ -4,6 +4,7 @@
/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)
+6 -1
View File
@@ -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)
@@ -402,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))
+26
View 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)
+1 -1
View File
@@ -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)
+3
View File
@@ -1,3 +1,6 @@
/datum/proc/CanProcCall(procname)
return TRUE
/datum/proc/can_vv_get(var_name)
return TRUE
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
+3 -3
View File
@@ -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
+9 -8
View File
@@ -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), 11)))
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"
@@ -58,9 +60,8 @@
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)]")
+2 -2
View File
@@ -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
+1 -1
View File
@@ -73,7 +73,7 @@
D.apply_damage(10, BRUTE)
add_logs(A, D, "cqc kicked")
if(D.IsKnockdown() && !D.stat)
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking them out!</span>", \
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1)
D.SetSleeping(300)
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
@@ -219,7 +219,7 @@
if(H.staminaloss && !H.IsSleeping())
var/total_health = (H.health - H.staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking them out cold!</span>", \
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \
"<span class='userdanger'>[user] knocks you unconscious!</span>")
H.SetSleeping(600)
H.adjustBrainLoss(15, 150)
+2 -2
View File
@@ -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
+16 -16
View File
@@ -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
+3 -1
View File
@@ -120,7 +120,7 @@ Use this as a guideline
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()
*/
+7 -14
View File
@@ -58,9 +58,9 @@
/obj/item/dice/d20)
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)
@@ -121,7 +121,7 @@
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
@@ -230,16 +230,9 @@
return
if(prob(2)) //we'll all be mad soon enough
madness()
/datum/quirk/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 (quirk_holder, FALSE)
else
quirk_holder.hallucination += rand(10, 50)
/datum/quirk/insanity/proc/madness()
quirk_holder.hallucination += rand(10, 25)
/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)
+6 -2
View File
@@ -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"
+1 -2
View File
@@ -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 -1
View File
@@ -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
+2 -2
View File
@@ -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
@@ -107,7 +107,7 @@
/obj/item/melee/transforming/energy/sword/bananium/suicide_act(mob/user)
if(!active)
transform_weapon(user, TRUE)
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of them harmlessly!</span>")
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of [user.p_them()] harmlessly!</span>")
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.Slip(user)
return SHAME
@@ -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
+2 -2
View File
@@ -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,\
+20 -20
View File
@@ -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
+1 -1
View File
@@ -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."
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -507,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>")
@@ -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()
+8 -1
View File
@@ -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)
+5 -35
View File
@@ -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)
+5 -2
View File
@@ -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
@@ -303,7 +303,7 @@
/obj/machinery/door/proc/crush()
for(var/mob/living/L in get_turf(src))
L.visible_message("<span class='warning'>[src] closes on [L], crushing them!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
L.visible_message("<span class='warning'>[src] closes on [L], crushing [L.p_them()]!</span>", "<span class='userdanger'>[src] closes on you and crushes you!</span>")
if(isalien(L)) //For xenos
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) //Xenos go into crit after aproximately the same amount of crushes as humans.
L.emote("roar")
@@ -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
+4 -3
View File
@@ -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)
+1 -1
View File
@@ -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
+13 -15
View File
@@ -38,7 +38,7 @@ Buildable meters
/obj/item/pipe/ComponentInitialize()
//Flipping handled manually due to custom handling for trinary pipes
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE ,null,null, CALLBACK(src, .proc/fixdir))
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
/obj/item/pipe/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from)
if(make_from)
@@ -98,7 +98,6 @@ Buildable meters
/obj/item/pipe/proc/do_a_flip()
setDir(turn(dir, -180))
fixdir()
/obj/item/pipe/trinary/flippable/do_a_flip()
setDir(turn(dir, flipped ? 45 : -45))
@@ -109,23 +108,24 @@ Buildable meters
..()
setDir(old_dir) //pipes changing direction when moved is just annoying and buggy
//Helper to clean up dir
/obj/item/pipe/proc/fixdir()
return
// Convert dir of fitting into dir of built component
/obj/item/pipe/proc/fixed_dir()
return dir
/obj/item/pipe/binary/fixdir()
/obj/item/pipe/binary/fixed_dir()
. = dir
if(dir == SOUTH)
setDir(NORTH)
. = NORTH
else if(dir == WEST)
setDir(EAST)
. = EAST
/obj/item/pipe/trinary/flippable/fixdir()
/obj/item/pipe/trinary/flippable/fixed_dir()
. = dir
if(dir in GLOB.diagonals)
setDir(turn(dir, 45))
. = turn(dir, 45)
/obj/item/pipe/attack_self(mob/user)
setDir(turn(dir,-90))
fixdir()
/obj/item/pipe/wrench_act(mob/living/user, obj/item/wrench/W)
if(!isturf(loc))
@@ -133,8 +133,6 @@ Buildable meters
add_fingerprint(user)
fixdir()
var/obj/machinery/atmospherics/fakeA = pipe_type
var/flags = initial(fakeA.pipe_flags)
for(var/obj/machinery/atmospherics/M in loc)
@@ -143,7 +141,7 @@ Buildable meters
return TRUE
if((M.piping_layer != piping_layer) && !((M.pipe_flags | flags) & PIPING_ALL_LAYER)) //don't continue if either pipe goes across all layers
continue
if(M.GetInitDirections() & SSair.get_init_dirs(pipe_type, dir)) // matches at least one direction on either type of pipe
if(M.GetInitDirections() & SSair.get_init_dirs(pipe_type, fixed_dir())) // matches at least one direction on either type of pipe
to_chat(user, "<span class='warning'>There is already a pipe at that location!</span>")
return TRUE
// no conflicts found
@@ -162,7 +160,7 @@ Buildable meters
qdel(src)
/obj/item/pipe/proc/build_pipe(obj/machinery/atmospherics/A)
A.setDir(dir)
A.setDir(fixed_dir())
A.SetInitDirections()
if(pipename)
+2 -2
View File
@@ -202,7 +202,7 @@
if(occupant || helmet || suit || storage)
return
if(target == user)
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind them!</span>", "<span class=notice'>You slip into [src]'s cramped space and shut its door.</span>")
user.visible_message("<span class='warning'>[user] slips into [src] and closes the door behind [user.p_them()]!</span>", "<span class=notice'>You slip into [src]'s cramped space and shut its door.</span>")
else
target.visible_message("<span class='warning'>[user] pushes [target] into [src] and shuts its door!<span>", "<span class='userdanger'>[user] shoves you into [src] and shuts the door!</span>")
close_machine(target)
@@ -300,7 +300,7 @@
/obj/machinery/suit_storage_unit/proc/resist_open(mob/user)
if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here.
visible_message("<span class='notice'>You see [user] bursts out of [src]!</span>", \
visible_message("<span class='notice'>You see [user] burst out of [src]!</span>", \
"<span class='notice'>You escape the cramped confines of [src]!</span>")
open_machine()
+1 -1
View File
@@ -5,7 +5,7 @@
name = "ominous beacon"
desc = "This looks suspicious..."
icon = 'icons/obj/singularity.dmi'
icon_state = "beacon"
icon_state = "beacon0"
anchored = FALSE
density = TRUE
@@ -70,7 +70,7 @@
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target)
if(target.buckled)
occupant_message("<span class='warning'>[target] will not fit into the sleeper because [target.p_they()] [target.p_are()] buckled to [target.buckled]!</span>")
occupant_message("<span class='warning'>[target] will not fit into the sleeper because [target.p_theyre()] buckled to [target.buckled]!</span>")
return
if(target.has_buckled_mobs())
occupant_message("<span class='warning'>[target] will not fit into the sleeper because of the creatures attached to it!</span>")
@@ -194,7 +194,7 @@
equip_cooldown = 10
energy_drain = 250
range = MELEE|RANGED
flags_2 = NO_MAT_REDEMPTION_2
item_flags = NO_MAT_REDEMPTION
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
/obj/item/mecha_parts/mecha_equipment/rcd/Initialize()
@@ -1,7 +1,7 @@
/obj/effect/decal/cleanable
gender = PLURAL
layer = ABOVE_NORMAL_TURF_LAYER
var/list/random_icon_states = list()
var/list/random_icon_states = null
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one?
+1 -1
View File
@@ -27,7 +27,7 @@
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
icon_state = "nothing"
name = "invisible wall"
desc = "You have a bad feeling about this."
+1 -1
View File
@@ -78,7 +78,7 @@
pixel_x = -32
icon_state = "[base_icon_state][rand(1,3)]"
else //if on the floor, glowshroom on-floor sprite
icon_state = "[base_icon_state]f"
icon_state = base_icon_state
addtimer(CALLBACK(src, .proc/Spread), delay)
@@ -1,46 +1,67 @@
#define CELSIUS_TO_KELVIN(T_K) ((T_K) + T0C)
#define OPTIMAL_TEMP_K_PLA_BURN_SCALE(PRESSURE_P,PRESSURE_O,TEMP_O) (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT]) / (((PRESSURE_P) * GLOB.meta_gas_info[/datum/gas/plasma][META_GAS_SPECIFIC_HEAT] + (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT]) / PLASMA_UPPER_TEMPERATURE - (PRESSURE_O) * GLOB.meta_gas_info[/datum/gas/oxygen][META_GAS_SPECIFIC_HEAT] / CELSIUS_TO_KELVIN(TEMP_O)))
#define OPTIMAL_TEMP_K_PLA_BURN_RATIO(PRESSURE_P,PRESSURE_O,TEMP_O) (CELSIUS_TO_KELVIN(TEMP_O) * PLASMA_OXYGEN_FULLBURN * (PRESSURE_P) / (PRESSURE_O))
/obj/effect/spawner/newbomb
name = "bomb"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x"
var/btemp1 = 1500
var/btemp2 = 1000 // tank temperatures
var/temp_p = 1500
var/temp_o = 1000 // tank temperatures
var/pressure_p = 10 * ONE_ATMOSPHERE
var/pressure_o = 10 * ONE_ATMOSPHERE //tank pressures
var/assembly_type
/obj/effect/spawner/newbomb/Initialize()
. = ..()
var/obj/item/transfer_valve/V = new(src.loc)
var/obj/item/tank/internals/plasma/full/PT = new(V)
var/obj/item/tank/internals/plasma/PT = new(V)
var/obj/item/tank/internals/oxygen/OT = new(V)
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
PT.air_contents.assert_gas(/datum/gas/plasma)
PT.air_contents.gases[/datum/gas/plasma][MOLES] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
OT.air_contents.assert_gas(/datum/gas/oxygen)
OT.air_contents.gases[/datum/gas/oxygen][MOLES] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
V.tank_one = PT
V.tank_two = OT
PT.master = V
OT.master = V
if(assembly_type)
var/obj/item/assembly/A = new assembly_type(V)
V.attached_device = A
A.holder = V
A.toggle_secure()
V.update_icon()
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/newbomb/timer/syndicate/Initialize()
temp_p = (OPTIMAL_TEMP_K_PLA_BURN_SCALE(pressure_p, pressure_o, temp_o)/2 + OPTIMAL_TEMP_K_PLA_BURN_RATIO(pressure_p, pressure_o, temp_o)/2) - T0C
. = ..()
/obj/effect/spawner/newbomb/timer
assembly_type = /obj/item/assembly/timer
/obj/effect/spawner/newbomb/timer/syndicate
btemp1 = 150
btemp2 = 20
pressure_o = TANK_LEAK_PRESSURE - 1
temp_o = 20
pressure_p = TANK_LEAK_PRESSURE - 1
/obj/effect/spawner/newbomb/proximity
assembly_type = /obj/item/assembly/prox_sensor
/obj/effect/spawner/newbomb/radio
assembly_type = /obj/item/assembly/signaler
#undef CELSIUS_TO_KELVIN
#undef OPTIMAL_TEMP_K_PLA_BURN_SCALE
#undef OPTIMAL_TEMP_K_PLA_BURN_RATIO
+114 -2
View File
@@ -5,7 +5,7 @@
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = TRUE //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,3,-3,6,-6,9,-9.. This overrides pixel_x/y on the spawner itself
var/fan_out_items = FALSE //Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
@@ -26,7 +26,7 @@
spawned_loot.pixel_y = pixel_y
else
if (loot_spawned)
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-3)+((loot_spawned%2)*(loot_spawned+1)/2*3)
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-1)+((loot_spawned%2)*(loot_spawned+1)/2*1)
loot_spawned++
return INITIALIZE_HINT_QDEL
@@ -206,3 +206,115 @@
/obj/item/aiModule/core/full/thermurderdynamic,
/obj/item/aiModule/core/full/damaged
)
// Tech storage circuit board spawners
// For these, make sure that lootcount equals the number of list items
/obj/effect/spawner/lootdrop/techstorage
name = "generic circuit board spawner"
lootdoubles = FALSE
fan_out_items = TRUE
/obj/effect/spawner/lootdrop/techstorage/service
name = "service circuit board spawner"
lootcount = 10
loot = list(
/obj/item/circuitboard/computer/arcade/battle,
/obj/item/circuitboard/computer/arcade/orion_trail,
/obj/item/circuitboard/machine/autolathe,
/obj/item/circuitboard/computer/mining,
/obj/item/circuitboard/machine/ore_redemption,
/obj/item/circuitboard/machine/mining_equipment_vendor,
/obj/item/circuitboard/machine/microwave,
/obj/item/circuitboard/machine/chem_dispenser/drinks,
/obj/item/circuitboard/machine/chem_dispenser/drinks/beer,
/obj/item/circuitboard/computer/slot_machine
)
/obj/effect/spawner/lootdrop/techstorage/rnd
name = "RnD circuit board spawner"
lootcount = 8
loot = list(
/obj/item/circuitboard/computer/aifixer,
/obj/item/circuitboard/machine/rdserver,
/obj/item/circuitboard/computer/pandemic,
/obj/item/circuitboard/machine/mechfab,
/obj/item/circuitboard/machine/circuit_imprinter/department,
/obj/item/circuitboard/computer/teleporter,
/obj/item/circuitboard/machine/destructive_analyzer,
/obj/item/circuitboard/computer/rdconsole
)
/obj/effect/spawner/lootdrop/techstorage/security
name = "security circuit board spawner"
lootcount = 3
loot = list(
/obj/item/circuitboard/computer/secure_data,
/obj/item/circuitboard/computer/security,
/obj/item/circuitboard/computer/prisoner
)
/obj/effect/spawner/lootdrop/techstorage/engineering
name = "engineering circuit board spawner"
lootcount = 3
loot = list(
/obj/item/circuitboard/computer/atmos_alert,
/obj/item/circuitboard/computer/stationalert,
/obj/item/circuitboard/computer/powermonitor
)
/obj/effect/spawner/lootdrop/techstorage/tcomms
name = "tcomms circuit board spawner"
lootcount = 9
loot = list(
/obj/item/circuitboard/computer/message_monitor,
/obj/item/circuitboard/machine/telecomms/broadcaster,
/obj/item/circuitboard/machine/telecomms/bus,
/obj/item/circuitboard/machine/telecomms/server,
/obj/item/circuitboard/machine/telecomms/receiver,
/obj/item/circuitboard/machine/telecomms/processor,
/obj/item/circuitboard/machine/announcement_system,
/obj/item/circuitboard/computer/comm_server,
/obj/item/circuitboard/computer/comm_monitor
)
/obj/effect/spawner/lootdrop/techstorage/medical
name = "medical circuit board spawner"
lootcount = 8
loot = list(
/obj/item/circuitboard/computer/cloning,
/obj/item/circuitboard/machine/clonepod,
/obj/item/circuitboard/machine/chem_dispenser,
/obj/item/circuitboard/computer/scan_consolenew,
/obj/item/circuitboard/computer/med_data,
/obj/item/circuitboard/machine/smoke_machine,
/obj/item/circuitboard/machine/chem_master,
/obj/item/circuitboard/machine/clonescanner
)
/obj/effect/spawner/lootdrop/techstorage/AI
name = "secure AI circuit board spawner"
lootcount = 3
loot = list(
/obj/item/circuitboard/computer/aiupload,
/obj/item/circuitboard/computer/borgupload,
/obj/item/circuitboard/aicore
)
/obj/effect/spawner/lootdrop/techstorage/command
name = "secure command circuit board spawner"
lootcount = 3
loot = list(
/obj/item/circuitboard/computer/crew,
/obj/item/circuitboard/computer/communications,
/obj/item/circuitboard/computer/card
)
/obj/effect/spawner/lootdrop/techstorage/RnD_secure
name = "secure RnD circuit board spawner"
lootcount = 3
loot = list(
/obj/item/circuitboard/computer/mecha_control,
/obj/item/circuitboard/computer/apc_control,
/obj/item/circuitboard/computer/robotics
)
+15 -15
View File
@@ -381,7 +381,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
/obj/item/proc/item_action_slot_check(slot, mob/user)
if(slot == slot_in_backpack || slot == slot_legcuffed) //these aren't true slots, so avoid granting actions there
if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
return FALSE
return TRUE
@@ -463,7 +463,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
"<span class='userdanger'>[user] stabs you in the eye with [src]!</span>")
else
user.visible_message( \
"<span class='danger'>[user] has stabbed themself in the eyes with [src]!</span>", \
"<span class='danger'>[user] has stabbed [user.p_them()]self in the eyes with [src]!</span>", \
"<span class='userdanger'>You stab yourself in the eyes with [src]!</span>" \
)
if(is_human_victim)
@@ -545,29 +545,29 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
return
var/mob/owner = loc
var/flags = slot_flags
if(flags & SLOT_OCLOTHING)
if(flags & ITEM_SLOT_OCLOTHING)
owner.update_inv_wear_suit()
if(flags & SLOT_ICLOTHING)
if(flags & ITEM_SLOT_ICLOTHING)
owner.update_inv_w_uniform()
if(flags & SLOT_GLOVES)
if(flags & ITEM_SLOT_GLOVES)
owner.update_inv_gloves()
if(flags & SLOT_EYES)
if(flags & ITEM_SLOT_EYES)
owner.update_inv_glasses()
if(flags & SLOT_EARS)
if(flags & ITEM_SLOT_EARS)
owner.update_inv_ears()
if(flags & SLOT_MASK)
if(flags & ITEM_SLOT_MASK)
owner.update_inv_wear_mask()
if(flags & SLOT_HEAD)
if(flags & ITEM_SLOT_HEAD)
owner.update_inv_head()
if(flags & SLOT_FEET)
if(flags & ITEM_SLOT_FEET)
owner.update_inv_shoes()
if(flags & SLOT_ID)
if(flags & ITEM_SLOT_ID)
owner.update_inv_wear_id()
if(flags & SLOT_BELT)
if(flags & ITEM_SLOT_BELT)
owner.update_inv_belt()
if(flags & SLOT_BACK)
if(flags & ITEM_SLOT_BACK)
owner.update_inv_back()
if(flags & SLOT_NECK)
if(flags & ITEM_SLOT_NECK)
owner.update_inv_neck()
/obj/item/proc/is_hot()
@@ -592,7 +592,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(ismob(location))
var/mob/M = location
var/success = FALSE
if(src == M.get_item_by_slot(slot_wear_mask))
if(src == M.get_item_by_slot(SLOT_WEAR_MASK))
success = TRUE
if(success)
location = get_turf(M)
+1 -1
View File
@@ -129,7 +129,7 @@ RLD
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
max_matter = 160
flags_2 = NO_MAT_REDEMPTION_2
item_flags = NO_MAT_REDEMPTION
has_ammobar = TRUE
var/mode = 1
var/ranged = FALSE
+6 -4
View File
@@ -98,12 +98,14 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
if(dirtype == PIPE_BENDABLE)
dirs += list("[NORTHWEST]" = "West to North", "[NORTHEAST]" = "North to East",
"[SOUTHWEST]" = "South to West", "[SOUTHEAST]" = "East to South")
if(PIPE_TRINARY, PIPE_TRIN_M)
if(PIPE_TRINARY)
dirs = list("[NORTH]" = "West South East", "[EAST]" = "North West South",
"[SOUTH]" = "East North West", "[WEST]" = "South East North")
if(dirtype == PIPE_TRIN_M)
dirs += list("[SOUTHEAST]" = "West South East", "[NORTHEAST]" = "North West South",
"[NORTHWEST]" = "East North West", "[SOUTHWEST]" = "South East North")
if(PIPE_TRIN_M)
dirs = list("[NORTH]" = "North East South", "[EAST]" = "East South West",
"[SOUTH]" = "South West North", "[WEST]" = "West North East",
"[SOUTHEAST]" = "West South East", "[NORTHEAST]" = "South East North",
"[NORTHWEST]" = "East North West", "[SOUTHWEST]" = "North West South")
if(PIPE_UNARY)
dirs = list("[NORTH]" = "North", "[EAST]" = "East", "[SOUTH]" = "South", "[WEST]" = "West")
if(PIPE_ONEDIR)
+2 -2
View File
@@ -10,7 +10,7 @@
materials = list(MAT_METAL=50, MAT_GLASS=50)
flags_1 = CONDUCT_1 | NOBLUDGEON_1
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
usesound = 'sound/effects/spray2.ogg'
var/obj/item/toner/ink = null
@@ -72,7 +72,7 @@
// TODO maybe add some colorful vomit?
user.visible_message("<span class='suicide'>[user] vomits out their [L]!</span>")
user.visible_message("<span class='suicide'>[user] vomits out [user.p_their()] [L]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
L.forceMove(T)
+2 -2
View File
@@ -30,7 +30,7 @@
user.forceMove(R)
playsound(src, 'sound/items/zip.ogg', 15, 1, -3)
return (OXYLOSS)
..()
..()
// Bluespace bodybag
@@ -41,7 +41,7 @@
icon_state = "bluebodybag_folded"
unfoldedbag_path = /obj/structure/closet/body_bag/bluespace
w_class = WEIGHT_CLASS_SMALL
flags_2 = NO_MAT_REDEMPTION_2
item_flags = NO_MAT_REDEMPTION
/obj/item/bodybag/bluespace/examine(mob/user)
+2 -2
View File
@@ -60,7 +60,7 @@
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
flags_1 = NOBLUDGEON_1
flags_2 = NO_MAT_REDEMPTION_2
item_flags = NO_MAT_REDEMPTION
var/prox_check = TRUE //If the emag requires you to be in range
/obj/item/card/emag/bluespace
@@ -97,7 +97,7 @@
item_state = "card-id"
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
slot_flags = SLOT_ID
slot_flags = ITEM_SLOT_ID
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
var/mining_points = 0 //For redeeming at mining equipment vendors
+2 -2
View File
@@ -9,7 +9,7 @@
lefthand_file = 'icons/mob/inhands/equipment/backpack_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
slot_flags = ITEM_SLOT_BACK
slowdown = 1
actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun)
var/obj/item/gun/energy/chrono_gun/PA = null
@@ -38,7 +38,7 @@
user.put_in_hands(PA)
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user)
if(slot == slot_back)
if(slot == SLOT_BACK)
return 1
/obj/item/gun/energy/chrono_gun
+10 -10
View File
@@ -86,7 +86,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
..()
/obj/item/proc/help_light_cig(mob/living/M)
var/mask_item = M.get_item_by_slot(slot_wear_mask)
var/mask_item = M.get_item_by_slot(SLOT_WEAR_MASK)
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
return mask_item
@@ -129,7 +129,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.add_reagent_list(list_reagents)
if(starts_lit)
light()
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(slot_wear_mask))//90% to knock off when wearing a mask
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(SLOT_WEAR_MASK))//90% to knock off when wearing a mask
/obj/item/clothing/mask/cigarette/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -250,7 +250,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(M == user)
cig.attackby(src, user)
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights [M.p_their()] [cig.name].</span>")
else
return ..()
@@ -489,7 +489,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
item_state = "zippo"
w_class = WEIGHT_CLASS_TINY
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
slot_flags = ITEM_SLOT_BELT
var/lit = 0
var/fancy = TRUE
heat = 1500
@@ -514,7 +514,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/lighter/ignition_effect(atom/A, mob/user)
if(is_hot())
. = "<span class='rose'>With a single flick of their wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.</span>"
. = "<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.</span>"
/obj/item/lighter/proc/set_lit(new_lit)
lit = new_lit
@@ -555,7 +555,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
else
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn [user.p_their()] finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
user.SendSignal(COMSIG_ADD_MOOD_EVENT, "burnt_thumb", /datum/mood_event/burnt_thumb)
else
@@ -579,9 +579,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
cig.attackby(src, user)
else
if(fancy)
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame they light \the [cig] with.</span>")
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame [user.p_they()] light[user.p_s()] \the [cig] with.</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights [M.p_their()] [cig.name].</span>")
else
..()
@@ -749,7 +749,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
return
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
if(slot == slot_wear_mask)
if(slot == SLOT_WEAR_MASK)
if(!screw)
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
reagents.set_reacting(TRUE)
@@ -759,7 +759,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/vape/dropped(mob/user)
var/mob/living/carbon/C = user
if(C.get_item_by_slot(slot_wear_mask) == src)
if(C.get_item_by_slot(SLOT_WEAR_MASK) == src)
reagents.set_reacting(FALSE)
STOP_PROCESSING(SSobj, src)
@@ -154,6 +154,10 @@
name = "Labor Camp teleporter console (Computer Board)"
build_path = /obj/machinery/computer/gulag_teleporter_computer
/obj/item/circuitboard/computer/rdconsole/production
name = "R&D Console Production Only (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/production
/obj/item/circuitboard/computer/rdconsole
name = "R&D Console (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/core

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