Merge branch 'master' into stambufferbuff
This commit is contained in:
@@ -1,91 +1,91 @@
|
||||
//A set of constants used to determine which type of mute an admin wishes to apply:
|
||||
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
|
||||
//Therefore there needs to be a gap between the flags for the automute flags
|
||||
#define MUTE_IC (1<<0)
|
||||
#define MUTE_OOC (1<<1)
|
||||
#define MUTE_PRAY (1<<2)
|
||||
#define MUTE_ADMINHELP (1<<3)
|
||||
#define MUTE_DEADCHAT (1<<4)
|
||||
#define MUTE_ALL (~0)
|
||||
|
||||
//Some constants for DB_Ban
|
||||
#define BANTYPE_PERMA 1
|
||||
#define BANTYPE_TEMP 2
|
||||
#define BANTYPE_JOB_PERMA 3
|
||||
#define BANTYPE_JOB_TEMP 4
|
||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||
|
||||
#define BANTYPE_ADMIN_PERMA 7
|
||||
#define BANTYPE_ADMIN_TEMP 8
|
||||
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
|
||||
|
||||
//Admin Permissions
|
||||
#define R_BUILDMODE (1<<0)
|
||||
#define R_ADMIN (1<<1)
|
||||
#define R_BAN (1<<2)
|
||||
#define R_FUN (1<<3)
|
||||
#define R_SERVER (1<<4)
|
||||
#define R_DEBUG (1<<5)
|
||||
#define R_POSSESS (1<<6)
|
||||
#define R_PERMISSIONS (1<<7)
|
||||
#define R_STEALTH (1<<8)
|
||||
#define R_POLL (1<<9)
|
||||
#define R_VAREDIT (1<<10)
|
||||
#define R_SOUNDS (1<<11)
|
||||
#define R_SPAWN (1<<12)
|
||||
#define R_AUTOLOGIN (1<<13)
|
||||
#define R_DBRANKS (1<<14)
|
||||
|
||||
#define R_DEFAULT R_AUTOLOGIN
|
||||
|
||||
#define R_EVERYTHING ALL //the sum of all other rank permissions, used for +EVERYTHING
|
||||
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=[REF(user)]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=[REF(atom)]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=[REF(user)]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitor=[REF(user)]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];boot2=[REF(user)]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];CentComReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=[REF(user)]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=[REF(user)]'>SMITE</a>)"
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;[HrefToken(TRUE)];set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"
|
||||
|
||||
#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
|
||||
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
|
||||
#define ADMIN_PUNISHMENT_FIREBALL "Fireball"
|
||||
#define ADMIN_PUNISHMENT_ROD "Immovable Rod"
|
||||
#define ADMIN_PUNISHMENT_SUPPLYPOD_QUICK "Supply Pod (Quick)"
|
||||
#define ADMIN_PUNISHMENT_SUPPLYPOD "Supply Pod"
|
||||
#define ADMIN_PUNISHMENT_MAZING "Puzzle"
|
||||
#define ADMIN_PUNISHMENT_PIE "Cream Pie"
|
||||
|
||||
#define AHELP_ACTIVE 1
|
||||
#define AHELP_CLOSED 2
|
||||
#define AHELP_RESOLVED 3
|
||||
|
||||
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
|
||||
|
||||
#define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu
|
||||
#define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you
|
||||
|
||||
///Max length of a keypress command before it's considered to be a forged packet/bogus command
|
||||
#define MAX_KEYPRESS_COMMANDLENGTH 16
|
||||
///Max amount of keypress messages per second over two seconds before client is autokicked
|
||||
#define MAX_KEYPRESS_AUTOKICK 100
|
||||
///Length of held key rolling buffer
|
||||
#define HELD_KEY_BUFFER_LENGTH 15
|
||||
//A set of constants used to determine which type of mute an admin wishes to apply:
|
||||
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
|
||||
//Therefore there needs to be a gap between the flags for the automute flags
|
||||
#define MUTE_IC (1<<0)
|
||||
#define MUTE_OOC (1<<1)
|
||||
#define MUTE_PRAY (1<<2)
|
||||
#define MUTE_ADMINHELP (1<<3)
|
||||
#define MUTE_DEADCHAT (1<<4)
|
||||
#define MUTE_ALL (~0)
|
||||
|
||||
//Some constants for DB_Ban
|
||||
#define BANTYPE_PERMA 1
|
||||
#define BANTYPE_TEMP 2
|
||||
#define BANTYPE_JOB_PERMA 3
|
||||
#define BANTYPE_JOB_TEMP 4
|
||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||
|
||||
#define BANTYPE_ADMIN_PERMA 7
|
||||
#define BANTYPE_ADMIN_TEMP 8
|
||||
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
|
||||
|
||||
//Admin Permissions
|
||||
#define R_BUILDMODE (1<<0)
|
||||
#define R_ADMIN (1<<1)
|
||||
#define R_BAN (1<<2)
|
||||
#define R_FUN (1<<3)
|
||||
#define R_SERVER (1<<4)
|
||||
#define R_DEBUG (1<<5)
|
||||
#define R_POSSESS (1<<6)
|
||||
#define R_PERMISSIONS (1<<7)
|
||||
#define R_STEALTH (1<<8)
|
||||
#define R_POLL (1<<9)
|
||||
#define R_VAREDIT (1<<10)
|
||||
#define R_SOUNDS (1<<11)
|
||||
#define R_SPAWN (1<<12)
|
||||
#define R_AUTOLOGIN (1<<13)
|
||||
#define R_DBRANKS (1<<14)
|
||||
|
||||
#define R_DEFAULT R_AUTOLOGIN
|
||||
|
||||
#define R_EVERYTHING ALL //the sum of all other rank permissions, used for +EVERYTHING
|
||||
|
||||
#define ADMIN_QUE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminmoreinfo=[REF(user)]'>?</a>)"
|
||||
#define ADMIN_FLW(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
|
||||
#define ADMIN_PP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;[HrefToken(TRUE)];Vars=[REF(atom)]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];subtlemessage=[REF(user)]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];traitor=[REF(user)]'>TP</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];boot2=[REF(user)]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];CentComReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];SyndicateReply=[REF(user)]'>RPLY</a>)"
|
||||
#define ADMIN_SC(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminspawncookie=[REF(user)]'>SC</a>)"
|
||||
#define ADMIN_SMITE(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminsmite=[REF(user)]'>SMITE</a>)"
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;[HrefToken(TRUE)];set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)] [ADMIN_SMITE(user)]"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;[HrefToken(TRUE)];adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] ([src.x], [src.y], [src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;[HrefToken(TRUE)];individuallog=[REF(user)]'>LOGS</a>)"
|
||||
|
||||
#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
|
||||
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
|
||||
#define ADMIN_PUNISHMENT_FIREBALL "Fireball"
|
||||
#define ADMIN_PUNISHMENT_ROD "Immovable Rod"
|
||||
#define ADMIN_PUNISHMENT_SUPPLYPOD_QUICK "Supply Pod (Quick)"
|
||||
#define ADMIN_PUNISHMENT_SUPPLYPOD "Supply Pod"
|
||||
#define ADMIN_PUNISHMENT_MAZING "Puzzle"
|
||||
#define ADMIN_PUNISHMENT_PIE "Cream Pie"
|
||||
|
||||
#define AHELP_ACTIVE 1
|
||||
#define AHELP_CLOSED 2
|
||||
#define AHELP_RESOLVED 3
|
||||
|
||||
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
|
||||
|
||||
#define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu
|
||||
#define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you
|
||||
|
||||
///Max length of a keypress command before it's considered to be a forged packet/bogus command
|
||||
#define MAX_KEYPRESS_COMMANDLENGTH 16
|
||||
///Max amount of keypress messages per second over two seconds before client is autokicked
|
||||
#define MAX_KEYPRESS_AUTOKICK 100
|
||||
///Length of held key rolling buffer
|
||||
#define HELD_KEY_BUFFER_LENGTH 15
|
||||
|
||||
@@ -1,299 +1,298 @@
|
||||
//LISTMOS
|
||||
//indices of values in gas lists.
|
||||
#define META_GAS_SPECIFIC_HEAT 1
|
||||
#define META_GAS_NAME 2
|
||||
#define META_GAS_MOLES_VISIBLE 3
|
||||
#define META_GAS_OVERLAY 4
|
||||
#define META_GAS_DANGER 5
|
||||
#define META_GAS_ID 6
|
||||
#define META_GAS_FUSION_POWER 7
|
||||
//ATMOS
|
||||
//stuff you should probably leave well alone!
|
||||
#define R_IDEAL_GAS_EQUATION 8.31446261815324 //kPa*L/(K*mol)
|
||||
#define ONE_ATMOSPHERE 101.325 //kPa
|
||||
#define TCMB 2.7 // -270.3degC
|
||||
#define TCRYO 225 // -48.15degC
|
||||
#define T0C 273.15 // 0degC
|
||||
#define T20C 293.15 // 20degC
|
||||
#define STEFANBOLTZMANN (5.670373*10e-8) // W/(m^2*K^4)
|
||||
|
||||
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
|
||||
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005) //compared against for superconductivity
|
||||
#define O2STANDARD 0.21 //percentage of oxygen in a normal mixture of air
|
||||
#define N2STANDARD 0.79 //same but for nitrogen
|
||||
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
|
||||
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
|
||||
#define CELL_VOLUME 2500 //liters in a cell
|
||||
#define BREATH_VOLUME 0.5 //liters in a normal breath
|
||||
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
|
||||
|
||||
//EXCITED GROUPS
|
||||
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4 //number of FULL air controller ticks before an excited group breaks down (averages gas contents across turfs)
|
||||
#define EXCITED_GROUP_DISMANTLE_CYCLES 16 //number of FULL air controller ticks before an excited group dismantles and removes its turfs from active
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
|
||||
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
|
||||
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
|
||||
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
|
||||
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 //Minimum temperature difference before group processing is suspended
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 //Minimum temperature difference before the gas temperatures are just set to be equal
|
||||
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION (T20C+10)
|
||||
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION (T20C+200)
|
||||
|
||||
//HEAT TRANSFER COEFFICIENTS
|
||||
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
|
||||
//Should not exceed 0.4 else strange heat flow occur
|
||||
#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0
|
||||
#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4
|
||||
#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now
|
||||
#define HEAT_CAPACITY_VACUUM 7000 //a hack to help make vacuums "cold", sacrificing realism for gameplay
|
||||
|
||||
//FIRE
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD (150+T0C)
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST (100+T0C)
|
||||
#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
|
||||
#define MAX_TOXIC_GAS_DAMAGE 10
|
||||
#define MOLES_GAS_VISIBLE 0.25 //Moles in a standard cell after which gases are visible
|
||||
#define FACTOR_GAS_VISIBLE_MAX 20 //moles_visible * FACTOR_GAS_VISIBLE_MAX = Moles after which gas is at maximum visibility
|
||||
#define MOLES_GAS_VISIBLE_STEP 0.25 //Mole step for alpha updates. This means alpha can update at 0.25, 0.5, 0.75 and so on
|
||||
|
||||
//REACTIONS
|
||||
//return values for reactions (bitflags)
|
||||
#define NO_REACTION 0
|
||||
#define REACTING 1
|
||||
#define STOP_REACTIONS 2
|
||||
|
||||
// Pressure limits.
|
||||
#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
|
||||
#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
|
||||
#define WARNING_LOW_PRESSURE 50 //This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE)
|
||||
#define HAZARD_LOW_PRESSURE 20 //This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)
|
||||
|
||||
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
|
||||
|
||||
#define BODYTEMP_NORMAL 310.15 //The natural temperature for a body
|
||||
#define BODYTEMP_AUTORECOVERY_DIVISOR 11 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
|
||||
#define BODYTEMP_AUTORECOVERY_MINIMUM 12 //Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
|
||||
#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
|
||||
#define BODYTEMP_HEAT_DIVISOR 15 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
|
||||
#define BODYTEMP_COOLING_MAX -100 //The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
|
||||
#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
|
||||
|
||||
#define BODYTEMP_HEAT_DAMAGE_LIMIT (BODYTEMP_NORMAL + 20) // The limit the human body can take before it starts taking damage from heat. //CITADEL EDIT to 20
|
||||
#define BODYTEMP_COLD_DAMAGE_LIMIT (BODYTEMP_NORMAL - 50) // The limit the human body can take before it starts taking damage from coldness.
|
||||
|
||||
|
||||
#define SPACE_HELM_MIN_TEMP_PROTECT 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0.
|
||||
#define SPACE_HELM_MAX_TEMP_PROTECT 1500 //Thermal insulation works both ways /Malkevin
|
||||
#define SPACE_SUIT_MIN_TEMP_PROTECT 2.0 //what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0.
|
||||
#define SPACE_SUIT_MAX_TEMP_PROTECT 1500
|
||||
|
||||
#define FIRE_SUIT_MIN_TEMP_PROTECT 60 //Cold protection for firesuits
|
||||
#define FIRE_SUIT_MAX_TEMP_PROTECT 30000 //what max_heat_protection_temperature is set to for firesuit quality suits. MUST NOT BE 0.
|
||||
#define FIRE_HELM_MIN_TEMP_PROTECT 60 //Cold protection for fire helmets
|
||||
#define FIRE_HELM_MAX_TEMP_PROTECT 30000 //for fire helmet quality items (red and white hardhats)
|
||||
|
||||
#define FIRE_IMMUNITY_MAX_TEMP_PROTECT 35000 //what max_heat_protection_temperature is set to for firesuit quality suits and helmets. MUST NOT BE 0.
|
||||
|
||||
#define HELMET_MIN_TEMP_PROTECT 160 //For normal helmets
|
||||
#define HELMET_MAX_TEMP_PROTECT 600 //For normal helmets
|
||||
#define ARMOR_MIN_TEMP_PROTECT 160 //For armor
|
||||
#define ARMOR_MAX_TEMP_PROTECT 600 //For armor
|
||||
|
||||
#define GLOVES_MIN_TEMP_PROTECT 2.0 //For some gloves (black and)
|
||||
#define GLOVES_MAX_TEMP_PROTECT 1500 //For some gloves
|
||||
#define SHOES_MIN_TEMP_PROTECT 2.0 //For gloves
|
||||
#define SHOES_MAX_TEMP_PROTECT 1500 //For gloves
|
||||
|
||||
#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
|
||||
#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8.
|
||||
#define LOW_PRESSURE_DAMAGE 8 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
|
||||
|
||||
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
|
||||
|
||||
//PIPES
|
||||
//Atmos pipe limits
|
||||
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
|
||||
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
|
||||
|
||||
//used for device_type vars
|
||||
#define UNARY 1
|
||||
#define BINARY 2
|
||||
#define TRINARY 3
|
||||
#define QUATERNARY 4
|
||||
|
||||
//TANKS
|
||||
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
|
||||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
||||
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
|
||||
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
|
||||
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 16
|
||||
|
||||
//CANATMOSPASS
|
||||
#define ATMOS_PASS_YES 1
|
||||
#define ATMOS_PASS_NO 0
|
||||
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
|
||||
#define ATMOS_PASS_DENSITY -2 //just check density
|
||||
|
||||
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
|
||||
#define CANVERTICALATMOSPASS(A, O) ( A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : ( A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical ) )
|
||||
|
||||
//OPEN TURF ATMOS
|
||||
#define OPENTURF_DEFAULT_ATMOS "o2=22;n2=82;TEMP=293.15" //the default air mix that open turfs spawn
|
||||
#define TCOMMS_ATMOS "n2=100;TEMP=80" //-193,15°C telecommunications. also used for xenobiology slime killrooms
|
||||
#define AIRLESS_ATMOS "TEMP=2.7" //space
|
||||
#define FROZEN_ATMOS "o2=22;n2=82;TEMP=180" //-93.15°C snow and ice turfs
|
||||
#define BURNMIX_ATMOS "o2=2500;plasma=5000;TEMP=370" //used in the holodeck burn test program
|
||||
|
||||
//ATMOSPHERICS DEPARTMENT GAS TANK TURFS
|
||||
#define ATMOS_TANK_N2O "n2o=6000;TEMP=293.15"
|
||||
#define ATMOS_TANK_CO2 "co2=50000;TEMP=293.15"
|
||||
#define ATMOS_TANK_PLASMA "plasma=70000;TEMP=293.15"
|
||||
#define ATMOS_TANK_O2 "o2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_N2 "n2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_AIRMIX "o2=2644;n2=10580;TEMP=293.15"
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
|
||||
|
||||
//ATMOSIA GAS MONITOR TAGS
|
||||
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_O2 "o2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_O2 "o2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOX "tox_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOX "tox_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOX "tox_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_AIR "air_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_AIR "air_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_AIR "air_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_MIX "mix_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_MIX "mix_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_MIX "mix_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2O "n2o_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2O "n2o_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2O "n2o_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2 "n2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2 "n2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2 "n2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_CO2 "co2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_CO2 "co2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_CO2 "co2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_INCINERATOR "incinerator_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR "incinerator_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_INCINERATOR "incinerator_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB "toxinslab_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB "toxinslab_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB "toxinslab_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION "distro-loop_meter"
|
||||
#define ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE "atmos-waste_loop_meter"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ENGINE "engine-waste_out"
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ATMOS "atmos-waste_out"
|
||||
|
||||
//AIRLOCK CONTROLLER TAGS
|
||||
|
||||
//RnD toxins burn chamber
|
||||
#define INCINERATOR_TOXMIX_IGNITER "toxmix_igniter"
|
||||
#define INCINERATOR_TOXMIX_VENT "toxmix_vent"
|
||||
#define INCINERATOR_TOXMIX_DP_VENTPUMP "toxmix_airlock_pump"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_SENSOR "toxmix_airlock_sensor"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_CONTROLLER "toxmix_airlock_controller"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_INTERIOR "toxmix_airlock_interior"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_EXTERIOR "toxmix_airlock_exterior"
|
||||
|
||||
//Atmospherics/maintenance incinerator
|
||||
#define INCINERATOR_ATMOS_IGNITER "atmos_incinerator_igniter"
|
||||
#define INCINERATOR_ATMOS_MAINVENT "atmos_incinerator_mainvent"
|
||||
#define INCINERATOR_ATMOS_AUXVENT "atmos_incinerator_auxvent"
|
||||
#define INCINERATOR_ATMOS_DP_VENTPUMP "atmos_incinerator_airlock_pump"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_SENSOR "atmos_incinerator_airlock_sensor"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_CONTROLLER "atmos_incinerator_airlock_controller"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_INTERIOR "atmos_incinerator_airlock_interior"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_EXTERIOR "atmos_incinerator_airlock_exterior"
|
||||
|
||||
//Syndicate lavaland base incinerator (lavaland_surface_syndicate_base1.dmm)
|
||||
#define INCINERATOR_SYNDICATELAVA_IGNITER "syndicatelava_igniter"
|
||||
#define INCINERATOR_SYNDICATELAVA_MAINVENT "syndicatelava_mainvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_AUXVENT "syndicatelava_auxvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_DP_VENTPUMP "syndicatelava_airlock_pump"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR "syndicatelava_airlock_sensor"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER "syndicatelava_airlock_controller"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_INTERIOR "syndicatelava_airlock_interior"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_EXTERIOR "syndicatelava_airlock_exterior"
|
||||
|
||||
//MULTIPIPES
|
||||
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
|
||||
#define PIPING_LAYER_MIN 1
|
||||
#define PIPING_LAYER_MAX 3
|
||||
#define PIPING_LAYER_DEFAULT 2
|
||||
#define PIPING_LAYER_P_X 5
|
||||
#define PIPING_LAYER_P_Y 5
|
||||
#define PIPING_LAYER_LCHANGE 0.05
|
||||
|
||||
#define PIPING_ALL_LAYER (1<<0) //intended to connect with all layers, check for all instead of just one.
|
||||
#define PIPING_ONE_PER_TURF (1<<1) //can only be built if nothing else with this flag is on the tile already.
|
||||
#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT
|
||||
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
|
||||
|
||||
//HELPERS
|
||||
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
|
||||
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
|
||||
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
|
||||
|
||||
//prefer this to gas_mixture/total_moles in performance critical areas
|
||||
#define TOTAL_MOLES(cached_gases, out_var)\
|
||||
out_var = 0;\
|
||||
for(var/total_moles_id in cached_gases){\
|
||||
out_var += cached_gases[total_moles_id];\
|
||||
}
|
||||
|
||||
#ifdef TESTING
|
||||
GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
|
||||
#define CALCULATE_ADJACENT_TURFS(T) if (SSadjacent_air.queue[T]) { GLOB.atmos_adjacent_savings[1] += 1 } else { GLOB.atmos_adjacent_savings[2] += 1; SSadjacent_air.queue[T] = 1 }
|
||||
#else
|
||||
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
|
||||
#endif
|
||||
|
||||
//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance.
|
||||
#define GAS_GARBAGE_COLLECT(GASGASGAS)\
|
||||
var/list/CACHE_GAS = GASGASGAS;\
|
||||
for(var/id in CACHE_GAS){\
|
||||
if(QUANTIZE(CACHE_GAS[id]) <= 0)\
|
||||
CACHE_GAS -= id;\
|
||||
}
|
||||
|
||||
#define ARCHIVE_TEMPERATURE(gas) gas.temperature_archived = gas.temperature
|
||||
|
||||
GLOBAL_LIST_INIT(pipe_paint_colors, list(
|
||||
"amethyst" = rgb(130,43,255), //supplymain
|
||||
"blue" = rgb(0,0,255),
|
||||
"brown" = rgb(178,100,56),
|
||||
"cyan" = rgb(0,255,249),
|
||||
"dark" = rgb(69,69,69),
|
||||
"green" = rgb(30,255,0),
|
||||
"grey" = rgb(255,255,255),
|
||||
"orange" = rgb(255,129,25),
|
||||
"purple" = rgb(128,0,182),
|
||||
"red" = rgb(255,0,0),
|
||||
"violet" = rgb(64,0,128),
|
||||
"yellow" = rgb(255,198,0)
|
||||
))
|
||||
//LISTMOS
|
||||
//indices of values in gas lists.
|
||||
#define META_GAS_SPECIFIC_HEAT 1
|
||||
#define META_GAS_NAME 2
|
||||
#define META_GAS_MOLES_VISIBLE 3
|
||||
#define META_GAS_OVERLAY 4
|
||||
#define META_GAS_DANGER 5
|
||||
#define META_GAS_ID 6
|
||||
#define META_GAS_FUSION_POWER 7
|
||||
//ATMOS
|
||||
//stuff you should probably leave well alone!
|
||||
#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)
|
||||
#define ONE_ATMOSPHERE 101.325 //kPa
|
||||
#define TCMB 2.7 // -270.3degC
|
||||
#define TCRYO 225 // -48.15degC
|
||||
#define T0C 273.15 // 0degC
|
||||
#define T20C 293.15 // 20degC
|
||||
|
||||
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
|
||||
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005) //compared against for superconductivity
|
||||
#define O2STANDARD 0.21 //percentage of oxygen in a normal mixture of air
|
||||
#define N2STANDARD 0.79 //same but for nitrogen
|
||||
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
|
||||
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
|
||||
#define CELL_VOLUME 2500 //liters in a cell
|
||||
#define BREATH_VOLUME 0.5 //liters in a normal breath
|
||||
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
|
||||
|
||||
//EXCITED GROUPS
|
||||
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4 //number of FULL air controller ticks before an excited group breaks down (averages gas contents across turfs)
|
||||
#define EXCITED_GROUP_DISMANTLE_CYCLES 16 //number of FULL air controller ticks before an excited group dismantles and removes its turfs from active
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
|
||||
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
|
||||
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
|
||||
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
|
||||
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 //Minimum temperature difference before group processing is suspended
|
||||
#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 //Minimum temperature difference before the gas temperatures are just set to be equal
|
||||
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION (T20C+10)
|
||||
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION (T20C+200)
|
||||
|
||||
//HEAT TRANSFER COEFFICIENTS
|
||||
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
|
||||
//Should not exceed 0.4 else strange heat flow occur
|
||||
#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0
|
||||
#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4
|
||||
#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now
|
||||
#define HEAT_CAPACITY_VACUUM 7000 //a hack to help make vacuums "cold", sacrificing realism for gameplay
|
||||
|
||||
//FIRE
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD (150+T0C)
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST (100+T0C)
|
||||
#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
|
||||
#define MAX_TOXIC_GAS_DAMAGE 10
|
||||
#define MOLES_GAS_VISIBLE 0.25 //Moles in a standard cell after which gases are visible
|
||||
#define FACTOR_GAS_VISIBLE_MAX 20 //moles_visible * FACTOR_GAS_VISIBLE_MAX = Moles after which gas is at maximum visibility
|
||||
#define MOLES_GAS_VISIBLE_STEP 0.25 //Mole step for alpha updates. This means alpha can update at 0.25, 0.5, 0.75 and so on
|
||||
|
||||
//REACTIONS
|
||||
//return values for reactions (bitflags)
|
||||
#define NO_REACTION 0
|
||||
#define REACTING 1
|
||||
#define STOP_REACTIONS 2
|
||||
|
||||
// Pressure limits.
|
||||
#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
|
||||
#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
|
||||
#define WARNING_LOW_PRESSURE 50 //This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE)
|
||||
#define HAZARD_LOW_PRESSURE 20 //This is when the black ultra-low pressure icon is displayed. (This one is set as a constant)
|
||||
|
||||
#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount.
|
||||
|
||||
#define BODYTEMP_NORMAL 310.15 //The natural temperature for a body
|
||||
#define BODYTEMP_AUTORECOVERY_DIVISOR 11 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive.
|
||||
#define BODYTEMP_AUTORECOVERY_MINIMUM 12 //Minimum amount of kelvin moved toward 310K per tick. So long as abs(310.15 - bodytemp) is more than 50.
|
||||
#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster.
|
||||
#define BODYTEMP_HEAT_DIVISOR 15 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster.
|
||||
#define BODYTEMP_COOLING_MAX -100 //The maximum number of degrees that your body can cool in 1 tick, due to the environment, when in a cold area.
|
||||
#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, due to the environment, when in a hot area.
|
||||
|
||||
#define BODYTEMP_HEAT_DAMAGE_LIMIT (BODYTEMP_NORMAL + 20) // The limit the human body can take before it starts taking damage from heat. //CITADEL EDIT to 20
|
||||
#define BODYTEMP_COLD_DAMAGE_LIMIT (BODYTEMP_NORMAL - 50) // The limit the human body can take before it starts taking damage from coldness.
|
||||
|
||||
|
||||
#define SPACE_HELM_MIN_TEMP_PROTECT 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0.
|
||||
#define SPACE_HELM_MAX_TEMP_PROTECT 1500 //Thermal insulation works both ways /Malkevin
|
||||
#define SPACE_SUIT_MIN_TEMP_PROTECT 2.0 //what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0.
|
||||
#define SPACE_SUIT_MAX_TEMP_PROTECT 1500
|
||||
|
||||
#define FIRE_SUIT_MIN_TEMP_PROTECT 60 //Cold protection for firesuits
|
||||
#define FIRE_SUIT_MAX_TEMP_PROTECT 30000 //what max_heat_protection_temperature is set to for firesuit quality suits. MUST NOT BE 0.
|
||||
#define FIRE_HELM_MIN_TEMP_PROTECT 60 //Cold protection for fire helmets
|
||||
#define FIRE_HELM_MAX_TEMP_PROTECT 30000 //for fire helmet quality items (red and white hardhats)
|
||||
|
||||
#define FIRE_IMMUNITY_MAX_TEMP_PROTECT 35000 //what max_heat_protection_temperature is set to for firesuit quality suits and helmets. MUST NOT BE 0.
|
||||
|
||||
#define HELMET_MIN_TEMP_PROTECT 160 //For normal helmets
|
||||
#define HELMET_MAX_TEMP_PROTECT 600 //For normal helmets
|
||||
#define ARMOR_MIN_TEMP_PROTECT 160 //For armor
|
||||
#define ARMOR_MAX_TEMP_PROTECT 600 //For armor
|
||||
|
||||
#define GLOVES_MIN_TEMP_PROTECT 2.0 //For some gloves (black and)
|
||||
#define GLOVES_MAX_TEMP_PROTECT 1500 //For some gloves
|
||||
#define SHOES_MIN_TEMP_PROTECT 2.0 //For gloves
|
||||
#define SHOES_MAX_TEMP_PROTECT 1500 //For gloves
|
||||
|
||||
#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
|
||||
#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8.
|
||||
#define LOW_PRESSURE_DAMAGE 8 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
|
||||
|
||||
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
|
||||
|
||||
//PIPES
|
||||
//Atmos pipe limits
|
||||
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
|
||||
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
|
||||
|
||||
//used for device_type vars
|
||||
#define UNARY 1
|
||||
#define BINARY 2
|
||||
#define TRINARY 3
|
||||
#define QUATERNARY 4
|
||||
|
||||
//TANKS
|
||||
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
|
||||
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
|
||||
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
|
||||
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
|
||||
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 16
|
||||
|
||||
//CANATMOSPASS
|
||||
#define ATMOS_PASS_YES 1
|
||||
#define ATMOS_PASS_NO 0
|
||||
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
|
||||
#define ATMOS_PASS_DENSITY -2 //just check density
|
||||
|
||||
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
|
||||
#define CANVERTICALATMOSPASS(A, O) ( A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : ( A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical ) )
|
||||
|
||||
//OPEN TURF ATMOS
|
||||
#define OPENTURF_DEFAULT_ATMOS "o2=22;n2=82;TEMP=293.15" //the default air mix that open turfs spawn
|
||||
#define TCOMMS_ATMOS "n2=100;TEMP=80" //-193,15°C telecommunications. also used for xenobiology slime killrooms
|
||||
#define AIRLESS_ATMOS "TEMP=2.7" //space
|
||||
#define FROZEN_ATMOS "o2=22;n2=82;TEMP=180" //-93.15°C snow and ice turfs
|
||||
#define BURNMIX_ATMOS "o2=2500;plasma=5000;TEMP=370" //used in the holodeck burn test program
|
||||
|
||||
//ATMOSPHERICS DEPARTMENT GAS TANK TURFS
|
||||
#define ATMOS_TANK_N2O "n2o=6000;TEMP=293.15"
|
||||
#define ATMOS_TANK_CO2 "co2=50000;TEMP=293.15"
|
||||
#define ATMOS_TANK_PLASMA "plasma=70000;TEMP=293.15"
|
||||
#define ATMOS_TANK_O2 "o2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_N2 "n2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_AIRMIX "o2=2644;n2=10580;TEMP=293.15"
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
|
||||
|
||||
//ATMOSIA GAS MONITOR TAGS
|
||||
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_O2 "o2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_O2 "o2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOX "tox_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOX "tox_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOX "tox_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_AIR "air_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_AIR "air_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_AIR "air_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_MIX "mix_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_MIX "mix_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_MIX "mix_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2O "n2o_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2O "n2o_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2O "n2o_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_N2 "n2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_N2 "n2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_N2 "n2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_CO2 "co2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_CO2 "co2_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_CO2 "co2_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_INCINERATOR "incinerator_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_INCINERATOR "incinerator_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_INCINERATOR "incinerator_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB "toxinslab_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_TOXINS_LAB "toxinslab_out"
|
||||
#define ATMOS_GAS_MONITOR_SENSOR_TOXINS_LAB "toxinslab_sensor"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_LOOP_DISTRIBUTION "distro-loop_meter"
|
||||
#define ATMOS_GAS_MONITOR_LOOP_ATMOS_WASTE "atmos-waste_loop_meter"
|
||||
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ENGINE "engine-waste_out"
|
||||
#define ATMOS_GAS_MONITOR_WASTE_ATMOS "atmos-waste_out"
|
||||
|
||||
//AIRLOCK CONTROLLER TAGS
|
||||
|
||||
//RnD toxins burn chamber
|
||||
#define INCINERATOR_TOXMIX_IGNITER "toxmix_igniter"
|
||||
#define INCINERATOR_TOXMIX_VENT "toxmix_vent"
|
||||
#define INCINERATOR_TOXMIX_DP_VENTPUMP "toxmix_airlock_pump"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_SENSOR "toxmix_airlock_sensor"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_CONTROLLER "toxmix_airlock_controller"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_INTERIOR "toxmix_airlock_interior"
|
||||
#define INCINERATOR_TOXMIX_AIRLOCK_EXTERIOR "toxmix_airlock_exterior"
|
||||
|
||||
//Atmospherics/maintenance incinerator
|
||||
#define INCINERATOR_ATMOS_IGNITER "atmos_incinerator_igniter"
|
||||
#define INCINERATOR_ATMOS_MAINVENT "atmos_incinerator_mainvent"
|
||||
#define INCINERATOR_ATMOS_AUXVENT "atmos_incinerator_auxvent"
|
||||
#define INCINERATOR_ATMOS_DP_VENTPUMP "atmos_incinerator_airlock_pump"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_SENSOR "atmos_incinerator_airlock_sensor"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_CONTROLLER "atmos_incinerator_airlock_controller"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_INTERIOR "atmos_incinerator_airlock_interior"
|
||||
#define INCINERATOR_ATMOS_AIRLOCK_EXTERIOR "atmos_incinerator_airlock_exterior"
|
||||
|
||||
//Syndicate lavaland base incinerator (lavaland_surface_syndicate_base1.dmm)
|
||||
#define INCINERATOR_SYNDICATELAVA_IGNITER "syndicatelava_igniter"
|
||||
#define INCINERATOR_SYNDICATELAVA_MAINVENT "syndicatelava_mainvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_AUXVENT "syndicatelava_auxvent"
|
||||
#define INCINERATOR_SYNDICATELAVA_DP_VENTPUMP "syndicatelava_airlock_pump"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR "syndicatelava_airlock_sensor"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER "syndicatelava_airlock_controller"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_INTERIOR "syndicatelava_airlock_interior"
|
||||
#define INCINERATOR_SYNDICATELAVA_AIRLOCK_EXTERIOR "syndicatelava_airlock_exterior"
|
||||
|
||||
//MULTIPIPES
|
||||
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
|
||||
#define PIPING_LAYER_MIN 1
|
||||
#define PIPING_LAYER_MAX 3
|
||||
#define PIPING_LAYER_DEFAULT 2
|
||||
#define PIPING_LAYER_P_X 5
|
||||
#define PIPING_LAYER_P_Y 5
|
||||
#define PIPING_LAYER_LCHANGE 0.05
|
||||
|
||||
#define PIPING_ALL_LAYER (1<<0) //intended to connect with all layers, check for all instead of just one.
|
||||
#define PIPING_ONE_PER_TURF (1<<1) //can only be built if nothing else with this flag is on the tile already.
|
||||
#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT
|
||||
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
|
||||
|
||||
//HELPERS
|
||||
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
|
||||
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
|
||||
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
|
||||
|
||||
//prefer this to gas_mixture/total_moles in performance critical areas
|
||||
#define TOTAL_MOLES(cached_gases, out_var)\
|
||||
out_var = 0;\
|
||||
for(var/total_moles_id in cached_gases){\
|
||||
out_var += cached_gases[total_moles_id];\
|
||||
}
|
||||
|
||||
#ifdef TESTING
|
||||
GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
|
||||
#define CALCULATE_ADJACENT_TURFS(T) if (SSadjacent_air.queue[T]) { GLOB.atmos_adjacent_savings[1] += 1 } else { GLOB.atmos_adjacent_savings[2] += 1; SSadjacent_air.queue[T] = 1 }
|
||||
#else
|
||||
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
|
||||
#endif
|
||||
|
||||
//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance.
|
||||
#define GAS_GARBAGE_COLLECT(GASGASGAS)\
|
||||
var/list/CACHE_GAS = GASGASGAS;\
|
||||
for(var/id in CACHE_GAS){\
|
||||
if(QUANTIZE(CACHE_GAS[id]) <= 0)\
|
||||
CACHE_GAS -= id;\
|
||||
}
|
||||
|
||||
#define ARCHIVE_TEMPERATURE(gas) gas.temperature_archived = gas.temperature
|
||||
|
||||
GLOBAL_LIST_INIT(pipe_paint_colors, list(
|
||||
"amethyst" = rgb(130,43,255), //supplymain
|
||||
"blue" = rgb(0,0,255),
|
||||
"brown" = rgb(178,100,56),
|
||||
"cyan" = rgb(0,255,249),
|
||||
"dark" = rgb(69,69,69),
|
||||
"green" = rgb(30,255,0),
|
||||
"grey" = rgb(255,255,255),
|
||||
"orange" = rgb(255,129,25),
|
||||
"purple" = rgb(128,0,182),
|
||||
"red" = rgb(255,0,0),
|
||||
"violet" = rgb(64,0,128),
|
||||
"yellow" = rgb(255,198,0)
|
||||
))
|
||||
|
||||
@@ -109,8 +109,16 @@
|
||||
#define MEDIHOUND_SLEEPER (1<<0)
|
||||
#define EATING_NOISES (1<<1)
|
||||
#define DIGESTION_NOISES (1<<2)
|
||||
#define BREAST_ENLARGEMENT (1<<3)
|
||||
#define PENIS_ENLARGEMENT (1<<4)
|
||||
#define FORCED_FEM (1<<5)
|
||||
#define FORCED_MASC (1<<6)
|
||||
#define HYPNO (1<<7)
|
||||
#define NEVER_HYPNO (1<<8)
|
||||
#define NO_APHRO (1<<9)
|
||||
#define NO_ASS_SLAP (1<<10)
|
||||
|
||||
#define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES)
|
||||
#define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES|BREAST_ENLARGEMENT|PENIS_ENLARGEMENT)
|
||||
|
||||
//component stuff
|
||||
#define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode)
|
||||
|
||||
@@ -1,198 +1,199 @@
|
||||
/*ALL DEFINES RELATED TO COMBAT GO HERE*/
|
||||
|
||||
//Damage and status effect defines
|
||||
|
||||
//Damage defines //TODO: merge these down to reduce on defines
|
||||
#define BRUTE "brute"
|
||||
#define BURN "fire"
|
||||
#define TOX "tox"
|
||||
#define OXY "oxy"
|
||||
#define CLONE "clone"
|
||||
#define STAMINA "stamina"
|
||||
#define BRAIN "brain"
|
||||
|
||||
//bitflag damage defines used for suicide_act
|
||||
#define BRUTELOSS (1<<0)
|
||||
#define FIRELOSS (1<<1)
|
||||
#define TOXLOSS (1<<2)
|
||||
#define OXYLOSS (1<<3)
|
||||
#define SHAME (1<<4)
|
||||
#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing.
|
||||
|
||||
#define EFFECT_STUN "stun"
|
||||
#define EFFECT_KNOCKDOWN "knockdown"
|
||||
#define EFFECT_UNCONSCIOUS "unconscious"
|
||||
#define EFFECT_IRRADIATE "irradiate"
|
||||
#define EFFECT_STUTTER "stutter"
|
||||
#define EFFECT_SLUR "slur"
|
||||
#define EFFECT_EYE_BLUR "eye_blur"
|
||||
#define EFFECT_DROWSY "drowsy"
|
||||
#define EFFECT_JITTER "jitter"
|
||||
|
||||
//Bitflags defining which status effects could be or are inflicted on a mob
|
||||
#define CANSTUN (1<<0)
|
||||
#define CANKNOCKDOWN (1<<1)
|
||||
#define CANUNCONSCIOUS (1<<2)
|
||||
#define CANPUSH (1<<3)
|
||||
#define GODMODE (1<<4)
|
||||
|
||||
//Health Defines
|
||||
#define HEALTH_THRESHOLD_CRIT 0
|
||||
#define HEALTH_THRESHOLD_FULLCRIT -30
|
||||
#define HEALTH_THRESHOLD_DEAD -100
|
||||
|
||||
//Actual combat defines
|
||||
|
||||
//click cooldowns, in tenths of a second, used for various combat actions
|
||||
#define CLICK_CD_MELEE 8
|
||||
#define CLICK_CD_RANGE 4
|
||||
#define CLICK_CD_RAPID 2
|
||||
#define CLICK_CD_CLICK_ABILITY 6
|
||||
#define CLICK_CD_BREAKOUT 100
|
||||
#define CLICK_CD_HANDCUFFED 10
|
||||
#define CLICK_CD_RESIST 20
|
||||
#define CLICK_CD_GRABBING 10
|
||||
|
||||
//Cuff resist speeds
|
||||
#define FAST_CUFFBREAK 1
|
||||
#define INSTANT_CUFFBREAK 2
|
||||
|
||||
//Grab levels
|
||||
#define GRAB_PASSIVE 0
|
||||
#define GRAB_AGGRESSIVE 1
|
||||
#define GRAB_NECK 2
|
||||
#define GRAB_KILL 3
|
||||
|
||||
//slowdown when in softcrit
|
||||
#define SOFTCRIT_ADD_SLOWDOWN 6
|
||||
|
||||
//Attack types for checking shields/hit reactions
|
||||
#define MELEE_ATTACK 1
|
||||
#define UNARMED_ATTACK 2
|
||||
#define PROJECTILE_ATTACK 3
|
||||
#define THROWN_PROJECTILE_ATTACK 4
|
||||
#define LEAP_ATTACK 5
|
||||
|
||||
//attack visual effects
|
||||
#define ATTACK_EFFECT_PUNCH "punch"
|
||||
#define ATTACK_EFFECT_KICK "kick"
|
||||
#define ATTACK_EFFECT_SMASH "smash"
|
||||
#define ATTACK_EFFECT_CLAW "claw"
|
||||
#define ATTACK_EFFECT_DISARM "disarm"
|
||||
#define ATTACK_EFFECT_ASS_SLAP "ass_slap"
|
||||
#define ATTACK_EFFECT_FACE_SLAP "face_slap"
|
||||
#define ATTACK_EFFECT_BITE "bite"
|
||||
#define ATTACK_EFFECT_MECHFIRE "mech_fire"
|
||||
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
|
||||
#define ATTACK_EFFECT_BOOP "boop" //Honk
|
||||
|
||||
//intent defines
|
||||
#define INTENT_HELP "help"
|
||||
#define INTENT_GRAB "grab"
|
||||
#define INTENT_DISARM "disarm"
|
||||
#define INTENT_HARM "harm"
|
||||
//NOTE: INTENT_HOTKEY_* defines are not actual intents!
|
||||
//they are here to support hotkeys
|
||||
#define INTENT_HOTKEY_LEFT "left"
|
||||
#define INTENT_HOTKEY_RIGHT "right"
|
||||
|
||||
//the define for visible message range in combat
|
||||
#define COMBAT_MESSAGE_RANGE 3
|
||||
#define DEFAULT_MESSAGE_RANGE 7
|
||||
|
||||
//Shove knockdown lengths (deciseconds)
|
||||
#define SHOVE_KNOCKDOWN_SOLID 30
|
||||
#define SHOVE_KNOCKDOWN_HUMAN 30
|
||||
#define SHOVE_KNOCKDOWN_TABLE 30
|
||||
#define SHOVE_KNOCKDOWN_COLLATERAL 10
|
||||
//for the shove slowdown, see __DEFINES/movespeed_modification.dm
|
||||
#define SHOVE_SLOWDOWN_LENGTH 30
|
||||
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
|
||||
//Shove disarming item list
|
||||
GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
|
||||
/obj/item/gun)))
|
||||
|
||||
|
||||
//Combat object defines
|
||||
|
||||
//Embedded objects
|
||||
#define EMBEDDED_PAIN_CHANCE 15 //Chance for embedded objects to cause pain (damage user)
|
||||
#define EMBEDDED_ITEM_FALLOUT 5 //Chance for embedded object to fall out (causing pain but removing the object)
|
||||
#define EMBED_CHANCE 45 //Chance for an object to embed into somebody when thrown (if it's sharp)
|
||||
#define EMBEDDED_PAIN_MULTIPLIER 2 //Coefficient of multiplication for the damage the item does while embedded (this*item.w_class)
|
||||
#define EMBEDDED_FALL_PAIN_MULTIPLIER 5 //Coefficient of multiplication for the damage the item does when it falls out (this*item.w_class)
|
||||
#define EMBEDDED_IMPACT_PAIN_MULTIPLIER 4 //Coefficient of multiplication for the damage the item does when it first embeds (this*item.w_class)
|
||||
#define EMBED_THROWSPEED_THRESHOLD 4 //The minimum value of an item's throw_speed for it to embed (Unless it has embedded_ignore_throwspeed_threshold set to 1)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_TIME 150 //A Time in ticks, total removal time = (this/item.w_class)
|
||||
|
||||
//Gun weapon weight
|
||||
#define WEAPON_LIGHT 1
|
||||
#define WEAPON_MEDIUM 2
|
||||
#define WEAPON_HEAVY 3
|
||||
//Gun trigger guards
|
||||
#define TRIGGER_GUARD_ALLOW_ALL -1
|
||||
#define TRIGGER_GUARD_NONE 0
|
||||
#define TRIGGER_GUARD_NORMAL 1
|
||||
//E-gun self-recharge values
|
||||
#define EGUN_NO_SELFCHARGE 0
|
||||
#define EGUN_SELFCHARGE 1
|
||||
#define EGUN_SELFCHARGE_BORG 2
|
||||
|
||||
//Object/Item sharpness
|
||||
#define IS_BLUNT 0
|
||||
#define IS_SHARP 1
|
||||
#define IS_SHARP_ACCURATE 2
|
||||
|
||||
//His Grace.
|
||||
#define HIS_GRACE_SATIATED 0 //He hungers not. If bloodthirst is set to this, His Grace is asleep.
|
||||
#define HIS_GRACE_PECKISH 20 //Slightly hungry.
|
||||
#define HIS_GRACE_HUNGRY 60 //Getting closer. Increases damage up to a minimum of 20.
|
||||
#define HIS_GRACE_FAMISHED 100 //Dangerous. Increases damage up to a minimum of 25 and cannot be dropped.
|
||||
#define HIS_GRACE_STARVING 120 //Incredibly close to breaking loose. Increases damage up to a minimum of 30.
|
||||
#define HIS_GRACE_CONSUME_OWNER 140 //His Grace consumes His owner at this point and becomes aggressive.
|
||||
#define HIS_GRACE_FALL_ASLEEP 160 //If it reaches this point, He falls asleep and resets.
|
||||
|
||||
#define HIS_GRACE_FORCE_BONUS 4 //How much force is gained per kill.
|
||||
|
||||
#define EXPLODE_NONE 0 //Don't even ask me why we need this.
|
||||
#define EXPLODE_DEVASTATE 1
|
||||
#define EXPLODE_HEAVY 2
|
||||
#define EXPLODE_LIGHT 3
|
||||
|
||||
#define EMP_HEAVY 1
|
||||
#define EMP_LIGHT 2
|
||||
|
||||
#define GRENADE_CLUMSY_FUMBLE 1
|
||||
#define GRENADE_NONCLUMSY_FUMBLE 2
|
||||
#define GRENADE_NO_FUMBLE 3
|
||||
|
||||
#define BODY_ZONE_HEAD "head"
|
||||
#define BODY_ZONE_CHEST "chest"
|
||||
#define BODY_ZONE_L_ARM "l_arm"
|
||||
#define BODY_ZONE_R_ARM "r_arm"
|
||||
#define BODY_ZONE_L_LEG "l_leg"
|
||||
#define BODY_ZONE_R_LEG "r_leg"
|
||||
|
||||
#define BODY_ZONE_PRECISE_EYES "eyes"
|
||||
#define BODY_ZONE_PRECISE_MOUTH "mouth"
|
||||
#define BODY_ZONE_PRECISE_GROIN "groin"
|
||||
#define BODY_ZONE_PRECISE_L_HAND "l_hand"
|
||||
#define BODY_ZONE_PRECISE_R_HAND "r_hand"
|
||||
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
|
||||
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
|
||||
|
||||
//We will round to this value in damage calculations.
|
||||
#define DAMAGE_PRECISION 0.1
|
||||
|
||||
//items total mass, used to calculate their attacks' stamina costs. If not defined, the cost will be (w_class * 1.25)
|
||||
#define TOTAL_MASS_TINY_ITEM 1.25
|
||||
#define TOTAL_MASS_SMALL_ITEM 2.5
|
||||
#define TOTAL_MASS_NORMAL_ITEM 3.75
|
||||
#define TOTAL_MASS_BULKY_ITEM 5
|
||||
#define TOTAL_MASS_HUGE_ITEM 6.25
|
||||
#define TOTAL_MASS_GIGANTIC_ITEM 7.5
|
||||
|
||||
#define TOTAL_MASS_HAND_REPLACEMENT 5 //standard punching stamina cost. most hand replacements are huge items anyway.
|
||||
#define TOTAL_MASS_MEDIEVAL_WEAPON 3.6 //very, very generic average sword/warpick/etc. weight in pounds.
|
||||
#define TOTAL_MASS_TOY_SWORD 1.5
|
||||
/*ALL DEFINES RELATED TO COMBAT GO HERE*/
|
||||
|
||||
//Damage and status effect defines
|
||||
|
||||
//Damage defines //TODO: merge these down to reduce on defines
|
||||
#define BRUTE "brute"
|
||||
#define BURN "fire"
|
||||
#define TOX "tox"
|
||||
#define OXY "oxy"
|
||||
#define CLONE "clone"
|
||||
#define STAMINA "stamina"
|
||||
#define BRAIN "brain"
|
||||
|
||||
//bitflag damage defines used for suicide_act
|
||||
#define BRUTELOSS (1<<0)
|
||||
#define FIRELOSS (1<<1)
|
||||
#define TOXLOSS (1<<2)
|
||||
#define OXYLOSS (1<<3)
|
||||
#define SHAME (1<<4)
|
||||
#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing.
|
||||
|
||||
#define EFFECT_STUN "stun"
|
||||
#define EFFECT_KNOCKDOWN "knockdown"
|
||||
#define EFFECT_UNCONSCIOUS "unconscious"
|
||||
#define EFFECT_IRRADIATE "irradiate"
|
||||
#define EFFECT_STUTTER "stutter"
|
||||
#define EFFECT_SLUR "slur"
|
||||
#define EFFECT_EYE_BLUR "eye_blur"
|
||||
#define EFFECT_DROWSY "drowsy"
|
||||
#define EFFECT_JITTER "jitter"
|
||||
|
||||
//Bitflags defining which status effects could be or are inflicted on a mob
|
||||
#define CANSTUN (1<<0)
|
||||
#define CANKNOCKDOWN (1<<1)
|
||||
#define CANUNCONSCIOUS (1<<2)
|
||||
#define CANPUSH (1<<3)
|
||||
#define GODMODE (1<<4)
|
||||
|
||||
//Health Defines
|
||||
#define HEALTH_THRESHOLD_CRIT 0
|
||||
#define HEALTH_THRESHOLD_FULLCRIT -30
|
||||
#define HEALTH_THRESHOLD_DEAD -100
|
||||
|
||||
//Actual combat defines
|
||||
|
||||
//click cooldowns, in tenths of a second, used for various combat actions
|
||||
#define CLICK_CD_MELEE 8
|
||||
#define CLICK_CD_RANGE 4
|
||||
#define CLICK_CD_RAPID 2
|
||||
#define CLICK_CD_CLICK_ABILITY 6
|
||||
#define CLICK_CD_BREAKOUT 100
|
||||
#define CLICK_CD_HANDCUFFED 10
|
||||
#define CLICK_CD_RESIST 20
|
||||
#define CLICK_CD_GRABBING 10
|
||||
|
||||
//Cuff resist speeds
|
||||
#define FAST_CUFFBREAK 1
|
||||
#define INSTANT_CUFFBREAK 2
|
||||
|
||||
//Grab levels
|
||||
#define GRAB_PASSIVE 0
|
||||
#define GRAB_AGGRESSIVE 1
|
||||
#define GRAB_NECK 2
|
||||
#define GRAB_KILL 3
|
||||
|
||||
//slowdown when in softcrit
|
||||
#define SOFTCRIT_ADD_SLOWDOWN 6
|
||||
|
||||
//Attack types for checking shields/hit reactions
|
||||
#define MELEE_ATTACK 1
|
||||
#define UNARMED_ATTACK 2
|
||||
#define PROJECTILE_ATTACK 3
|
||||
#define THROWN_PROJECTILE_ATTACK 4
|
||||
#define LEAP_ATTACK 5
|
||||
|
||||
//attack visual effects
|
||||
#define ATTACK_EFFECT_PUNCH "punch"
|
||||
#define ATTACK_EFFECT_KICK "kick"
|
||||
#define ATTACK_EFFECT_SMASH "smash"
|
||||
#define ATTACK_EFFECT_CLAW "claw"
|
||||
#define ATTACK_EFFECT_DISARM "disarm"
|
||||
#define ATTACK_EFFECT_ASS_SLAP "ass_slap"
|
||||
#define ATTACK_EFFECT_FACE_SLAP "face_slap"
|
||||
#define ATTACK_EFFECT_BITE "bite"
|
||||
#define ATTACK_EFFECT_MECHFIRE "mech_fire"
|
||||
#define ATTACK_EFFECT_MECHTOXIN "mech_toxin"
|
||||
#define ATTACK_EFFECT_BOOP "boop" //Honk
|
||||
|
||||
//intent defines
|
||||
#define INTENT_HELP "help"
|
||||
#define INTENT_GRAB "grab"
|
||||
#define INTENT_DISARM "disarm"
|
||||
#define INTENT_HARM "harm"
|
||||
//NOTE: INTENT_HOTKEY_* defines are not actual intents!
|
||||
//they are here to support hotkeys
|
||||
#define INTENT_HOTKEY_LEFT "left"
|
||||
#define INTENT_HOTKEY_RIGHT "right"
|
||||
|
||||
//the define for visible message range in combat
|
||||
#define COMBAT_MESSAGE_RANGE 3
|
||||
#define DEFAULT_MESSAGE_RANGE 7
|
||||
|
||||
//Shove knockdown lengths (deciseconds)
|
||||
#define SHOVE_KNOCKDOWN_SOLID 30
|
||||
#define SHOVE_KNOCKDOWN_HUMAN 30
|
||||
#define SHOVE_KNOCKDOWN_TABLE 30
|
||||
#define SHOVE_KNOCKDOWN_COLLATERAL 10
|
||||
//for the shove slowdown, see __DEFINES/movespeed_modification.dm
|
||||
#define SHOVE_SLOWDOWN_LENGTH 30
|
||||
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
|
||||
//Shove disarming item list
|
||||
GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
|
||||
/obj/item/gun)))
|
||||
|
||||
|
||||
//Combat object defines
|
||||
|
||||
//Embedded objects
|
||||
#define EMBEDDED_PAIN_CHANCE 15 //Chance for embedded objects to cause pain (damage user)
|
||||
#define EMBEDDED_ITEM_FALLOUT 5 //Chance for embedded object to fall out (causing pain but removing the object)
|
||||
#define EMBED_CHANCE 45 //Chance for an object to embed into somebody when thrown (if it's sharp)
|
||||
#define EMBEDDED_PAIN_MULTIPLIER 2 //Coefficient of multiplication for the damage the item does while embedded (this*item.w_class)
|
||||
#define EMBEDDED_FALL_PAIN_MULTIPLIER 5 //Coefficient of multiplication for the damage the item does when it falls out (this*item.w_class)
|
||||
#define EMBEDDED_IMPACT_PAIN_MULTIPLIER 4 //Coefficient of multiplication for the damage the item does when it first embeds (this*item.w_class)
|
||||
#define EMBED_THROWSPEED_THRESHOLD 4 //The minimum value of an item's throw_speed for it to embed (Unless it has embedded_ignore_throwspeed_threshold set to 1)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class)
|
||||
#define EMBEDDED_UNSAFE_REMOVAL_TIME 150 //A Time in ticks, total removal time = (this/item.w_class)
|
||||
|
||||
//Gun weapon weight
|
||||
#define WEAPON_LIGHT 1
|
||||
#define WEAPON_MEDIUM 2
|
||||
#define WEAPON_HEAVY 3
|
||||
//Gun trigger guards
|
||||
#define TRIGGER_GUARD_ALLOW_ALL -1
|
||||
#define TRIGGER_GUARD_NONE 0
|
||||
#define TRIGGER_GUARD_NORMAL 1
|
||||
//E-gun self-recharge values
|
||||
#define EGUN_NO_SELFCHARGE 0
|
||||
#define EGUN_SELFCHARGE 1
|
||||
#define EGUN_SELFCHARGE_BORG 2
|
||||
|
||||
//Object/Item sharpness
|
||||
#define IS_BLUNT 0
|
||||
#define IS_SHARP 1
|
||||
#define IS_SHARP_ACCURATE 2
|
||||
|
||||
//His Grace.
|
||||
#define HIS_GRACE_SATIATED 0 //He hungers not. If bloodthirst is set to this, His Grace is asleep.
|
||||
#define HIS_GRACE_PECKISH 20 //Slightly hungry.
|
||||
#define HIS_GRACE_HUNGRY 60 //Getting closer. Increases damage up to a minimum of 20.
|
||||
#define HIS_GRACE_FAMISHED 100 //Dangerous. Increases damage up to a minimum of 25 and cannot be dropped.
|
||||
#define HIS_GRACE_STARVING 120 //Incredibly close to breaking loose. Increases damage up to a minimum of 30.
|
||||
#define HIS_GRACE_CONSUME_OWNER 140 //His Grace consumes His owner at this point and becomes aggressive.
|
||||
#define HIS_GRACE_FALL_ASLEEP 160 //If it reaches this point, He falls asleep and resets.
|
||||
|
||||
#define HIS_GRACE_FORCE_BONUS 4 //How much force is gained per kill.
|
||||
|
||||
#define EXPLODE_NONE 0 //Don't even ask me why we need this.
|
||||
#define EXPLODE_DEVASTATE 1
|
||||
#define EXPLODE_HEAVY 2
|
||||
#define EXPLODE_LIGHT 3
|
||||
#define EXPLODE_GIB_THRESHOLD 50
|
||||
|
||||
#define EMP_HEAVY 1
|
||||
#define EMP_LIGHT 2
|
||||
|
||||
#define GRENADE_CLUMSY_FUMBLE 1
|
||||
#define GRENADE_NONCLUMSY_FUMBLE 2
|
||||
#define GRENADE_NO_FUMBLE 3
|
||||
|
||||
#define BODY_ZONE_HEAD "head"
|
||||
#define BODY_ZONE_CHEST "chest"
|
||||
#define BODY_ZONE_L_ARM "l_arm"
|
||||
#define BODY_ZONE_R_ARM "r_arm"
|
||||
#define BODY_ZONE_L_LEG "l_leg"
|
||||
#define BODY_ZONE_R_LEG "r_leg"
|
||||
|
||||
#define BODY_ZONE_PRECISE_EYES "eyes"
|
||||
#define BODY_ZONE_PRECISE_MOUTH "mouth"
|
||||
#define BODY_ZONE_PRECISE_GROIN "groin"
|
||||
#define BODY_ZONE_PRECISE_L_HAND "l_hand"
|
||||
#define BODY_ZONE_PRECISE_R_HAND "r_hand"
|
||||
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
|
||||
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
|
||||
|
||||
//We will round to this value in damage calculations.
|
||||
#define DAMAGE_PRECISION 0.1
|
||||
|
||||
//items total mass, used to calculate their attacks' stamina costs. If not defined, the cost will be (w_class * 1.25)
|
||||
#define TOTAL_MASS_TINY_ITEM 1.25
|
||||
#define TOTAL_MASS_SMALL_ITEM 2.5
|
||||
#define TOTAL_MASS_NORMAL_ITEM 3.75
|
||||
#define TOTAL_MASS_BULKY_ITEM 5
|
||||
#define TOTAL_MASS_HUGE_ITEM 6.25
|
||||
#define TOTAL_MASS_GIGANTIC_ITEM 7.5
|
||||
|
||||
#define TOTAL_MASS_HAND_REPLACEMENT 5 //standard punching stamina cost. most hand replacements are huge items anyway.
|
||||
#define TOTAL_MASS_MEDIEVAL_WEAPON 3.6 //very, very generic average sword/warpick/etc. weight in pounds.
|
||||
#define TOTAL_MASS_TOY_SWORD 1.5
|
||||
|
||||
@@ -1,347 +1,348 @@
|
||||
#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) )
|
||||
|
||||
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
|
||||
|
||||
#define COMPONENT_INCOMPATIBLE 1
|
||||
#define COMPONENT_NOTRANSFER 2
|
||||
|
||||
#define ELEMENT_INCOMPATIBLE 1 // Return value to cancel attaching
|
||||
|
||||
// /datum/element flags
|
||||
/// Causes the detach proc to be called when the host object is being deleted
|
||||
#define ELEMENT_DETACH (1 << 0)
|
||||
/**
|
||||
* Only elements created with the same arguments given after `id_arg_index` share an element instance
|
||||
* The arguments are the same when the text and number values are the same and all other values have the same ref
|
||||
*/
|
||||
#define ELEMENT_BESPOKE (1 << 1)
|
||||
|
||||
// How multiple components of the exact same type are handled in the same datum
|
||||
|
||||
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
|
||||
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
|
||||
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
|
||||
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new
|
||||
|
||||
// All signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
// All signals send the source datum of the signal as the first argument
|
||||
|
||||
// global signals
|
||||
// These are signals which can be listened to by any component on any parent
|
||||
// start global signals with "!", this used to be necessary but now it's just a formatting choice
|
||||
#define COMSIG_GLOB_NEW_Z "!new_z" //from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
|
||||
#define COMSIG_GLOB_VAR_EDIT "!var_edit" //called after a successful var edit somewhere in the world: (list/args)
|
||||
#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" //global living say plug - use sparingly: (mob/speaker , message)
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
// /datum signals
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //sent to the new datum parent when a component is added to them: (/datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //sent to the datum parent before a component is removed from them because of RemoveComponent: (/datum/component)
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent" //sent to the component itself when unregistered from a parent
|
||||
#define COMSIG_COMPONENT_REGISTER_PARENT "component_register_parent" //sent to the component itself when registered to a parent
|
||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting" //just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
||||
|
||||
// /atom signals
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
|
||||
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
|
||||
//Positions for overrides list
|
||||
#define EXAMINE_POSITION_ARTICLE 1
|
||||
#define EXAMINE_POSITION_BEFORE 2
|
||||
//End positions
|
||||
#define COMPONENT_EXNAME_CHANGED 1
|
||||
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): ()
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
|
||||
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
|
||||
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays)
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
|
||||
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
|
||||
#define COMPONENT_ATOM_BLOCK_EXIT 1
|
||||
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
|
||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity)
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
|
||||
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
|
||||
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
|
||||
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
|
||||
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" //from base of atom/has_gravity(): (turf/location, list/forced_gravities)
|
||||
#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" //from proc/get_rad_contents(): ()
|
||||
#define COMPONENT_BLOCK_RADIATION 1
|
||||
#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" //from base of datum/radiation_wave/radiate(): (strength)
|
||||
#define COMPONENT_BLOCK_CONTAMINATION 1
|
||||
#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" //from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width)
|
||||
#define COMPONENT_RAD_WAVE_HANDLED 1
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMPONENT_BLOCK_REACH 1
|
||||
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin, turf/destination)
|
||||
#define COMPONENT_BLOCK_TELEPORT 1
|
||||
#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" //called when an atom with HEAR_1 is added to the hearers on /proc/get_hearers_in_view(): (list/processing_list, list/hearers)
|
||||
/////////////////
|
||||
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
|
||||
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
|
||||
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
|
||||
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
|
||||
//This signal return value bitflags can be found in __DEFINES/misc.dm
|
||||
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" //called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
|
||||
|
||||
|
||||
/////////////////
|
||||
|
||||
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
|
||||
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
|
||||
|
||||
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params, mob/user)
|
||||
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
|
||||
#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
|
||||
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user)
|
||||
#define COMPONENT_NO_MOUSEDROP 1
|
||||
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user)
|
||||
|
||||
// /area signals
|
||||
#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M)
|
||||
#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M)
|
||||
|
||||
// /turf signals
|
||||
#define COMSIG_TURF_CHANGE "turf_change" //from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
|
||||
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" //from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
|
||||
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSS "movable_cross" //from base of atom/movable/Cross(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_UNCROSS "movable_uncross" //from base of atom/movable/Uncross(): (/atom/movable)
|
||||
#define COMPONENT_MOVABLE_BLOCK_UNCROSS 1
|
||||
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" //from base of atom/movable/Uncrossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_BUMP "movable_bump" //from base of atom/movable/Bump(): (/atom)
|
||||
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
|
||||
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" //from base of mob/living/hitby(): (mob/living/target, hit_zone)
|
||||
#define COMSIG_MOVABLE_BUCKLE "buckle" //from base of atom/movable/buckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" //from base of atom/movable/unbuckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw" //from base of atom/movable/throw_at(): (list/args)
|
||||
#define COMPONENT_CANCEL_THROW 1
|
||||
#define COMSIG_MOVABLE_POST_THROW "movable_post_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)
|
||||
#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" //called when the movable is placed in an unaccessible area, used for stationloving: ()
|
||||
#define COMSIG_MOVABLE_HEAR "movable_hear" //from base of atom/movable/Hear(): (message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
#define HEARING_MESSAGE 1
|
||||
#define HEARING_SPEAKER 2
|
||||
// #define HEARING_LANGUAGE 3
|
||||
#define HEARING_RAW_MESSAGE 4
|
||||
/* #define HEARING_RADIO_FREQ 5
|
||||
#define HEARING_SPANS 6
|
||||
#define HEARING_MESSAGE_MODE 7
|
||||
#define HEARING_SOURCE 8*/
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
|
||||
// /mind signals
|
||||
#define COMSIG_PRE_MIND_TRANSFER "pre_mind_transfer" //from base of mind/transfer_to() before it's done: (new_character, old_character)
|
||||
#define COMPONENT_STOP_MIND_TRANSFER 1 //stops the mind transfer from happening.
|
||||
#define COMSIG_MIND_TRANSFER "mind_transfer" //from base of mind/transfer_to() when it's done: (new_character, old_character)
|
||||
|
||||
// /mob signals
|
||||
#define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/A)
|
||||
#define COMPONENT_ALLOW_EXAMINE 1
|
||||
#define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed)
|
||||
#define COMPONENT_BLOCK_DEATH_BROADCAST 1 //stops the death from being broadcasted in deadchat.
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize(): (can_reenter_corpse, special, penalize)
|
||||
#define COMPONENT_BLOCK_GHOSTING 1
|
||||
#define COMSIG_MOB_ALLOWED "mob_allowed" //from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
|
||||
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
|
||||
#define COMPONENT_BLOCK_MAGIC 1
|
||||
#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): ()
|
||||
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of
|
||||
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user)
|
||||
#define COMPONENT_ITEM_NO_ATTACK 1
|
||||
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
|
||||
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params)
|
||||
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
|
||||
#define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_ckey(): (new_character, old_character)
|
||||
#define COMSIG_MOB_PRE_PLAYER_CHANGE "mob_pre_player_change" //sent to the target mob from base of /mob/transfer_ckey() and /mind/transfer_to(): (our_character, their_character)
|
||||
// #define COMPONENT_STOP_MIND_TRANSFER 1
|
||||
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): ()
|
||||
#define COMSIG_MOB_SAY "mob_say" // from /mob/living/say(): (proc args list)
|
||||
#define COMPONENT_UPPERCASE_SPEECH 1
|
||||
// used to access COMSIG_MOB_SAY argslist
|
||||
#define SPEECH_MESSAGE 1
|
||||
// #define SPEECH_BUBBLE_TYPE 2
|
||||
#define SPEECH_SPANS 3
|
||||
/* #define SPEECH_SANITIZE 4
|
||||
#define SPEECH_LANGUAGE 5
|
||||
#define SPEECH_IGNORE_SPAM 6
|
||||
#define SPEECH_FORCED 7 */
|
||||
|
||||
// /mob/living signals
|
||||
#define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive)
|
||||
#define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
|
||||
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
|
||||
#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living)
|
||||
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
|
||||
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
|
||||
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
||||
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK 1
|
||||
|
||||
// /obj signals
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag)
|
||||
#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value)
|
||||
|
||||
// /machinery signals
|
||||
#define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant)
|
||||
|
||||
// /obj/item signals
|
||||
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
|
||||
#define COMPONENT_NO_INTERACT 1
|
||||
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
|
||||
#define COMPONENT_NO_ATTACK_OBJ 1
|
||||
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
|
||||
#define COMPONENT_NO_ATTACK 1
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user)
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
|
||||
// /obj/item/implant signals
|
||||
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
|
||||
#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" //from base of /obj/item/implant/proc/implant(): (list/args)
|
||||
#define COMPONENT_STOP_IMPLANTING 1
|
||||
#define COMSIG_IMPLANT_OTHER "implant_other" //called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant)
|
||||
//#define COMPONENT_STOP_IMPLANTING 1 //The name makes sense for both
|
||||
#define COMPONENT_DELETE_NEW_IMPLANT 2
|
||||
#define COMPONENT_DELETE_OLD_IMPLANT 4
|
||||
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
|
||||
//This uses all return values of COMSIG_IMPLANT_OTHER
|
||||
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
|
||||
|
||||
// /obj/item/pda signals
|
||||
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
|
||||
#define COMPONENT_STOP_RINGTONE_CHANGE 1
|
||||
|
||||
// /obj/item/radio signals
|
||||
#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" //called from base of /obj/item/radio/proc/set_frequency(): (list/args)
|
||||
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/item/projectile/proc/fire(): (obj/item/projectile, atom/original_target)
|
||||
|
||||
// /mob/living/carbon/human signals
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" //from mob/living/carbon/human/UnarmedAttack(): (atom/target)
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker)
|
||||
#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)
|
||||
|
||||
// /datum/species signals
|
||||
#define COMSIG_SPECIES_GAIN "species_gain" //from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species)
|
||||
#define COMSIG_SPECIES_LOSS "species_loss" //from datum/species/on_species_loss(): (datum/species/lost_species)
|
||||
|
||||
/*******Component Specific Signals*******/
|
||||
//Janitor
|
||||
#define COMSIG_TURF_IS_WET "check_turf_wet" //(): Returns bitflags of wet values.
|
||||
#define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool.
|
||||
#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength)
|
||||
|
||||
//Blood color
|
||||
#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff
|
||||
//Food
|
||||
#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
|
||||
//Gibs
|
||||
#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
|
||||
|
||||
//Mood
|
||||
#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code.
|
||||
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code.
|
||||
#define COMSIG_MODIFY_SANITY "modify_sanity" //Called when you want to increase or decrease sanity from anywhere in the code.
|
||||
|
||||
//NTnet
|
||||
#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata))
|
||||
|
||||
//Nanites
|
||||
#define COMSIG_HAS_NANITES "has_nanites" //() returns TRUE if nanites are found
|
||||
#define COMSIG_NANITE_GET_PROGRAMS "nanite_get_programs" //(list/nanite_programs) - makes the input list a copy the nanites' program list
|
||||
#define COMSIG_NANITE_SET_VOLUME "nanite_set_volume" //(amount) Sets current nanite volume to the given amount
|
||||
#define COMSIG_NANITE_ADJUST_VOLUME "nanite_adjust" //(amount) Adjusts nanite volume by the given amount
|
||||
#define COMSIG_NANITE_SET_MAX_VOLUME "nanite_set_max_volume" //(amount) Sets maximum nanite volume to the given amount
|
||||
#define COMSIG_NANITE_SET_CLOUD "nanite_set_cloud" //(amount(0-100)) Sets cloud ID to the given amount
|
||||
#define COMSIG_NANITE_SET_SAFETY "nanite_set_safety" //(amount) Sets safety threshold to the given amount
|
||||
#define COMSIG_NANITE_SET_REGEN "nanite_set_regen" //(amount) Sets regeneration rate to the given amount
|
||||
#define COMSIG_NANITE_SIGNAL "nanite_signal" //(code(1-9999)) Called when sending a nanite signal to a mob.
|
||||
#define COMSIG_NANITE_SCAN "nanite_scan" //(mob/user, full_scan) - sends to chat a scan of the nanites to the user, returns TRUE if nanites are detected
|
||||
#define COMSIG_NANITE_UI_DATA "nanite_ui_data" //(list/data, scan_level) - adds nanite data to the given data list - made for ui_data procs
|
||||
#define COMSIG_NANITE_ADD_PROGRAM "nanite_add_program" //(datum/nanite_program/new_program, datum/nanite_program/source_program) Called when adding a program to a nanite component
|
||||
#define COMPONENT_PROGRAM_INSTALLED 1 //Installation successful
|
||||
#define COMPONENT_PROGRAM_NOT_INSTALLED 2 //Installation failed, but there are still nanites
|
||||
#define COMSIG_NANITE_SYNC "nanite_sync" //(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component
|
||||
|
||||
// /datum/component/storage signals
|
||||
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool
|
||||
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate)
|
||||
#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST!
|
||||
#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types.
|
||||
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items.
|
||||
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location.
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
|
||||
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
|
||||
|
||||
// /datum/action signals
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
|
||||
|
||||
/*******Non-Signal Component Related Defines*******/
|
||||
|
||||
//Redirection component init flags
|
||||
#define REDIRECT_TRANSFER_WITH_TURF 1
|
||||
|
||||
//Arch
|
||||
#define ARCH_PROB "probability" //Probability for each item
|
||||
#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount
|
||||
|
||||
//Ouch my toes!
|
||||
#define CALTROP_BYPASS_SHOES 1
|
||||
#define CALTROP_IGNORE_WALKERS 2
|
||||
|
||||
//Xenobio hotkeys
|
||||
#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob)
|
||||
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob)
|
||||
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" //from slime ShiftClickOn(): (/mob)
|
||||
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob)
|
||||
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob)
|
||||
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)
|
||||
#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) )
|
||||
|
||||
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
|
||||
|
||||
#define COMPONENT_INCOMPATIBLE 1
|
||||
#define COMPONENT_NOTRANSFER 2
|
||||
|
||||
#define ELEMENT_INCOMPATIBLE 1 // Return value to cancel attaching
|
||||
|
||||
// /datum/element flags
|
||||
/// Causes the detach proc to be called when the host object is being deleted
|
||||
#define ELEMENT_DETACH (1 << 0)
|
||||
/**
|
||||
* Only elements created with the same arguments given after `id_arg_index` share an element instance
|
||||
* The arguments are the same when the text and number values are the same and all other values have the same ref
|
||||
*/
|
||||
#define ELEMENT_BESPOKE (1 << 1)
|
||||
|
||||
// How multiple components of the exact same type are handled in the same datum
|
||||
|
||||
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
|
||||
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
|
||||
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
|
||||
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new
|
||||
|
||||
// All signals. Format:
|
||||
// When the signal is called: (signal arguments)
|
||||
// All signals send the source datum of the signal as the first argument
|
||||
|
||||
// global signals
|
||||
// These are signals which can be listened to by any component on any parent
|
||||
// start global signals with "!", this used to be necessary but now it's just a formatting choice
|
||||
#define COMSIG_GLOB_NEW_Z "!new_z" //from base of datum/controller/subsystem/mapping/proc/add_new_zlevel(): (list/args)
|
||||
#define COMSIG_GLOB_VAR_EDIT "!var_edit" //called after a successful var edit somewhere in the world: (list/args)
|
||||
#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special" //global living say plug - use sparingly: (mob/speaker , message)
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
// /datum signals
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //sent to the new datum parent when a component is added to them: (/datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //sent to the datum parent before a component is removed from them because of RemoveComponent: (/datum/component)
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent" //sent to the component itself when unregistered from a parent
|
||||
#define COMSIG_COMPONENT_REGISTER_PARENT "component_register_parent" //sent to the component itself when registered to a parent
|
||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting" //just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
||||
|
||||
// /atom signals
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
|
||||
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
|
||||
//Positions for overrides list
|
||||
#define EXAMINE_POSITION_ARTICLE 1
|
||||
#define EXAMINE_POSITION_BEFORE 2
|
||||
//End positions
|
||||
#define COMPONENT_EXNAME_CHANGED 1
|
||||
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): ()
|
||||
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
|
||||
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
|
||||
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays)
|
||||
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
|
||||
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
|
||||
#define COMPONENT_ATOM_BLOCK_EXIT 1
|
||||
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
|
||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity)
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
|
||||
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
|
||||
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
|
||||
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
|
||||
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" //from base of atom/has_gravity(): (turf/location, list/forced_gravities)
|
||||
#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" //from proc/get_rad_contents(): ()
|
||||
#define COMPONENT_BLOCK_RADIATION 1
|
||||
#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" //from base of datum/radiation_wave/radiate(): (strength)
|
||||
#define COMPONENT_BLOCK_CONTAMINATION 1
|
||||
#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" //from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width)
|
||||
#define COMPONENT_RAD_WAVE_HANDLED 1
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMPONENT_BLOCK_REACH 1
|
||||
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin, turf/destination)
|
||||
#define COMPONENT_BLOCK_TELEPORT 1
|
||||
#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" //called when an atom with HEAR_1 is added to the hearers on /proc/get_hearers_in_view(): (list/processing_list, list/hearers)
|
||||
/////////////////
|
||||
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
|
||||
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
|
||||
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
|
||||
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
|
||||
//This signal return value bitflags can be found in __DEFINES/misc.dm
|
||||
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" //called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
|
||||
|
||||
|
||||
/////////////////
|
||||
|
||||
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
|
||||
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
|
||||
|
||||
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params, mob/user)
|
||||
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
|
||||
#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
|
||||
#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
|
||||
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto" //from base of atom/MouseDrop(): (/atom/over, /mob/user)
|
||||
#define COMPONENT_NO_MOUSEDROP 1
|
||||
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto" //from base of atom/MouseDrop_T: (/atom/from, /mob/user)
|
||||
|
||||
// /area signals
|
||||
#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M)
|
||||
#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M)
|
||||
|
||||
// /turf signals
|
||||
#define COMSIG_TURF_CHANGE "turf_change" //from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
|
||||
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" //from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
|
||||
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSS "movable_cross" //from base of atom/movable/Cross(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_UNCROSS "movable_uncross" //from base of atom/movable/Uncross(): (/atom/movable)
|
||||
#define COMPONENT_MOVABLE_BLOCK_UNCROSS 1
|
||||
#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed" //from base of atom/movable/Uncrossed(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_BUMP "movable_bump" //from base of atom/movable/Bump(): (/atom)
|
||||
#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
|
||||
#define COMSIG_MOVABLE_IMPACT_ZONE "item_impact_zone" //from base of mob/living/hitby(): (mob/living/target, hit_zone)
|
||||
#define COMSIG_MOVABLE_BUCKLE "buckle" //from base of atom/movable/buckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_UNBUCKLE "unbuckle" //from base of atom/movable/unbuckle_mob(): (mob, force)
|
||||
#define COMSIG_MOVABLE_PRE_THROW "movable_pre_throw" //from base of atom/movable/throw_at(): (list/args)
|
||||
#define COMPONENT_CANCEL_THROW 1
|
||||
#define COMSIG_MOVABLE_POST_THROW "movable_post_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)
|
||||
#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" //called when the movable is placed in an unaccessible area, used for stationloving: ()
|
||||
#define COMSIG_MOVABLE_HEAR "movable_hear" //from base of atom/movable/Hear(): (message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
#define HEARING_MESSAGE 1
|
||||
#define HEARING_SPEAKER 2
|
||||
// #define HEARING_LANGUAGE 3
|
||||
#define HEARING_RAW_MESSAGE 4
|
||||
/* #define HEARING_RADIO_FREQ 5
|
||||
#define HEARING_SPANS 6
|
||||
#define HEARING_MESSAGE_MODE 7
|
||||
#define HEARING_SOURCE 8*/
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
|
||||
// /mind signals
|
||||
#define COMSIG_PRE_MIND_TRANSFER "pre_mind_transfer" //from base of mind/transfer_to() before it's done: (new_character, old_character)
|
||||
#define COMPONENT_STOP_MIND_TRANSFER 1 //stops the mind transfer from happening.
|
||||
#define COMSIG_MIND_TRANSFER "mind_transfer" //from base of mind/transfer_to() when it's done: (new_character, old_character)
|
||||
|
||||
// /mob signals
|
||||
#define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/A)
|
||||
#define COMPONENT_ALLOW_EXAMINE 1
|
||||
#define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed)
|
||||
#define COMPONENT_BLOCK_DEATH_BROADCAST 1 //stops the death from being broadcasted in deadchat.
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize(): (can_reenter_corpse, special, penalize)
|
||||
#define COMPONENT_BLOCK_GHOSTING 1
|
||||
#define COMSIG_MOB_ALLOWED "mob_allowed" //from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
|
||||
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
|
||||
#define COMPONENT_BLOCK_MAGIC 1
|
||||
#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): ()
|
||||
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of
|
||||
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user)
|
||||
#define COMPONENT_ITEM_NO_ATTACK 1
|
||||
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
|
||||
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params)
|
||||
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
|
||||
#define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_ckey(): (new_character, old_character)
|
||||
#define COMSIG_MOB_PRE_PLAYER_CHANGE "mob_pre_player_change" //sent to the target mob from base of /mob/transfer_ckey() and /mind/transfer_to(): (our_character, their_character)
|
||||
// #define COMPONENT_STOP_MIND_TRANSFER 1
|
||||
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): ()
|
||||
#define COMSIG_MOB_ON_NEW_MIND "mob_on_new_mind" //called when a new mind is assigned to a mob: ()
|
||||
#define COMSIG_MOB_SAY "mob_say" // from /mob/living/say(): (proc args list)
|
||||
#define COMPONENT_UPPERCASE_SPEECH 1
|
||||
// used to access COMSIG_MOB_SAY argslist
|
||||
#define SPEECH_MESSAGE 1
|
||||
// #define SPEECH_BUBBLE_TYPE 2
|
||||
#define SPEECH_SPANS 3
|
||||
/* #define SPEECH_SANITIZE 4
|
||||
#define SPEECH_LANGUAGE 5
|
||||
#define SPEECH_IGNORE_SPAM 6
|
||||
#define SPEECH_FORCED 7 */
|
||||
|
||||
// /mob/living signals
|
||||
#define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive)
|
||||
#define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
|
||||
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
|
||||
#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living)
|
||||
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
|
||||
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
|
||||
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
||||
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK 1
|
||||
|
||||
// /obj signals
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag)
|
||||
#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value)
|
||||
|
||||
// /machinery signals
|
||||
#define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant)
|
||||
|
||||
// /obj/item signals
|
||||
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
|
||||
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
|
||||
#define COMPONENT_NO_INTERACT 1
|
||||
#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
|
||||
#define COMPONENT_NO_ATTACK_OBJ 1
|
||||
#define COMSIG_ITEM_PRE_ATTACK "item_pre_attack" //from base of obj/item/pre_attack(): (atom/target, mob/user, params)
|
||||
#define COMPONENT_NO_ATTACK 1
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user)
|
||||
#define COMSIG_ITEM_PICKUP "item_pickup" //from base of obj/item/pickup(): (/mob/taker)
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
|
||||
// /obj/item/implant signals
|
||||
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
|
||||
#define COMSIG_IMPLANT_IMPLANTING "implant_implanting" //from base of /obj/item/implant/proc/implant(): (list/args)
|
||||
#define COMPONENT_STOP_IMPLANTING 1
|
||||
#define COMSIG_IMPLANT_OTHER "implant_other" //called on already installed implants when a new one is being added in /obj/item/implant/proc/implant(): (list/args, obj/item/implant/new_implant)
|
||||
//#define COMPONENT_STOP_IMPLANTING 1 //The name makes sense for both
|
||||
#define COMPONENT_DELETE_NEW_IMPLANT 2
|
||||
#define COMPONENT_DELETE_OLD_IMPLANT 4
|
||||
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
|
||||
//This uses all return values of COMSIG_IMPLANT_OTHER
|
||||
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
|
||||
|
||||
// /obj/item/pda signals
|
||||
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
|
||||
#define COMPONENT_STOP_RINGTONE_CHANGE 1
|
||||
|
||||
// /obj/item/radio signals
|
||||
#define COMSIG_RADIO_NEW_FREQUENCY "radio_new_frequency" //called from base of /obj/item/radio/proc/set_frequency(): (list/args)
|
||||
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/item/projectile/proc/fire(): (obj/item/projectile, atom/original_target)
|
||||
|
||||
// /mob/living/carbon/human signals
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" //from mob/living/carbon/human/UnarmedAttack(): (atom/target)
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker)
|
||||
#define COMSIG_HUMAN_DISARM_HIT "human_disarm_hit" //Hit by successful disarm attack (mob/living/carbon/human/attacker,zone_targeted)
|
||||
|
||||
// /datum/species signals
|
||||
#define COMSIG_SPECIES_GAIN "species_gain" //from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species)
|
||||
#define COMSIG_SPECIES_LOSS "species_loss" //from datum/species/on_species_loss(): (datum/species/lost_species)
|
||||
|
||||
/*******Component Specific Signals*******/
|
||||
//Janitor
|
||||
#define COMSIG_TURF_IS_WET "check_turf_wet" //(): Returns bitflags of wet values.
|
||||
#define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool.
|
||||
#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength)
|
||||
|
||||
//Blood color
|
||||
#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff
|
||||
//Food
|
||||
#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
|
||||
//Gibs
|
||||
#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
|
||||
|
||||
//Mood
|
||||
#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code.
|
||||
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code.
|
||||
#define COMSIG_MODIFY_SANITY "modify_sanity" //Called when you want to increase or decrease sanity from anywhere in the code.
|
||||
|
||||
//NTnet
|
||||
#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata))
|
||||
|
||||
//Nanites
|
||||
#define COMSIG_HAS_NANITES "has_nanites" //() returns TRUE if nanites are found
|
||||
#define COMSIG_NANITE_GET_PROGRAMS "nanite_get_programs" //(list/nanite_programs) - makes the input list a copy the nanites' program list
|
||||
#define COMSIG_NANITE_SET_VOLUME "nanite_set_volume" //(amount) Sets current nanite volume to the given amount
|
||||
#define COMSIG_NANITE_ADJUST_VOLUME "nanite_adjust" //(amount) Adjusts nanite volume by the given amount
|
||||
#define COMSIG_NANITE_SET_MAX_VOLUME "nanite_set_max_volume" //(amount) Sets maximum nanite volume to the given amount
|
||||
#define COMSIG_NANITE_SET_CLOUD "nanite_set_cloud" //(amount(0-100)) Sets cloud ID to the given amount
|
||||
#define COMSIG_NANITE_SET_SAFETY "nanite_set_safety" //(amount) Sets safety threshold to the given amount
|
||||
#define COMSIG_NANITE_SET_REGEN "nanite_set_regen" //(amount) Sets regeneration rate to the given amount
|
||||
#define COMSIG_NANITE_SIGNAL "nanite_signal" //(code(1-9999)) Called when sending a nanite signal to a mob.
|
||||
#define COMSIG_NANITE_SCAN "nanite_scan" //(mob/user, full_scan) - sends to chat a scan of the nanites to the user, returns TRUE if nanites are detected
|
||||
#define COMSIG_NANITE_UI_DATA "nanite_ui_data" //(list/data, scan_level) - adds nanite data to the given data list - made for ui_data procs
|
||||
#define COMSIG_NANITE_ADD_PROGRAM "nanite_add_program" //(datum/nanite_program/new_program, datum/nanite_program/source_program) Called when adding a program to a nanite component
|
||||
#define COMPONENT_PROGRAM_INSTALLED 1 //Installation successful
|
||||
#define COMPONENT_PROGRAM_NOT_INSTALLED 2 //Installation failed, but there are still nanites
|
||||
#define COMSIG_NANITE_SYNC "nanite_sync" //(datum/component/nanites, full_overwrite, copy_activation) Called to sync the target's nanites to a given nanite component
|
||||
|
||||
// /datum/component/storage signals
|
||||
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool.
|
||||
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool
|
||||
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate)
|
||||
#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST!
|
||||
#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types.
|
||||
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items.
|
||||
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool
|
||||
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location.
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
|
||||
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
|
||||
|
||||
// /datum/action signals
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
|
||||
|
||||
/*******Non-Signal Component Related Defines*******/
|
||||
|
||||
//Redirection component init flags
|
||||
#define REDIRECT_TRANSFER_WITH_TURF 1
|
||||
|
||||
//Arch
|
||||
#define ARCH_PROB "probability" //Probability for each item
|
||||
#define ARCH_MAXDROP "max_drop_amount" //each item's max drop amount
|
||||
|
||||
//Ouch my toes!
|
||||
#define CALTROP_BYPASS_SHOES 1
|
||||
#define CALTROP_IGNORE_WALKERS 2
|
||||
|
||||
//Xenobio hotkeys
|
||||
#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl" //from slime CtrlClickOn(): (/mob)
|
||||
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt" //from slime AltClickOn(): (/mob)
|
||||
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift" //from slime ShiftClickOn(): (/mob)
|
||||
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift" //from turf ShiftClickOn(): (/mob)
|
||||
#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt" //from turf AltClickOn(): (/mob)
|
||||
#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl" //from monkey CtrlClickOn(): (/mob)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//config files
|
||||
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
|
||||
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
|
||||
|
||||
#define CONFIG_MAPS_FILE "maps.txt"
|
||||
|
||||
//flags
|
||||
#define CONFIG_ENTRY_LOCKED 1 //can't edit
|
||||
#define CONFIG_ENTRY_HIDDEN 2 //can't see value
|
||||
//config files
|
||||
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
|
||||
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
|
||||
|
||||
#define CONFIG_MAPS_FILE "maps.txt"
|
||||
|
||||
//flags
|
||||
#define CONFIG_ENTRY_LOCKED 1 //can't edit
|
||||
#define CONFIG_ENTRY_HIDDEN 2 //can't see value
|
||||
|
||||
@@ -110,4 +110,7 @@
|
||||
#define RCD_DECONSTRUCT 3
|
||||
#define RCD_WINDOWGRILLE 4
|
||||
#define RCD_MACHINE 8
|
||||
#define RCD_COMPUTER 16
|
||||
#define RCD_COMPUTER 16
|
||||
|
||||
#define RCD_UPGRADE_FRAMES 1
|
||||
#define RCD_UPGRADE_SIMPLE_CIRCUITS 2
|
||||
14
code/__DEFINES/dynamic.dm
Normal file
14
code/__DEFINES/dynamic.dm
Normal file
@@ -0,0 +1,14 @@
|
||||
#define CURRENT_LIVING_PLAYERS 1
|
||||
#define CURRENT_LIVING_ANTAGS 2
|
||||
#define CURRENT_DEAD_PLAYERS 3
|
||||
#define CURRENT_OBSERVERS 4
|
||||
|
||||
#define NO_ASSASSIN (1<<0)
|
||||
#define WAROPS_ALWAYS_ALLOWED (1<<1)
|
||||
|
||||
#define ONLY_RULESET (1<<0)
|
||||
#define HIGHLANDER_RULESET (1<<1)
|
||||
#define TRAITOR_RULESET (1<<2)
|
||||
#define MINOR_RULESET (1<<3)
|
||||
|
||||
#define RULESET_STOP_PROCESSING 1
|
||||
@@ -1,93 +1,93 @@
|
||||
/*
|
||||
These defines are specific to the atom/flags_1 bitmask
|
||||
*/
|
||||
#define ALL (~0) //For convenience.
|
||||
#define NONE 0
|
||||
|
||||
//for convenience
|
||||
#define ENABLE_BITFIELD(variable, flag) (variable |= (flag))
|
||||
#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag))
|
||||
#define CHECK_BITFIELD(variable, flag) (variable & (flag))
|
||||
#define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag))
|
||||
|
||||
#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) (((flagvar) & (flags)) == (flags))
|
||||
|
||||
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
|
||||
|
||||
// for /datum/var/datum_flags
|
||||
#define DF_USE_TAG (1<<0)
|
||||
#define DF_VAR_EDITED (1<<1)
|
||||
#define DF_ISPROCESSING (1<<2)
|
||||
|
||||
//FLAGS BITMASK
|
||||
|
||||
#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 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 PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
#define HOLOGRAM_1 (1<<12)
|
||||
#define TESLA_IGNORE_1 (1<<13) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define INITIALIZED_1 (1<<14) //Whether /atom/Initialize() has already run for the object
|
||||
#define ADMIN_SPAWNED_1 (1<<15) //was this spawned by an admin? used for stat tracking stuff.
|
||||
#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16) /// should not get harmed if this gets caught by an explosion?
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT_1 (1<<0)
|
||||
#define UNUSED_RESERVATION_TURF_1 (1<<1)
|
||||
#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf
|
||||
#define NO_RUINS_1 (1<<10) //Blocks ruins spawning on the turf
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
|
||||
*/
|
||||
//flags for pass_flags
|
||||
#define PASSTABLE (1<<0)
|
||||
#define PASSGLASS (1<<1)
|
||||
#define PASSGRILLE (1<<2)
|
||||
#define PASSBLOB (1<<3)
|
||||
#define PASSMOB (1<<4)
|
||||
#define PASSCLOSEDTURF (1<<5)
|
||||
#define LETPASSTHROW (1<<6)
|
||||
|
||||
|
||||
//Movement Types
|
||||
#define GROUND (1<<0)
|
||||
#define FLYING (1<<1)
|
||||
#define VENTCRAWLING (1<<2)
|
||||
#define FLOATING (1<<3)
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF (1<<0)
|
||||
#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat)
|
||||
#define FLAMMABLE (1<<2)
|
||||
#define ON_FIRE (1<<3)
|
||||
#define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE (1<<6) //doesn't take damage
|
||||
#define FREEZE_PROOF (1<<7) //can't be frozen
|
||||
#define GOLIATH_RESISTANCE (1<<8) //CIT CHANGE
|
||||
#define GOLIATH_WEAKNESS (1<<9) //CIT CHANGE
|
||||
|
||||
//tesla_zap
|
||||
#define TESLA_MACHINE_EXPLOSIVE (1<<0)
|
||||
#define TESLA_ALLOW_DUPLICATES (1<<1)
|
||||
#define TESLA_OBJ_DAMAGE (1<<2)
|
||||
#define TESLA_MOB_DAMAGE (1<<3)
|
||||
#define TESLA_MOB_STUN (1<<4)
|
||||
|
||||
#define TESLA_DEFAULT_FLAGS ALL
|
||||
#define TESLA_FUSION_FLAGS TESLA_OBJ_DAMAGE | TESLA_MOB_DAMAGE | TESLA_MOB_STUN
|
||||
|
||||
//EMP protection
|
||||
#define EMP_PROTECT_SELF (1<<0)
|
||||
#define EMP_PROTECT_CONTENTS (1<<1)
|
||||
#define EMP_PROTECT_WIRES (1<<2)
|
||||
|
||||
// radiation
|
||||
#define RAD_PROTECT_CONTENTS (1<<0)
|
||||
#define RAD_NO_CONTAMINATE (1<<1)
|
||||
/*
|
||||
These defines are specific to the atom/flags_1 bitmask
|
||||
*/
|
||||
#define ALL (~0) //For convenience.
|
||||
#define NONE 0
|
||||
|
||||
//for convenience
|
||||
#define ENABLE_BITFIELD(variable, flag) (variable |= (flag))
|
||||
#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag))
|
||||
#define CHECK_BITFIELD(variable, flag) (variable & (flag))
|
||||
#define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag))
|
||||
|
||||
#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) (((flagvar) & (flags)) == (flags))
|
||||
|
||||
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
|
||||
|
||||
// for /datum/var/datum_flags
|
||||
#define DF_USE_TAG (1<<0)
|
||||
#define DF_VAR_EDITED (1<<1)
|
||||
#define DF_ISPROCESSING (1<<2)
|
||||
|
||||
//FLAGS BITMASK
|
||||
|
||||
#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 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 PREVENT_CLICK_UNDER_1 (1<<11) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
|
||||
#define HOLOGRAM_1 (1<<12)
|
||||
#define TESLA_IGNORE_1 (1<<13) // TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
|
||||
#define INITIALIZED_1 (1<<14) //Whether /atom/Initialize() has already run for the object
|
||||
#define ADMIN_SPAWNED_1 (1<<15) //was this spawned by an admin? used for stat tracking stuff.
|
||||
#define PREVENT_CONTENTS_EXPLOSION_1 (1<<16) /// should not get harmed if this gets caught by an explosion?
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT_1 (1<<0)
|
||||
#define UNUSED_RESERVATION_TURF_1 (1<<1)
|
||||
#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf
|
||||
#define NO_RUINS_1 (1<<10) //Blocks ruins spawning on the turf
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/pass_flags bitmask
|
||||
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
|
||||
*/
|
||||
//flags for pass_flags
|
||||
#define PASSTABLE (1<<0)
|
||||
#define PASSGLASS (1<<1)
|
||||
#define PASSGRILLE (1<<2)
|
||||
#define PASSBLOB (1<<3)
|
||||
#define PASSMOB (1<<4)
|
||||
#define PASSCLOSEDTURF (1<<5)
|
||||
#define LETPASSTHROW (1<<6)
|
||||
|
||||
|
||||
//Movement Types
|
||||
#define GROUND (1<<0)
|
||||
#define FLYING (1<<1)
|
||||
#define VENTCRAWLING (1<<2)
|
||||
#define FLOATING (1<<3)
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF (1<<0)
|
||||
#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat)
|
||||
#define FLAMMABLE (1<<2)
|
||||
#define ON_FIRE (1<<3)
|
||||
#define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE (1<<6) //doesn't take damage
|
||||
#define FREEZE_PROOF (1<<7) //can't be frozen
|
||||
#define GOLIATH_RESISTANCE (1<<8) //CIT CHANGE
|
||||
#define GOLIATH_WEAKNESS (1<<9) //CIT CHANGE
|
||||
|
||||
//tesla_zap
|
||||
#define TESLA_MACHINE_EXPLOSIVE (1<<0)
|
||||
#define TESLA_ALLOW_DUPLICATES (1<<1)
|
||||
#define TESLA_OBJ_DAMAGE (1<<2)
|
||||
#define TESLA_MOB_DAMAGE (1<<3)
|
||||
#define TESLA_MOB_STUN (1<<4)
|
||||
|
||||
#define TESLA_DEFAULT_FLAGS ALL
|
||||
#define TESLA_FUSION_FLAGS TESLA_OBJ_DAMAGE | TESLA_MOB_DAMAGE | TESLA_MOB_STUN
|
||||
|
||||
//EMP protection
|
||||
#define EMP_PROTECT_SELF (1<<0)
|
||||
#define EMP_PROTECT_CONTENTS (1<<1)
|
||||
#define EMP_PROTECT_WIRES (1<<2)
|
||||
|
||||
// radiation
|
||||
#define RAD_PROTECT_CONTENTS (1<<0)
|
||||
#define RAD_NO_CONTAMINATE (1<<1)
|
||||
|
||||
@@ -130,33 +130,24 @@
|
||||
#define NECK (1<<11)
|
||||
#define FULL_BODY (~0)
|
||||
|
||||
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
|
||||
#define NORMAL_STYLE 0
|
||||
#define ALT_STYLE 1
|
||||
|
||||
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
|
||||
#define NO_FEMALE_UNIFORM 0
|
||||
#define FEMALE_UNIFORM_FULL 1
|
||||
#define FEMALE_UNIFORM_TOP 2
|
||||
|
||||
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
|
||||
#define NORMAL_STYLE 0
|
||||
#define ALT_STYLE 1
|
||||
|
||||
#define NORMAL_SUIT_STYLE 0
|
||||
#define DIGITIGRADE_SUIT_STYLE 1
|
||||
|
||||
//Tauric Specific suits
|
||||
#define NOT_TAURIC 0
|
||||
#define SNEK_TAURIC 1
|
||||
#define PAW_TAURIC 2
|
||||
#define HOOF_TAURIC 3
|
||||
|
||||
//Helmets/masks for muzzles or beaks
|
||||
#define NORMAL_FACED 0
|
||||
#define MUZZLE_FACED 1
|
||||
#define BEAKED_FACED 2
|
||||
|
||||
//flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
|
||||
#define NO_MUTANTRACE_VARIATION 0
|
||||
#define MUTANTRACE_VARIATION 1
|
||||
//flags for outfits that have mutantrace variants: These are hard sprited too.
|
||||
#define STYLE_DIGITIGRADE (1<<0) //jumpsuits, suits and shoes
|
||||
#define STYLE_MUZZLE (1<<1) //hats or masks
|
||||
#define STYLE_SNEK_TAURIC (1<<2) //taur-friendly suits
|
||||
#define STYLE_PAW_TAURIC (1<<3)
|
||||
#define STYLE_HOOF_TAURIC (1<<4)
|
||||
#define STYLE_ALL_TAURIC (STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC|STYLE_HOOF_TAURIC)
|
||||
|
||||
//digitigrade legs settings.
|
||||
#define NOT_DIGITIGRADE 0
|
||||
#define FULL_DIGITIGRADE 1
|
||||
#define SQUISHED_DIGITIGRADE 2
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
|
||||
#define ENGSEC (1<<0)
|
||||
|
||||
#define CAPTAIN (1<<0)
|
||||
#define HOS (1<<1)
|
||||
#define WARDEN (1<<2)
|
||||
#define DETECTIVE (1<<3)
|
||||
#define OFFICER (1<<4)
|
||||
#define CHIEF (1<<5)
|
||||
#define ENGINEER (1<<6)
|
||||
#define ATMOSTECH (1<<7)
|
||||
#define ROBOTICIST (1<<8)
|
||||
#define AI_JF (1<<9)
|
||||
#define CYBORG (1<<10)
|
||||
|
||||
|
||||
#define MEDSCI (1<<1)
|
||||
|
||||
#define RD_JF (1<<0)
|
||||
#define SCIENTIST (1<<1)
|
||||
#define CHEMIST (1<<2)
|
||||
#define CMO_JF (1<<3)
|
||||
#define DOCTOR (1<<4)
|
||||
#define GENETICIST (1<<5)
|
||||
#define VIROLOGIST (1<<6)
|
||||
|
||||
|
||||
#define CIVILIAN (1<<2)
|
||||
|
||||
#define HOP (1<<0)
|
||||
#define BARTENDER (1<<1)
|
||||
#define BOTANIST (1<<2)
|
||||
#define COOK (1<<3)
|
||||
#define JANITOR (1<<4)
|
||||
#define CURATOR (1<<5)
|
||||
#define QUARTERMASTER (1<<6)
|
||||
#define CARGOTECH (1<<7)
|
||||
#define MINER (1<<8)
|
||||
#define LAWYER (1<<9)
|
||||
#define CHAPLAIN (1<<10)
|
||||
#define CLOWN (1<<11)
|
||||
#define MIME (1<<12)
|
||||
#define ASSISTANT (1<<13)
|
||||
|
||||
#define JOB_AVAILABLE 0
|
||||
#define JOB_UNAVAILABLE_GENERIC 1
|
||||
#define JOB_UNAVAILABLE_BANNED 2
|
||||
#define JOB_UNAVAILABLE_PLAYTIME 3
|
||||
#define JOB_UNAVAILABLE_ACCOUNTAGE 4
|
||||
#define JOB_UNAVAILABLE_SLOTFULL 5
|
||||
#define JOB_UNAVAILABLE_SPECIESLOCK 6
|
||||
|
||||
#define DEFAULT_RELIGION "Christianity"
|
||||
#define DEFAULT_DEITY "Space Jesus"
|
||||
|
||||
#define JOB_DISPLAY_ORDER_DEFAULT 0
|
||||
|
||||
#define JOB_DISPLAY_ORDER_ASSISTANT 1
|
||||
#define JOB_DISPLAY_ORDER_CAPTAIN 2
|
||||
#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3
|
||||
#define JOB_DISPLAY_ORDER_BARTENDER 4
|
||||
#define JOB_DISPLAY_ORDER_COOK 5
|
||||
#define JOB_DISPLAY_ORDER_BOTANIST 6
|
||||
#define JOB_DISPLAY_ORDER_JANITOR 7
|
||||
#define JOB_DISPLAY_ORDER_CLOWN 8
|
||||
#define JOB_DISPLAY_ORDER_MIME 9
|
||||
#define JOB_DISPLAY_ORDER_CURATOR 10
|
||||
#define JOB_DISPLAY_ORDER_LAWYER 11
|
||||
#define JOB_DISPLAY_ORDER_CHAPLAIN 12
|
||||
#define JOB_DISPLAY_ORDER_QUARTERMASTER 13
|
||||
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 14
|
||||
#define JOB_DISPLAY_ORDER_SHAFT_MINER 15
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16
|
||||
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17
|
||||
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 19
|
||||
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 20
|
||||
#define JOB_DISPLAY_ORDER_CHEMIST 21
|
||||
#define JOB_DISPLAY_ORDER_GENETICIST 22
|
||||
#define JOB_DISPLAY_ORDER_VIROLOGIST 23
|
||||
#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 24
|
||||
#define JOB_DISPLAY_ORDER_SCIENTIST 25
|
||||
#define JOB_DISPLAY_ORDER_ROBOTICIST 26
|
||||
#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 27
|
||||
#define JOB_DISPLAY_ORDER_WARDEN 28
|
||||
#define JOB_DISPLAY_ORDER_DETECTIVE 29
|
||||
#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 30
|
||||
#define JOB_DISPLAY_ORDER_AI 31
|
||||
#define JOB_DISPLAY_ORDER_CYBORG 32
|
||||
|
||||
#define ENGSEC (1<<0)
|
||||
|
||||
#define CAPTAIN (1<<0)
|
||||
#define HOS (1<<1)
|
||||
#define WARDEN (1<<2)
|
||||
#define DETECTIVE (1<<3)
|
||||
#define OFFICER (1<<4)
|
||||
#define CHIEF (1<<5)
|
||||
#define ENGINEER (1<<6)
|
||||
#define ATMOSTECH (1<<7)
|
||||
#define ROBOTICIST (1<<8)
|
||||
#define AI_JF (1<<9)
|
||||
#define CYBORG (1<<10)
|
||||
|
||||
|
||||
#define MEDSCI (1<<1)
|
||||
|
||||
#define RD_JF (1<<0)
|
||||
#define SCIENTIST (1<<1)
|
||||
#define CHEMIST (1<<2)
|
||||
#define CMO_JF (1<<3)
|
||||
#define DOCTOR (1<<4)
|
||||
#define GENETICIST (1<<5)
|
||||
#define VIROLOGIST (1<<6)
|
||||
|
||||
|
||||
#define CIVILIAN (1<<2)
|
||||
|
||||
#define HOP (1<<0)
|
||||
#define BARTENDER (1<<1)
|
||||
#define BOTANIST (1<<2)
|
||||
#define COOK (1<<3)
|
||||
#define JANITOR (1<<4)
|
||||
#define CURATOR (1<<5)
|
||||
#define QUARTERMASTER (1<<6)
|
||||
#define CARGOTECH (1<<7)
|
||||
#define MINER (1<<8)
|
||||
#define LAWYER (1<<9)
|
||||
#define CHAPLAIN (1<<10)
|
||||
#define CLOWN (1<<11)
|
||||
#define MIME (1<<12)
|
||||
#define ASSISTANT (1<<13)
|
||||
|
||||
#define JOB_AVAILABLE 0
|
||||
#define JOB_UNAVAILABLE_GENERIC 1
|
||||
#define JOB_UNAVAILABLE_BANNED 2
|
||||
#define JOB_UNAVAILABLE_PLAYTIME 3
|
||||
#define JOB_UNAVAILABLE_ACCOUNTAGE 4
|
||||
#define JOB_UNAVAILABLE_SLOTFULL 5
|
||||
#define JOB_UNAVAILABLE_SPECIESLOCK 6
|
||||
|
||||
#define DEFAULT_RELIGION "Christianity"
|
||||
#define DEFAULT_DEITY "Space Jesus"
|
||||
|
||||
#define JOB_DISPLAY_ORDER_DEFAULT 0
|
||||
|
||||
#define JOB_DISPLAY_ORDER_ASSISTANT 1
|
||||
#define JOB_DISPLAY_ORDER_CAPTAIN 2
|
||||
#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3
|
||||
#define JOB_DISPLAY_ORDER_BARTENDER 4
|
||||
#define JOB_DISPLAY_ORDER_COOK 5
|
||||
#define JOB_DISPLAY_ORDER_BOTANIST 6
|
||||
#define JOB_DISPLAY_ORDER_JANITOR 7
|
||||
#define JOB_DISPLAY_ORDER_CLOWN 8
|
||||
#define JOB_DISPLAY_ORDER_MIME 9
|
||||
#define JOB_DISPLAY_ORDER_CURATOR 10
|
||||
#define JOB_DISPLAY_ORDER_LAWYER 11
|
||||
#define JOB_DISPLAY_ORDER_CHAPLAIN 12
|
||||
#define JOB_DISPLAY_ORDER_QUARTERMASTER 13
|
||||
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 14
|
||||
#define JOB_DISPLAY_ORDER_SHAFT_MINER 15
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16
|
||||
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17
|
||||
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 19
|
||||
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 20
|
||||
#define JOB_DISPLAY_ORDER_CHEMIST 21
|
||||
#define JOB_DISPLAY_ORDER_GENETICIST 22
|
||||
#define JOB_DISPLAY_ORDER_VIROLOGIST 23
|
||||
#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 24
|
||||
#define JOB_DISPLAY_ORDER_SCIENTIST 25
|
||||
#define JOB_DISPLAY_ORDER_ROBOTICIST 26
|
||||
#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 27
|
||||
#define JOB_DISPLAY_ORDER_WARDEN 28
|
||||
#define JOB_DISPLAY_ORDER_DETECTIVE 29
|
||||
#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 30
|
||||
#define JOB_DISPLAY_ORDER_AI 31
|
||||
#define JOB_DISPLAY_ORDER_CYBORG 32
|
||||
|
||||
@@ -1,107 +1,107 @@
|
||||
// channel numbers for power
|
||||
#define EQUIP 1
|
||||
#define LIGHT 2
|
||||
#define ENVIRON 3
|
||||
#define TOTAL 4 //for total power used only
|
||||
#define STATIC_EQUIP 5
|
||||
#define STATIC_LIGHT 6
|
||||
#define STATIC_ENVIRON 7
|
||||
|
||||
//Power use
|
||||
#define NO_POWER_USE 0
|
||||
#define IDLE_POWER_USE 1
|
||||
#define ACTIVE_POWER_USE 2
|
||||
|
||||
|
||||
//bitflags for door switches.
|
||||
#define OPEN (1<<0)
|
||||
#define IDSCAN (1<<1)
|
||||
#define BOLTS (1<<2)
|
||||
#define SHOCK (1<<3)
|
||||
#define SAFE (1<<4)
|
||||
|
||||
//used in design to specify which machine can build it
|
||||
#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals
|
||||
#define AUTOLATHE (1<<2) //Uses glass/metal only.
|
||||
#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR (1<<5) //Uses biomass
|
||||
#define LIMBGROWER (1<<6) //Uses synthetic flesh
|
||||
#define SMELTER (1<<7) //uses various minerals
|
||||
#define AUTOYLATHE (1<<8) // CITADEL ADD
|
||||
#define NANITE_COMPILER (1<<9) //Prints nanite disks
|
||||
#define AUTOBOTTLER (1<<10) //Uses booze, for printing
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
//Modular computer/NTNet defines
|
||||
|
||||
//Modular computer part defines
|
||||
#define MC_CPU "CPU"
|
||||
#define MC_HDD "HDD"
|
||||
#define MC_SDD "SDD"
|
||||
#define MC_CARD "CARD"
|
||||
#define MC_NET "NET"
|
||||
#define MC_PRINT "PRINT"
|
||||
#define MC_CELL "CELL"
|
||||
#define MC_CHARGE "CHARGE"
|
||||
#define MC_AI "AI"
|
||||
|
||||
//NTNet stuff, for modular computers
|
||||
// NTNet module-configuration values. Do not change these. If you need to add another use larger number (5..6..7 etc)
|
||||
#define NTNET_SOFTWAREDOWNLOAD 1 // Downloads of software from NTNet
|
||||
#define NTNET_PEERTOPEER 2 // P2P transfers of files between devices
|
||||
#define NTNET_COMMUNICATION 3 // Communication (messaging)
|
||||
#define NTNET_SYSTEMCONTROL 4 // Control of various systems, RCon, air alarm control, etc.
|
||||
|
||||
//NTNet transfer speeds, used when downloading/uploading a file/program.
|
||||
#define NTNETSPEED_LOWSIGNAL 0.5 // GQ/s transfer speed when the device is wirelessly connected and on Low signal
|
||||
#define NTNETSPEED_HIGHSIGNAL 1 // GQ/s transfer speed when the device is wirelessly connected and on High signal
|
||||
#define NTNETSPEED_ETHERNET 2 // GQ/s transfer speed when the device is using wired connection
|
||||
|
||||
//Caps for NTNet logging. Less than 10 would make logging useless anyway, more than 500 may make the log browser too laggy. Defaults to 100 unless user changes it.
|
||||
#define MAX_NTNET_LOGS 300
|
||||
#define MIN_NTNET_LOGS 10
|
||||
|
||||
//Program bitflags
|
||||
#define PROGRAM_ALL (~0)
|
||||
#define PROGRAM_CONSOLE (1<<0)
|
||||
#define PROGRAM_LAPTOP (1<<1)
|
||||
#define PROGRAM_TABLET (1<<2)
|
||||
//Program states
|
||||
#define PROGRAM_STATE_KILLED 0
|
||||
#define PROGRAM_STATE_BACKGROUND 1
|
||||
#define PROGRAM_STATE_ACTIVE 2
|
||||
|
||||
#define FIREDOOR_OPEN 1
|
||||
#define FIREDOOR_CLOSED 2
|
||||
|
||||
|
||||
|
||||
// These are used by supermatter and supermatter monitor program, mostly for UI updating purposes. Higher should always be worse!
|
||||
#define SUPERMATTER_ERROR -1 // Unknown status, shouldn't happen but just in case.
|
||||
#define SUPERMATTER_INACTIVE 0 // No or minimal energy
|
||||
#define SUPERMATTER_NORMAL 1 // Normal operation
|
||||
#define SUPERMATTER_NOTIFY 2 // Ambient temp > 80% of CRITICAL_TEMPERATURE
|
||||
#define SUPERMATTER_WARNING 3 // Ambient temp > CRITICAL_TEMPERATURE OR integrity damaged
|
||||
#define SUPERMATTER_DANGER 4 // Integrity < 50%
|
||||
#define SUPERMATTER_EMERGENCY 5 // Integrity < 25%
|
||||
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.
|
||||
|
||||
//Nuclear bomb stuff
|
||||
#define NUKESTATE_INTACT 5
|
||||
#define NUKESTATE_UNSCREWED 4
|
||||
#define NUKESTATE_PANEL_REMOVED 3
|
||||
#define NUKESTATE_WELDED 2
|
||||
#define NUKESTATE_CORE_EXPOSED 1
|
||||
#define NUKESTATE_CORE_REMOVED 0
|
||||
|
||||
#define NUKE_OFF_LOCKED 0
|
||||
#define NUKE_OFF_UNLOCKED 1
|
||||
#define NUKE_ON_TIMING 2
|
||||
#define NUKE_ON_EXPLODING 3
|
||||
|
||||
|
||||
//these flags are used to tell the DNA modifier if a plant gene cannot be extracted or modified.
|
||||
#define PLANT_GENE_REMOVABLE (1<<0)
|
||||
// channel numbers for power
|
||||
#define EQUIP 1
|
||||
#define LIGHT 2
|
||||
#define ENVIRON 3
|
||||
#define TOTAL 4 //for total power used only
|
||||
#define STATIC_EQUIP 5
|
||||
#define STATIC_LIGHT 6
|
||||
#define STATIC_ENVIRON 7
|
||||
|
||||
//Power use
|
||||
#define NO_POWER_USE 0
|
||||
#define IDLE_POWER_USE 1
|
||||
#define ACTIVE_POWER_USE 2
|
||||
|
||||
|
||||
//bitflags for door switches.
|
||||
#define OPEN (1<<0)
|
||||
#define IDSCAN (1<<1)
|
||||
#define BOLTS (1<<2)
|
||||
#define SHOCK (1<<3)
|
||||
#define SAFE (1<<4)
|
||||
|
||||
//used in design to specify which machine can build it
|
||||
#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals
|
||||
#define AUTOLATHE (1<<2) //Uses glass/metal only.
|
||||
#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR (1<<5) //Uses biomass
|
||||
#define LIMBGROWER (1<<6) //Uses synthetic flesh
|
||||
#define SMELTER (1<<7) //uses various minerals
|
||||
#define AUTOYLATHE (1<<8) // CITADEL ADD
|
||||
#define NANITE_COMPILER (1<<9) //Prints nanite disks
|
||||
#define AUTOBOTTLER (1<<10) //Uses booze, for printing
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
//Modular computer/NTNet defines
|
||||
|
||||
//Modular computer part defines
|
||||
#define MC_CPU "CPU"
|
||||
#define MC_HDD "HDD"
|
||||
#define MC_SDD "SDD"
|
||||
#define MC_CARD "CARD"
|
||||
#define MC_NET "NET"
|
||||
#define MC_PRINT "PRINT"
|
||||
#define MC_CELL "CELL"
|
||||
#define MC_CHARGE "CHARGE"
|
||||
#define MC_AI "AI"
|
||||
|
||||
//NTNet stuff, for modular computers
|
||||
// NTNet module-configuration values. Do not change these. If you need to add another use larger number (5..6..7 etc)
|
||||
#define NTNET_SOFTWAREDOWNLOAD 1 // Downloads of software from NTNet
|
||||
#define NTNET_PEERTOPEER 2 // P2P transfers of files between devices
|
||||
#define NTNET_COMMUNICATION 3 // Communication (messaging)
|
||||
#define NTNET_SYSTEMCONTROL 4 // Control of various systems, RCon, air alarm control, etc.
|
||||
|
||||
//NTNet transfer speeds, used when downloading/uploading a file/program.
|
||||
#define NTNETSPEED_LOWSIGNAL 0.5 // GQ/s transfer speed when the device is wirelessly connected and on Low signal
|
||||
#define NTNETSPEED_HIGHSIGNAL 1 // GQ/s transfer speed when the device is wirelessly connected and on High signal
|
||||
#define NTNETSPEED_ETHERNET 2 // GQ/s transfer speed when the device is using wired connection
|
||||
|
||||
//Caps for NTNet logging. Less than 10 would make logging useless anyway, more than 500 may make the log browser too laggy. Defaults to 100 unless user changes it.
|
||||
#define MAX_NTNET_LOGS 300
|
||||
#define MIN_NTNET_LOGS 10
|
||||
|
||||
//Program bitflags
|
||||
#define PROGRAM_ALL (~0)
|
||||
#define PROGRAM_CONSOLE (1<<0)
|
||||
#define PROGRAM_LAPTOP (1<<1)
|
||||
#define PROGRAM_TABLET (1<<2)
|
||||
//Program states
|
||||
#define PROGRAM_STATE_KILLED 0
|
||||
#define PROGRAM_STATE_BACKGROUND 1
|
||||
#define PROGRAM_STATE_ACTIVE 2
|
||||
|
||||
#define FIREDOOR_OPEN 1
|
||||
#define FIREDOOR_CLOSED 2
|
||||
|
||||
|
||||
|
||||
// These are used by supermatter and supermatter monitor program, mostly for UI updating purposes. Higher should always be worse!
|
||||
#define SUPERMATTER_ERROR -1 // Unknown status, shouldn't happen but just in case.
|
||||
#define SUPERMATTER_INACTIVE 0 // No or minimal energy
|
||||
#define SUPERMATTER_NORMAL 1 // Normal operation
|
||||
#define SUPERMATTER_NOTIFY 2 // Ambient temp > 80% of CRITICAL_TEMPERATURE
|
||||
#define SUPERMATTER_WARNING 3 // Ambient temp > CRITICAL_TEMPERATURE OR integrity damaged
|
||||
#define SUPERMATTER_DANGER 4 // Integrity < 50%
|
||||
#define SUPERMATTER_EMERGENCY 5 // Integrity < 25%
|
||||
#define SUPERMATTER_DELAMINATING 6 // Pretty obvious.
|
||||
|
||||
//Nuclear bomb stuff
|
||||
#define NUKESTATE_INTACT 5
|
||||
#define NUKESTATE_UNSCREWED 4
|
||||
#define NUKESTATE_PANEL_REMOVED 3
|
||||
#define NUKESTATE_WELDED 2
|
||||
#define NUKESTATE_CORE_EXPOSED 1
|
||||
#define NUKESTATE_CORE_REMOVED 0
|
||||
|
||||
#define NUKE_OFF_LOCKED 0
|
||||
#define NUKE_OFF_UNLOCKED 1
|
||||
#define NUKE_ON_TIMING 2
|
||||
#define NUKE_ON_EXPLODING 3
|
||||
|
||||
|
||||
//these flags are used to tell the DNA modifier if a plant gene cannot be extracted or modified.
|
||||
#define PLANT_GENE_REMOVABLE (1<<0)
|
||||
#define PLANT_GENE_EXTRACTABLE (1<<1)
|
||||
@@ -38,8 +38,6 @@ require only minor tweaks.
|
||||
#define ZTRAIT_SPACE_RUINS "Space Ruins"
|
||||
#define ZTRAIT_LAVA_RUINS "Lava Ruins"
|
||||
#define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement.
|
||||
// prevents certain turfs from being stripped by a singularity
|
||||
#define ZTRAIT_PLANET "Planet"
|
||||
|
||||
// number - bombcap is multiplied by this before being applied to bombs
|
||||
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
|
||||
@@ -60,11 +58,18 @@ require only minor tweaks.
|
||||
// CROSSLINKED - mixed in with the cross-linked space pool
|
||||
#define CROSSLINKED "Cross"
|
||||
|
||||
// string - type path of the z-level's baseturf (defaults to space)
|
||||
#define ZTRAIT_BASETURF "Baseturf"
|
||||
|
||||
// default trait definitions, used by SSmapping
|
||||
#define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE)
|
||||
#define ZTRAITS_STATION list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_STATION = TRUE)
|
||||
#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
|
||||
#define ZTRAITS_LAVALAND list(ZTRAIT_MINING = TRUE, ZTRAIT_LAVA_RUINS = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 5)
|
||||
#define ZTRAITS_LAVALAND list(\
|
||||
ZTRAIT_MINING = TRUE, \
|
||||
ZTRAIT_LAVA_RUINS = TRUE, \
|
||||
ZTRAIT_BOMBCAP_MULTIPLIER = 5, \
|
||||
ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface)
|
||||
#define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5)
|
||||
|
||||
#define DL_NAME "name"
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
// Medal names
|
||||
#define BOSS_KILL_MEDAL "Killer"
|
||||
#define ALL_KILL_MEDAL "Exterminator" //Killing all of x type
|
||||
#define BOSS_KILL_MEDAL_CRUSHER "Crusher"
|
||||
|
||||
//Defines for boss medals
|
||||
#define BOSS_MEDAL_MINER "Blood-drunk Miner"
|
||||
#define BOSS_MEDAL_BUBBLEGUM "Bubblegum"
|
||||
#define BOSS_MEDAL_COLOSSUS "Colossus"
|
||||
#define BOSS_MEDAL_DRAKE "Drake"
|
||||
#define BOSS_MEDAL_HIEROPHANT "Hierophant"
|
||||
#define BOSS_MEDAL_LEGION "Legion"
|
||||
#define BOSS_MEDAL_TENDRIL "Tendril"
|
||||
#define BOSS_MEDAL_SWARMERS "Swarmer Beacon"
|
||||
|
||||
// Score names
|
||||
#define HIEROPHANT_SCORE "Hierophants Killed"
|
||||
#define BOSS_SCORE "Bosses Killed"
|
||||
#define BUBBLEGUM_SCORE "Bubblegum Killed"
|
||||
#define COLOSSUS_SCORE "Colossus Killed"
|
||||
#define DRAKE_SCORE "Drakes Killed"
|
||||
#define LEGION_SCORE "Legion Killed"
|
||||
#define SWARMER_BEACON_SCORE "Swarmer Beacons Killed"
|
||||
#define TENDRIL_CLEAR_SCORE "Tendrils Killed"
|
||||
|
||||
//Misc medals
|
||||
#define MEDAL_METEOR "Your Life Before Your Eyes"
|
||||
#define MEDAL_PULSE "Jackpot"
|
||||
// Medal names
|
||||
#define BOSS_KILL_MEDAL "Killer"
|
||||
#define ALL_KILL_MEDAL "Exterminator" //Killing all of x type
|
||||
#define BOSS_KILL_MEDAL_CRUSHER "Crusher"
|
||||
|
||||
//Defines for boss medals
|
||||
#define BOSS_MEDAL_MINER "Blood-drunk Miner"
|
||||
#define BOSS_MEDAL_BUBBLEGUM "Bubblegum"
|
||||
#define BOSS_MEDAL_COLOSSUS "Colossus"
|
||||
#define BOSS_MEDAL_DRAKE "Drake"
|
||||
#define BOSS_MEDAL_HIEROPHANT "Hierophant"
|
||||
#define BOSS_MEDAL_LEGION "Legion"
|
||||
#define BOSS_MEDAL_TENDRIL "Tendril"
|
||||
#define BOSS_MEDAL_SWARMERS "Swarmer Beacon"
|
||||
|
||||
// Score names
|
||||
#define HIEROPHANT_SCORE "Hierophants Killed"
|
||||
#define BOSS_SCORE "Bosses Killed"
|
||||
#define BUBBLEGUM_SCORE "Bubblegum Killed"
|
||||
#define COLOSSUS_SCORE "Colossus Killed"
|
||||
#define DRAKE_SCORE "Drakes Killed"
|
||||
#define LEGION_SCORE "Legion Killed"
|
||||
#define SWARMER_BEACON_SCORE "Swarmer Beacons Killed"
|
||||
#define TENDRIL_CLEAR_SCORE "Tendrils Killed"
|
||||
|
||||
//Misc medals
|
||||
#define MEDAL_METEOR "Your Life Before Your Eyes"
|
||||
#define MEDAL_PULSE "Jackpot"
|
||||
#define MEDAL_TIMEWASTE "Overextended The Joke"
|
||||
@@ -427,6 +427,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
|
||||
//Dummy mob reserve slots
|
||||
#define DUMMY_HUMAN_SLOT_PREFERENCES "dummy_preference_preview"
|
||||
#define DUMMY_HUMAN_SLOT_HOLOFORM "dummy_holoform_generation"
|
||||
#define DUMMY_HUMAN_SLOT_ADMIN "admintools"
|
||||
#define DUMMY_HUMAN_SLOT_MANIFEST "dummy_manifest_generation"
|
||||
|
||||
@@ -528,3 +529,11 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define FOURSPACES " "
|
||||
|
||||
#define CRYOMOBS 'icons/obj/cryo_mobs.dmi'
|
||||
|
||||
#define CUSTOM_HOLOFORM_DELAY 10 SECONDS //prevents spamming to make lag. it's pretty expensive to do this.
|
||||
|
||||
#define HOLOFORM_FILTER_AI "FILTER_AI"
|
||||
#define HOLOFORM_FILTER_PAI "FILTER_PAI"
|
||||
#define HOLOFORM_FILTER_STATIC "FILTER_STATIC"
|
||||
|
||||
#define CANT_REENTER_ROUND -1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#define HID_RESTRICTED_END 101 //the first nonrestricted ID, automatically assigned on connection creation.
|
||||
|
||||
#define NETWORK_BROADCAST_ID "ALL"
|
||||
#define HID_RESTRICTED_END 101 //the first nonrestricted ID, automatically assigned on connection creation.
|
||||
|
||||
#define NETWORK_BROADCAST_ID "ALL"
|
||||
|
||||
@@ -1,84 +1,84 @@
|
||||
|
||||
//Preference toggles
|
||||
#define SOUND_ADMINHELP (1<<0)
|
||||
#define SOUND_MIDI (1<<1)
|
||||
#define SOUND_AMBIENCE (1<<2)
|
||||
#define SOUND_LOBBY (1<<3)
|
||||
#define MEMBER_PUBLIC (1<<4)
|
||||
#define INTENT_STYLE (1<<5)
|
||||
#define MIDROUND_ANTAG (1<<6)
|
||||
#define SOUND_INSTRUMENTS (1<<7)
|
||||
#define SOUND_SHIP_AMBIENCE (1<<8)
|
||||
#define SOUND_PRAYERS (1<<9)
|
||||
#define ANNOUNCE_LOGIN (1<<10)
|
||||
#define SOUND_ANNOUNCEMENTS (1<<11)
|
||||
#define DISABLE_DEATHRATTLE (1<<12)
|
||||
#define DISABLE_ARRIVALRATTLE (1<<13)
|
||||
#define COMBOHUD_LIGHTING (1<<14)
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
|
||||
|
||||
//Chat toggles
|
||||
#define CHAT_OOC (1<<0)
|
||||
#define CHAT_DEAD (1<<1)
|
||||
#define CHAT_GHOSTEARS (1<<2)
|
||||
#define CHAT_GHOSTSIGHT (1<<3)
|
||||
#define CHAT_PRAYER (1<<4)
|
||||
#define CHAT_RADIO (1<<5)
|
||||
#define CHAT_PULLR (1<<6)
|
||||
#define CHAT_GHOSTWHISPER (1<<7)
|
||||
#define CHAT_GHOSTPDA (1<<8)
|
||||
#define CHAT_GHOSTRADIO (1<<9)
|
||||
#define CHAT_LOOC (1<<10)
|
||||
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
|
||||
|
||||
#define PARALLAX_INSANE -1 //for show offs
|
||||
#define PARALLAX_HIGH 0 //default.
|
||||
#define PARALLAX_MED 1
|
||||
#define PARALLAX_LOW 2
|
||||
#define PARALLAX_DISABLE 3 //this option must be the highest number
|
||||
|
||||
#define PARALLAX_DELAY_DEFAULT world.tick_lag
|
||||
#define PARALLAX_DELAY_MED 1
|
||||
#define PARALLAX_DELAY_LOW 2
|
||||
|
||||
#define SEC_DEPT_NONE "None"
|
||||
#define SEC_DEPT_RANDOM "Random"
|
||||
#define SEC_DEPT_ENGINEERING "Engineering"
|
||||
#define SEC_DEPT_MEDICAL "Medical"
|
||||
#define SEC_DEPT_SCIENCE "Science"
|
||||
#define SEC_DEPT_SUPPLY "Supply"
|
||||
|
||||
// Playtime tracking system, see jobs_exp.dm
|
||||
#define EXP_TYPE_LIVING "Living"
|
||||
#define EXP_TYPE_CREW "Crew"
|
||||
#define EXP_TYPE_COMMAND "Command"
|
||||
#define EXP_TYPE_ENGINEERING "Engineering"
|
||||
#define EXP_TYPE_MEDICAL "Medical"
|
||||
#define EXP_TYPE_SCIENCE "Science"
|
||||
#define EXP_TYPE_SUPPLY "Supply"
|
||||
#define EXP_TYPE_SECURITY "Security"
|
||||
#define EXP_TYPE_SILICON "Silicon"
|
||||
#define EXP_TYPE_SERVICE "Service"
|
||||
#define EXP_TYPE_ANTAG "Antag"
|
||||
#define EXP_TYPE_SPECIAL "Special"
|
||||
#define EXP_TYPE_GHOST "Ghost"
|
||||
#define EXP_TYPE_ADMIN "Admin"
|
||||
|
||||
//Flags in the players table in the db
|
||||
#define DB_FLAG_EXEMPT 1
|
||||
|
||||
#define DEFAULT_CYBORG_NAME "Default Cyborg Name"
|
||||
|
||||
//Job preferences levels
|
||||
#define JP_LOW 1
|
||||
#define JP_MEDIUM 2
|
||||
#define JP_HIGH 3
|
||||
|
||||
//Chaos levels for dynamic voting
|
||||
#define CHAOS_NONE "None (Extended)"
|
||||
#define CHAOS_LOW "Low"
|
||||
#define CHAOS_MED "Medium"
|
||||
#define CHAOS_HIGH "High"
|
||||
#define CHAOS_MAX "Maximum"
|
||||
|
||||
//Preference toggles
|
||||
#define SOUND_ADMINHELP (1<<0)
|
||||
#define SOUND_MIDI (1<<1)
|
||||
#define SOUND_AMBIENCE (1<<2)
|
||||
#define SOUND_LOBBY (1<<3)
|
||||
#define MEMBER_PUBLIC (1<<4)
|
||||
#define INTENT_STYLE (1<<5)
|
||||
#define MIDROUND_ANTAG (1<<6)
|
||||
#define SOUND_INSTRUMENTS (1<<7)
|
||||
#define SOUND_SHIP_AMBIENCE (1<<8)
|
||||
#define SOUND_PRAYERS (1<<9)
|
||||
#define ANNOUNCE_LOGIN (1<<10)
|
||||
#define SOUND_ANNOUNCEMENTS (1<<11)
|
||||
#define DISABLE_DEATHRATTLE (1<<12)
|
||||
#define DISABLE_ARRIVALRATTLE (1<<13)
|
||||
#define COMBOHUD_LIGHTING (1<<14)
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
|
||||
|
||||
//Chat toggles
|
||||
#define CHAT_OOC (1<<0)
|
||||
#define CHAT_DEAD (1<<1)
|
||||
#define CHAT_GHOSTEARS (1<<2)
|
||||
#define CHAT_GHOSTSIGHT (1<<3)
|
||||
#define CHAT_PRAYER (1<<4)
|
||||
#define CHAT_RADIO (1<<5)
|
||||
#define CHAT_PULLR (1<<6)
|
||||
#define CHAT_GHOSTWHISPER (1<<7)
|
||||
#define CHAT_GHOSTPDA (1<<8)
|
||||
#define CHAT_GHOSTRADIO (1<<9)
|
||||
#define CHAT_LOOC (1<<10)
|
||||
|
||||
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
|
||||
|
||||
#define PARALLAX_INSANE -1 //for show offs
|
||||
#define PARALLAX_HIGH 0 //default.
|
||||
#define PARALLAX_MED 1
|
||||
#define PARALLAX_LOW 2
|
||||
#define PARALLAX_DISABLE 3 //this option must be the highest number
|
||||
|
||||
#define PARALLAX_DELAY_DEFAULT world.tick_lag
|
||||
#define PARALLAX_DELAY_MED 1
|
||||
#define PARALLAX_DELAY_LOW 2
|
||||
|
||||
#define SEC_DEPT_NONE "None"
|
||||
#define SEC_DEPT_RANDOM "Random"
|
||||
#define SEC_DEPT_ENGINEERING "Engineering"
|
||||
#define SEC_DEPT_MEDICAL "Medical"
|
||||
#define SEC_DEPT_SCIENCE "Science"
|
||||
#define SEC_DEPT_SUPPLY "Supply"
|
||||
|
||||
// Playtime tracking system, see jobs_exp.dm
|
||||
#define EXP_TYPE_LIVING "Living"
|
||||
#define EXP_TYPE_CREW "Crew"
|
||||
#define EXP_TYPE_COMMAND "Command"
|
||||
#define EXP_TYPE_ENGINEERING "Engineering"
|
||||
#define EXP_TYPE_MEDICAL "Medical"
|
||||
#define EXP_TYPE_SCIENCE "Science"
|
||||
#define EXP_TYPE_SUPPLY "Supply"
|
||||
#define EXP_TYPE_SECURITY "Security"
|
||||
#define EXP_TYPE_SILICON "Silicon"
|
||||
#define EXP_TYPE_SERVICE "Service"
|
||||
#define EXP_TYPE_ANTAG "Antag"
|
||||
#define EXP_TYPE_SPECIAL "Special"
|
||||
#define EXP_TYPE_GHOST "Ghost"
|
||||
#define EXP_TYPE_ADMIN "Admin"
|
||||
|
||||
//Flags in the players table in the db
|
||||
#define DB_FLAG_EXEMPT 1
|
||||
|
||||
#define DEFAULT_CYBORG_NAME "Default Cyborg Name"
|
||||
|
||||
//Job preferences levels
|
||||
#define JP_LOW 1
|
||||
#define JP_MEDIUM 2
|
||||
#define JP_HIGH 3
|
||||
|
||||
//Chaos levels for dynamic voting
|
||||
#define CHAOS_NONE "None (Extended)"
|
||||
#define CHAOS_LOW "Low"
|
||||
#define CHAOS_MED "Medium"
|
||||
#define CHAOS_HIGH "High"
|
||||
#define CHAOS_MAX "Maximum"
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
|
||||
#define RDCONSOLE_UI_MODE_NORMAL 1
|
||||
#define RDCONSOLE_UI_MODE_EXPERT 2
|
||||
#define RDCONSOLE_UI_MODE_LIST 3
|
||||
|
||||
//RDSCREEN screens
|
||||
#define RDSCREEN_MENU 0
|
||||
#define RDSCREEN_TECHDISK 1
|
||||
#define RDSCREEN_DESIGNDISK 20
|
||||
#define RDSCREEN_DESIGNDISK_UPLOAD 21
|
||||
#define RDSCREEN_DECONSTRUCT 3
|
||||
#define RDSCREEN_PROTOLATHE 40
|
||||
#define RDSCREEN_PROTOLATHE_MATERIALS 41
|
||||
#define RDSCREEN_PROTOLATHE_CHEMICALS 42
|
||||
#define RDSCREEN_PROTOLATHE_CATEGORY_VIEW 43
|
||||
#define RDSCREEN_PROTOLATHE_SEARCH 44
|
||||
#define RDSCREEN_IMPRINTER 50
|
||||
#define RDSCREEN_IMPRINTER_MATERIALS 51
|
||||
#define RDSCREEN_IMPRINTER_CHEMICALS 52
|
||||
#define RDSCREEN_IMPRINTER_CATEGORY_VIEW 53
|
||||
#define RDSCREEN_IMPRINTER_SEARCH 54
|
||||
#define RDSCREEN_SETTINGS 61
|
||||
#define RDSCREEN_DEVICE_LINKING 62
|
||||
#define RDSCREEN_TECHWEB 70
|
||||
#define RDSCREEN_TECHWEB_NODEVIEW 71
|
||||
#define RDSCREEN_TECHWEB_DESIGNVIEW 72
|
||||
|
||||
#define RDSCREEN_NOBREAK "<NO_HTML_BREAK>"
|
||||
|
||||
#define RDSCREEN_TEXT_NO_PROTOLATHE "<div><h3>No Protolathe Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_IMPRINTER "<div><h3>No Circuit Imprinter Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DECONSTRUCT "<div><h3>No Destructive Analyzer Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_TDISK "<div><h3>No Technology Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DDISK "<div><h3>No Design Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SNODE "<div><h3>No Technology Node Selected!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SDESIGN "<div><h3>No Design Selected!</h3></div><br>"
|
||||
|
||||
#define RDSCREEN_UI_LATHE_CHECK if(QDELETED(linked_lathe)) { return RDSCREEN_TEXT_NO_PROTOLATHE }
|
||||
#define RDSCREEN_UI_IMPRINTER_CHECK if(QDELETED(linked_imprinter)) { return RDSCREEN_TEXT_NO_IMPRINTER }
|
||||
#define RDSCREEN_UI_DECONSTRUCT_CHECK if(QDELETED(linked_destroy)) { return RDSCREEN_TEXT_NO_DECONSTRUCT }
|
||||
#define RDSCREEN_UI_TDISK_CHECK if(QDELETED(t_disk)) { return RDSCREEN_TEXT_NO_TDISK }
|
||||
#define RDSCREEN_UI_DDISK_CHECK if(QDELETED(d_disk)) { return RDSCREEN_TEXT_NO_DDISK }
|
||||
#define RDSCREEN_UI_SNODE_CHECK if(!selected_node) { return RDSCREEN_TEXT_NO_SNODE }
|
||||
#define RDSCREEN_UI_SDESIGN_CHECK if(!selected_design) { return RDSCREEN_TEXT_NO_SDESIGN }
|
||||
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MAIN 1
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CHEMICALS 2
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MATERIALS 3
|
||||
#define RESEARCH_FABRICATOR_SCREEN_SEARCH 4
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5
|
||||
|
||||
#define DEPARTMENTAL_FLAG_SECURITY (1<<0)
|
||||
#define DEPARTMENTAL_FLAG_MEDICAL (1<<1)
|
||||
#define DEPARTMENTAL_FLAG_CARGO (1<<2)
|
||||
#define DEPARTMENTAL_FLAG_SCIENCE (1<<3)
|
||||
#define DEPARTMENTAL_FLAG_ENGINEERING (1<<4)
|
||||
#define DEPARTMENTAL_FLAG_SERVICE (1<<5)
|
||||
#define DEPARTMENTAL_FLAG_ALL (1<<6) //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS!
|
||||
//#define DEPARTMENTAL_FLAG_MINING (1<<7)
|
||||
|
||||
#define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN"
|
||||
|
||||
#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials"
|
||||
|
||||
//When adding new types, update the list below!
|
||||
#define TECHWEB_POINT_TYPE_GENERIC "General Research"
|
||||
|
||||
#define TECHWEB_POINT_TYPE_DEFAULT TECHWEB_POINT_TYPE_GENERIC
|
||||
|
||||
//defined here so people don't forget to change this!
|
||||
#define TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES list(\
|
||||
TECHWEB_POINT_TYPE_GENERIC = "General Research"\
|
||||
)
|
||||
|
||||
#define TECHWEB_BOMB_POINTCAP 50000 //Adjust as needed; Stops toxins from nullifying RND progression mechanics. Current Value Cap Radius: 100
|
||||
|
||||
#define RDCONSOLE_UI_MODE_NORMAL 1
|
||||
#define RDCONSOLE_UI_MODE_EXPERT 2
|
||||
#define RDCONSOLE_UI_MODE_LIST 3
|
||||
|
||||
//RDSCREEN screens
|
||||
#define RDSCREEN_MENU 0
|
||||
#define RDSCREEN_TECHDISK 1
|
||||
#define RDSCREEN_DESIGNDISK 20
|
||||
#define RDSCREEN_DESIGNDISK_UPLOAD 21
|
||||
#define RDSCREEN_DECONSTRUCT 3
|
||||
#define RDSCREEN_PROTOLATHE 40
|
||||
#define RDSCREEN_PROTOLATHE_MATERIALS 41
|
||||
#define RDSCREEN_PROTOLATHE_CHEMICALS 42
|
||||
#define RDSCREEN_PROTOLATHE_CATEGORY_VIEW 43
|
||||
#define RDSCREEN_PROTOLATHE_SEARCH 44
|
||||
#define RDSCREEN_IMPRINTER 50
|
||||
#define RDSCREEN_IMPRINTER_MATERIALS 51
|
||||
#define RDSCREEN_IMPRINTER_CHEMICALS 52
|
||||
#define RDSCREEN_IMPRINTER_CATEGORY_VIEW 53
|
||||
#define RDSCREEN_IMPRINTER_SEARCH 54
|
||||
#define RDSCREEN_SETTINGS 61
|
||||
#define RDSCREEN_DEVICE_LINKING 62
|
||||
#define RDSCREEN_TECHWEB 70
|
||||
#define RDSCREEN_TECHWEB_NODEVIEW 71
|
||||
#define RDSCREEN_TECHWEB_DESIGNVIEW 72
|
||||
|
||||
#define RDSCREEN_NOBREAK "<NO_HTML_BREAK>"
|
||||
|
||||
#define RDSCREEN_TEXT_NO_PROTOLATHE "<div><h3>No Protolathe Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_IMPRINTER "<div><h3>No Circuit Imprinter Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DECONSTRUCT "<div><h3>No Destructive Analyzer Linked!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_TDISK "<div><h3>No Technology Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_DDISK "<div><h3>No Design Disk Inserted!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SNODE "<div><h3>No Technology Node Selected!</h3></div><br>"
|
||||
#define RDSCREEN_TEXT_NO_SDESIGN "<div><h3>No Design Selected!</h3></div><br>"
|
||||
|
||||
#define RDSCREEN_UI_LATHE_CHECK if(QDELETED(linked_lathe)) { return RDSCREEN_TEXT_NO_PROTOLATHE }
|
||||
#define RDSCREEN_UI_IMPRINTER_CHECK if(QDELETED(linked_imprinter)) { return RDSCREEN_TEXT_NO_IMPRINTER }
|
||||
#define RDSCREEN_UI_DECONSTRUCT_CHECK if(QDELETED(linked_destroy)) { return RDSCREEN_TEXT_NO_DECONSTRUCT }
|
||||
#define RDSCREEN_UI_TDISK_CHECK if(QDELETED(t_disk)) { return RDSCREEN_TEXT_NO_TDISK }
|
||||
#define RDSCREEN_UI_DDISK_CHECK if(QDELETED(d_disk)) { return RDSCREEN_TEXT_NO_DDISK }
|
||||
#define RDSCREEN_UI_SNODE_CHECK if(!selected_node) { return RDSCREEN_TEXT_NO_SNODE }
|
||||
#define RDSCREEN_UI_SDESIGN_CHECK if(!selected_design) { return RDSCREEN_TEXT_NO_SDESIGN }
|
||||
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MAIN 1
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CHEMICALS 2
|
||||
#define RESEARCH_FABRICATOR_SCREEN_MATERIALS 3
|
||||
#define RESEARCH_FABRICATOR_SCREEN_SEARCH 4
|
||||
#define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5
|
||||
|
||||
#define DEPARTMENTAL_FLAG_SECURITY (1<<0)
|
||||
#define DEPARTMENTAL_FLAG_MEDICAL (1<<1)
|
||||
#define DEPARTMENTAL_FLAG_CARGO (1<<2)
|
||||
#define DEPARTMENTAL_FLAG_SCIENCE (1<<3)
|
||||
#define DEPARTMENTAL_FLAG_ENGINEERING (1<<4)
|
||||
#define DEPARTMENTAL_FLAG_SERVICE (1<<5)
|
||||
#define DEPARTMENTAL_FLAG_ALL (1<<6) //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS!
|
||||
//#define DEPARTMENTAL_FLAG_MINING (1<<7)
|
||||
|
||||
#define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN"
|
||||
|
||||
#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials"
|
||||
|
||||
//When adding new types, update the list below!
|
||||
#define TECHWEB_POINT_TYPE_GENERIC "General Research"
|
||||
|
||||
#define TECHWEB_POINT_TYPE_DEFAULT TECHWEB_POINT_TYPE_GENERIC
|
||||
|
||||
//defined here so people don't forget to change this!
|
||||
#define TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES list(\
|
||||
TECHWEB_POINT_TYPE_GENERIC = "General Research"\
|
||||
)
|
||||
|
||||
#define TECHWEB_BOMB_POINTCAP 50000 //Adjust as needed; Stops toxins from nullifying RND progression mechanics. Current Value Cap Radius: 100
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
//max channel is 1024. Only go lower from here, because byond tends to pick the first availiable channel to play sounds on
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
#define CHANNEL_JUKEBOX_START 1016 //The gap between this and CHANNEL_JUKEBOX determines the amount of free jukebox channels. This currently allows 6 jukebox channels to exist.
|
||||
#define CHANNEL_JUSTICAR_ARK 1015
|
||||
#define CHANNEL_HEARTBEAT 1014 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1013
|
||||
#define CHANNEL_BUZZ 1012
|
||||
#define CHANNEL_BICYCLE 1011
|
||||
|
||||
//CIT CHANNELS - TRY NOT TO REGRESS
|
||||
#define CHANNEL_PRED 1010
|
||||
#define CHANNEL_DIGEST 1009
|
||||
#define CHANNEL_PREYLOOP 1008
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1008 //CIT CHANGE - COMPENSATES FOR VORESOUND CHANNELS
|
||||
|
||||
|
||||
#define SOUND_MINIMUM_PRESSURE 10
|
||||
#define FALLOFF_SOUNDS 1
|
||||
|
||||
|
||||
//Ambience types
|
||||
|
||||
#define GENERIC list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
|
||||
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
|
||||
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
|
||||
'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
|
||||
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
|
||||
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambigen15.ogg')
|
||||
|
||||
#define HOLY list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg',\
|
||||
'sound/ambience/ambicha4.ogg', 'sound/ambience/ambiholy.ogg', 'sound/ambience/ambiholy2.ogg',\
|
||||
'sound/ambience/ambiholy3.ogg')
|
||||
|
||||
#define HIGHSEC list('sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg')
|
||||
|
||||
#define RUINS list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambitech3.ogg',\
|
||||
'sound/ambience/ambimystery.ogg', 'sound/ambience/ambimaint1.ogg')
|
||||
|
||||
#define ENGINEERING list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
|
||||
|
||||
#define MINING list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg', 'sound/ambience/ambilava.ogg')
|
||||
|
||||
#define MEDICAL list('sound/ambience/ambinice.ogg')
|
||||
|
||||
#define SPOOKY list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/ambiruin7.ogg','sound/ambience/ambiruin6.ogg',\
|
||||
'sound/ambience/ambiodd.ogg', 'sound/ambience/ambimystery.ogg')
|
||||
|
||||
#define SPACE list('sound/ambience/ambispace.ogg', 'sound/ambience/ambispace2.ogg', 'sound/ambience/title2.ogg', 'sound/ambience/ambiatmos.ogg')
|
||||
|
||||
#define MAINTENANCE list('sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg', 'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg',\
|
||||
'sound/ambience/ambimaint5.ogg', 'sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg', 'sound/ambience/ambitech2.ogg' )
|
||||
|
||||
#define AWAY_MISSION list('sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambiodd.ogg')
|
||||
|
||||
#define REEBE list('sound/ambience/ambireebe1.ogg', 'sound/ambience/ambireebe2.ogg', 'sound/ambience/ambireebe3.ogg')
|
||||
|
||||
|
||||
|
||||
#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\
|
||||
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
|
||||
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
|
||||
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
|
||||
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
|
||||
//max channel is 1024. Only go lower from here, because byond tends to pick the first availiable channel to play sounds on
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
#define CHANNEL_JUKEBOX_START 1016 //The gap between this and CHANNEL_JUKEBOX determines the amount of free jukebox channels. This currently allows 6 jukebox channels to exist.
|
||||
#define CHANNEL_JUSTICAR_ARK 1015
|
||||
#define CHANNEL_HEARTBEAT 1014 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1013
|
||||
#define CHANNEL_BUZZ 1012
|
||||
#define CHANNEL_BICYCLE 1011
|
||||
|
||||
//CIT CHANNELS - TRY NOT TO REGRESS
|
||||
#define CHANNEL_PRED 1010
|
||||
#define CHANNEL_DIGEST 1009
|
||||
#define CHANNEL_PREYLOOP 1008
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1008 //CIT CHANGE - COMPENSATES FOR VORESOUND CHANNELS
|
||||
|
||||
|
||||
#define SOUND_MINIMUM_PRESSURE 10
|
||||
#define FALLOFF_SOUNDS 1
|
||||
|
||||
|
||||
//Ambience types
|
||||
|
||||
#define GENERIC list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
|
||||
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
|
||||
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
|
||||
'sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg',\
|
||||
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
|
||||
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg','sound/ambience/ambigen15.ogg')
|
||||
|
||||
#define HOLY list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg',\
|
||||
'sound/ambience/ambicha4.ogg', 'sound/ambience/ambiholy.ogg', 'sound/ambience/ambiholy2.ogg',\
|
||||
'sound/ambience/ambiholy3.ogg')
|
||||
|
||||
#define HIGHSEC list('sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg')
|
||||
|
||||
#define RUINS list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambitech3.ogg',\
|
||||
'sound/ambience/ambimystery.ogg', 'sound/ambience/ambimaint1.ogg')
|
||||
|
||||
#define ENGINEERING list('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambitech3.ogg')
|
||||
|
||||
#define MINING list('sound/ambience/ambimine.ogg', 'sound/ambience/ambicave.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint1.ogg', 'sound/ambience/ambilava.ogg')
|
||||
|
||||
#define MEDICAL list('sound/ambience/ambinice.ogg')
|
||||
|
||||
#define SPOOKY list('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/ambiruin7.ogg','sound/ambience/ambiruin6.ogg',\
|
||||
'sound/ambience/ambiodd.ogg', 'sound/ambience/ambimystery.ogg')
|
||||
|
||||
#define SPACE list('sound/ambience/ambispace.ogg', 'sound/ambience/ambispace2.ogg', 'sound/ambience/title2.ogg', 'sound/ambience/ambiatmos.ogg')
|
||||
|
||||
#define MAINTENANCE list('sound/ambience/ambimaint1.ogg', 'sound/ambience/ambimaint2.ogg', 'sound/ambience/ambimaint3.ogg', 'sound/ambience/ambimaint4.ogg',\
|
||||
'sound/ambience/ambimaint5.ogg', 'sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg', 'sound/ambience/ambitech2.ogg' )
|
||||
|
||||
#define AWAY_MISSION list('sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiruin.ogg',\
|
||||
'sound/ambience/ambiruin2.ogg', 'sound/ambience/ambiruin3.ogg', 'sound/ambience/ambiruin4.ogg',\
|
||||
'sound/ambience/ambiruin5.ogg', 'sound/ambience/ambiruin6.ogg', 'sound/ambience/ambiruin7.ogg',\
|
||||
'sound/ambience/ambidanger.ogg', 'sound/ambience/ambidanger2.ogg', 'sound/ambience/ambimaint.ogg',\
|
||||
'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg', 'sound/ambience/ambiodd.ogg')
|
||||
|
||||
#define REEBE list('sound/ambience/ambireebe1.ogg', 'sound/ambience/ambireebe2.ogg', 'sound/ambience/ambireebe3.ogg')
|
||||
|
||||
|
||||
|
||||
#define CREEPY_SOUNDS list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/heart_beat.ogg', 'sound/effects/screech.ogg',\
|
||||
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
|
||||
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
|
||||
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
|
||||
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
Used with the various stat variables (mob, machines)
|
||||
*/
|
||||
|
||||
//mob/var/stat things
|
||||
#define CONSCIOUS 0
|
||||
#define SOFT_CRIT 1
|
||||
#define UNCONSCIOUS 2
|
||||
#define DEAD 3
|
||||
|
||||
//Maximum healthiness an individual can have
|
||||
#define MAX_SATIETY 600
|
||||
|
||||
// bitflags for machine stat variable
|
||||
#define BROKEN (1<<0)
|
||||
#define NOPOWER (1<<1)
|
||||
#define MAINT (1<<2) // under maintaince
|
||||
#define EMPED (1<<3) // temporary broken by EMP pulse
|
||||
|
||||
//ai power requirement defines
|
||||
#define POWER_REQ_ALL 1
|
||||
#define POWER_REQ_CLOCKCULT 2
|
||||
/*
|
||||
Used with the various stat variables (mob, machines)
|
||||
*/
|
||||
|
||||
//mob/var/stat things
|
||||
#define CONSCIOUS 0
|
||||
#define SOFT_CRIT 1
|
||||
#define UNCONSCIOUS 2
|
||||
#define DEAD 3
|
||||
|
||||
//Maximum healthiness an individual can have
|
||||
#define MAX_SATIETY 600
|
||||
|
||||
// bitflags for machine stat variable
|
||||
#define BROKEN (1<<0)
|
||||
#define NOPOWER (1<<1)
|
||||
#define MAINT (1<<2) // under maintaince
|
||||
#define EMPED (1<<3) // temporary broken by EMP pulse
|
||||
|
||||
//ai power requirement defines
|
||||
#define POWER_REQ_ALL 1
|
||||
#define POWER_REQ_CLOCKCULT 2
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
// Subsystems shutdown in the reverse of the order they initialize in
|
||||
// The numbers just define the ordering, they are meaningless otherwise.
|
||||
|
||||
#define INIT_ORDER_FAIL2TOPIC 22
|
||||
#define INIT_ORDER_TITLE 20
|
||||
#define INIT_ORDER_GARBAGE 19
|
||||
#define INIT_ORDER_DBCORE 18
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#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) GENERAL_PROTECT_DATUM(##Path)
|
||||
#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) GENERAL_PROTECT_DATUM(##Path)
|
||||
|
||||
@@ -1,242 +1,242 @@
|
||||
//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
|
||||
|
||||
//Uncomment this if you wish to allow the game to interact with TGS 3
|
||||
//This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()()
|
||||
//#define TGS_V3_API
|
||||
|
||||
//Required interfaces (fill in with your codebase equivalent):
|
||||
|
||||
//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
|
||||
|
||||
#define TGS_EVENT_PORT_SWAP -2 //before a port change is about to happen, extra parameter is new port
|
||||
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //before a reboot mode change, extras parameters are the current and new reboot mode enums
|
||||
|
||||
//See the descriptions for these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs
|
||||
#define TGS_EVENT_REPO_RESET_ORIGIN 0
|
||||
#define TGS_EVENT_REPO_CHECKOUT 1
|
||||
#define TGS_EVENT_REPO_FETCH 2
|
||||
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
|
||||
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
|
||||
#define TGS_EVENT_BYOND_INSTALL_START 5
|
||||
#define TGS_EVENT_BYOND_INSTALL_FAIL 6
|
||||
#define TGS_EVENT_BYOND_ACTIVE_VERSION_CHANGE 7
|
||||
#define TGS_EVENT_COMPILE_START 8
|
||||
#define TGS_EVENT_COMPILE_CANCELLED 9
|
||||
#define TGS_EVENT_COMPILE_FAILURE 10
|
||||
#define TGS_EVENT_COMPILE_COMPLETE 11
|
||||
#define TGS_EVENT_INSTANCE_AUTO_UPDATE_START 12
|
||||
#define TGS_EVENT_REPO_MERGE_CONFLICT 13
|
||||
|
||||
//OTHER ENUMS
|
||||
|
||||
#define TGS_REBOOT_MODE_NORMAL 0
|
||||
#define TGS_REBOOT_MODE_SHUTDOWN 1
|
||||
#define TGS_REBOOT_MODE_RESTART 2
|
||||
|
||||
#define TGS_SECURITY_TRUSTED 0
|
||||
#define TGS_SECURITY_SAFE 1
|
||||
#define TGS_SECURITY_ULTRASAFE 2
|
||||
|
||||
//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
|
||||
//minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated
|
||||
/world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE)
|
||||
return
|
||||
|
||||
//Call this when your initializations are complete and your game is ready to play before any player interactions happen
|
||||
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
|
||||
//Most importantly, before this point, note that any static files or directories may be in use by another server. Your code should account for this
|
||||
//This function should not be called before ..() in /world/New()
|
||||
/world/proc/TgsInitializationComplete()
|
||||
return
|
||||
|
||||
//Put this at the start of /world/Topic()
|
||||
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return
|
||||
|
||||
//Call this at the beginning of world/Reboot(reason)
|
||||
/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/connection_name //the name of the configured chat connection
|
||||
var/is_admin_channel //if the server operator has marked this channel for game admins only
|
||||
var/is_private_channel //if this is a private chat channel
|
||||
var/custom_tag //user defined string associated with channel
|
||||
|
||||
//represents a chat user
|
||||
/datum/tgs_chat_user
|
||||
var/id //Internal user representation, requires channel to be unique
|
||||
var/friendly_name //The user's public name
|
||||
var/mention //The text to use to ping this user in a message
|
||||
var/datum/tgs_chat_channel/channel //The /datum/tgs_chat_channel this user was from
|
||||
|
||||
//user definable callback for handling events
|
||||
//extra parameters may be specified depending on the event
|
||||
/datum/tgs_event_handler/proc/HandleEvent(event_code, ...)
|
||||
set waitfor = FALSE
|
||||
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
|
||||
|
||||
//Get the current BYOND security level
|
||||
/world/proc/TgsSecurityLevel()
|
||||
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.
|
||||
//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
|
||||
|
||||
//Uncomment this if you wish to allow the game to interact with TGS 3
|
||||
//This will raise the minimum required security level of your game to TGS_SECURITY_TRUSTED due to it utilizing call()()
|
||||
//#define TGS_V3_API
|
||||
|
||||
//Required interfaces (fill in with your codebase equivalent):
|
||||
|
||||
//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
|
||||
|
||||
#define TGS_EVENT_PORT_SWAP -2 //before a port change is about to happen, extra parameter is new port
|
||||
#define TGS_EVENT_REBOOT_MODE_CHANGE -1 //before a reboot mode change, extras parameters are the current and new reboot mode enums
|
||||
|
||||
//See the descriptions for these codes here: https://github.com/tgstation/tgstation-server/blob/master/src/Tgstation.Server.Host/Components/EventType.cs
|
||||
#define TGS_EVENT_REPO_RESET_ORIGIN 0
|
||||
#define TGS_EVENT_REPO_CHECKOUT 1
|
||||
#define TGS_EVENT_REPO_FETCH 2
|
||||
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
|
||||
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
|
||||
#define TGS_EVENT_BYOND_INSTALL_START 5
|
||||
#define TGS_EVENT_BYOND_INSTALL_FAIL 6
|
||||
#define TGS_EVENT_BYOND_ACTIVE_VERSION_CHANGE 7
|
||||
#define TGS_EVENT_COMPILE_START 8
|
||||
#define TGS_EVENT_COMPILE_CANCELLED 9
|
||||
#define TGS_EVENT_COMPILE_FAILURE 10
|
||||
#define TGS_EVENT_COMPILE_COMPLETE 11
|
||||
#define TGS_EVENT_INSTANCE_AUTO_UPDATE_START 12
|
||||
#define TGS_EVENT_REPO_MERGE_CONFLICT 13
|
||||
|
||||
//OTHER ENUMS
|
||||
|
||||
#define TGS_REBOOT_MODE_NORMAL 0
|
||||
#define TGS_REBOOT_MODE_SHUTDOWN 1
|
||||
#define TGS_REBOOT_MODE_RESTART 2
|
||||
|
||||
#define TGS_SECURITY_TRUSTED 0
|
||||
#define TGS_SECURITY_SAFE 1
|
||||
#define TGS_SECURITY_ULTRASAFE 2
|
||||
|
||||
//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
|
||||
//minimum_required_security_level: The minimum required security level to run the game in which the DMAPI is integrated
|
||||
/world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE)
|
||||
return
|
||||
|
||||
//Call this when your initializations are complete and your game is ready to play before any player interactions happen
|
||||
//This may use world.sleep_offline to make this happen so ensure no changes are made to it while this call is running
|
||||
//Most importantly, before this point, note that any static files or directories may be in use by another server. Your code should account for this
|
||||
//This function should not be called before ..() in /world/New()
|
||||
/world/proc/TgsInitializationComplete()
|
||||
return
|
||||
|
||||
//Put this at the start of /world/Topic()
|
||||
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return
|
||||
|
||||
//Call this at the beginning of world/Reboot(reason)
|
||||
/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/connection_name //the name of the configured chat connection
|
||||
var/is_admin_channel //if the server operator has marked this channel for game admins only
|
||||
var/is_private_channel //if this is a private chat channel
|
||||
var/custom_tag //user defined string associated with channel
|
||||
|
||||
//represents a chat user
|
||||
/datum/tgs_chat_user
|
||||
var/id //Internal user representation, requires channel to be unique
|
||||
var/friendly_name //The user's public name
|
||||
var/mention //The text to use to ping this user in a message
|
||||
var/datum/tgs_chat_channel/channel //The /datum/tgs_chat_channel this user was from
|
||||
|
||||
//user definable callback for handling events
|
||||
//extra parameters may be specified depending on the event
|
||||
/datum/tgs_event_handler/proc/HandleEvent(event_code, ...)
|
||||
set waitfor = FALSE
|
||||
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
|
||||
|
||||
//Get the current BYOND security level
|
||||
/world/proc/TgsSecurityLevel()
|
||||
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,21 +1,21 @@
|
||||
// Tool types
|
||||
#define TOOL_CROWBAR "crowbar"
|
||||
#define TOOL_MULTITOOL "multitool"
|
||||
#define TOOL_SCREWDRIVER "screwdriver"
|
||||
#define TOOL_WIRECUTTER "wirecutter"
|
||||
#define TOOL_WRENCH "wrench"
|
||||
#define TOOL_WELDER "welder"
|
||||
#define TOOL_ANALYZER "analyzer"
|
||||
#define TOOL_MINING "mining"
|
||||
#define TOOL_SHOVEL "shovel"
|
||||
#define TOOL_RETRACTOR "retractor"
|
||||
#define TOOL_HEMOSTAT "hemostat"
|
||||
#define TOOL_CAUTERY "cautery"
|
||||
#define TOOL_DRILL "drill"
|
||||
#define TOOL_SCALPEL "scalpel"
|
||||
#define TOOL_SAW "saw"
|
||||
|
||||
|
||||
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
|
||||
// tool sound is only played when op is started. If not, it's played twice.
|
||||
#define MIN_TOOL_SOUND_DELAY 20
|
||||
// Tool types
|
||||
#define TOOL_CROWBAR "crowbar"
|
||||
#define TOOL_MULTITOOL "multitool"
|
||||
#define TOOL_SCREWDRIVER "screwdriver"
|
||||
#define TOOL_WIRECUTTER "wirecutter"
|
||||
#define TOOL_WRENCH "wrench"
|
||||
#define TOOL_WELDER "welder"
|
||||
#define TOOL_ANALYZER "analyzer"
|
||||
#define TOOL_MINING "mining"
|
||||
#define TOOL_SHOVEL "shovel"
|
||||
#define TOOL_RETRACTOR "retractor"
|
||||
#define TOOL_HEMOSTAT "hemostat"
|
||||
#define TOOL_CAUTERY "cautery"
|
||||
#define TOOL_DRILL "drill"
|
||||
#define TOOL_SCALPEL "scalpel"
|
||||
#define TOOL_SAW "saw"
|
||||
|
||||
|
||||
// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
|
||||
// tool sound is only played when op is started. If not, it's played twice.
|
||||
#define MIN_TOOL_SOUND_DELAY 20
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
#define TRAIT_NORUNNING "norunning" // You walk!
|
||||
#define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites.
|
||||
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
|
||||
#define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events"
|
||||
|
||||
|
||||
//non-mob traits
|
||||
@@ -160,19 +161,18 @@
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
#define TRAIT_PHOTOGRAPHER "photographer"
|
||||
#define TRAIT_MUSICIAN "musician"
|
||||
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
|
||||
#define TRAIT_NYMPHO "nymphomania"
|
||||
#define TRAIT_MASO "masochism"
|
||||
#define TRAIT_EXHIBITIONIST "exhibitionist"
|
||||
#define TRAIT_HIGH_BLOOD "high_blood"
|
||||
#define TRAIT_PHARMA "hepatic_pharmacokinesis"
|
||||
#define TRAIT_PARA "paraplegic"
|
||||
#define TRAIT_EMPATH "empath"
|
||||
#define TRAIT_FRIENDLY "friendly"
|
||||
#define TRAIT_ASSBLASTUSA "assblastusa"
|
||||
#define TRAIT_CULT_EYES "cult_eyes"
|
||||
#define TRAIT_AUTO_CATCH_ITEM "auto_catch_item"
|
||||
#define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman.
|
||||
#define TRAIT_FREESPRINT "free_sprinting"
|
||||
|
||||
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
|
||||
|
||||
// common trait sources
|
||||
#define TRAIT_GENERIC "generic"
|
||||
@@ -193,6 +193,7 @@
|
||||
#define ABSTRACT_ITEM_TRAIT "abstract-item"
|
||||
#define STATUS_EFFECT_TRAIT "status-effect"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
#define GHOSTROLE_TRAIT "ghostrole"
|
||||
|
||||
// unique trait sources, still defines
|
||||
#define STATUE_MUTE "statue"
|
||||
@@ -228,6 +229,7 @@
|
||||
#define SLEEPING_CARP_TRAIT "sleeping_carp"
|
||||
#define RISING_BASS_TRAIT "rising_bass"
|
||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||
#define NUKEOP_ANTAGONIST "nukeop-antagonist"
|
||||
#define MADE_UNCLONEABLE "made-uncloneable"
|
||||
#define NUKEOP_TRAIT "nuke-op"
|
||||
#define DEATHSQUAD_TRAIT "deathsquad"
|
||||
|
||||
6
code/__DEFINES/vote.dm
Normal file
6
code/__DEFINES/vote.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
#define PLURALITY_VOTING 0
|
||||
#define APPROVAL_VOTING 1
|
||||
#define RANKED_CHOICE_VOTING 2
|
||||
#define SCORE_VOTING 3
|
||||
|
||||
GLOBAL_LIST_INIT(vote_score_options,list("Bad","Poor","Acceptable","Good","Great"))
|
||||
@@ -1,50 +1,50 @@
|
||||
//retvals for attempt_wires_interaction
|
||||
#define WIRE_INTERACTION_FAIL 0
|
||||
#define WIRE_INTERACTION_SUCCESSFUL 1
|
||||
#define WIRE_INTERACTION_BLOCK 2 //don't do anything else rather than open wires and whatever else.
|
||||
|
||||
#define WIRE_DUD_PREFIX "__dud"
|
||||
#define WIRE_ACTIVATE "Activate"
|
||||
#define WIRE_AI "AI Connection"
|
||||
#define WIRE_ALARM "Alarm"
|
||||
#define WIRE_AVOIDANCE "Avoidance"
|
||||
#define WIRE_BACKUP1 "Auxiliary Power 1"
|
||||
#define WIRE_BACKUP2 "Auxiliary Power 2"
|
||||
#define WIRE_BEACON "Beacon"
|
||||
#define WIRE_BOLTS "Bolts"
|
||||
#define WIRE_BOOM "Boom"
|
||||
#define WIRE_CAMERA "Camera"
|
||||
#define WIRE_CONTRABAND "Contraband"
|
||||
#define WIRE_DELAY "Delay"
|
||||
#define WIRE_DISABLE "Disable"
|
||||
#define WIRE_DISARM "Disarm"
|
||||
#define WIRE_HACK "Hack"
|
||||
#define WIRE_IDSCAN "ID Scan"
|
||||
#define WIRE_INTERFACE "Interface"
|
||||
#define WIRE_LAWSYNC "AI Law Synchronization"
|
||||
#define WIRE_LIGHT "Bolt Lights"
|
||||
#define WIRE_LIMIT "Limiter"
|
||||
#define WIRE_LOADCHECK "Load Check"
|
||||
#define WIRE_LOCKDOWN "Lockdown"
|
||||
#define WIRE_MOTOR1 "Motor 1"
|
||||
#define WIRE_MOTOR2 "Motor 2"
|
||||
#define WIRE_OPEN "Open"
|
||||
#define WIRE_PANIC "Panic Siphon"
|
||||
#define WIRE_POWER "Power"
|
||||
#define WIRE_POWER1 "Main Power 1"
|
||||
#define WIRE_POWER2 "Main Power 2"
|
||||
#define WIRE_PROCEED "Proceed"
|
||||
#define WIRE_RX "Receive"
|
||||
#define WIRE_RESET_MODULE "Reset Module"
|
||||
#define WIRE_SAFETY "Safety"
|
||||
#define WIRE_SHOCK "High Voltage Ground"
|
||||
#define WIRE_SIGNAL "Signal"
|
||||
#define WIRE_SPEAKER "Speaker"
|
||||
#define WIRE_STRENGTH "Strength"
|
||||
#define WIRE_THROW "Throw"
|
||||
#define WIRE_TIMING "Timing"
|
||||
#define WIRE_TX "Transmit"
|
||||
#define WIRE_UNBOLT "Unbolt"
|
||||
#define WIRE_ZAP "High Voltage Circuit"
|
||||
#define WIRE_ZAP1 "High Voltage Circuit 1"
|
||||
#define WIRE_ZAP2 "High Voltage Circuit 2"
|
||||
//retvals for attempt_wires_interaction
|
||||
#define WIRE_INTERACTION_FAIL 0
|
||||
#define WIRE_INTERACTION_SUCCESSFUL 1
|
||||
#define WIRE_INTERACTION_BLOCK 2 //don't do anything else rather than open wires and whatever else.
|
||||
|
||||
#define WIRE_DUD_PREFIX "__dud"
|
||||
#define WIRE_ACTIVATE "Activate"
|
||||
#define WIRE_AI "AI Connection"
|
||||
#define WIRE_ALARM "Alarm"
|
||||
#define WIRE_AVOIDANCE "Avoidance"
|
||||
#define WIRE_BACKUP1 "Auxiliary Power 1"
|
||||
#define WIRE_BACKUP2 "Auxiliary Power 2"
|
||||
#define WIRE_BEACON "Beacon"
|
||||
#define WIRE_BOLTS "Bolts"
|
||||
#define WIRE_BOOM "Boom"
|
||||
#define WIRE_CAMERA "Camera"
|
||||
#define WIRE_CONTRABAND "Contraband"
|
||||
#define WIRE_DELAY "Delay"
|
||||
#define WIRE_DISABLE "Disable"
|
||||
#define WIRE_DISARM "Disarm"
|
||||
#define WIRE_HACK "Hack"
|
||||
#define WIRE_IDSCAN "ID Scan"
|
||||
#define WIRE_INTERFACE "Interface"
|
||||
#define WIRE_LAWSYNC "AI Law Synchronization"
|
||||
#define WIRE_LIGHT "Bolt Lights"
|
||||
#define WIRE_LIMIT "Limiter"
|
||||
#define WIRE_LOADCHECK "Load Check"
|
||||
#define WIRE_LOCKDOWN "Lockdown"
|
||||
#define WIRE_MOTOR1 "Motor 1"
|
||||
#define WIRE_MOTOR2 "Motor 2"
|
||||
#define WIRE_OPEN "Open"
|
||||
#define WIRE_PANIC "Panic Siphon"
|
||||
#define WIRE_POWER "Power"
|
||||
#define WIRE_POWER1 "Main Power 1"
|
||||
#define WIRE_POWER2 "Main Power 2"
|
||||
#define WIRE_PROCEED "Proceed"
|
||||
#define WIRE_RX "Receive"
|
||||
#define WIRE_RESET_MODULE "Reset Module"
|
||||
#define WIRE_SAFETY "Safety"
|
||||
#define WIRE_SHOCK "High Voltage Ground"
|
||||
#define WIRE_SIGNAL "Signal"
|
||||
#define WIRE_SPEAKER "Speaker"
|
||||
#define WIRE_STRENGTH "Strength"
|
||||
#define WIRE_THROW "Throw"
|
||||
#define WIRE_TIMING "Timing"
|
||||
#define WIRE_TX "Transmit"
|
||||
#define WIRE_UNBOLT "Unbolt"
|
||||
#define WIRE_ZAP "High Voltage Circuit"
|
||||
#define WIRE_ZAP1 "High Voltage Circuit 1"
|
||||
#define WIRE_ZAP2 "High Voltage Circuit 2"
|
||||
|
||||
@@ -121,6 +121,17 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
flavor_text = sanitize(new_flavor)
|
||||
to_chat(src, "Your flavor text has been updated.")
|
||||
|
||||
//Flavor Text
|
||||
/mob/living/carbon/human/verb/set_flavor_2()
|
||||
set name = "Set Temporary Flavor Text"
|
||||
set desc = "Sets a description of your character's current appearance. Use this for emotions, poses etc."
|
||||
set category = "IC"
|
||||
|
||||
var/new_flavor = input(src, "Enter your new temporary flavor text:", "Temporary flavor text", null) as message|null
|
||||
if(!isnull(new_flavor))
|
||||
flavor_text_2 = sanitize(new_flavor)
|
||||
to_chat(src, "Your temporary flavor text has been updated.")
|
||||
|
||||
//LOOC toggles
|
||||
/client/verb/listen_looc()
|
||||
set name = "Show/Hide LOOC"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -78,7 +78,6 @@
|
||||
if (CONFIG_GET(flag/log_manifest))
|
||||
WRITE_LOG(GLOB.world_manifest_log, "[ckey] \\ [body.real_name] \\ [mind.assigned_role] \\ [mind.special_role ? mind.special_role : "NONE"] \\ [latejoin ? "LATEJOIN":"ROUNDSTART"]")
|
||||
|
||||
|
||||
/proc/log_say(text)
|
||||
if (CONFIG_GET(flag/log_say))
|
||||
WRITE_LOG(GLOB.world_game_log, "SAY: [text]")
|
||||
@@ -121,7 +120,6 @@
|
||||
if (CONFIG_GET(flag/log_vote))
|
||||
WRITE_LOG(GLOB.world_game_log, "VOTE: [text]")
|
||||
|
||||
|
||||
/proc/log_topic(text)
|
||||
WRITE_LOG(GLOB.world_game_log, "TOPIC: [text]")
|
||||
|
||||
@@ -141,6 +139,9 @@
|
||||
if (CONFIG_GET(flag/log_job_debug))
|
||||
WRITE_LOG(GLOB.world_job_debug_log, "JOB: [text]")
|
||||
|
||||
/proc/log_subsystem(subsystem, text)
|
||||
WRITE_LOG(GLOB.subsystem_log, "[subsystem]: [text]")
|
||||
|
||||
/* Log to both DD and the logfile. */
|
||||
/proc/log_world(text)
|
||||
#ifdef USE_CUSTOM_ERROR_HANDLER
|
||||
@@ -157,6 +158,8 @@
|
||||
WRITE_LOG(GLOB.config_error_log, text)
|
||||
SEND_TEXT(world.log, text)
|
||||
|
||||
/proc/log_mapping(text)
|
||||
WRITE_LOG(GLOB.world_map_error_log, text)
|
||||
|
||||
/* For logging round startup. */
|
||||
/proc/start_log(log)
|
||||
|
||||
@@ -43,6 +43,13 @@
|
||||
var/static/blacklisted_areas = typecacheof(list(
|
||||
/area/space,
|
||||
))
|
||||
|
||||
if(creator)
|
||||
if(creator.create_area_cooldown >= world.time)
|
||||
to_chat(creator, "<span class='warning'>You're trying to create a new area a little too fast.</span>")
|
||||
return
|
||||
creator.create_area_cooldown = world.time + 10
|
||||
|
||||
var/list/turfs = detect_room(get_turf(creator), area_or_turf_fail_types)
|
||||
if(!turfs)
|
||||
to_chat(creator, "<span class='warning'>The new area must be completely airtight and not a part of a shuttle.</span>")
|
||||
|
||||
@@ -97,6 +97,9 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
|
||||
return sorttext(B.sample_object.name, A.sample_object.name)
|
||||
|
||||
/proc/cmp_reagents_asc(datum/reagent/a, datum/reagent/b)
|
||||
return sorttext(initial(b.name),initial(a.name))
|
||||
|
||||
/proc/cmp_quirk_asc(datum/quirk/A, datum/quirk/B)
|
||||
var/a_sign = num2sign(initial(A.value) * -1)
|
||||
var/b_sign = num2sign(initial(B.value) * -1)
|
||||
|
||||
62
code/__HELPERS/custom_holoforms.dm
Normal file
62
code/__HELPERS/custom_holoforms.dm
Normal file
@@ -0,0 +1,62 @@
|
||||
// Generates a holoform appearance
|
||||
// Equipment list is slot = path.
|
||||
/proc/generate_custom_holoform_from_prefs(datum/preferences/prefs, list/equipment_by_slot, list/inhand_equipment, copy_job = FALSE, apply_loadout = FALSE)
|
||||
ASSERT(prefs)
|
||||
var/mob/living/carbon/human/dummy/mannequin = generate_or_wait_for_human_dummy(DUMMY_HUMAN_SLOT_HOLOFORM)
|
||||
prefs.copy_to(mannequin)
|
||||
if(apply_loadout && prefs.parent)
|
||||
SSjob.equip_loadout(prefs.parent.mob, mannequin, bypass_prereqs = TRUE)
|
||||
if(copy_job)
|
||||
var/datum/job/highest = prefs.get_highest_job()
|
||||
if(highest && !istype(highest, /datum/job/ai) && !istype(highest, /datum/job/cyborg))
|
||||
highest.equip(mannequin, TRUE, preference_source = prefs.parent)
|
||||
|
||||
if(length(equipment_by_slot))
|
||||
for(var/slot in equipment_by_slot)
|
||||
var/obj/item/I = new equipment_by_slot[slot]
|
||||
mannequin.equip_to_slot_if_possible(I, slot, TRUE, TRUE, TRUE, TRUE)
|
||||
if(length(inhand_equipment))
|
||||
for(var/path in inhand_equipment)
|
||||
var/obj/item/I = new path
|
||||
mannequin.equip_to_slot_if_possible(I, SLOT_HANDS, TRUE, TRUE, TRUE, TRUE)
|
||||
|
||||
|
||||
var/icon/combined = new
|
||||
for(var/d in GLOB.cardinals)
|
||||
mannequin.setDir(d)
|
||||
COMPILE_OVERLAYS(mannequin)
|
||||
CHECK_TICK
|
||||
var/icon/capture = getFlatIcon(mannequin)
|
||||
CHECK_TICK
|
||||
combined.Insert(capture, dir = d)
|
||||
CHECK_TICK
|
||||
|
||||
unset_busy_human_dummy(DUMMY_HUMAN_SLOT_HOLOFORM)
|
||||
return combined
|
||||
|
||||
/proc/process_holoform_icon_filter(icon/I, filter_type, clone = TRUE)
|
||||
if(clone)
|
||||
I = icon(I) //Clone
|
||||
switch(filter_type)
|
||||
if(HOLOFORM_FILTER_AI)
|
||||
I = getHologramIcon(I)
|
||||
if(HOLOFORM_FILTER_STATIC)
|
||||
I = getStaticIcon(I)
|
||||
if(HOLOFORM_FILTER_PAI)
|
||||
I = getPAIHologramIcon(I)
|
||||
return I
|
||||
|
||||
//Errors go to user.
|
||||
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, mob/user)
|
||||
if(user)
|
||||
if(user.client.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
|
||||
to_chat(user, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
|
||||
return
|
||||
return generate_custom_holoform_from_prefs(prefs, null, null, TRUE, TRUE)
|
||||
|
||||
//Prompts this client for custom holoform parameters.
|
||||
/proc/user_interface_custom_holoform(client/C)
|
||||
var/datum/preferences/target_prefs = C.prefs
|
||||
ASSERT(target_prefs)
|
||||
//In the future, maybe add custom path allowances a la admin create outfit but for now..
|
||||
return generate_custom_holoform_from_prefs_safe(target_prefs, C.mob)
|
||||
@@ -1,73 +1,73 @@
|
||||
//Sends resource files to client cache
|
||||
/client/proc/getFiles()
|
||||
for(var/file in args)
|
||||
src << browse_rsc(file)
|
||||
|
||||
/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "md"))
|
||||
var/path = root
|
||||
|
||||
for(var/i=0, i<max_iterations, i++)
|
||||
var/list/choices = flist(path)
|
||||
if(path != root)
|
||||
choices.Insert(1,"/")
|
||||
|
||||
var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
|
||||
switch(choice)
|
||||
if(null)
|
||||
return
|
||||
if("/")
|
||||
path = root
|
||||
continue
|
||||
path += choice
|
||||
|
||||
if(copytext(path,-1,0) != "/") //didn't choose a directory, no need to iterate again
|
||||
break
|
||||
var/extensions
|
||||
for(var/i in valid_extensions)
|
||||
if(extensions)
|
||||
extensions += "|"
|
||||
extensions += "[i]"
|
||||
var/regex/valid_ext = new("\\.([extensions])$", "i")
|
||||
if( !fexists(path) || !(valid_ext.Find(path)) )
|
||||
to_chat(src, "<font color='red'>Error: browse_files(): File not found/Invalid file([path]).</font>")
|
||||
return
|
||||
|
||||
return path
|
||||
|
||||
#define FTPDELAY 200 //200 tick delay to discourage spam
|
||||
#define ADMIN_FTPDELAY_MODIFIER 0.5 //Admins get to spam files faster since we ~trust~ them!
|
||||
/* This proc is a failsafe to prevent spamming of file requests.
|
||||
It is just a timer that only permits a download every [FTPDELAY] ticks.
|
||||
This can be changed by modifying FTPDELAY's value above.
|
||||
|
||||
PLEASE USE RESPONSIBLY, Some log files can reach sizes of 4MB! */
|
||||
/client/proc/file_spam_check()
|
||||
var/time_to_wait = GLOB.fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
|
||||
return 1
|
||||
var/delay = FTPDELAY
|
||||
if(holder)
|
||||
delay *= ADMIN_FTPDELAY_MODIFIER
|
||||
GLOB.fileaccess_timer = world.time + delay
|
||||
return 0
|
||||
#undef FTPDELAY
|
||||
#undef ADMIN_FTPDELAY_MODIFIER
|
||||
|
||||
/proc/pathwalk(path)
|
||||
var/list/jobs = list(path)
|
||||
var/list/filenames = list()
|
||||
|
||||
while(jobs.len)
|
||||
var/current_dir = pop(jobs)
|
||||
var/list/new_filenames = flist(current_dir)
|
||||
for(var/new_filename in new_filenames)
|
||||
// if filename ends in / it is a directory, append to currdir
|
||||
if(findtext(new_filename, "/", -1))
|
||||
jobs += current_dir + new_filename
|
||||
else
|
||||
filenames += current_dir + new_filename
|
||||
return filenames
|
||||
|
||||
/proc/pathflatten(path)
|
||||
return replacetext(path, "/", "_")
|
||||
//Sends resource files to client cache
|
||||
/client/proc/getFiles()
|
||||
for(var/file in args)
|
||||
src << browse_rsc(file)
|
||||
|
||||
/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "md"))
|
||||
var/path = root
|
||||
|
||||
for(var/i=0, i<max_iterations, i++)
|
||||
var/list/choices = flist(path)
|
||||
if(path != root)
|
||||
choices.Insert(1,"/")
|
||||
|
||||
var/choice = input(src,"Choose a file to access:","Download",null) as null|anything in choices
|
||||
switch(choice)
|
||||
if(null)
|
||||
return
|
||||
if("/")
|
||||
path = root
|
||||
continue
|
||||
path += choice
|
||||
|
||||
if(copytext(path,-1,0) != "/") //didn't choose a directory, no need to iterate again
|
||||
break
|
||||
var/extensions
|
||||
for(var/i in valid_extensions)
|
||||
if(extensions)
|
||||
extensions += "|"
|
||||
extensions += "[i]"
|
||||
var/regex/valid_ext = new("\\.([extensions])$", "i")
|
||||
if( !fexists(path) || !(valid_ext.Find(path)) )
|
||||
to_chat(src, "<font color='red'>Error: browse_files(): File not found/Invalid file([path]).</font>")
|
||||
return
|
||||
|
||||
return path
|
||||
|
||||
#define FTPDELAY 200 //200 tick delay to discourage spam
|
||||
#define ADMIN_FTPDELAY_MODIFIER 0.5 //Admins get to spam files faster since we ~trust~ them!
|
||||
/* This proc is a failsafe to prevent spamming of file requests.
|
||||
It is just a timer that only permits a download every [FTPDELAY] ticks.
|
||||
This can be changed by modifying FTPDELAY's value above.
|
||||
|
||||
PLEASE USE RESPONSIBLY, Some log files can reach sizes of 4MB! */
|
||||
/client/proc/file_spam_check()
|
||||
var/time_to_wait = GLOB.fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
|
||||
return 1
|
||||
var/delay = FTPDELAY
|
||||
if(holder)
|
||||
delay *= ADMIN_FTPDELAY_MODIFIER
|
||||
GLOB.fileaccess_timer = world.time + delay
|
||||
return 0
|
||||
#undef FTPDELAY
|
||||
#undef ADMIN_FTPDELAY_MODIFIER
|
||||
|
||||
/proc/pathwalk(path)
|
||||
var/list/jobs = list(path)
|
||||
var/list/filenames = list()
|
||||
|
||||
while(jobs.len)
|
||||
var/current_dir = pop(jobs)
|
||||
var/list/new_filenames = flist(current_dir)
|
||||
for(var/new_filename in new_filenames)
|
||||
// if filename ends in / it is a directory, append to currdir
|
||||
if(findtext(new_filename, "/", -1))
|
||||
jobs += current_dir + new_filename
|
||||
else
|
||||
filenames += current_dir + new_filename
|
||||
return filenames
|
||||
|
||||
/proc/pathflatten(path)
|
||||
return replacetext(path, "/", "_")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,128 +1,128 @@
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
|
||||
/proc/make_datum_references_lists()
|
||||
//hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
|
||||
//facial hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
|
||||
//underwear
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/bottom, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
|
||||
//undershirt
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/top, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
//socks
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/socks, GLOB.socks_list)
|
||||
//bodypart accessories (blizzard intensifies)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, GLOB.animated_tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, GLOB.animated_tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_wings, GLOB.insect_wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_fluff, GLOB.insect_fluffs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/deco_wings, GLOB.deco_wings_list)
|
||||
|
||||
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_snouts, GLOB.mam_snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
|
||||
//ipcs
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/screen, GLOB.ipc_screens_list, roundstart = TRUE)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/antenna, GLOB.ipc_antennas_list, roundstart = TRUE)
|
||||
//genitals
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
for(var/K in GLOB.cock_shapes_list)
|
||||
var/datum/sprite_accessory/penis/value = GLOB.cock_shapes_list[K]
|
||||
GLOB.cock_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
GLOB.breasts_size_list = list ("a", "b", "c", "d", "e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing.
|
||||
GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ",
|
||||
"cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret",
|
||||
"baloney pony", "schlanger", "Mutton dagger", "old blind bob","Hanging Johnny", "fishing rod", "Tally whacker", "polly rocket",
|
||||
"One eyed trouser trout", "Ding dong", "ankle spanker", "Pork sword", "engine cranker", "Harry hot dog", "Davy Crockett",
|
||||
"Kidney cracker", "Heat seeking moisture missile", "Giggle stick", "love whistle", "Tube steak", "Uncle Dick", "Purple helmet warrior")
|
||||
for(var/K in GLOB.breasts_shapes_list)
|
||||
var/datum/sprite_accessory/breasts/value = GLOB.breasts_shapes_list[K]
|
||||
GLOB.breasts_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/testicles, GLOB.balls_shapes_list)
|
||||
for(var/K in GLOB.balls_shapes_list)
|
||||
var/datum/sprite_accessory/testicles/value = GLOB.balls_shapes_list[K]
|
||||
GLOB.balls_shapes_icons[K] = value.icon_state
|
||||
|
||||
for(var/gpath in subtypesof(/obj/item/organ/genital))
|
||||
var/obj/item/organ/genital/G = gpath
|
||||
if(!CHECK_BITFIELD(initial(G.genital_flags), GENITAL_BLACKLISTED))
|
||||
GLOB.genitals_list[initial(G.name)] = gpath
|
||||
//END OF CIT CHANGES
|
||||
|
||||
//Species
|
||||
for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
GLOB.species_list[S.id] = spath
|
||||
|
||||
//Surgeries
|
||||
for(var/path in subtypesof(/datum/surgery))
|
||||
GLOB.surgeries_list += new path()
|
||||
|
||||
//Materials
|
||||
for(var/path in subtypesof(/datum/material))
|
||||
var/datum/material/D = new path()
|
||||
GLOB.materials_list[D.id] = D
|
||||
|
||||
//Emotes
|
||||
for(var/path in subtypesof(/datum/emote))
|
||||
var/datum/emote/E = new path()
|
||||
E.emote_list[E.key] = E
|
||||
|
||||
//Uplink Items
|
||||
for(var/path in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/I = path
|
||||
if(!initial(I.item)) //We add categories to a separate list.
|
||||
GLOB.uplink_categories |= initial(I.category)
|
||||
continue
|
||||
GLOB.uplink_items += path
|
||||
//(sub)typesof entries are listed by the order they are loaded in the code, so we'll have to rearrange them here.
|
||||
GLOB.uplink_items = sortList(GLOB.uplink_items, /proc/cmp_uplink_items_dsc)
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_subtypes(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L += new path()
|
||||
return L
|
||||
|
||||
//returns a list of paths to every subtype of prototype (excluding prototype)
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_paths(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L+= path
|
||||
return L
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
|
||||
/proc/make_datum_references_lists()
|
||||
//hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
|
||||
//facial hair
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
|
||||
//underwear
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/bottom, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
|
||||
//undershirt
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/top, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
|
||||
//socks
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/socks, GLOB.socks_list)
|
||||
//bodypart accessories (blizzard intensifies)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, GLOB.animated_tails_list_lizard)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, GLOB.animated_tails_list_human)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_wings, GLOB.insect_wings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_fluff, GLOB.insect_fluffs_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/deco_wings, GLOB.deco_wings_list)
|
||||
|
||||
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_snouts, GLOB.mam_snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
|
||||
//ipcs
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/screen, GLOB.ipc_screens_list, roundstart = TRUE)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/antenna, GLOB.ipc_antennas_list, roundstart = TRUE)
|
||||
//genitals
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
for(var/K in GLOB.cock_shapes_list)
|
||||
var/datum/sprite_accessory/penis/value = GLOB.cock_shapes_list[K]
|
||||
GLOB.cock_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
|
||||
GLOB.breasts_size_list = list ("a", "b", "c", "d", "e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing.
|
||||
GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ",
|
||||
"cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret",
|
||||
"baloney pony", "schlanger", "Mutton dagger", "old blind bob","Hanging Johnny", "fishing rod", "Tally whacker", "polly rocket",
|
||||
"One eyed trouser trout", "Ding dong", "ankle spanker", "Pork sword", "engine cranker", "Harry hot dog", "Davy Crockett",
|
||||
"Kidney cracker", "Heat seeking moisture missile", "Giggle stick", "love whistle", "Tube steak", "Uncle Dick", "Purple helmet warrior")
|
||||
for(var/K in GLOB.breasts_shapes_list)
|
||||
var/datum/sprite_accessory/breasts/value = GLOB.breasts_shapes_list[K]
|
||||
GLOB.breasts_shapes_icons[K] = value.icon_state
|
||||
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/testicles, GLOB.balls_shapes_list)
|
||||
for(var/K in GLOB.balls_shapes_list)
|
||||
var/datum/sprite_accessory/testicles/value = GLOB.balls_shapes_list[K]
|
||||
GLOB.balls_shapes_icons[K] = value.icon_state
|
||||
|
||||
for(var/gpath in subtypesof(/obj/item/organ/genital))
|
||||
var/obj/item/organ/genital/G = gpath
|
||||
if(!CHECK_BITFIELD(initial(G.genital_flags), GENITAL_BLACKLISTED))
|
||||
GLOB.genitals_list[initial(G.name)] = gpath
|
||||
//END OF CIT CHANGES
|
||||
|
||||
//Species
|
||||
for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
GLOB.species_list[S.id] = spath
|
||||
|
||||
//Surgeries
|
||||
for(var/path in subtypesof(/datum/surgery))
|
||||
GLOB.surgeries_list += new path()
|
||||
|
||||
//Materials
|
||||
for(var/path in subtypesof(/datum/material))
|
||||
var/datum/material/D = new path()
|
||||
GLOB.materials_list[D.id] = D
|
||||
|
||||
//Emotes
|
||||
for(var/path in subtypesof(/datum/emote))
|
||||
var/datum/emote/E = new path()
|
||||
E.emote_list[E.key] = E
|
||||
|
||||
//Uplink Items
|
||||
for(var/path in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/I = path
|
||||
if(!initial(I.item)) //We add categories to a separate list.
|
||||
GLOB.uplink_categories |= initial(I.category)
|
||||
continue
|
||||
GLOB.uplink_items += path
|
||||
//(sub)typesof entries are listed by the order they are loaded in the code, so we'll have to rearrange them here.
|
||||
GLOB.uplink_items = sortList(GLOB.uplink_items, /proc/cmp_uplink_items_dsc)
|
||||
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_subtypes(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L += new path()
|
||||
return L
|
||||
|
||||
//returns a list of paths to every subtype of prototype (excluding prototype)
|
||||
//if no list/L is provided, one is created.
|
||||
/proc/init_paths(prototype, list/L)
|
||||
if(!istype(L))
|
||||
L = list()
|
||||
for(var/path in subtypesof(prototype))
|
||||
L+= path
|
||||
return L
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,3 @@
|
||||
#define is_reserved_level(z) SSmapping.level_trait(z, ZTRAIT_RESERVED)
|
||||
|
||||
#define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY)
|
||||
|
||||
// If true, the singularity cannot strip away asteroid turf on this Z
|
||||
#define is_planet_level(z) SSmapping.level_trait(z, ZTRAIT_PLANET)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,248 +1,248 @@
|
||||
/proc/lizard_name(gender)
|
||||
if(gender == MALE)
|
||||
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_male)]"
|
||||
else
|
||||
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
/proc/moth_name()
|
||||
return "[pick(GLOB.moth_first)] [pick(GLOB.moth_last)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
if (GLOB.command_name)
|
||||
return GLOB.command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
|
||||
GLOB.command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(name)
|
||||
|
||||
GLOB.command_name = name
|
||||
|
||||
return name
|
||||
|
||||
/proc/religion_name()
|
||||
var/static/religion_name
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if(!GLOB.station_name)
|
||||
var/newname
|
||||
var/config_station_name = CONFIG_GET(string/stationname)
|
||||
if(config_station_name)
|
||||
newname = config_station_name
|
||||
else
|
||||
newname = new_station_name()
|
||||
|
||||
set_station_name(newname)
|
||||
|
||||
return GLOB.station_name
|
||||
|
||||
/proc/set_station_name(newname)
|
||||
GLOB.station_name = newname
|
||||
|
||||
var/config_server_name = CONFIG_GET(string/servername)
|
||||
if(config_server_name)
|
||||
world.name = "[config_server_name][config_server_name == GLOB.station_name ? "" : ": [GLOB.station_name]"]"
|
||||
else
|
||||
world.name = GLOB.station_name
|
||||
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
var/new_station_name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick(GLOB.station_prefixes)
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in SSevents.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
|
||||
name = holiday.getStationPrefix()
|
||||
//get normal name
|
||||
if(!name)
|
||||
name = pick(GLOB.station_names)
|
||||
if(name)
|
||||
new_station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick(GLOB.station_suffixes)
|
||||
new_station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
new_station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
new_station_name += pick(GLOB.greek_letters)
|
||||
if(3)
|
||||
new_station_name += "\Roman[rand(1,99)]"
|
||||
if(4)
|
||||
new_station_name += pick(GLOB.phonetic_alphabet)
|
||||
if(5)
|
||||
new_station_name += pick(GLOB.numbers_as_words)
|
||||
if(13)
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
/proc/syndicate_name()
|
||||
var/name = ""
|
||||
|
||||
// Prefix
|
||||
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
|
||||
|
||||
// Suffix
|
||||
if (prob(80))
|
||||
name += " "
|
||||
|
||||
// Full
|
||||
if (prob(60))
|
||||
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
|
||||
// Broken
|
||||
else
|
||||
name += pick("Syndi", "Corp", "Bio", "System", "Prod", "Chem", "Inter", "Hive")
|
||||
name += pick("", "-")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Code")
|
||||
// Small
|
||||
else
|
||||
name += pick("-", "*", "")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
|
||||
|
||||
return name
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
|
||||
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
|
||||
|
||||
//Cached regex search - for checking if codewords are used.
|
||||
GLOBAL_DATUM(syndicate_code_phrase_regex, /regex)
|
||||
GLOBAL_DATUM(syndicate_code_response_regex, /regex)
|
||||
|
||||
/*
|
||||
Should be expanded.
|
||||
How this works:
|
||||
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
|
||||
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
|
||||
The phrase should then have the words: James Smith.
|
||||
The response should then have the words: run, void, and derelict.
|
||||
This way assures that the code is suited to the conversation and is unpredicatable.
|
||||
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
|
||||
Can probably be done through "{ }" but I don't really see the practical benefit.
|
||||
One example of an earlier system is commented below.
|
||||
/N
|
||||
*/
|
||||
|
||||
/proc/generate_code_phrase(return_list=FALSE)//Proc is used for phrase and response in master_controller.dm
|
||||
|
||||
if(!return_list)
|
||||
. = ""
|
||||
else
|
||||
. = list()
|
||||
|
||||
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
|
||||
50; 2,
|
||||
200; 3,
|
||||
50; 4,
|
||||
25; 5
|
||||
)
|
||||
|
||||
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns = strings(ION_FILE, "ionabstract")
|
||||
var/objects = strings(ION_FILE, "ionobjects")
|
||||
var/adjectives = strings(ION_FILE, "ionadjectives")
|
||||
var/threats = strings(ION_FILE, "ionthreats")
|
||||
var/foods = strings(ION_FILE, "ionfood")
|
||||
var/drinks = strings(ION_FILE, "iondrinks")
|
||||
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
|
||||
|
||||
var/list/names = list()
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
|
||||
names += t.fields["name"]
|
||||
|
||||
var/maxwords = words//Extra var to check for duplicates.
|
||||
|
||||
for(words,words>0,words--)//Randomly picks from one of the choices below.
|
||||
|
||||
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
|
||||
safety = list(pick(1,2))//Select choice 1 or 2.
|
||||
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
|
||||
safety = list(3)//Default to list 3
|
||||
|
||||
switch(pick(safety))//Chance based on the safety list.
|
||||
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
|
||||
switch(rand(1,2))//Mainly to add more options later.
|
||||
if(1)
|
||||
if(names.len&&prob(70))
|
||||
. += pick(names)
|
||||
else
|
||||
if(prob(10))
|
||||
. += pick(lizard_name(MALE),lizard_name(FEMALE))
|
||||
else
|
||||
var/new_name = pick(pick(GLOB.first_names_male,GLOB.first_names_female))
|
||||
new_name += " "
|
||||
new_name += pick(GLOB.last_names)
|
||||
. += new_name
|
||||
if(2)
|
||||
. += pick(get_all_jobs())//Returns a job.
|
||||
safety -= 1
|
||||
if(2)
|
||||
switch(rand(1,3))//Food, drinks, or things. Only selectable once.
|
||||
if(1)
|
||||
. += lowertext(pick(drinks))
|
||||
if(2)
|
||||
. += lowertext(pick(foods))
|
||||
if(3)
|
||||
. += lowertext(pick(locations))
|
||||
safety -= 2
|
||||
if(3)
|
||||
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
|
||||
if(1)
|
||||
. += lowertext(pick(nouns))
|
||||
if(2)
|
||||
. += lowertext(pick(objects))
|
||||
if(3)
|
||||
. += lowertext(pick(adjectives))
|
||||
if(4)
|
||||
. += lowertext(pick(threats))
|
||||
if(!return_list)
|
||||
if(words==1)
|
||||
. += "."
|
||||
else
|
||||
. += ", "
|
||||
/proc/lizard_name(gender)
|
||||
if(gender == MALE)
|
||||
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_male)]"
|
||||
else
|
||||
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
/proc/moth_name()
|
||||
return "[pick(GLOB.moth_first)] [pick(GLOB.moth_last)]"
|
||||
|
||||
/proc/church_name()
|
||||
var/static/church_name
|
||||
if (church_name)
|
||||
return church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("Holy", "United", "First", "Second", "Last")
|
||||
|
||||
if (prob(20))
|
||||
name += " Space"
|
||||
|
||||
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
|
||||
name += " of [religion_name()]"
|
||||
|
||||
return name
|
||||
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
if (GLOB.command_name)
|
||||
return GLOB.command_name
|
||||
|
||||
var/name = "Central Command"
|
||||
|
||||
GLOB.command_name = name
|
||||
return name
|
||||
|
||||
/proc/change_command_name(name)
|
||||
|
||||
GLOB.command_name = name
|
||||
|
||||
return name
|
||||
|
||||
/proc/religion_name()
|
||||
var/static/religion_name
|
||||
if (religion_name)
|
||||
return religion_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
name += pick("bee", "science", "edu", "captain", "assistant", "monkey", "alien", "space", "unit", "sprocket", "gadget", "bomb", "revolution", "beyond", "station", "goon", "robot", "ivor", "hobnob")
|
||||
name += pick("ism", "ia", "ology", "istism", "ites", "ick", "ian", "ity")
|
||||
|
||||
return capitalize(name)
|
||||
|
||||
/proc/station_name()
|
||||
if(!GLOB.station_name)
|
||||
var/newname
|
||||
var/config_station_name = CONFIG_GET(string/stationname)
|
||||
if(config_station_name)
|
||||
newname = config_station_name
|
||||
else
|
||||
newname = new_station_name()
|
||||
|
||||
set_station_name(newname)
|
||||
|
||||
return GLOB.station_name
|
||||
|
||||
/proc/set_station_name(newname)
|
||||
GLOB.station_name = newname
|
||||
|
||||
var/config_server_name = CONFIG_GET(string/servername)
|
||||
if(config_server_name)
|
||||
world.name = "[config_server_name][config_server_name == GLOB.station_name ? "" : ": [GLOB.station_name]"]"
|
||||
else
|
||||
world.name = GLOB.station_name
|
||||
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
var/name = ""
|
||||
var/new_station_name = ""
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick(GLOB.station_prefixes)
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in SSevents.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
|
||||
name = holiday.getStationPrefix()
|
||||
//get normal name
|
||||
if(!name)
|
||||
name = pick(GLOB.station_names)
|
||||
if(name)
|
||||
new_station_name += name + " "
|
||||
|
||||
// Suffix
|
||||
name = pick(GLOB.station_suffixes)
|
||||
new_station_name += name + " "
|
||||
|
||||
// ID Number
|
||||
switch(random)
|
||||
if(1)
|
||||
new_station_name += "[rand(1, 99)]"
|
||||
if(2)
|
||||
new_station_name += pick(GLOB.greek_letters)
|
||||
if(3)
|
||||
new_station_name += "\Roman[rand(1,99)]"
|
||||
if(4)
|
||||
new_station_name += pick(GLOB.phonetic_alphabet)
|
||||
if(5)
|
||||
new_station_name += pick(GLOB.numbers_as_words)
|
||||
if(13)
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
/proc/syndicate_name()
|
||||
var/name = ""
|
||||
|
||||
// Prefix
|
||||
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
|
||||
|
||||
// Suffix
|
||||
if (prob(80))
|
||||
name += " "
|
||||
|
||||
// Full
|
||||
if (prob(60))
|
||||
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
|
||||
// Broken
|
||||
else
|
||||
name += pick("Syndi", "Corp", "Bio", "System", "Prod", "Chem", "Inter", "Hive")
|
||||
name += pick("", "-")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Code")
|
||||
// Small
|
||||
else
|
||||
name += pick("-", "*", "")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
|
||||
|
||||
return name
|
||||
|
||||
|
||||
//Traitors and traitor silicons will get these. Revs will not.
|
||||
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
|
||||
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
|
||||
|
||||
//Cached regex search - for checking if codewords are used.
|
||||
GLOBAL_DATUM(syndicate_code_phrase_regex, /regex)
|
||||
GLOBAL_DATUM(syndicate_code_response_regex, /regex)
|
||||
|
||||
/*
|
||||
Should be expanded.
|
||||
How this works:
|
||||
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
|
||||
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
|
||||
The phrase should then have the words: James Smith.
|
||||
The response should then have the words: run, void, and derelict.
|
||||
This way assures that the code is suited to the conversation and is unpredicatable.
|
||||
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
|
||||
Can probably be done through "{ }" but I don't really see the practical benefit.
|
||||
One example of an earlier system is commented below.
|
||||
/N
|
||||
*/
|
||||
|
||||
/proc/generate_code_phrase(return_list=FALSE)//Proc is used for phrase and response in master_controller.dm
|
||||
|
||||
if(!return_list)
|
||||
. = ""
|
||||
else
|
||||
. = list()
|
||||
|
||||
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
|
||||
50; 2,
|
||||
200; 3,
|
||||
50; 4,
|
||||
25; 5
|
||||
)
|
||||
|
||||
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns = strings(ION_FILE, "ionabstract")
|
||||
var/objects = strings(ION_FILE, "ionobjects")
|
||||
var/adjectives = strings(ION_FILE, "ionadjectives")
|
||||
var/threats = strings(ION_FILE, "ionthreats")
|
||||
var/foods = strings(ION_FILE, "ionfood")
|
||||
var/drinks = strings(ION_FILE, "iondrinks")
|
||||
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
|
||||
|
||||
var/list/names = list()
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
|
||||
names += t.fields["name"]
|
||||
|
||||
var/maxwords = words//Extra var to check for duplicates.
|
||||
|
||||
for(words,words>0,words--)//Randomly picks from one of the choices below.
|
||||
|
||||
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
|
||||
safety = list(pick(1,2))//Select choice 1 or 2.
|
||||
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
|
||||
safety = list(3)//Default to list 3
|
||||
|
||||
switch(pick(safety))//Chance based on the safety list.
|
||||
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
|
||||
switch(rand(1,2))//Mainly to add more options later.
|
||||
if(1)
|
||||
if(names.len&&prob(70))
|
||||
. += pick(names)
|
||||
else
|
||||
if(prob(10))
|
||||
. += pick(lizard_name(MALE),lizard_name(FEMALE))
|
||||
else
|
||||
var/new_name = pick(pick(GLOB.first_names_male,GLOB.first_names_female))
|
||||
new_name += " "
|
||||
new_name += pick(GLOB.last_names)
|
||||
. += new_name
|
||||
if(2)
|
||||
. += pick(get_all_jobs())//Returns a job.
|
||||
safety -= 1
|
||||
if(2)
|
||||
switch(rand(1,3))//Food, drinks, or things. Only selectable once.
|
||||
if(1)
|
||||
. += lowertext(pick(drinks))
|
||||
if(2)
|
||||
. += lowertext(pick(foods))
|
||||
if(3)
|
||||
. += lowertext(pick(locations))
|
||||
safety -= 2
|
||||
if(3)
|
||||
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
|
||||
if(1)
|
||||
. += lowertext(pick(nouns))
|
||||
if(2)
|
||||
. += lowertext(pick(objects))
|
||||
if(3)
|
||||
. += lowertext(pick(adjectives))
|
||||
if(4)
|
||||
. += lowertext(pick(threats))
|
||||
if(!return_list)
|
||||
if(words==1)
|
||||
. += "."
|
||||
else
|
||||
. += ", "
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
||||
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
|
||||
#define QDEL_NULL(item) qdel(item); item = null
|
||||
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
|
||||
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
|
||||
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
|
||||
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
|
||||
|
||||
/proc/______qdel_list_wrapper(list/L) //the underscores are to encourage people not to use this directly.
|
||||
QDEL_LIST(L)
|
||||
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
|
||||
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
|
||||
#define QDEL_NULL(item) qdel(item); item = null
|
||||
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
|
||||
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
|
||||
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
|
||||
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }
|
||||
|
||||
/proc/______qdel_list_wrapper(list/L) //the underscores are to encourage people not to use this directly.
|
||||
QDEL_LIST(L)
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// Ensure the frequency is within bounds of what it should be sending/receiving at
|
||||
/proc/sanitize_frequency(frequency, free = FALSE)
|
||||
. = round(frequency)
|
||||
if(free)
|
||||
. = CLAMP(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
|
||||
else
|
||||
. = CLAMP(frequency, MIN_FREQ, MAX_FREQ)
|
||||
if(!(. % 2)) // Ensure the last digit is an odd number
|
||||
. += 1
|
||||
|
||||
// Format frequency by moving the decimal.
|
||||
/proc/format_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return "[round(frequency / 10)].[frequency % 10]"
|
||||
|
||||
//Opposite of format, returns as a number
|
||||
/proc/unformat_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return frequency * 10
|
||||
// Ensure the frequency is within bounds of what it should be sending/receiving at
|
||||
/proc/sanitize_frequency(frequency, free = FALSE)
|
||||
. = round(frequency)
|
||||
if(free)
|
||||
. = CLAMP(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
|
||||
else
|
||||
. = CLAMP(frequency, MIN_FREQ, MAX_FREQ)
|
||||
if(!(. % 2)) // Ensure the last digit is an odd number
|
||||
. += 1
|
||||
|
||||
// Format frequency by moving the decimal.
|
||||
/proc/format_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return "[round(frequency / 10)].[frequency % 10]"
|
||||
|
||||
//Opposite of format, returns as a number
|
||||
/proc/unformat_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return frequency * 10
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
var/list/mob_data = list()
|
||||
if(isnewplayer(m))
|
||||
continue
|
||||
if (m.client && m.client.prefs && m.client.prefs.auto_ooc)
|
||||
if (!(m.client.prefs.chat_toggles & CHAT_OOC))
|
||||
m.client.prefs.chat_toggles ^= CHAT_OOC
|
||||
if(m.mind)
|
||||
if(m.stat != DEAD && !isbrain(m) && !iscameramob(m))
|
||||
num_survivors++
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,83 +1,83 @@
|
||||
/proc/station_time_debug(force_set)
|
||||
if(isnum(force_set))
|
||||
SSticker.gametime_offset = force_set
|
||||
return
|
||||
SSticker.gametime_offset = rand(0, 864000) //hours in day * minutes in hour * seconds in minute * deciseconds in second
|
||||
if(prob(50))
|
||||
SSticker.gametime_offset = FLOOR(SSticker.gametime_offset, 3600)
|
||||
else
|
||||
SSticker.gametime_offset = CEILING(SSticker.gametime_offset, 3600)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
/proc/isDay(month, day)
|
||||
if(isnum(month) && isnum(day))
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
if(month == MM && day == DD)
|
||||
return 1
|
||||
|
||||
//returns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format
|
||||
/proc/SQLtime(timevar)
|
||||
return time2text(timevar || world.timeofday, "YYYY-MM-DD hh:mm:ss")
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(midnight_rollovers, 0)
|
||||
GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
|
||||
/proc/update_midnight_rollover()
|
||||
if (world.timeofday < GLOB.rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
|
||||
return GLOB.midnight_rollovers++
|
||||
return GLOB.midnight_rollovers
|
||||
|
||||
/proc/weekdayofthemonth()
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
switch(DD)
|
||||
if(8 to 13)
|
||||
return 2
|
||||
if(14 to 20)
|
||||
return 3
|
||||
if(21 to 27)
|
||||
return 4
|
||||
if(28 to INFINITY)
|
||||
return 5
|
||||
else
|
||||
return 1
|
||||
|
||||
//Takes a value of time in deciseconds.
|
||||
//Returns a text value of that number in hours, minutes, or seconds.
|
||||
/proc/DisplayTimeText(time_value, round_seconds_to = 0.1)
|
||||
var/second = FLOOR(time_value * 0.1, round_seconds_to)
|
||||
if(!second)
|
||||
return "right now"
|
||||
if(second < 60)
|
||||
return "[second] second[(second != 1)? "s":""]"
|
||||
var/minute = FLOOR(second / 60, 1)
|
||||
second = FLOOR(MODULUS(second, 60), round_seconds_to)
|
||||
var/secondT
|
||||
if(second)
|
||||
secondT = " and [second] second[(second != 1)? "s":""]"
|
||||
if(minute < 60)
|
||||
return "[minute] minute[(minute != 1)? "s":""][secondT]"
|
||||
var/hour = FLOOR(minute / 60, 1)
|
||||
minute = MODULUS(minute, 60)
|
||||
var/minuteT
|
||||
if(minute)
|
||||
minuteT = " and [minute] minute[(minute != 1)? "s":""]"
|
||||
if(hour < 24)
|
||||
return "[hour] hour[(hour != 1)? "s":""][minuteT][secondT]"
|
||||
var/day = FLOOR(hour / 24, 1)
|
||||
hour = MODULUS(hour, 24)
|
||||
var/hourT
|
||||
if(hour)
|
||||
hourT = " and [hour] hour[(hour != 1)? "s":""]"
|
||||
return "[day] day[(day != 1)? "s":""][hourT][minuteT][secondT]"
|
||||
|
||||
/proc/daysSince(realtimev)
|
||||
return round((world.realtime - realtimev) / (24 HOURS))
|
||||
|
||||
/proc/worldtime2text()
|
||||
return gameTimestamp("hh:mm:ss", world.time)
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
return time2text(wtime - GLOB.timezoneOffset, format)
|
||||
/proc/station_time_debug(force_set)
|
||||
if(isnum(force_set))
|
||||
SSticker.gametime_offset = force_set
|
||||
return
|
||||
SSticker.gametime_offset = rand(0, 864000) //hours in day * minutes in hour * seconds in minute * deciseconds in second
|
||||
if(prob(50))
|
||||
SSticker.gametime_offset = FLOOR(SSticker.gametime_offset, 3600)
|
||||
else
|
||||
SSticker.gametime_offset = CEILING(SSticker.gametime_offset, 3600)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
/proc/isDay(month, day)
|
||||
if(isnum(month) && isnum(day))
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
if(month == MM && day == DD)
|
||||
return 1
|
||||
|
||||
//returns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format
|
||||
/proc/SQLtime(timevar)
|
||||
return time2text(timevar || world.timeofday, "YYYY-MM-DD hh:mm:ss")
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(midnight_rollovers, 0)
|
||||
GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
|
||||
/proc/update_midnight_rollover()
|
||||
if (world.timeofday < GLOB.rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
|
||||
return GLOB.midnight_rollovers++
|
||||
return GLOB.midnight_rollovers
|
||||
|
||||
/proc/weekdayofthemonth()
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
switch(DD)
|
||||
if(8 to 13)
|
||||
return 2
|
||||
if(14 to 20)
|
||||
return 3
|
||||
if(21 to 27)
|
||||
return 4
|
||||
if(28 to INFINITY)
|
||||
return 5
|
||||
else
|
||||
return 1
|
||||
|
||||
//Takes a value of time in deciseconds.
|
||||
//Returns a text value of that number in hours, minutes, or seconds.
|
||||
/proc/DisplayTimeText(time_value, round_seconds_to = 0.1)
|
||||
var/second = FLOOR(time_value * 0.1, round_seconds_to)
|
||||
if(!second)
|
||||
return "right now"
|
||||
if(second < 60)
|
||||
return "[second] second[(second != 1)? "s":""]"
|
||||
var/minute = FLOOR(second / 60, 1)
|
||||
second = FLOOR(MODULUS(second, 60), round_seconds_to)
|
||||
var/secondT
|
||||
if(second)
|
||||
secondT = " and [second] second[(second != 1)? "s":""]"
|
||||
if(minute < 60)
|
||||
return "[minute] minute[(minute != 1)? "s":""][secondT]"
|
||||
var/hour = FLOOR(minute / 60, 1)
|
||||
minute = MODULUS(minute, 60)
|
||||
var/minuteT
|
||||
if(minute)
|
||||
minuteT = " and [minute] minute[(minute != 1)? "s":""]"
|
||||
if(hour < 24)
|
||||
return "[hour] hour[(hour != 1)? "s":""][minuteT][secondT]"
|
||||
var/day = FLOOR(hour / 24, 1)
|
||||
hour = MODULUS(hour, 24)
|
||||
var/hourT
|
||||
if(hour)
|
||||
hourT = " and [hour] hour[(hour != 1)? "s":""]"
|
||||
return "[day] day[(day != 1)? "s":""][hourT][minuteT][secondT]"
|
||||
|
||||
/proc/daysSince(realtimev)
|
||||
return round((world.realtime - realtimev) / (24 HOURS))
|
||||
|
||||
/proc/worldtime2text()
|
||||
return gameTimestamp("hh:mm:ss", world.time)
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
return time2text(wtime - GLOB.timezoneOffset, format)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -758,16 +758,6 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
|
||||
/obj/item/stack/rods,
|
||||
/obj/item/pipe)))
|
||||
|
||||
/proc/can_embed(obj/item/W)
|
||||
if(W.get_sharpness())
|
||||
return 1
|
||||
if(is_pointed(W))
|
||||
return 1
|
||||
|
||||
if(is_type_in_typecache(W, GLOB.can_embed_types))
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
Checks if that loc and dir has an item on the wall
|
||||
*/
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
|
||||
//uncommented, but not visible in the release version)
|
||||
|
||||
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
|
||||
|
||||
// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
|
||||
#ifdef DEBUG
|
||||
#define USE_CUSTOM_ERROR_HANDLER
|
||||
#endif
|
||||
|
||||
#ifdef TESTING
|
||||
#define DATUMVAR_DEBUGGING_MODE
|
||||
|
||||
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
|
||||
//implies FIND_REF_NO_CHECK_TICK
|
||||
|
||||
//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping
|
||||
|
||||
|
||||
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
|
||||
#endif
|
||||
|
||||
//#define UNIT_TESTS //Enables unit tests via TEST_RUN_PARAMETER
|
||||
|
||||
#ifndef PRELOAD_RSC //set to:
|
||||
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
|
||||
#endif // 1 to use the default behaviour;
|
||||
// 2 for preloading absolutely everything;
|
||||
|
||||
#ifdef LOWMEMORYMODE
|
||||
#define FORCE_MAP "_maps/runtimestation.json"
|
||||
#endif
|
||||
|
||||
//Update this whenever you need to take advantage of more recent byond features
|
||||
#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 https://secure.byond.com/download and update.
|
||||
#error You need version 512 or higher
|
||||
#endif
|
||||
|
||||
//Additional code for the above flags.
|
||||
#ifdef TESTING
|
||||
#warn compiling in TESTING mode. testing() debug messages will be visible.
|
||||
#endif
|
||||
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
#define FIND_REF_NO_CHECK_TICK
|
||||
#endif
|
||||
|
||||
#ifdef TRAVISBUILDING
|
||||
#define UNIT_TESTS
|
||||
#endif
|
||||
|
||||
#ifdef TRAVISTESTING
|
||||
#define TESTING
|
||||
#endif
|
||||
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
|
||||
//uncommented, but not visible in the release version)
|
||||
|
||||
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
|
||||
|
||||
// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
|
||||
#ifdef DEBUG
|
||||
#define USE_CUSTOM_ERROR_HANDLER
|
||||
#endif
|
||||
|
||||
#ifdef TESTING
|
||||
#define DATUMVAR_DEBUGGING_MODE
|
||||
|
||||
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
|
||||
//implies FIND_REF_NO_CHECK_TICK
|
||||
|
||||
//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping
|
||||
|
||||
|
||||
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
|
||||
#endif
|
||||
|
||||
//#define UNIT_TESTS //Enables unit tests via TEST_RUN_PARAMETER
|
||||
|
||||
#ifndef PRELOAD_RSC //set to:
|
||||
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
|
||||
#endif // 1 to use the default behaviour;
|
||||
// 2 for preloading absolutely everything;
|
||||
|
||||
#ifdef LOWMEMORYMODE
|
||||
#define FORCE_MAP "_maps/runtimestation.json"
|
||||
#endif
|
||||
|
||||
//Update this whenever you need to take advantage of more recent byond features
|
||||
#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 https://secure.byond.com/download and update.
|
||||
#error You need version 512 or higher
|
||||
#endif
|
||||
|
||||
//Additional code for the above flags.
|
||||
#ifdef TESTING
|
||||
#warn compiling in TESTING mode. testing() debug messages will be visible.
|
||||
#endif
|
||||
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
#define FIND_REF_NO_CHECK_TICK
|
||||
#endif
|
||||
|
||||
#ifdef TRAVISBUILDING
|
||||
#define UNIT_TESTS
|
||||
#endif
|
||||
|
||||
#ifdef TRAVISTESTING
|
||||
#define TESTING
|
||||
#endif
|
||||
|
||||
@@ -1,215 +1,215 @@
|
||||
GLOBAL_LIST_INIT(bitfields, list(
|
||||
"appearance_flags" = list(
|
||||
"LONG_GLIDE" = LONG_GLIDE,
|
||||
"RESET_COLOR" = RESET_COLOR,
|
||||
"RESET_ALPHA" = RESET_ALPHA,
|
||||
"RESET_TRANSFORM" = RESET_TRANSFORM,
|
||||
"NO_CLIENT_COLOR" = NO_CLIENT_COLOR,
|
||||
"KEEP_TOGETHER" = KEEP_TOGETHER,
|
||||
"KEEP_APART" = KEEP_APART,
|
||||
"PLANE_MASTER" = PLANE_MASTER,
|
||||
"TILE_BOUND" = TILE_BOUND,
|
||||
"PIXEL_SCALE" = PIXEL_SCALE
|
||||
),
|
||||
"sight" = list(
|
||||
"SEE_INFRA" = SEE_INFRA,
|
||||
"SEE_SELF" = SEE_SELF,
|
||||
"SEE_MOBS" = SEE_MOBS,
|
||||
"SEE_OBJS" = SEE_OBJS,
|
||||
"SEE_TURFS" = SEE_TURFS,
|
||||
"SEE_PIXELS" = SEE_PIXELS,
|
||||
"SEE_THRU" = SEE_THRU,
|
||||
"SEE_BLACKNESS" = SEE_BLACKNESS,
|
||||
"BLIND" = BLIND
|
||||
),
|
||||
"obj_flags" = list(
|
||||
"EMAGGED" = EMAGGED,
|
||||
"IN_USE" = IN_USE,
|
||||
"CAN_BE_HIT" = CAN_BE_HIT,
|
||||
"BEING_SHOCKED" = BEING_SHOCKED,
|
||||
"DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION,
|
||||
"ON_BLUEPRINTS" = ON_BLUEPRINTS,
|
||||
"UNIQUE_RENAME" = UNIQUE_RENAME,
|
||||
"USES_TGUI" = USES_TGUI,
|
||||
"FROZEN" = FROZEN,
|
||||
"SHOVABLE_ONTO" = SHOVABLE_ONTO
|
||||
),
|
||||
"datum_flags" = list(
|
||||
"DF_USE_TAG" = DF_USE_TAG,
|
||||
"DF_VAR_EDITED" = DF_VAR_EDITED,
|
||||
"DF_ISPROCESSING" = DF_ISPROCESSING,
|
||||
),
|
||||
"item_flags" = list(
|
||||
"BEING_REMOVED" = BEING_REMOVED,
|
||||
"IN_INVENTORY" = IN_INVENTORY,
|
||||
"FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE,
|
||||
"NEEDS_PERMIT" = NEEDS_PERMIT,
|
||||
"SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND,
|
||||
"NO_MAT_REDEMPTION" = NO_MAT_REDEMPTION,
|
||||
"DROPDEL" = DROPDEL,
|
||||
"NOBLUDGEON" = NOBLUDGEON,
|
||||
"ABSTRACT" = ABSTRACT,
|
||||
),
|
||||
"admin_flags" = list(
|
||||
"BUILDMODE" = R_BUILDMODE,
|
||||
"ADMIN" = R_ADMIN,
|
||||
"BAN" = R_BAN,
|
||||
"FUN" = R_FUN,
|
||||
"SERVER" = R_SERVER,
|
||||
"DEBUG" = R_DEBUG,
|
||||
"POSSESS" = R_POSSESS,
|
||||
"PERMISSIONS" = R_PERMISSIONS,
|
||||
"STEALTH" = R_STEALTH,
|
||||
"POLL" = R_POLL,
|
||||
"VAREDIT" = R_VAREDIT,
|
||||
"SOUNDS" = R_SOUNDS,
|
||||
"SPAWN" = R_SPAWN,
|
||||
"AUTOLOGIN" = R_AUTOLOGIN,
|
||||
"DBRANKS" = R_DBRANKS
|
||||
),
|
||||
"interaction_flags_atom" = list(
|
||||
"INTERACT_ATOM_REQUIRES_ANCHORED" = INTERACT_ATOM_REQUIRES_ANCHORED,
|
||||
"INTERACT_ATOM_ATTACK_HAND" = INTERACT_ATOM_ATTACK_HAND,
|
||||
"INTERACT_ATOM_UI_INTERACT" = INTERACT_ATOM_UI_INTERACT,
|
||||
"INTERACT_ATOM_REQUIRES_DEXTERITY" = INTERACT_ATOM_REQUIRES_DEXTERITY,
|
||||
"INTERACT_ATOM_IGNORE_INCAPACITATED" = INTERACT_ATOM_IGNORE_INCAPACITATED,
|
||||
"INTERACT_ATOM_IGNORE_RESTRAINED" = INTERACT_ATOM_IGNORE_RESTRAINED,
|
||||
"INTERACT_ATOM_CHECK_GRAB" = INTERACT_ATOM_CHECK_GRAB,
|
||||
"INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND" = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND,
|
||||
"INTERACT_ATOM_NO_FINGERPRINT_INTERACT" = INTERACT_ATOM_NO_FINGERPRINT_INTERACT
|
||||
),
|
||||
"interaction_flags_machine" = list(
|
||||
"INTERACT_MACHINE_OPEN" = INTERACT_MACHINE_OPEN,
|
||||
"INTERACT_MACHINE_OFFLINE" = INTERACT_MACHINE_OFFLINE,
|
||||
"INTERACT_MACHINE_WIRES_IF_OPEN" = INTERACT_MACHINE_WIRES_IF_OPEN,
|
||||
"INTERACT_MACHINE_ALLOW_SILICON" = INTERACT_MACHINE_ALLOW_SILICON,
|
||||
"INTERACT_MACHINE_OPEN_SILICON" = INTERACT_MACHINE_OPEN_SILICON,
|
||||
"INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON,
|
||||
"INTERACT_MACHINE_SET_MACHINE" = INTERACT_MACHINE_SET_MACHINE
|
||||
),
|
||||
"interaction_flags_item" = list(
|
||||
"INTERACT_ITEM_ATTACK_HAND_PICKUP" = INTERACT_ITEM_ATTACK_HAND_PICKUP,
|
||||
),
|
||||
"pass_flags" = list(
|
||||
"PASSTABLE" = PASSTABLE,
|
||||
"PASSGLASS" = PASSGLASS,
|
||||
"PASSGRILLE" = PASSGRILLE,
|
||||
"PASSBLOB" = PASSBLOB,
|
||||
"PASSMOB" = PASSMOB,
|
||||
"PASSCLOSEDTURF" = PASSCLOSEDTURF,
|
||||
"LETPASSTHROW" = LETPASSTHROW
|
||||
),
|
||||
"movement_type" = list(
|
||||
"GROUND" = GROUND,
|
||||
"FLYING" = FLYING
|
||||
),
|
||||
"resistance_flags" = list(
|
||||
"LAVA_PROOF" = LAVA_PROOF,
|
||||
"FIRE_PROOF" = FIRE_PROOF,
|
||||
"FLAMMABLE" = FLAMMABLE,
|
||||
"ON_FIRE" = ON_FIRE,
|
||||
"UNACIDABLE" = UNACIDABLE,
|
||||
"ACID_PROOF" = ACID_PROOF,
|
||||
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
|
||||
"FREEZE_PROOF" = FREEZE_PROOF,
|
||||
"GOLIATH_RESISTANCE" = GOLIATH_RESISTANCE,
|
||||
"GOLIATH_WEAKNESS" = GOLIATH_WEAKNESS
|
||||
),
|
||||
"flags_1" = list(
|
||||
"NOJAUNT_1" = NOJAUNT_1,
|
||||
"UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
|
||||
"CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1,
|
||||
"HEAR_1" = HEAR_1,
|
||||
"CHECK_RICOCHET_1" = CHECK_RICOCHET_1,
|
||||
"CONDUCT_1" = CONDUCT_1,
|
||||
"NO_LAVA_GEN_1" = NO_LAVA_GEN_1,
|
||||
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
|
||||
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
|
||||
"ON_BORDER_1" = ON_BORDER_1,
|
||||
"NO_RUINS_1" = NO_RUINS_1,
|
||||
"PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1,
|
||||
"HOLOGRAM_1" = HOLOGRAM_1,
|
||||
"TESLA_IGNORE_1" = TESLA_IGNORE_1,
|
||||
"INITIALIZED_1" = INITIALIZED_1,
|
||||
"ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1,
|
||||
),
|
||||
"clothing_flags" = list(
|
||||
"LAVAPROTECT" = LAVAPROTECT,
|
||||
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
|
||||
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
|
||||
"ALLOWINTERNALS" = ALLOWINTERNALS,
|
||||
"NOSLIP" = NOSLIP,
|
||||
"THICKMATERIAL" = THICKMATERIAL,
|
||||
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
|
||||
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
|
||||
"IGNORE_HAT_TOSS" = IGNORE_HAT_TOSS,
|
||||
"SCAN_REAGENTS" = SCAN_REAGENTS
|
||||
),
|
||||
"tesla_flags" = list(
|
||||
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
|
||||
"TESLA_OBJ_DAMAGE" = TESLA_OBJ_DAMAGE,
|
||||
"TESLA_MOB_STUN" = TESLA_MOB_STUN,
|
||||
"TESLA_ALLOW_DUPLICATES" = TESLA_ALLOW_DUPLICATES,
|
||||
"TESLA_MACHINE_EXPLOSIVE" = TESLA_MACHINE_EXPLOSIVE,
|
||||
),
|
||||
"smooth" = list(
|
||||
"SMOOTH_TRUE" = SMOOTH_TRUE,
|
||||
"SMOOTH_MORE" = SMOOTH_MORE,
|
||||
"SMOOTH_DIAGONAL" = SMOOTH_DIAGONAL,
|
||||
"SMOOTH_BORDER" = SMOOTH_BORDER,
|
||||
"SMOOTH_QUEUED" = SMOOTH_QUEUED,
|
||||
),
|
||||
"reagents_holder_flags" = list(
|
||||
"INJECTABLE" = INJECTABLE,
|
||||
"DRAWABLE" = DRAWABLE,
|
||||
"REFILLABLE" = REFILLABLE,
|
||||
"DRAINABLE" = DRAINABLE,
|
||||
"TRANSPARENT" = TRANSPARENT,
|
||||
"AMOUNT_VISIBLE" = AMOUNT_VISIBLE,
|
||||
"NO_REACT" = NO_REACT,
|
||||
),
|
||||
"car_traits" = list(
|
||||
"CAN_KIDNAP" = CAN_KIDNAP,
|
||||
),
|
||||
"rad_flags" = list(
|
||||
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
|
||||
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
|
||||
),
|
||||
"disease_flags" = list(
|
||||
"CURABLE" = CURABLE,
|
||||
"CAN_CARRY" = CAN_CARRY,
|
||||
"CAN_RESIST" = CAN_RESIST
|
||||
),
|
||||
"chemical_flags" = list(
|
||||
"REAGENT_DEAD_PROCESS" = REAGENT_DEAD_PROCESS,
|
||||
"REAGENT_DONOTSPLIT" = REAGENT_DONOTSPLIT,
|
||||
"REAGENT_ONLYINVERSE" = REAGENT_ONLYINVERSE,
|
||||
"REAGENT_ONMOBMERGE" = REAGENT_ONMOBMERGE,
|
||||
"REAGENT_INVISIBLE" = REAGENT_INVISIBLE,
|
||||
"REAGENT_FORCEONNEW" = REAGENT_FORCEONNEW,
|
||||
"REAGENT_SNEAKYNAME" = REAGENT_SNEAKYNAME,
|
||||
"REAGENT_SPLITRETAINVOL" = REAGENT_SPLITRETAINVOL
|
||||
),
|
||||
"clear_conversion" = list(
|
||||
"REACTION_CLEAR_IMPURE" = REACTION_CLEAR_IMPURE,
|
||||
"REACTION_CLEAR_INVERSE" = REACTION_CLEAR_INVERSE
|
||||
),
|
||||
"organ_flags" = list(
|
||||
"ORGAN_SYNTHETIC" = ORGAN_SYNTHETIC,
|
||||
"ORGAN_FROZEN" = ORGAN_FROZEN,
|
||||
"ORGAN_FAILING" = ORGAN_FAILING,
|
||||
"ORGAN_EXTERNAL" = ORGAN_EXTERNAL,
|
||||
"ORGAN_VITAL" = ORGAN_VITAL,
|
||||
"ORGAN_NO_SPOIL" = ORGAN_NO_SPOIL
|
||||
),
|
||||
"genital_flags" = list(
|
||||
"GENITAL_BLACKLISTED" = GENITAL_BLACKLISTED,
|
||||
"GENITAL_INTERNAL" = GENITAL_INTERNAL,
|
||||
"GENITAL_HIDDEN" = GENITAL_HIDDEN,
|
||||
"GENITAL_THROUGH_CLOTHES" = GENITAL_THROUGH_CLOTHES,
|
||||
"GENITAL_FUID_PRODUCTION" = GENITAL_FUID_PRODUCTION,
|
||||
"CAN_MASTURBATE_WITH" = CAN_MASTURBATE_WITH,
|
||||
"MASTURBATE_LINKED_ORGAN" = MASTURBATE_LINKED_ORGAN,
|
||||
"CAN_CLIMAX_WITH" = CAN_CLIMAX_WITH
|
||||
)
|
||||
GLOBAL_LIST_INIT(bitfields, list(
|
||||
"appearance_flags" = list(
|
||||
"LONG_GLIDE" = LONG_GLIDE,
|
||||
"RESET_COLOR" = RESET_COLOR,
|
||||
"RESET_ALPHA" = RESET_ALPHA,
|
||||
"RESET_TRANSFORM" = RESET_TRANSFORM,
|
||||
"NO_CLIENT_COLOR" = NO_CLIENT_COLOR,
|
||||
"KEEP_TOGETHER" = KEEP_TOGETHER,
|
||||
"KEEP_APART" = KEEP_APART,
|
||||
"PLANE_MASTER" = PLANE_MASTER,
|
||||
"TILE_BOUND" = TILE_BOUND,
|
||||
"PIXEL_SCALE" = PIXEL_SCALE
|
||||
),
|
||||
"sight" = list(
|
||||
"SEE_INFRA" = SEE_INFRA,
|
||||
"SEE_SELF" = SEE_SELF,
|
||||
"SEE_MOBS" = SEE_MOBS,
|
||||
"SEE_OBJS" = SEE_OBJS,
|
||||
"SEE_TURFS" = SEE_TURFS,
|
||||
"SEE_PIXELS" = SEE_PIXELS,
|
||||
"SEE_THRU" = SEE_THRU,
|
||||
"SEE_BLACKNESS" = SEE_BLACKNESS,
|
||||
"BLIND" = BLIND
|
||||
),
|
||||
"obj_flags" = list(
|
||||
"EMAGGED" = EMAGGED,
|
||||
"IN_USE" = IN_USE,
|
||||
"CAN_BE_HIT" = CAN_BE_HIT,
|
||||
"BEING_SHOCKED" = BEING_SHOCKED,
|
||||
"DANGEROUS_POSSESSION" = DANGEROUS_POSSESSION,
|
||||
"ON_BLUEPRINTS" = ON_BLUEPRINTS,
|
||||
"UNIQUE_RENAME" = UNIQUE_RENAME,
|
||||
"USES_TGUI" = USES_TGUI,
|
||||
"FROZEN" = FROZEN,
|
||||
"SHOVABLE_ONTO" = SHOVABLE_ONTO
|
||||
),
|
||||
"datum_flags" = list(
|
||||
"DF_USE_TAG" = DF_USE_TAG,
|
||||
"DF_VAR_EDITED" = DF_VAR_EDITED,
|
||||
"DF_ISPROCESSING" = DF_ISPROCESSING,
|
||||
),
|
||||
"item_flags" = list(
|
||||
"BEING_REMOVED" = BEING_REMOVED,
|
||||
"IN_INVENTORY" = IN_INVENTORY,
|
||||
"FORCE_STRING_OVERRIDE" = FORCE_STRING_OVERRIDE,
|
||||
"NEEDS_PERMIT" = NEEDS_PERMIT,
|
||||
"SLOWS_WHILE_IN_HAND" = SLOWS_WHILE_IN_HAND,
|
||||
"NO_MAT_REDEMPTION" = NO_MAT_REDEMPTION,
|
||||
"DROPDEL" = DROPDEL,
|
||||
"NOBLUDGEON" = NOBLUDGEON,
|
||||
"ABSTRACT" = ABSTRACT,
|
||||
),
|
||||
"admin_flags" = list(
|
||||
"BUILDMODE" = R_BUILDMODE,
|
||||
"ADMIN" = R_ADMIN,
|
||||
"BAN" = R_BAN,
|
||||
"FUN" = R_FUN,
|
||||
"SERVER" = R_SERVER,
|
||||
"DEBUG" = R_DEBUG,
|
||||
"POSSESS" = R_POSSESS,
|
||||
"PERMISSIONS" = R_PERMISSIONS,
|
||||
"STEALTH" = R_STEALTH,
|
||||
"POLL" = R_POLL,
|
||||
"VAREDIT" = R_VAREDIT,
|
||||
"SOUNDS" = R_SOUNDS,
|
||||
"SPAWN" = R_SPAWN,
|
||||
"AUTOLOGIN" = R_AUTOLOGIN,
|
||||
"DBRANKS" = R_DBRANKS
|
||||
),
|
||||
"interaction_flags_atom" = list(
|
||||
"INTERACT_ATOM_REQUIRES_ANCHORED" = INTERACT_ATOM_REQUIRES_ANCHORED,
|
||||
"INTERACT_ATOM_ATTACK_HAND" = INTERACT_ATOM_ATTACK_HAND,
|
||||
"INTERACT_ATOM_UI_INTERACT" = INTERACT_ATOM_UI_INTERACT,
|
||||
"INTERACT_ATOM_REQUIRES_DEXTERITY" = INTERACT_ATOM_REQUIRES_DEXTERITY,
|
||||
"INTERACT_ATOM_IGNORE_INCAPACITATED" = INTERACT_ATOM_IGNORE_INCAPACITATED,
|
||||
"INTERACT_ATOM_IGNORE_RESTRAINED" = INTERACT_ATOM_IGNORE_RESTRAINED,
|
||||
"INTERACT_ATOM_CHECK_GRAB" = INTERACT_ATOM_CHECK_GRAB,
|
||||
"INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND" = INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND,
|
||||
"INTERACT_ATOM_NO_FINGERPRINT_INTERACT" = INTERACT_ATOM_NO_FINGERPRINT_INTERACT
|
||||
),
|
||||
"interaction_flags_machine" = list(
|
||||
"INTERACT_MACHINE_OPEN" = INTERACT_MACHINE_OPEN,
|
||||
"INTERACT_MACHINE_OFFLINE" = INTERACT_MACHINE_OFFLINE,
|
||||
"INTERACT_MACHINE_WIRES_IF_OPEN" = INTERACT_MACHINE_WIRES_IF_OPEN,
|
||||
"INTERACT_MACHINE_ALLOW_SILICON" = INTERACT_MACHINE_ALLOW_SILICON,
|
||||
"INTERACT_MACHINE_OPEN_SILICON" = INTERACT_MACHINE_OPEN_SILICON,
|
||||
"INTERACT_MACHINE_REQUIRES_SILICON" = INTERACT_MACHINE_REQUIRES_SILICON,
|
||||
"INTERACT_MACHINE_SET_MACHINE" = INTERACT_MACHINE_SET_MACHINE
|
||||
),
|
||||
"interaction_flags_item" = list(
|
||||
"INTERACT_ITEM_ATTACK_HAND_PICKUP" = INTERACT_ITEM_ATTACK_HAND_PICKUP,
|
||||
),
|
||||
"pass_flags" = list(
|
||||
"PASSTABLE" = PASSTABLE,
|
||||
"PASSGLASS" = PASSGLASS,
|
||||
"PASSGRILLE" = PASSGRILLE,
|
||||
"PASSBLOB" = PASSBLOB,
|
||||
"PASSMOB" = PASSMOB,
|
||||
"PASSCLOSEDTURF" = PASSCLOSEDTURF,
|
||||
"LETPASSTHROW" = LETPASSTHROW
|
||||
),
|
||||
"movement_type" = list(
|
||||
"GROUND" = GROUND,
|
||||
"FLYING" = FLYING
|
||||
),
|
||||
"resistance_flags" = list(
|
||||
"LAVA_PROOF" = LAVA_PROOF,
|
||||
"FIRE_PROOF" = FIRE_PROOF,
|
||||
"FLAMMABLE" = FLAMMABLE,
|
||||
"ON_FIRE" = ON_FIRE,
|
||||
"UNACIDABLE" = UNACIDABLE,
|
||||
"ACID_PROOF" = ACID_PROOF,
|
||||
"INDESTRUCTIBLE" = INDESTRUCTIBLE,
|
||||
"FREEZE_PROOF" = FREEZE_PROOF,
|
||||
"GOLIATH_RESISTANCE" = GOLIATH_RESISTANCE,
|
||||
"GOLIATH_WEAKNESS" = GOLIATH_WEAKNESS
|
||||
),
|
||||
"flags_1" = list(
|
||||
"NOJAUNT_1" = NOJAUNT_1,
|
||||
"UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
|
||||
"CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1,
|
||||
"HEAR_1" = HEAR_1,
|
||||
"CHECK_RICOCHET_1" = CHECK_RICOCHET_1,
|
||||
"CONDUCT_1" = CONDUCT_1,
|
||||
"NO_LAVA_GEN_1" = NO_LAVA_GEN_1,
|
||||
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
|
||||
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
|
||||
"ON_BORDER_1" = ON_BORDER_1,
|
||||
"NO_RUINS_1" = NO_RUINS_1,
|
||||
"PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1,
|
||||
"HOLOGRAM_1" = HOLOGRAM_1,
|
||||
"TESLA_IGNORE_1" = TESLA_IGNORE_1,
|
||||
"INITIALIZED_1" = INITIALIZED_1,
|
||||
"ADMIN_SPAWNED_1" = ADMIN_SPAWNED_1,
|
||||
),
|
||||
"clothing_flags" = list(
|
||||
"LAVAPROTECT" = LAVAPROTECT,
|
||||
"STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE,
|
||||
"BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
|
||||
"ALLOWINTERNALS" = ALLOWINTERNALS,
|
||||
"NOSLIP" = NOSLIP,
|
||||
"THICKMATERIAL" = THICKMATERIAL,
|
||||
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
|
||||
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
|
||||
"IGNORE_HAT_TOSS" = IGNORE_HAT_TOSS,
|
||||
"SCAN_REAGENTS" = SCAN_REAGENTS
|
||||
),
|
||||
"tesla_flags" = list(
|
||||
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
|
||||
"TESLA_OBJ_DAMAGE" = TESLA_OBJ_DAMAGE,
|
||||
"TESLA_MOB_STUN" = TESLA_MOB_STUN,
|
||||
"TESLA_ALLOW_DUPLICATES" = TESLA_ALLOW_DUPLICATES,
|
||||
"TESLA_MACHINE_EXPLOSIVE" = TESLA_MACHINE_EXPLOSIVE,
|
||||
),
|
||||
"smooth" = list(
|
||||
"SMOOTH_TRUE" = SMOOTH_TRUE,
|
||||
"SMOOTH_MORE" = SMOOTH_MORE,
|
||||
"SMOOTH_DIAGONAL" = SMOOTH_DIAGONAL,
|
||||
"SMOOTH_BORDER" = SMOOTH_BORDER,
|
||||
"SMOOTH_QUEUED" = SMOOTH_QUEUED,
|
||||
),
|
||||
"reagents_holder_flags" = list(
|
||||
"INJECTABLE" = INJECTABLE,
|
||||
"DRAWABLE" = DRAWABLE,
|
||||
"REFILLABLE" = REFILLABLE,
|
||||
"DRAINABLE" = DRAINABLE,
|
||||
"TRANSPARENT" = TRANSPARENT,
|
||||
"AMOUNT_VISIBLE" = AMOUNT_VISIBLE,
|
||||
"NO_REACT" = NO_REACT,
|
||||
),
|
||||
"car_traits" = list(
|
||||
"CAN_KIDNAP" = CAN_KIDNAP,
|
||||
),
|
||||
"rad_flags" = list(
|
||||
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
|
||||
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
|
||||
),
|
||||
"disease_flags" = list(
|
||||
"CURABLE" = CURABLE,
|
||||
"CAN_CARRY" = CAN_CARRY,
|
||||
"CAN_RESIST" = CAN_RESIST
|
||||
),
|
||||
"chemical_flags" = list(
|
||||
"REAGENT_DEAD_PROCESS" = REAGENT_DEAD_PROCESS,
|
||||
"REAGENT_DONOTSPLIT" = REAGENT_DONOTSPLIT,
|
||||
"REAGENT_ONLYINVERSE" = REAGENT_ONLYINVERSE,
|
||||
"REAGENT_ONMOBMERGE" = REAGENT_ONMOBMERGE,
|
||||
"REAGENT_INVISIBLE" = REAGENT_INVISIBLE,
|
||||
"REAGENT_FORCEONNEW" = REAGENT_FORCEONNEW,
|
||||
"REAGENT_SNEAKYNAME" = REAGENT_SNEAKYNAME,
|
||||
"REAGENT_SPLITRETAINVOL" = REAGENT_SPLITRETAINVOL
|
||||
),
|
||||
"clear_conversion" = list(
|
||||
"REACTION_CLEAR_IMPURE" = REACTION_CLEAR_IMPURE,
|
||||
"REACTION_CLEAR_INVERSE" = REACTION_CLEAR_INVERSE
|
||||
),
|
||||
"organ_flags" = list(
|
||||
"ORGAN_SYNTHETIC" = ORGAN_SYNTHETIC,
|
||||
"ORGAN_FROZEN" = ORGAN_FROZEN,
|
||||
"ORGAN_FAILING" = ORGAN_FAILING,
|
||||
"ORGAN_EXTERNAL" = ORGAN_EXTERNAL,
|
||||
"ORGAN_VITAL" = ORGAN_VITAL,
|
||||
"ORGAN_NO_SPOIL" = ORGAN_NO_SPOIL
|
||||
),
|
||||
"genital_flags" = list(
|
||||
"GENITAL_BLACKLISTED" = GENITAL_BLACKLISTED,
|
||||
"GENITAL_INTERNAL" = GENITAL_INTERNAL,
|
||||
"GENITAL_HIDDEN" = GENITAL_HIDDEN,
|
||||
"GENITAL_THROUGH_CLOTHES" = GENITAL_THROUGH_CLOTHES,
|
||||
"GENITAL_FUID_PRODUCTION" = GENITAL_FUID_PRODUCTION,
|
||||
"CAN_MASTURBATE_WITH" = CAN_MASTURBATE_WITH,
|
||||
"MASTURBATE_LINKED_ORGAN" = MASTURBATE_LINKED_ORGAN,
|
||||
"CAN_CLIMAX_WITH" = CAN_CLIMAX_WITH
|
||||
)
|
||||
))
|
||||
@@ -1,38 +1,38 @@
|
||||
GLOBAL_REAL(config, /datum/controller/configuration)
|
||||
|
||||
GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
|
||||
GLOBAL_VAR(host)
|
||||
GLOBAL_VAR(station_name)
|
||||
GLOBAL_VAR_INIT(game_version, "/tg/ Station 13")
|
||||
GLOBAL_VAR_INIT(changelog_hash, "")
|
||||
GLOBAL_VAR_INIT(hub_visibility, FALSE)
|
||||
|
||||
GLOBAL_VAR_INIT(ooc_allowed, TRUE) // used with admin verbs to disable ooc - not a config option apparently
|
||||
GLOBAL_VAR_INIT(looc_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(dooc_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(aooc_allowed, FALSE)
|
||||
GLOBAL_VAR_INIT(enter_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(shuttle_frozen, FALSE)
|
||||
GLOBAL_VAR_INIT(shuttle_left, FALSE)
|
||||
GLOBAL_VAR_INIT(tinted_weldhelh, TRUE)
|
||||
|
||||
|
||||
// Debug is used exactly once (in living.dm) but is commented out in a lot of places. It is not set anywhere and only checked.
|
||||
// Debug2 is used in conjunction with a lot of admin verbs and therefore is actually legit.
|
||||
GLOBAL_VAR_INIT(Debug, FALSE) // global debug switch
|
||||
GLOBAL_VAR_INIT(Debug2, FALSE)
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
//Protecting these because the proper way to edit them is with the config/secrets
|
||||
GLOBAL_VAR_INIT(MAX_EX_DEVESTATION_RANGE, 3)
|
||||
GLOBAL_PROTECT(MAX_EX_DEVESTATION_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_HEAVY_RANGE, 7)
|
||||
GLOBAL_PROTECT(MAX_EX_HEAVY_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_LIGHT_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_LIGHT_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_FLASH_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_FLASH_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_FLAME_RANGE)
|
||||
GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5)
|
||||
GLOBAL_REAL(config, /datum/controller/configuration)
|
||||
|
||||
GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
|
||||
GLOBAL_VAR(host)
|
||||
GLOBAL_VAR(station_name)
|
||||
GLOBAL_VAR_INIT(game_version, "/tg/ Station 13")
|
||||
GLOBAL_VAR_INIT(changelog_hash, "")
|
||||
GLOBAL_VAR_INIT(hub_visibility, FALSE)
|
||||
|
||||
GLOBAL_VAR_INIT(ooc_allowed, TRUE) // used with admin verbs to disable ooc - not a config option apparently
|
||||
GLOBAL_VAR_INIT(looc_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(dooc_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(aooc_allowed, FALSE)
|
||||
GLOBAL_VAR_INIT(enter_allowed, TRUE)
|
||||
GLOBAL_VAR_INIT(shuttle_frozen, FALSE)
|
||||
GLOBAL_VAR_INIT(shuttle_left, FALSE)
|
||||
GLOBAL_VAR_INIT(tinted_weldhelh, TRUE)
|
||||
|
||||
|
||||
// Debug is used exactly once (in living.dm) but is commented out in a lot of places. It is not set anywhere and only checked.
|
||||
// Debug2 is used in conjunction with a lot of admin verbs and therefore is actually legit.
|
||||
GLOBAL_VAR_INIT(Debug, FALSE) // global debug switch
|
||||
GLOBAL_VAR_INIT(Debug2, FALSE)
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
//Protecting these because the proper way to edit them is with the config/secrets
|
||||
GLOBAL_VAR_INIT(MAX_EX_DEVESTATION_RANGE, 3)
|
||||
GLOBAL_PROTECT(MAX_EX_DEVESTATION_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_HEAVY_RANGE, 7)
|
||||
GLOBAL_PROTECT(MAX_EX_HEAVY_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_LIGHT_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_LIGHT_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_FLASH_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_FLASH_RANGE)
|
||||
GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14)
|
||||
GLOBAL_PROTECT(MAX_EX_FLAME_RANGE)
|
||||
GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
GLOBAL_VAR_INIT(master_mode, "traitor") //"extended"
|
||||
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode
|
||||
GLOBAL_VAR(common_report) //Contains common part of roundend report
|
||||
GLOBAL_VAR(survivor_report) //Contains shared survivor report for roundend report (part of personal report)
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
|
||||
GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report
|
||||
|
||||
|
||||
//TODO clear this one up too
|
||||
GLOBAL_VAR_INIT(master_mode, "traitor") //"extended"
|
||||
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode
|
||||
GLOBAL_VAR(common_report) //Contains common part of roundend report
|
||||
GLOBAL_VAR(survivor_report) //Contains shared survivor report for roundend report (part of personal report)
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
|
||||
GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report
|
||||
|
||||
|
||||
//TODO clear this one up too
|
||||
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
|
||||
@@ -1,28 +1,28 @@
|
||||
//////////////
|
||||
GLOBAL_VAR_INIT(NEARSIGHTBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(EPILEPSYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(COUGHBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(TOURETTESBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(NERVOUSBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(BLINDBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(DEAFBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(HULKBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(TELEBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(FIREBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(XRAYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(CLUMSYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(STRANGEBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(RACEBLOCK, 0)
|
||||
|
||||
GLOBAL_LIST(bad_se_blocks)
|
||||
GLOBAL_LIST(good_se_blocks)
|
||||
GLOBAL_LIST(op_se_blocks)
|
||||
|
||||
GLOBAL_VAR(NULLED_SE)
|
||||
GLOBAL_VAR(NULLED_UI)
|
||||
|
||||
GLOBAL_LIST_EMPTY(global_mutations) // list of hidden mutation things
|
||||
|
||||
GLOBAL_LIST_EMPTY(bad_mutations)
|
||||
GLOBAL_LIST_EMPTY(good_mutations)
|
||||
//////////////
|
||||
GLOBAL_VAR_INIT(NEARSIGHTBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(EPILEPSYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(COUGHBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(TOURETTESBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(NERVOUSBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(BLINDBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(DEAFBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(HULKBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(TELEBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(FIREBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(XRAYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(CLUMSYBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(STRANGEBLOCK, 0)
|
||||
GLOBAL_VAR_INIT(RACEBLOCK, 0)
|
||||
|
||||
GLOBAL_LIST(bad_se_blocks)
|
||||
GLOBAL_LIST(good_se_blocks)
|
||||
GLOBAL_LIST(op_se_blocks)
|
||||
|
||||
GLOBAL_VAR(NULLED_SE)
|
||||
GLOBAL_VAR(NULLED_UI)
|
||||
|
||||
GLOBAL_LIST_EMPTY(global_mutations) // list of hidden mutation things
|
||||
|
||||
GLOBAL_LIST_EMPTY(bad_mutations)
|
||||
GLOBAL_LIST_EMPTY(good_mutations)
|
||||
GLOBAL_LIST_EMPTY(not_good_mutations)
|
||||
@@ -1,223 +1,223 @@
|
||||
//Preferences stuff
|
||||
//Hairstyles
|
||||
GLOBAL_LIST_EMPTY(hair_styles_list) //stores /datum/sprite_accessory/hair indexed by name
|
||||
GLOBAL_LIST_EMPTY(hair_styles_male_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(hair_styles_female_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
|
||||
//Underwear
|
||||
GLOBAL_LIST_EMPTY_TYPED(underwear_list, /datum/sprite_accessory/underwear/bottom) //stores bottoms indexed by name
|
||||
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
|
||||
GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name
|
||||
//Undershirts
|
||||
GLOBAL_LIST_EMPTY_TYPED(undershirt_list, /datum/sprite_accessory/underwear/top) //stores tops indexed by name
|
||||
GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name
|
||||
GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name
|
||||
//Socks
|
||||
GLOBAL_LIST_EMPTY_TYPED(socks_list, /datum/sprite_accessory/underwear/socks) //stores socks indexed by name
|
||||
//Lizard Bits (all datum lists indexed by name)
|
||||
GLOBAL_LIST_EMPTY(body_markings_list)
|
||||
GLOBAL_LIST_EMPTY(tails_list_lizard)
|
||||
GLOBAL_LIST_EMPTY(animated_tails_list_lizard)
|
||||
GLOBAL_LIST_EMPTY(snouts_list)
|
||||
GLOBAL_LIST_EMPTY(horns_list)
|
||||
GLOBAL_LIST_EMPTY(frills_list)
|
||||
GLOBAL_LIST_EMPTY(spines_list)
|
||||
GLOBAL_LIST_EMPTY(legs_list)
|
||||
GLOBAL_LIST_EMPTY(animated_spines_list)
|
||||
|
||||
//Mutant Human bits
|
||||
GLOBAL_LIST_EMPTY(tails_list_human)
|
||||
GLOBAL_LIST_EMPTY(animated_tails_list_human)
|
||||
GLOBAL_LIST_EMPTY(ears_list)
|
||||
GLOBAL_LIST_EMPTY(wings_list)
|
||||
GLOBAL_LIST_EMPTY(wings_open_list)
|
||||
GLOBAL_LIST_EMPTY(deco_wings_list)
|
||||
GLOBAL_LIST_EMPTY(r_wings_list)
|
||||
GLOBAL_LIST_EMPTY(insect_wings_list)
|
||||
GLOBAL_LIST_EMPTY(insect_fluffs_list)
|
||||
GLOBAL_LIST_EMPTY(insect_markings_list)
|
||||
GLOBAL_LIST_EMPTY(caps_list)
|
||||
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things
|
||||
|
||||
GLOBAL_LIST_INIT(ai_core_display_screens, list(
|
||||
":thinking:",
|
||||
"Alien",
|
||||
"Angel",
|
||||
"Angryface",
|
||||
"AtlantisCZE",
|
||||
"Banned",
|
||||
"Bliss",
|
||||
"Blue",
|
||||
"Boy",
|
||||
"Boy-Malf",
|
||||
"Girl",
|
||||
"Girl-Malf",
|
||||
"Database",
|
||||
"Dorf",
|
||||
"Firewall",
|
||||
"Fuzzy",
|
||||
"Gentoo",
|
||||
"Glitchman",
|
||||
"Gondola",
|
||||
"Goon",
|
||||
"Hades",
|
||||
"Heartline",
|
||||
"Helios",
|
||||
"Hotdog",
|
||||
"Hourglass",
|
||||
"House",
|
||||
"Inverted",
|
||||
"Jack",
|
||||
"Matrix",
|
||||
"Monochrome",
|
||||
"Mothman",
|
||||
"Murica",
|
||||
"Nanotrasen",
|
||||
"Not Malf",
|
||||
"Patriot",
|
||||
"Pirate",
|
||||
"President",
|
||||
"Rainbow",
|
||||
"Clown",
|
||||
"Random",
|
||||
"Ravensdale",
|
||||
"Red October",
|
||||
"Red",
|
||||
"Royal",
|
||||
"Searif",
|
||||
"Serithi",
|
||||
"SilveryFerret",
|
||||
"Smiley",
|
||||
"Static",
|
||||
"Syndicat Meow",
|
||||
"TechDemon",
|
||||
"Terminal",
|
||||
"Text",
|
||||
"Too Deep",
|
||||
"Triumvirate",
|
||||
"Triumvirate-M",
|
||||
"Wasp",
|
||||
"Weird",
|
||||
"Xerxes",
|
||||
"Yes-Man"
|
||||
))
|
||||
|
||||
/proc/resolve_ai_icon(input)
|
||||
if(!input || !(input in GLOB.ai_core_display_screens))
|
||||
return "ai"
|
||||
else
|
||||
if(input == "Random")
|
||||
input = pick(GLOB.ai_core_display_screens - "Random")
|
||||
return "ai-[lowertext(input)]"
|
||||
|
||||
GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY))
|
||||
|
||||
//Backpacks
|
||||
#define GBACKPACK "Grey Backpack"
|
||||
#define GSATCHEL "Grey Satchel"
|
||||
#define GDUFFELBAG "Grey Duffel Bag"
|
||||
#define LSATCHEL "Leather Satchel"
|
||||
#define DBACKPACK "Department Backpack"
|
||||
#define DSATCHEL "Department Satchel"
|
||||
#define DDUFFELBAG "Department Duffel Bag"
|
||||
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFELBAG, GBACKPACK, GSATCHEL, GDUFFELBAG, LSATCHEL))
|
||||
|
||||
//Suit/Skirt
|
||||
#define PREF_SUIT "Jumpsuit"
|
||||
#define PREF_SKIRT "Jumpskirt"
|
||||
GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT))
|
||||
|
||||
//Uplink spawn loc
|
||||
#define UPLINK_PDA "PDA"
|
||||
#define UPLINK_RADIO "Radio"
|
||||
#define UPLINK_PEN "Pen" //like a real spy!
|
||||
GLOBAL_LIST_INIT(uplink_spawn_loc_list, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN))
|
||||
|
||||
//Female Uniforms
|
||||
GLOBAL_LIST_EMPTY(female_clothing_icons)
|
||||
|
||||
//radical shit
|
||||
GLOBAL_LIST_INIT(hit_appends, list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF"))
|
||||
|
||||
GLOBAL_LIST_INIT(scarySounds, list('sound/weapons/thudswoosh.ogg','sound/weapons/taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg','sound/items/welder.ogg','sound/items/welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg'))
|
||||
|
||||
|
||||
// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to
|
||||
// the index of the sort department that you want. For example, sortType set to 2 will reroute all packages
|
||||
// tagged for the Cargo Bay.
|
||||
|
||||
/* List of sortType codes for mapping reference
|
||||
0 Waste
|
||||
1 Disposals - All unwrapped items and untagged parcels get picked up by a junction with this sortType. Usually leads to the recycler.
|
||||
2 Cargo Bay
|
||||
3 QM Office
|
||||
4 Engineering
|
||||
5 CE Office
|
||||
6 Atmospherics
|
||||
7 Security
|
||||
8 HoS Office
|
||||
9 Medbay
|
||||
10 CMO Office
|
||||
11 Chemistry
|
||||
12 Research
|
||||
13 RD Office
|
||||
14 Robotics
|
||||
15 HoP Office
|
||||
16 Library
|
||||
17 Chapel
|
||||
18 Theatre
|
||||
19 Bar
|
||||
20 Kitchen
|
||||
21 Hydroponics
|
||||
22 Janitor
|
||||
23 Genetics
|
||||
24 Circuitry
|
||||
25 Toxins
|
||||
26 Dormitories
|
||||
27 Virology
|
||||
28 Xenobiology
|
||||
29 Law Office
|
||||
30 Detective's Office
|
||||
*/
|
||||
|
||||
//The whole system for the sorttype var is determined based on the order of this list,
|
||||
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
|
||||
|
||||
//If you don't want to fuck up disposals, add to this list, and don't change the order.
|
||||
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
|
||||
|
||||
GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals",
|
||||
"Cargo Bay", "QM Office", "Engineering", "CE Office",
|
||||
"Atmospherics", "Security", "HoS Office", "Medbay",
|
||||
"CMO Office", "Chemistry", "Research", "RD Office",
|
||||
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
|
||||
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics",
|
||||
"Circuitry", "Toxins", "Dormitories", "Virology",
|
||||
"Xenobiology", "Law Office","Detective's Office"))
|
||||
|
||||
GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "")
|
||||
|
||||
GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt" + ""))
|
||||
|
||||
GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(greek_letters, world.file2list("strings/greek_letters.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(phonetic_alphabet, world.file2list("strings/phonetic_alphabet.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(numbers_as_words, world.file2list("strings/numbers_as_words.txt"))
|
||||
|
||||
/proc/generate_number_strings()
|
||||
var/list/L[198]
|
||||
for(var/i in 1 to 99)
|
||||
L += "[i]"
|
||||
L += "\Roman[i]"
|
||||
return L
|
||||
|
||||
GLOBAL_LIST_INIT(station_numerals, greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings())
|
||||
|
||||
GLOBAL_LIST_INIT(admiral_messages, list("Do you know how expensive these stations are?","Stop wasting my time.","I was sleeping, thanks a lot.","Stand and fight you cowards!","You knew the risks coming in.","Stop being paranoid.","Whatever's broken just build a new one.","No.", "<i>null</i>","<i>Error: No comment given.</i>", "It's a good day to die!"))
|
||||
//Preferences stuff
|
||||
//Hairstyles
|
||||
GLOBAL_LIST_EMPTY(hair_styles_list) //stores /datum/sprite_accessory/hair indexed by name
|
||||
GLOBAL_LIST_EMPTY(hair_styles_male_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(hair_styles_female_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
|
||||
//Underwear
|
||||
GLOBAL_LIST_EMPTY_TYPED(underwear_list, /datum/sprite_accessory/underwear/bottom) //stores bottoms indexed by name
|
||||
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
|
||||
GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name
|
||||
//Undershirts
|
||||
GLOBAL_LIST_EMPTY_TYPED(undershirt_list, /datum/sprite_accessory/underwear/top) //stores tops indexed by name
|
||||
GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name
|
||||
GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name
|
||||
//Socks
|
||||
GLOBAL_LIST_EMPTY_TYPED(socks_list, /datum/sprite_accessory/underwear/socks) //stores socks indexed by name
|
||||
//Lizard Bits (all datum lists indexed by name)
|
||||
GLOBAL_LIST_EMPTY(body_markings_list)
|
||||
GLOBAL_LIST_EMPTY(tails_list_lizard)
|
||||
GLOBAL_LIST_EMPTY(animated_tails_list_lizard)
|
||||
GLOBAL_LIST_EMPTY(snouts_list)
|
||||
GLOBAL_LIST_EMPTY(horns_list)
|
||||
GLOBAL_LIST_EMPTY(frills_list)
|
||||
GLOBAL_LIST_EMPTY(spines_list)
|
||||
GLOBAL_LIST_EMPTY(legs_list)
|
||||
GLOBAL_LIST_EMPTY(animated_spines_list)
|
||||
|
||||
//Mutant Human bits
|
||||
GLOBAL_LIST_EMPTY(tails_list_human)
|
||||
GLOBAL_LIST_EMPTY(animated_tails_list_human)
|
||||
GLOBAL_LIST_EMPTY(ears_list)
|
||||
GLOBAL_LIST_EMPTY(wings_list)
|
||||
GLOBAL_LIST_EMPTY(wings_open_list)
|
||||
GLOBAL_LIST_EMPTY(deco_wings_list)
|
||||
GLOBAL_LIST_EMPTY(r_wings_list)
|
||||
GLOBAL_LIST_EMPTY(insect_wings_list)
|
||||
GLOBAL_LIST_EMPTY(insect_fluffs_list)
|
||||
GLOBAL_LIST_EMPTY(insect_markings_list)
|
||||
GLOBAL_LIST_EMPTY(caps_list)
|
||||
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things
|
||||
|
||||
GLOBAL_LIST_INIT(ai_core_display_screens, list(
|
||||
":thinking:",
|
||||
"Alien",
|
||||
"Angel",
|
||||
"Angryface",
|
||||
"AtlantisCZE",
|
||||
"Banned",
|
||||
"Bliss",
|
||||
"Blue",
|
||||
"Boy",
|
||||
"Boy-Malf",
|
||||
"Girl",
|
||||
"Girl-Malf",
|
||||
"Database",
|
||||
"Dorf",
|
||||
"Firewall",
|
||||
"Fuzzy",
|
||||
"Gentoo",
|
||||
"Glitchman",
|
||||
"Gondola",
|
||||
"Goon",
|
||||
"Hades",
|
||||
"Heartline",
|
||||
"Helios",
|
||||
"Hotdog",
|
||||
"Hourglass",
|
||||
"House",
|
||||
"Inverted",
|
||||
"Jack",
|
||||
"Matrix",
|
||||
"Monochrome",
|
||||
"Mothman",
|
||||
"Murica",
|
||||
"Nanotrasen",
|
||||
"Not Malf",
|
||||
"Patriot",
|
||||
"Pirate",
|
||||
"President",
|
||||
"Rainbow",
|
||||
"Clown",
|
||||
"Random",
|
||||
"Ravensdale",
|
||||
"Red October",
|
||||
"Red",
|
||||
"Royal",
|
||||
"Searif",
|
||||
"Serithi",
|
||||
"SilveryFerret",
|
||||
"Smiley",
|
||||
"Static",
|
||||
"Syndicat Meow",
|
||||
"TechDemon",
|
||||
"Terminal",
|
||||
"Text",
|
||||
"Too Deep",
|
||||
"Triumvirate",
|
||||
"Triumvirate-M",
|
||||
"Wasp",
|
||||
"Weird",
|
||||
"Xerxes",
|
||||
"Yes-Man"
|
||||
))
|
||||
|
||||
/proc/resolve_ai_icon(input)
|
||||
if(!input || !(input in GLOB.ai_core_display_screens))
|
||||
return "ai"
|
||||
else
|
||||
if(input == "Random")
|
||||
input = pick(GLOB.ai_core_display_screens - "Random")
|
||||
return "ai-[lowertext(input)]"
|
||||
|
||||
GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY))
|
||||
|
||||
//Backpacks
|
||||
#define GBACKPACK "Grey Backpack"
|
||||
#define GSATCHEL "Grey Satchel"
|
||||
#define GDUFFELBAG "Grey Duffel Bag"
|
||||
#define LSATCHEL "Leather Satchel"
|
||||
#define DBACKPACK "Department Backpack"
|
||||
#define DSATCHEL "Department Satchel"
|
||||
#define DDUFFELBAG "Department Duffel Bag"
|
||||
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFELBAG, GBACKPACK, GSATCHEL, GDUFFELBAG, LSATCHEL))
|
||||
|
||||
//Suit/Skirt
|
||||
#define PREF_SUIT "Jumpsuit"
|
||||
#define PREF_SKIRT "Jumpskirt"
|
||||
GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT))
|
||||
|
||||
//Uplink spawn loc
|
||||
#define UPLINK_PDA "PDA"
|
||||
#define UPLINK_RADIO "Radio"
|
||||
#define UPLINK_PEN "Pen" //like a real spy!
|
||||
GLOBAL_LIST_INIT(uplink_spawn_loc_list, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN))
|
||||
|
||||
//Female Uniforms
|
||||
GLOBAL_LIST_EMPTY(female_clothing_icons)
|
||||
|
||||
//radical shit
|
||||
GLOBAL_LIST_INIT(hit_appends, list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF"))
|
||||
|
||||
GLOBAL_LIST_INIT(scarySounds, list('sound/weapons/thudswoosh.ogg','sound/weapons/taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg','sound/items/welder.ogg','sound/items/welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg'))
|
||||
|
||||
|
||||
// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to
|
||||
// the index of the sort department that you want. For example, sortType set to 2 will reroute all packages
|
||||
// tagged for the Cargo Bay.
|
||||
|
||||
/* List of sortType codes for mapping reference
|
||||
0 Waste
|
||||
1 Disposals - All unwrapped items and untagged parcels get picked up by a junction with this sortType. Usually leads to the recycler.
|
||||
2 Cargo Bay
|
||||
3 QM Office
|
||||
4 Engineering
|
||||
5 CE Office
|
||||
6 Atmospherics
|
||||
7 Security
|
||||
8 HoS Office
|
||||
9 Medbay
|
||||
10 CMO Office
|
||||
11 Chemistry
|
||||
12 Research
|
||||
13 RD Office
|
||||
14 Robotics
|
||||
15 HoP Office
|
||||
16 Library
|
||||
17 Chapel
|
||||
18 Theatre
|
||||
19 Bar
|
||||
20 Kitchen
|
||||
21 Hydroponics
|
||||
22 Janitor
|
||||
23 Genetics
|
||||
24 Circuitry
|
||||
25 Toxins
|
||||
26 Dormitories
|
||||
27 Virology
|
||||
28 Xenobiology
|
||||
29 Law Office
|
||||
30 Detective's Office
|
||||
*/
|
||||
|
||||
//The whole system for the sorttype var is determined based on the order of this list,
|
||||
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
|
||||
|
||||
//If you don't want to fuck up disposals, add to this list, and don't change the order.
|
||||
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
|
||||
|
||||
GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals",
|
||||
"Cargo Bay", "QM Office", "Engineering", "CE Office",
|
||||
"Atmospherics", "Security", "HoS Office", "Medbay",
|
||||
"CMO Office", "Chemistry", "Research", "RD Office",
|
||||
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
|
||||
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics",
|
||||
"Circuitry", "Toxins", "Dormitories", "Virology",
|
||||
"Xenobiology", "Law Office","Detective's Office"))
|
||||
|
||||
GLOBAL_LIST_INIT(station_prefixes, world.file2list("strings/station_prefixes.txt") + "")
|
||||
|
||||
GLOBAL_LIST_INIT(station_names, world.file2list("strings/station_names.txt" + ""))
|
||||
|
||||
GLOBAL_LIST_INIT(station_suffixes, world.file2list("strings/station_suffixes.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(greek_letters, world.file2list("strings/greek_letters.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(phonetic_alphabet, world.file2list("strings/phonetic_alphabet.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(numbers_as_words, world.file2list("strings/numbers_as_words.txt"))
|
||||
|
||||
/proc/generate_number_strings()
|
||||
var/list/L[198]
|
||||
for(var/i in 1 to 99)
|
||||
L += "[i]"
|
||||
L += "\Roman[i]"
|
||||
return L
|
||||
|
||||
GLOBAL_LIST_INIT(station_numerals, greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings())
|
||||
|
||||
GLOBAL_LIST_INIT(admiral_messages, list("Do you know how expensive these stations are?","Stop wasting my time.","I was sleeping, thanks a lot.","Stand and fight you cowards!","You knew the risks coming in.","Stop being paranoid.","Whatever's broken just build a new one.","No.", "<i>null</i>","<i>Error: No comment given.</i>", "It's a good day to die!"))
|
||||
|
||||
@@ -115,5 +115,6 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
|
||||
/obj/item/clothing/shoes/kindleKicks = 1,
|
||||
/obj/item/autosurgeon/penis = 1,
|
||||
/obj/item/autosurgeon/testicles = 1,
|
||||
/obj/item/storage/box/marshmallow = 2,
|
||||
"" = 3
|
||||
))
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST))
|
||||
GLOBAL_LIST_INIT(cardinals_multiz, list(NORTH, SOUTH, EAST, WEST, UP, DOWN))
|
||||
GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(corners_multiz, list(UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(diagonals_multiz, list(
|
||||
NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs_multiz, list(
|
||||
NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP, UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN, DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
|
||||
GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created
|
||||
GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created
|
||||
GLOBAL_LIST_EMPTY(department_security_spawns) //list of all department security spawns
|
||||
GLOBAL_LIST_EMPTY(generic_event_spawns) //list of all spawns for events
|
||||
GLOBAL_LIST_EMPTY(jobspawn_overrides) //These will take precedence over normal spawnpoints if created.
|
||||
|
||||
GLOBAL_LIST_EMPTY(wizardstart)
|
||||
GLOBAL_LIST_EMPTY(nukeop_start)
|
||||
GLOBAL_LIST_EMPTY(nukeop_leader_start)
|
||||
GLOBAL_LIST_EMPTY(newplayer_start)
|
||||
GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these
|
||||
GLOBAL_LIST_EMPTY(holdingfacility) //captured people go here
|
||||
GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these.
|
||||
GLOBAL_LIST_EMPTY(tdome1)
|
||||
GLOBAL_LIST_EMPTY(tdome2)
|
||||
GLOBAL_LIST_EMPTY(tdomeobserve)
|
||||
GLOBAL_LIST_EMPTY(tdomeadmin)
|
||||
GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped
|
||||
GLOBAL_LIST_EMPTY(blobstart)
|
||||
GLOBAL_LIST_EMPTY(secequipment)
|
||||
GLOBAL_LIST_EMPTY(deathsquadspawn)
|
||||
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
|
||||
GLOBAL_LIST_EMPTY(servant_spawns) //Servants of Ratvar spawn here
|
||||
GLOBAL_LIST_EMPTY(city_of_cogs_spawns) //Anyone entering the City of Cogs spawns here
|
||||
GLOBAL_LIST_EMPTY(ruin_landmarks)
|
||||
|
||||
//away missions
|
||||
GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to
|
||||
GLOBAL_LIST_EMPTY(vr_spawnpoints)
|
||||
|
||||
//used by jump-to-area etc. Updated by area/updateName()
|
||||
GLOBAL_LIST_EMPTY(sortedAreas)
|
||||
/// An association from typepath to area instance. Only includes areas with `unique` set.
|
||||
GLOBAL_LIST_EMPTY_TYPED(areas_by_type, /area)
|
||||
|
||||
GLOBAL_LIST_EMPTY(all_abstract_markers)
|
||||
|
||||
GLOBAL_LIST_EMPTY(stationroom_landmarks) //List of all spawns for stationrooms
|
||||
GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST))
|
||||
GLOBAL_LIST_INIT(cardinals_multiz, list(NORTH, SOUTH, EAST, WEST, UP, DOWN))
|
||||
GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(corners_multiz, list(UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(diagonals_multiz, list(
|
||||
NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs_multiz, list(
|
||||
NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP, UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN, DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
|
||||
GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created
|
||||
GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created
|
||||
GLOBAL_LIST_EMPTY(department_security_spawns) //list of all department security spawns
|
||||
GLOBAL_LIST_EMPTY(generic_event_spawns) //list of all spawns for events
|
||||
GLOBAL_LIST_EMPTY(jobspawn_overrides) //These will take precedence over normal spawnpoints if created.
|
||||
|
||||
GLOBAL_LIST_EMPTY(wizardstart)
|
||||
GLOBAL_LIST_EMPTY(nukeop_start)
|
||||
GLOBAL_LIST_EMPTY(nukeop_leader_start)
|
||||
GLOBAL_LIST_EMPTY(newplayer_start)
|
||||
GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these
|
||||
GLOBAL_LIST_EMPTY(holdingfacility) //captured people go here
|
||||
GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these.
|
||||
GLOBAL_LIST_EMPTY(tdome1)
|
||||
GLOBAL_LIST_EMPTY(tdome2)
|
||||
GLOBAL_LIST_EMPTY(tdomeobserve)
|
||||
GLOBAL_LIST_EMPTY(tdomeadmin)
|
||||
GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped
|
||||
GLOBAL_LIST_EMPTY(blobstart)
|
||||
GLOBAL_LIST_EMPTY(secequipment)
|
||||
GLOBAL_LIST_EMPTY(deathsquadspawn)
|
||||
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
|
||||
GLOBAL_LIST_EMPTY(servant_spawns) //Servants of Ratvar spawn here
|
||||
GLOBAL_LIST_EMPTY(city_of_cogs_spawns) //Anyone entering the City of Cogs spawns here
|
||||
GLOBAL_LIST_EMPTY(ruin_landmarks)
|
||||
|
||||
//away missions
|
||||
GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to
|
||||
GLOBAL_LIST_EMPTY(vr_spawnpoints)
|
||||
|
||||
//used by jump-to-area etc. Updated by area/updateName()
|
||||
GLOBAL_LIST_EMPTY(sortedAreas)
|
||||
/// An association from typepath to area instance. Only includes areas with `unique` set.
|
||||
GLOBAL_LIST_EMPTY_TYPED(areas_by_type, /area)
|
||||
|
||||
GLOBAL_LIST_EMPTY(all_abstract_markers)
|
||||
|
||||
GLOBAL_LIST_EMPTY(stationroom_landmarks) //List of all spawns for stationrooms
|
||||
|
||||
@@ -1,123 +1,103 @@
|
||||
GLOBAL_LIST_EMPTY(clients) //all clients
|
||||
GLOBAL_LIST_EMPTY(admins) //all clients whom are admins
|
||||
GLOBAL_PROTECT(admins)
|
||||
GLOBAL_LIST_EMPTY(mentors) //all clients whom are mentors
|
||||
GLOBAL_PROTECT(mentors)
|
||||
GLOBAL_LIST_EMPTY(deadmins) //all ckeys who have used the de-admin verb.
|
||||
|
||||
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
|
||||
GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
|
||||
|
||||
GLOBAL_LIST_EMPTY(bunker_passthrough)
|
||||
|
||||
//Since it didn't really belong in any other category, I'm putting this here
|
||||
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
|
||||
|
||||
GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**.
|
||||
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
|
||||
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
|
||||
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
|
||||
GLOBAL_LIST_EMPTY(drones_list)
|
||||
GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player
|
||||
GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin.
|
||||
GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs
|
||||
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
|
||||
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain brains or simple animals
|
||||
GLOBAL_LIST_EMPTY(ai_list)
|
||||
GLOBAL_LIST_EMPTY(pai_list)
|
||||
GLOBAL_LIST_EMPTY(available_ai_shells)
|
||||
GLOBAL_LIST_INIT(simple_animals, list(list(),list(),list(),list())) // One for each AI_* status define
|
||||
GLOBAL_LIST_EMPTY(spidermobs) //all sentient spider mobs
|
||||
GLOBAL_LIST_EMPTY(bots_list)
|
||||
GLOBAL_LIST_EMPTY(living_cameras)
|
||||
GLOBAL_LIST_EMPTY(aiEyes)
|
||||
|
||||
GLOBAL_LIST_EMPTY(language_datum_instances)
|
||||
GLOBAL_LIST_EMPTY(all_languages)
|
||||
|
||||
GLOBAL_LIST_EMPTY(sentient_disease_instances)
|
||||
|
||||
GLOBAL_LIST_EMPTY(latejoin_ai_cores)
|
||||
|
||||
GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
|
||||
|
||||
GLOBAL_LIST_EMPTY(latejoiners) //CIT CHANGE - All latejoining people, for traitor-target purposes.
|
||||
|
||||
/proc/update_config_movespeed_type_lookup(update_mobs = TRUE)
|
||||
var/list/mob_types = list()
|
||||
var/list/entry_value = CONFIG_GET(keyed_list/multiplicative_movespeed)
|
||||
for(var/path in entry_value)
|
||||
var/value = entry_value[path]
|
||||
if(!value)
|
||||
continue
|
||||
for(var/subpath in typesof(path))
|
||||
mob_types[subpath] = value
|
||||
GLOB.mob_config_movespeed_type_lookup = mob_types
|
||||
if(update_mobs)
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/proc/update_mob_config_movespeeds()
|
||||
for(var/i in GLOB.mob_list)
|
||||
var/mob/M = i
|
||||
M.update_config_movespeed()
|
||||
|
||||
GLOBAL_LIST_INIT(noodle_taurs, list(
|
||||
"Naga",
|
||||
"Tentacle"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(paw_taurs, list(
|
||||
"Fox",
|
||||
"Wolf",
|
||||
"Otie",
|
||||
"Drake",
|
||||
"Lab",
|
||||
"Shepherd",
|
||||
"Husky",
|
||||
"Eevee",
|
||||
"Panther",
|
||||
"Horse",
|
||||
"Cow",
|
||||
"Tiger"
|
||||
))
|
||||
|
||||
//blood types
|
||||
GLOBAL_LIST_INIT(regular_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(all_types_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+",
|
||||
"SY",
|
||||
"X*",
|
||||
"HF",
|
||||
"L",
|
||||
"U",
|
||||
"GEL",
|
||||
"BUG"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_types, list(
|
||||
"blood",
|
||||
"jellyblood"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_id_types, list(
|
||||
"blood" = /datum/reagent/blood,
|
||||
"jellyblood" = /datum/reagent/blood/jellyblood
|
||||
))
|
||||
|
||||
GLOBAL_LIST_EMPTY(clients) //all clients
|
||||
GLOBAL_LIST_EMPTY(admins) //all clients whom are admins
|
||||
GLOBAL_PROTECT(admins)
|
||||
GLOBAL_LIST_EMPTY(mentors) //all clients whom are mentors
|
||||
GLOBAL_PROTECT(mentors)
|
||||
GLOBAL_LIST_EMPTY(deadmins) //all ckeys who have used the de-admin verb.
|
||||
|
||||
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
|
||||
GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
|
||||
|
||||
GLOBAL_LIST_EMPTY(bunker_passthrough)
|
||||
|
||||
//Since it didn't really belong in any other category, I'm putting this here
|
||||
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
|
||||
|
||||
GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**.
|
||||
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
|
||||
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
|
||||
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
|
||||
GLOBAL_LIST_EMPTY(drones_list)
|
||||
GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player
|
||||
GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin.
|
||||
GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs
|
||||
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
|
||||
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain brains or simple animals
|
||||
GLOBAL_LIST_EMPTY(ai_list)
|
||||
GLOBAL_LIST_EMPTY(pai_list)
|
||||
GLOBAL_LIST_EMPTY(available_ai_shells)
|
||||
GLOBAL_LIST_INIT(simple_animals, list(list(),list(),list(),list())) // One for each AI_* status define
|
||||
GLOBAL_LIST_EMPTY(spidermobs) //all sentient spider mobs
|
||||
GLOBAL_LIST_EMPTY(bots_list)
|
||||
GLOBAL_LIST_EMPTY(living_cameras)
|
||||
GLOBAL_LIST_EMPTY(aiEyes)
|
||||
|
||||
GLOBAL_LIST_EMPTY(language_datum_instances)
|
||||
GLOBAL_LIST_EMPTY(all_languages)
|
||||
|
||||
GLOBAL_LIST_EMPTY(sentient_disease_instances)
|
||||
|
||||
GLOBAL_LIST_EMPTY(latejoin_ai_cores)
|
||||
|
||||
GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
|
||||
|
||||
GLOBAL_LIST_EMPTY(latejoiners) //CIT CHANGE - All latejoining people, for traitor-target purposes.
|
||||
|
||||
/proc/update_config_movespeed_type_lookup(update_mobs = TRUE)
|
||||
var/list/mob_types = list()
|
||||
var/list/entry_value = CONFIG_GET(keyed_list/multiplicative_movespeed)
|
||||
for(var/path in entry_value)
|
||||
var/value = entry_value[path]
|
||||
if(!value)
|
||||
continue
|
||||
for(var/subpath in typesof(path))
|
||||
mob_types[subpath] = value
|
||||
GLOB.mob_config_movespeed_type_lookup = mob_types
|
||||
if(update_mobs)
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/proc/update_mob_config_movespeeds()
|
||||
for(var/i in GLOB.mob_list)
|
||||
var/mob/M = i
|
||||
M.update_config_movespeed()
|
||||
|
||||
//blood types
|
||||
GLOBAL_LIST_INIT(regular_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(all_types_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+",
|
||||
"SY",
|
||||
"X*",
|
||||
"HF",
|
||||
"L",
|
||||
"U",
|
||||
"GEL",
|
||||
"BUG"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_types, list(
|
||||
"blood",
|
||||
"jellyblood"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_id_types, list(
|
||||
"blood" = /datum/reagent/blood,
|
||||
"jellyblood" = /datum/reagent/blood/jellyblood
|
||||
))
|
||||
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
GLOBAL_LIST_INIT(ai_names, world.file2list("strings/names/ai.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_first, world.file2list("strings/names/wizardfirst.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_second, world.file2list("strings/names/wizardsecond.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_titles, world.file2list("strings/names/ninjatitle.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_names, world.file2list("strings/names/ninjaname.txt"))
|
||||
GLOBAL_LIST_INIT(commando_names, world.file2list("strings/names/death_commando.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_male, world.file2list("strings/names/first_male.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_female, world.file2list("strings/names/first_female.txt"))
|
||||
GLOBAL_LIST_INIT(last_names, world.file2list("strings/names/last.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_male, world.file2list("strings/names/lizard_male.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_female, world.file2list("strings/names/lizard_female.txt"))
|
||||
GLOBAL_LIST_INIT(clown_names, world.file2list("strings/names/clown.txt"))
|
||||
GLOBAL_LIST_INIT(mime_names, world.file2list("strings/names/mime.txt"))
|
||||
GLOBAL_LIST_INIT(carp_names, world.file2list("strings/names/carp.txt"))
|
||||
GLOBAL_LIST_INIT(golem_names, world.file2list("strings/names/golem.txt"))
|
||||
GLOBAL_LIST_INIT(moth_first, world.file2list("strings/names/moth_first.txt"))
|
||||
GLOBAL_LIST_INIT(moth_last, world.file2list("strings/names/moth_last.txt"))
|
||||
GLOBAL_LIST_INIT(plasmaman_names, world.file2list("strings/names/plasmaman.txt"))
|
||||
GLOBAL_LIST_INIT(posibrain_names, world.file2list("strings/names/posibrain.txt"))
|
||||
GLOBAL_LIST_INIT(nightmare_names, world.file2list("strings/names/nightmare.txt"))
|
||||
GLOBAL_LIST_INIT(megacarp_first_names, world.file2list("strings/names/megacarp1.txt"))
|
||||
GLOBAL_LIST_INIT(megacarp_last_names, world.file2list("strings/names/megacarp2.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(verbs, world.file2list("strings/names/verbs.txt"))
|
||||
GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt"))
|
||||
GLOBAL_LIST_INIT(adverbs, world.file2list("strings/names/adverbs.txt"))
|
||||
GLOBAL_LIST_INIT(adjectives, world.file2list("strings/names/adjectives.txt"))
|
||||
GLOBAL_LIST_INIT(dream_strings, world.file2list("strings/dreamstrings.txt"))
|
||||
//loaded on startup because of "
|
||||
//would include in rsc if ' was used
|
||||
|
||||
/*
|
||||
List of configurable names in preferences and their metadata
|
||||
"id" = list(
|
||||
"pref_name" = "name", //pref label
|
||||
"qdesc" = "name", //popup question text
|
||||
"allow_numbers" = FALSE, // numbers allowed in the name
|
||||
"group" = "whatever", // group (these will be grouped together on pref ui ,order still follows the list so they need to be concurrent to be grouped)
|
||||
"allow_null" = FALSE // if empty name is entered it's replaced with default value
|
||||
),
|
||||
*/
|
||||
GLOBAL_LIST_INIT(preferences_custom_names, list(
|
||||
"human" = list("pref_name" = "Backup Human", "qdesc" = "backup human name, used in the event you are assigned a command role as another species", "allow_numbers" = FALSE , "group" = "backup_human", "allow_null" = FALSE),
|
||||
"clown" = list("pref_name" = "Clown" , "qdesc" = "clown name", "allow_numbers" = FALSE , "group" = "fun", "allow_null" = FALSE),
|
||||
"mime" = list("pref_name" = "Mime", "qdesc" = "mime name" , "allow_numbers" = FALSE , "group" = "fun", "allow_null" = FALSE),
|
||||
"cyborg" = list("pref_name" = "Cyborg", "qdesc" = "cyborg name (Leave empty to use default naming scheme)", "allow_numbers" = TRUE , "group" = "silicons", "allow_null" = TRUE),
|
||||
"ai" = list("pref_name" = "AI", "qdesc" = "ai name", "allow_numbers" = TRUE , "group" = "silicons", "allow_null" = FALSE),
|
||||
"religion" = list("pref_name" = "Chaplain religion", "qdesc" = "religion" , "allow_numbers" = TRUE , "group" = "chaplain", "allow_null" = FALSE),
|
||||
"deity" = list("pref_name" = "Chaplain deity", "qdesc" = "deity", "allow_numbers" = TRUE , "group" = "chaplain", "allow_null" = FALSE)
|
||||
))
|
||||
GLOBAL_LIST_INIT(ai_names, world.file2list("strings/names/ai.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_first, world.file2list("strings/names/wizardfirst.txt"))
|
||||
GLOBAL_LIST_INIT(wizard_second, world.file2list("strings/names/wizardsecond.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_titles, world.file2list("strings/names/ninjatitle.txt"))
|
||||
GLOBAL_LIST_INIT(ninja_names, world.file2list("strings/names/ninjaname.txt"))
|
||||
GLOBAL_LIST_INIT(commando_names, world.file2list("strings/names/death_commando.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_male, world.file2list("strings/names/first_male.txt"))
|
||||
GLOBAL_LIST_INIT(first_names_female, world.file2list("strings/names/first_female.txt"))
|
||||
GLOBAL_LIST_INIT(last_names, world.file2list("strings/names/last.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_male, world.file2list("strings/names/lizard_male.txt"))
|
||||
GLOBAL_LIST_INIT(lizard_names_female, world.file2list("strings/names/lizard_female.txt"))
|
||||
GLOBAL_LIST_INIT(clown_names, world.file2list("strings/names/clown.txt"))
|
||||
GLOBAL_LIST_INIT(mime_names, world.file2list("strings/names/mime.txt"))
|
||||
GLOBAL_LIST_INIT(carp_names, world.file2list("strings/names/carp.txt"))
|
||||
GLOBAL_LIST_INIT(golem_names, world.file2list("strings/names/golem.txt"))
|
||||
GLOBAL_LIST_INIT(moth_first, world.file2list("strings/names/moth_first.txt"))
|
||||
GLOBAL_LIST_INIT(moth_last, world.file2list("strings/names/moth_last.txt"))
|
||||
GLOBAL_LIST_INIT(plasmaman_names, world.file2list("strings/names/plasmaman.txt"))
|
||||
GLOBAL_LIST_INIT(posibrain_names, world.file2list("strings/names/posibrain.txt"))
|
||||
GLOBAL_LIST_INIT(nightmare_names, world.file2list("strings/names/nightmare.txt"))
|
||||
GLOBAL_LIST_INIT(megacarp_first_names, world.file2list("strings/names/megacarp1.txt"))
|
||||
GLOBAL_LIST_INIT(megacarp_last_names, world.file2list("strings/names/megacarp2.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(verbs, world.file2list("strings/names/verbs.txt"))
|
||||
GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt"))
|
||||
GLOBAL_LIST_INIT(adverbs, world.file2list("strings/names/adverbs.txt"))
|
||||
GLOBAL_LIST_INIT(adjectives, world.file2list("strings/names/adjectives.txt"))
|
||||
GLOBAL_LIST_INIT(dream_strings, world.file2list("strings/dreamstrings.txt"))
|
||||
//loaded on startup because of "
|
||||
//would include in rsc if ' was used
|
||||
|
||||
/*
|
||||
List of configurable names in preferences and their metadata
|
||||
"id" = list(
|
||||
"pref_name" = "name", //pref label
|
||||
"qdesc" = "name", //popup question text
|
||||
"allow_numbers" = FALSE, // numbers allowed in the name
|
||||
"group" = "whatever", // group (these will be grouped together on pref ui ,order still follows the list so they need to be concurrent to be grouped)
|
||||
"allow_null" = FALSE // if empty name is entered it's replaced with default value
|
||||
),
|
||||
*/
|
||||
GLOBAL_LIST_INIT(preferences_custom_names, list(
|
||||
"human" = list("pref_name" = "Backup Human", "qdesc" = "backup human name, used in the event you are assigned a command role as another species", "allow_numbers" = FALSE , "group" = "backup_human", "allow_null" = FALSE),
|
||||
"clown" = list("pref_name" = "Clown" , "qdesc" = "clown name", "allow_numbers" = FALSE , "group" = "fun", "allow_null" = FALSE),
|
||||
"mime" = list("pref_name" = "Mime", "qdesc" = "mime name" , "allow_numbers" = FALSE , "group" = "fun", "allow_null" = FALSE),
|
||||
"cyborg" = list("pref_name" = "Cyborg", "qdesc" = "cyborg name (Leave empty to use default naming scheme)", "allow_numbers" = TRUE , "group" = "silicons", "allow_null" = TRUE),
|
||||
"ai" = list("pref_name" = "AI", "qdesc" = "ai name", "allow_numbers" = TRUE , "group" = "silicons", "allow_null" = FALSE),
|
||||
"religion" = list("pref_name" = "Chaplain religion", "qdesc" = "religion" , "allow_numbers" = TRUE , "group" = "chaplain", "allow_null" = FALSE),
|
||||
"deity" = list("pref_name" = "Chaplain deity", "qdesc" = "deity", "allow_numbers" = TRUE , "group" = "chaplain", "allow_null" = FALSE)
|
||||
))
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
GLOBAL_LIST_EMPTY(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
GLOBAL_LIST_EMPTY(portals) //list of all /obj/effect/portal
|
||||
GLOBAL_LIST_EMPTY(airlocks) //list of all airlocks
|
||||
GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking.
|
||||
GLOBAL_LIST_EMPTY(shuttle_caller_list) //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
|
||||
GLOBAL_LIST_EMPTY(machines) //NOTE: this is a list of ALL machines now. The processing machines list is SSmachine.processing !
|
||||
GLOBAL_LIST_EMPTY(navigation_computers) //list of all /obj/machinery/computer/camera_advanced/shuttle_docker
|
||||
GLOBAL_LIST_EMPTY(syndicate_shuttle_boards) //important to keep track of for managing nukeops war declarations.
|
||||
GLOBAL_LIST_EMPTY(navbeacons) //list of all bot nagivation beacons, used for patrolling.
|
||||
GLOBAL_LIST_EMPTY(teleportbeacons) //list of all tracking beacons used by teleporters
|
||||
GLOBAL_LIST_EMPTY(deliverybeacons) //list of all MULEbot delivery beacons.
|
||||
GLOBAL_LIST_EMPTY(deliverybeacontags) //list of all tags associated with delivery beacons.
|
||||
GLOBAL_LIST_EMPTY(nuke_list)
|
||||
GLOBAL_LIST_EMPTY(alarmdisplay) //list of all machines or programs that can display station alerts
|
||||
GLOBAL_LIST_EMPTY(singularities) //list of all singularities on the station (actually technically all engines)
|
||||
|
||||
GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
GLOBAL_LIST_EMPTY(materials_list) //list of all /datum/material datums indexed by material id.
|
||||
GLOBAL_LIST_EMPTY(tech_list) //list of all /datum/tech datums indexed by id.
|
||||
GLOBAL_LIST_EMPTY(surgeries_list) //list of all surgeries by name, associated with their path.
|
||||
GLOBAL_LIST_EMPTY(uplink_items) //list of all uplink item typepaths, ascendingly sorted by their initial name.
|
||||
GLOBAL_LIST_EMPTY(uplink_categories) //list of all uplink categories, listed by the order they are loaded in code. Be careful.
|
||||
GLOBAL_LIST_EMPTY(crafting_recipes) //list of all table craft recipes
|
||||
GLOBAL_LIST_EMPTY(rcd_list) //list of Rapid Construction Devices.
|
||||
GLOBAL_LIST_EMPTY(apcs_list) //list of all Area Power Controller machines, separate from machines for powernet speeeeeeed.
|
||||
GLOBAL_LIST_EMPTY(tracked_implants) //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
GLOBAL_LIST_EMPTY(tracked_chem_implants) //list of implants the prisoner console can track and send inject commands too
|
||||
GLOBAL_LIST_EMPTY(poi_list) //list of points of interest for observe/follow
|
||||
GLOBAL_LIST_EMPTY(pinpointer_list) //list of all pinpointers. Used to change stuff they are pointing to all at once.
|
||||
GLOBAL_LIST_EMPTY(zombie_infection_list) // A list of all zombie_infection organs, for any mass "animation"
|
||||
GLOBAL_LIST_EMPTY(meteor_list) // List of all meteors.
|
||||
GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers
|
||||
GLOBAL_LIST_EMPTY(ladders)
|
||||
GLOBAL_LIST_EMPTY(trophy_cases)
|
||||
|
||||
GLOBAL_LIST_EMPTY(wire_color_directory)
|
||||
GLOBAL_LIST_EMPTY(wire_name_directory)
|
||||
|
||||
GLOBAL_LIST_EMPTY(ai_status_displays)
|
||||
|
||||
GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects
|
||||
GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert
|
||||
GLOBAL_LIST_EMPTY(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
GLOBAL_LIST_EMPTY(portals) //list of all /obj/effect/portal
|
||||
GLOBAL_LIST_EMPTY(airlocks) //list of all airlocks
|
||||
GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking.
|
||||
GLOBAL_LIST_EMPTY(shuttle_caller_list) //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
|
||||
GLOBAL_LIST_EMPTY(machines) //NOTE: this is a list of ALL machines now. The processing machines list is SSmachine.processing !
|
||||
GLOBAL_LIST_EMPTY(navigation_computers) //list of all /obj/machinery/computer/camera_advanced/shuttle_docker
|
||||
GLOBAL_LIST_EMPTY(syndicate_shuttle_boards) //important to keep track of for managing nukeops war declarations.
|
||||
GLOBAL_LIST_EMPTY(navbeacons) //list of all bot nagivation beacons, used for patrolling.
|
||||
GLOBAL_LIST_EMPTY(teleportbeacons) //list of all tracking beacons used by teleporters
|
||||
GLOBAL_LIST_EMPTY(deliverybeacons) //list of all MULEbot delivery beacons.
|
||||
GLOBAL_LIST_EMPTY(deliverybeacontags) //list of all tags associated with delivery beacons.
|
||||
GLOBAL_LIST_EMPTY(nuke_list)
|
||||
GLOBAL_LIST_EMPTY(alarmdisplay) //list of all machines or programs that can display station alerts
|
||||
GLOBAL_LIST_EMPTY(singularities) //list of all singularities on the station (actually technically all engines)
|
||||
|
||||
GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
GLOBAL_LIST_EMPTY(materials_list) //list of all /datum/material datums indexed by material id.
|
||||
GLOBAL_LIST_EMPTY(tech_list) //list of all /datum/tech datums indexed by id.
|
||||
GLOBAL_LIST_EMPTY(surgeries_list) //list of all surgeries by name, associated with their path.
|
||||
GLOBAL_LIST_EMPTY(uplink_items) //list of all uplink item typepaths, ascendingly sorted by their initial name.
|
||||
GLOBAL_LIST_EMPTY(uplink_categories) //list of all uplink categories, listed by the order they are loaded in code. Be careful.
|
||||
GLOBAL_LIST_EMPTY(crafting_recipes) //list of all table craft recipes
|
||||
GLOBAL_LIST_EMPTY(rcd_list) //list of Rapid Construction Devices.
|
||||
GLOBAL_LIST_EMPTY(apcs_list) //list of all Area Power Controller machines, separate from machines for powernet speeeeeeed.
|
||||
GLOBAL_LIST_EMPTY(tracked_implants) //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
GLOBAL_LIST_EMPTY(tracked_chem_implants) //list of implants the prisoner console can track and send inject commands too
|
||||
GLOBAL_LIST_EMPTY(poi_list) //list of points of interest for observe/follow
|
||||
GLOBAL_LIST_EMPTY(pinpointer_list) //list of all pinpointers. Used to change stuff they are pointing to all at once.
|
||||
GLOBAL_LIST_EMPTY(zombie_infection_list) // A list of all zombie_infection organs, for any mass "animation"
|
||||
GLOBAL_LIST_EMPTY(meteor_list) // List of all meteors.
|
||||
GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers
|
||||
GLOBAL_LIST_EMPTY(ladders)
|
||||
GLOBAL_LIST_EMPTY(trophy_cases)
|
||||
|
||||
GLOBAL_LIST_EMPTY(wire_color_directory)
|
||||
GLOBAL_LIST_EMPTY(wire_name_directory)
|
||||
|
||||
GLOBAL_LIST_EMPTY(ai_status_displays)
|
||||
|
||||
GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects
|
||||
GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert
|
||||
|
||||
@@ -1,60 +1,64 @@
|
||||
GLOBAL_VAR(log_directory)
|
||||
GLOBAL_PROTECT(log_directory)
|
||||
GLOBAL_VAR(world_game_log)
|
||||
GLOBAL_PROTECT(world_game_log)
|
||||
GLOBAL_VAR(world_runtime_log)
|
||||
GLOBAL_PROTECT(world_runtime_log)
|
||||
GLOBAL_VAR(world_qdel_log)
|
||||
GLOBAL_PROTECT(world_qdel_log)
|
||||
GLOBAL_VAR(world_attack_log)
|
||||
GLOBAL_PROTECT(world_attack_log)
|
||||
GLOBAL_VAR(world_href_log)
|
||||
GLOBAL_PROTECT(world_href_log)
|
||||
GLOBAL_VAR(round_id)
|
||||
GLOBAL_PROTECT(round_id)
|
||||
GLOBAL_VAR(config_error_log)
|
||||
GLOBAL_PROTECT(config_error_log)
|
||||
GLOBAL_VAR(sql_error_log)
|
||||
GLOBAL_PROTECT(sql_error_log)
|
||||
GLOBAL_VAR(world_pda_log)
|
||||
GLOBAL_PROTECT(world_pda_log)
|
||||
GLOBAL_VAR(world_telecomms_log)
|
||||
GLOBAL_PROTECT(world_telecomms_log)
|
||||
GLOBAL_VAR(world_manifest_log)
|
||||
GLOBAL_PROTECT(world_manifest_log)
|
||||
GLOBAL_VAR(query_debug_log)
|
||||
GLOBAL_PROTECT(query_debug_log)
|
||||
GLOBAL_VAR(world_job_debug_log)
|
||||
GLOBAL_PROTECT(world_job_debug_log)
|
||||
GLOBAL_VAR(world_virus_log)
|
||||
GLOBAL_PROTECT(world_virus_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(bombers)
|
||||
GLOBAL_PROTECT(bombers)
|
||||
GLOBAL_LIST_EMPTY(admin_log)
|
||||
GLOBAL_PROTECT(admin_log)
|
||||
GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used [REF(src)] @ location [src.loc]: [freq]/[code]"
|
||||
GLOBAL_PROTECT(lastsignalers)
|
||||
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
|
||||
GLOBAL_PROTECT(lawchanges)
|
||||
|
||||
GLOBAL_LIST_EMPTY(combatlog)
|
||||
GLOBAL_PROTECT(combatlog)
|
||||
GLOBAL_LIST_EMPTY(IClog)
|
||||
GLOBAL_PROTECT(IClog)
|
||||
GLOBAL_LIST_EMPTY(OOClog)
|
||||
GLOBAL_PROTECT(OOClog)
|
||||
GLOBAL_LIST_EMPTY(adminlog)
|
||||
GLOBAL_PROTECT(adminlog)
|
||||
|
||||
GLOBAL_LIST_EMPTY(active_turfs_startlist)
|
||||
|
||||
/////Picture logging
|
||||
GLOBAL_VAR(picture_log_directory)
|
||||
GLOBAL_PROTECT(picture_log_directory)
|
||||
|
||||
GLOBAL_VAR_INIT(picture_logging_id, 1)
|
||||
GLOBAL_PROTECT(picture_logging_id)
|
||||
GLOBAL_VAR(picture_logging_prefix)
|
||||
GLOBAL_PROTECT(picture_logging_prefix)
|
||||
/////
|
||||
GLOBAL_VAR(log_directory)
|
||||
GLOBAL_PROTECT(log_directory)
|
||||
GLOBAL_VAR(world_game_log)
|
||||
GLOBAL_PROTECT(world_game_log)
|
||||
GLOBAL_VAR(world_runtime_log)
|
||||
GLOBAL_PROTECT(world_runtime_log)
|
||||
GLOBAL_VAR(world_qdel_log)
|
||||
GLOBAL_PROTECT(world_qdel_log)
|
||||
GLOBAL_VAR(world_attack_log)
|
||||
GLOBAL_PROTECT(world_attack_log)
|
||||
GLOBAL_VAR(world_href_log)
|
||||
GLOBAL_PROTECT(world_href_log)
|
||||
GLOBAL_VAR(round_id)
|
||||
GLOBAL_PROTECT(round_id)
|
||||
GLOBAL_VAR(config_error_log)
|
||||
GLOBAL_PROTECT(config_error_log)
|
||||
GLOBAL_VAR(sql_error_log)
|
||||
GLOBAL_PROTECT(sql_error_log)
|
||||
GLOBAL_VAR(world_pda_log)
|
||||
GLOBAL_PROTECT(world_pda_log)
|
||||
GLOBAL_VAR(world_telecomms_log)
|
||||
GLOBAL_PROTECT(world_telecomms_log)
|
||||
GLOBAL_VAR(world_manifest_log)
|
||||
GLOBAL_PROTECT(world_manifest_log)
|
||||
GLOBAL_VAR(query_debug_log)
|
||||
GLOBAL_PROTECT(query_debug_log)
|
||||
GLOBAL_VAR(world_job_debug_log)
|
||||
GLOBAL_PROTECT(world_job_debug_log)
|
||||
GLOBAL_VAR(world_virus_log)
|
||||
GLOBAL_PROTECT(world_virus_log)
|
||||
GLOBAL_VAR(world_map_error_log)
|
||||
GLOBAL_PROTECT(world_map_error_log)
|
||||
GLOBAL_VAR(subsystem_log)
|
||||
GLOBAL_PROTECT(subsystem_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(bombers)
|
||||
GLOBAL_PROTECT(bombers)
|
||||
GLOBAL_LIST_EMPTY(admin_log)
|
||||
GLOBAL_PROTECT(admin_log)
|
||||
GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used [REF(src)] @ location [src.loc]: [freq]/[code]"
|
||||
GLOBAL_PROTECT(lastsignalers)
|
||||
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
|
||||
GLOBAL_PROTECT(lawchanges)
|
||||
|
||||
GLOBAL_LIST_EMPTY(combatlog)
|
||||
GLOBAL_PROTECT(combatlog)
|
||||
GLOBAL_LIST_EMPTY(IClog)
|
||||
GLOBAL_PROTECT(IClog)
|
||||
GLOBAL_LIST_EMPTY(OOClog)
|
||||
GLOBAL_PROTECT(OOClog)
|
||||
GLOBAL_LIST_EMPTY(adminlog)
|
||||
GLOBAL_PROTECT(adminlog)
|
||||
|
||||
GLOBAL_LIST_EMPTY(active_turfs_startlist)
|
||||
|
||||
/////Picture logging
|
||||
GLOBAL_VAR(picture_log_directory)
|
||||
GLOBAL_PROTECT(picture_log_directory)
|
||||
|
||||
GLOBAL_VAR_INIT(picture_logging_id, 1)
|
||||
GLOBAL_PROTECT(picture_logging_id)
|
||||
GLOBAL_VAR(picture_logging_prefix)
|
||||
GLOBAL_PROTECT(picture_logging_prefix)
|
||||
/////
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
GLOBAL_VAR_INIT(admin_notice, "") // Admin notice that all clients see when joining the server
|
||||
|
||||
GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks.
|
||||
|
||||
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
|
||||
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(announcertype, "standard")
|
||||
|
||||
// For FTP requests. (i.e. downloading runtime logs.)
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
GLOBAL_VAR_INIT(fileaccess_timer, 0)
|
||||
|
||||
GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
|
||||
GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule
|
||||
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
|
||||
GLOBAL_LIST_EMPTY(powernets)
|
||||
|
||||
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
|
||||
|
||||
GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details
|
||||
|
||||
// All religion stuff
|
||||
GLOBAL_VAR(religion)
|
||||
GLOBAL_VAR(deity)
|
||||
GLOBAL_VAR(bible_name)
|
||||
GLOBAL_VAR(bible_icon_state)
|
||||
GLOBAL_VAR(bible_item_state)
|
||||
GLOBAL_VAR(holy_weapon_type)
|
||||
GLOBAL_VAR(holy_armor_type)
|
||||
GLOBAL_VAR_INIT(admin_notice, "") // Admin notice that all clients see when joining the server
|
||||
|
||||
GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks.
|
||||
|
||||
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
|
||||
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(announcertype, "standard")
|
||||
|
||||
// For FTP requests. (i.e. downloading runtime logs.)
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
GLOBAL_VAR_INIT(fileaccess_timer, 0)
|
||||
|
||||
GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
|
||||
GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule
|
||||
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
|
||||
GLOBAL_LIST_EMPTY(powernets)
|
||||
|
||||
GLOBAL_VAR_INIT(bsa_unlock, FALSE) //BSA unlocked by head ID swipes
|
||||
|
||||
GLOBAL_LIST_EMPTY(player_details) // ckey -> /datum/player_details
|
||||
|
||||
GLOBAL_LIST_EMPTY(clientless_round_timeouts) // ckey -> time that ckey can rejoin round
|
||||
|
||||
// All religion stuff
|
||||
GLOBAL_VAR(religion)
|
||||
GLOBAL_VAR(deity)
|
||||
GLOBAL_VAR(bible_name)
|
||||
GLOBAL_VAR(bible_icon_state)
|
||||
GLOBAL_VAR(bible_item_state)
|
||||
GLOBAL_VAR(holy_weapon_type)
|
||||
GLOBAL_VAR(holy_armor_type)
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
//this function places received data into element with specified id.
|
||||
#define js_byjax {"
|
||||
|
||||
function replaceContent() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var id = args\[0\];
|
||||
var content = args\[1\];
|
||||
var callback = null;
|
||||
if(args\[2\]){
|
||||
callback = args\[2\];
|
||||
if(args\[3\]){
|
||||
args = args.slice(3);
|
||||
}
|
||||
}
|
||||
var parent = document.getElementById(id);
|
||||
if(typeof(parent)!=='undefined' && parent!=null){
|
||||
parent.innerHTML = content?content:'';
|
||||
}
|
||||
if(callback && window\[callback\]){
|
||||
window\[callback\].apply(null,args);
|
||||
}
|
||||
}
|
||||
"}
|
||||
|
||||
/*
|
||||
sends data to control_id:replaceContent
|
||||
|
||||
receiver - mob
|
||||
control_id - window id (for windows opened with browse(), it'll be "windowname.browser")
|
||||
target_element - HTML element id
|
||||
new_content - HTML content
|
||||
callback - js function that will be called after the data is sent
|
||||
callback_args - arguments for callback function
|
||||
|
||||
Be sure to include required js functions in your page, or it'll raise an exception.
|
||||
*/
|
||||
/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
|
||||
if(receiver && target_element && control_id) // && winexists(receiver, control_id))
|
||||
var/list/argums = list(target_element, new_content)
|
||||
if(callback)
|
||||
argums += callback
|
||||
if(callback_args)
|
||||
argums += callback_args
|
||||
argums = list2params(argums)
|
||||
|
||||
receiver << output(argums,"[control_id]:replaceContent")
|
||||
return
|
||||
|
||||
//this function places received data into element with specified id.
|
||||
#define js_byjax {"
|
||||
|
||||
function replaceContent() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
var id = args\[0\];
|
||||
var content = args\[1\];
|
||||
var callback = null;
|
||||
if(args\[2\]){
|
||||
callback = args\[2\];
|
||||
if(args\[3\]){
|
||||
args = args.slice(3);
|
||||
}
|
||||
}
|
||||
var parent = document.getElementById(id);
|
||||
if(typeof(parent)!=='undefined' && parent!=null){
|
||||
parent.innerHTML = content?content:'';
|
||||
}
|
||||
if(callback && window\[callback\]){
|
||||
window\[callback\].apply(null,args);
|
||||
}
|
||||
}
|
||||
"}
|
||||
|
||||
/*
|
||||
sends data to control_id:replaceContent
|
||||
|
||||
receiver - mob
|
||||
control_id - window id (for windows opened with browse(), it'll be "windowname.browser")
|
||||
target_element - HTML element id
|
||||
new_content - HTML content
|
||||
callback - js function that will be called after the data is sent
|
||||
callback_args - arguments for callback function
|
||||
|
||||
Be sure to include required js functions in your page, or it'll raise an exception.
|
||||
*/
|
||||
/proc/send_byjax(receiver, control_id, target_element, new_content=null, callback=null, list/callback_args=null)
|
||||
if(receiver && target_element && control_id) // && winexists(receiver, control_id))
|
||||
var/list/argums = list(target_element, new_content)
|
||||
if(callback)
|
||||
argums += callback
|
||||
if(callback_args)
|
||||
argums += callback_args
|
||||
argums = list2params(argums)
|
||||
|
||||
receiver << output(argums,"[control_id]:replaceContent")
|
||||
return
|
||||
|
||||
|
||||
@@ -1,105 +1,105 @@
|
||||
/*
|
||||
Adjacency proc for determining touch range
|
||||
|
||||
This is mostly to determine if a user can enter a square for the purposes of touching something.
|
||||
Examples include reaching a square diagonally or reaching something on the other side of a glass window.
|
||||
|
||||
This is calculated by looking for border items, or in the case of clicking diagonally from yourself, dense items.
|
||||
This proc will NOT notice if you are trying to attack a window on the other side of a dense object in its turf. There is a window helper for that.
|
||||
|
||||
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you
|
||||
to check that the mob is not inside of something
|
||||
*/
|
||||
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
|
||||
return 0
|
||||
|
||||
// Not a sane use of the function and (for now) indicative of an error elsewhere
|
||||
/area/Adjacent(var/atom/neighbor)
|
||||
CRASH("Call to /area/Adjacent(), unimplemented proc")
|
||||
|
||||
|
||||
/*
|
||||
Adjacency (to turf):
|
||||
* If you are in the same turf, always true
|
||||
* If you are vertically/horizontally adjacent, ensure there are no border objects
|
||||
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
|
||||
* Passing through in this case ignores anything with the LETPASSTHROW pass flag, such as tables, racks, and morgue trays.
|
||||
*/
|
||||
/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null)
|
||||
var/turf/T0 = get_turf(neighbor)
|
||||
|
||||
if(T0 == src) //same turf
|
||||
return TRUE
|
||||
|
||||
if(get_dist(src, T0) > 1 || z != T0.z) //too far
|
||||
return FALSE
|
||||
|
||||
// Non diagonal case
|
||||
if(T0.x == x || T0.y == y)
|
||||
// Check for border blockages
|
||||
return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover)
|
||||
|
||||
// Diagonal case
|
||||
var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001)
|
||||
var/d1 = in_dir&3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001)
|
||||
var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000)
|
||||
|
||||
for(var/d in list(d1,d2))
|
||||
if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not leave T0 in that direction
|
||||
|
||||
var/turf/T1 = get_step(T0,d)
|
||||
if(!T1 || T1.density)
|
||||
continue
|
||||
if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover))
|
||||
continue // couldn't enter or couldn't leave T1
|
||||
|
||||
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not enter src
|
||||
|
||||
return 1 // we don't care about our own density
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
Adjacency (to anything else):
|
||||
* Must be on a turf
|
||||
*/
|
||||
/atom/movable/Adjacent(var/atom/neighbor)
|
||||
if(neighbor == loc)
|
||||
return TRUE
|
||||
var/turf/T = loc
|
||||
if(!istype(T))
|
||||
return FALSE
|
||||
if(T.Adjacent(neighbor, neighbor, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// This is necessary for storage items not on your person.
|
||||
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
|
||||
if(neighbor == loc)
|
||||
return 1
|
||||
if(isitem(loc))
|
||||
if(recurse > 0)
|
||||
return loc.Adjacent(neighbor,recurse - 1)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/*
|
||||
This checks if you there is uninterrupted airspace between that turf and this one.
|
||||
This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW.
|
||||
The border_only flag allows you to not objects (for source and destination squares)
|
||||
*/
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null)
|
||||
for(var/obj/O in src)
|
||||
if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density))
|
||||
continue
|
||||
if(O == target_atom || O == mover || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf
|
||||
continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above)
|
||||
|
||||
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
|
||||
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
|
||||
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
|
||||
else if( !border_only ) // dense, not on border, cannot pass over
|
||||
return 0
|
||||
return 1
|
||||
/*
|
||||
Adjacency proc for determining touch range
|
||||
|
||||
This is mostly to determine if a user can enter a square for the purposes of touching something.
|
||||
Examples include reaching a square diagonally or reaching something on the other side of a glass window.
|
||||
|
||||
This is calculated by looking for border items, or in the case of clicking diagonally from yourself, dense items.
|
||||
This proc will NOT notice if you are trying to attack a window on the other side of a dense object in its turf. There is a window helper for that.
|
||||
|
||||
Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you
|
||||
to check that the mob is not inside of something
|
||||
*/
|
||||
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
|
||||
return 0
|
||||
|
||||
// Not a sane use of the function and (for now) indicative of an error elsewhere
|
||||
/area/Adjacent(var/atom/neighbor)
|
||||
CRASH("Call to /area/Adjacent(), unimplemented proc")
|
||||
|
||||
|
||||
/*
|
||||
Adjacency (to turf):
|
||||
* If you are in the same turf, always true
|
||||
* If you are vertically/horizontally adjacent, ensure there are no border objects
|
||||
* If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square.
|
||||
* Passing through in this case ignores anything with the LETPASSTHROW pass flag, such as tables, racks, and morgue trays.
|
||||
*/
|
||||
/turf/Adjacent(atom/neighbor, atom/target = null, atom/movable/mover = null)
|
||||
var/turf/T0 = get_turf(neighbor)
|
||||
|
||||
if(T0 == src) //same turf
|
||||
return TRUE
|
||||
|
||||
if(get_dist(src, T0) > 1 || z != T0.z) //too far
|
||||
return FALSE
|
||||
|
||||
// Non diagonal case
|
||||
if(T0.x == x || T0.y == y)
|
||||
// Check for border blockages
|
||||
return T0.ClickCross(get_dir(T0,src), border_only = 1, target_atom = target, mover = mover) && src.ClickCross(get_dir(src,T0), border_only = 1, target_atom = target, mover = mover)
|
||||
|
||||
// Diagonal case
|
||||
var/in_dir = get_dir(T0,src) // eg. northwest (1+8) = 9 (00001001)
|
||||
var/d1 = in_dir&3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001)
|
||||
var/d2 = in_dir&12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000)
|
||||
|
||||
for(var/d in list(d1,d2))
|
||||
if(!T0.ClickCross(d, border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not leave T0 in that direction
|
||||
|
||||
var/turf/T1 = get_step(T0,d)
|
||||
if(!T1 || T1.density)
|
||||
continue
|
||||
if(!T1.ClickCross(get_dir(T1,src), border_only = 0, target_atom = target, mover = mover) || !T1.ClickCross(get_dir(T1,T0), border_only = 0, target_atom = target, mover = mover))
|
||||
continue // couldn't enter or couldn't leave T1
|
||||
|
||||
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not enter src
|
||||
|
||||
return 1 // we don't care about our own density
|
||||
|
||||
return 0
|
||||
|
||||
/*
|
||||
Adjacency (to anything else):
|
||||
* Must be on a turf
|
||||
*/
|
||||
/atom/movable/Adjacent(var/atom/neighbor)
|
||||
if(neighbor == loc)
|
||||
return TRUE
|
||||
var/turf/T = loc
|
||||
if(!istype(T))
|
||||
return FALSE
|
||||
if(T.Adjacent(neighbor, neighbor, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// This is necessary for storage items not on your person.
|
||||
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
|
||||
if(neighbor == loc)
|
||||
return 1
|
||||
if(isitem(loc))
|
||||
if(recurse > 0)
|
||||
return loc.Adjacent(neighbor,recurse - 1)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/*
|
||||
This checks if you there is uninterrupted airspace between that turf and this one.
|
||||
This is defined as any dense ON_BORDER_1 object, or any dense object without LETPASSTHROW.
|
||||
The border_only flag allows you to not objects (for source and destination squares)
|
||||
*/
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null, atom/movable/mover = null)
|
||||
for(var/obj/O in src)
|
||||
if((mover && O.CanPass(mover,get_step(src,target_dir))) || (!mover && !O.density))
|
||||
continue
|
||||
if(O == target_atom || O == mover || (O.pass_flags & LETPASSTHROW)) //check if there's a dense object present on the turf
|
||||
continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above)
|
||||
|
||||
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
|
||||
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
|
||||
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
|
||||
else if( !border_only ) // dense, not on border, cannot pass over
|
||||
return 0
|
||||
return 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,185 +1,185 @@
|
||||
/*
|
||||
Cyborg ClickOn()
|
||||
|
||||
Cyborgs have no range restriction on attack_robot(), because it is basically an AI click.
|
||||
However, they do have a range restriction on item use, so they cannot do without the
|
||||
adjacency code.
|
||||
*/
|
||||
|
||||
/mob/living/silicon/robot/ClickOn(var/atom/A, var/params)
|
||||
if(world.time <= next_click)
|
||||
return
|
||||
next_click = world.time + 1
|
||||
|
||||
if(check_click_intercept(params,A))
|
||||
return
|
||||
|
||||
if(stat || lockcharge || IsKnockdown() || IsStun() || IsUnconscious())
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"])
|
||||
ShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["alt"]) // alt and alt-gr (rightalt)
|
||||
AltClickOn(A)
|
||||
return
|
||||
if(modifiers["ctrl"])
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(next_move >= world.time)
|
||||
return
|
||||
|
||||
face_atom(A) // change direction to face what you clicked on
|
||||
|
||||
/*
|
||||
cyborg restrained() currently does nothing
|
||||
if(restrained())
|
||||
RestrainedClickOn(A)
|
||||
return
|
||||
*/
|
||||
if(aicamera.in_camera_mode) //Cyborg picture taking
|
||||
aicamera.camera_mode_off()
|
||||
aicamera.captureimage(A, usr)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
if(!W && A.Adjacent(src) && (isobj(A) || ismob(A)))
|
||||
var/atom/movable/C = A
|
||||
if(C.can_buckle && C.has_buckled_mobs())
|
||||
if(C.buckled_mobs.len > 1)
|
||||
var/unbuckled = input(src, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in C.buckled_mobs
|
||||
if(C.user_unbuckle_mob(unbuckled,src))
|
||||
return
|
||||
else
|
||||
if(C.user_unbuckle_mob(C.buckled_mobs[1],src))
|
||||
return
|
||||
|
||||
if(!W && get_dist(src,A) <= interaction_range)
|
||||
A.attack_robot(src)
|
||||
return
|
||||
|
||||
if(W)
|
||||
// buckled cannot prevent machine interlinking but stops arm movement
|
||||
if( buckled || incapacitated())
|
||||
return
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
return
|
||||
|
||||
//Middle click cycles through selected modules.
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
cycle_modules()
|
||||
return
|
||||
|
||||
//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks
|
||||
// for non-doors/apcs
|
||||
/mob/living/silicon/robot/CtrlShiftClickOn(atom/A)
|
||||
A.BorgCtrlShiftClick(src)
|
||||
/mob/living/silicon/robot/ShiftClickOn(atom/A)
|
||||
A.BorgShiftClick(src)
|
||||
/mob/living/silicon/robot/CtrlClickOn(atom/A)
|
||||
A.BorgCtrlClick(src)
|
||||
/mob/living/silicon/robot/AltClickOn(atom/A)
|
||||
if(!A.BorgAltClick(src))
|
||||
altclick_listed_turf(A)
|
||||
|
||||
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlShiftClick()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
ShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick(mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AIShiftClick()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/BorgCtrlClick(mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/turretid/BorgCtrlClick(mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/atom/proc/BorgAltClick(mob/living/silicon/robot/user)
|
||||
return AltClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgAltClick(mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
return AIAltClick()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/turretid/BorgAltClick(mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
return AIAltClick()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
As with AI, these are not used in click code,
|
||||
because the code for robots is specific, not generic.
|
||||
|
||||
If you would like to add advanced features to robot
|
||||
clicks, you can do so here, but you will have to
|
||||
change attack_robot() above to the proper function
|
||||
*/
|
||||
/mob/living/silicon/robot/UnarmedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
/mob/living/silicon/robot/RangedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
|
||||
/atom/proc/attack_robot(mob/user)
|
||||
attack_ai(user)
|
||||
return
|
||||
/*
|
||||
Cyborg ClickOn()
|
||||
|
||||
Cyborgs have no range restriction on attack_robot(), because it is basically an AI click.
|
||||
However, they do have a range restriction on item use, so they cannot do without the
|
||||
adjacency code.
|
||||
*/
|
||||
|
||||
/mob/living/silicon/robot/ClickOn(var/atom/A, var/params)
|
||||
if(world.time <= next_click)
|
||||
return
|
||||
next_click = world.time + 1
|
||||
|
||||
if(check_click_intercept(params,A))
|
||||
return
|
||||
|
||||
if(stat || lockcharge || IsKnockdown() || IsStun() || IsUnconscious())
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"])
|
||||
ShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["alt"]) // alt and alt-gr (rightalt)
|
||||
AltClickOn(A)
|
||||
return
|
||||
if(modifiers["ctrl"])
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(next_move >= world.time)
|
||||
return
|
||||
|
||||
face_atom(A) // change direction to face what you clicked on
|
||||
|
||||
/*
|
||||
cyborg restrained() currently does nothing
|
||||
if(restrained())
|
||||
RestrainedClickOn(A)
|
||||
return
|
||||
*/
|
||||
if(aicamera.in_camera_mode) //Cyborg picture taking
|
||||
aicamera.camera_mode_off()
|
||||
aicamera.captureimage(A, usr)
|
||||
return
|
||||
|
||||
var/obj/item/W = get_active_held_item()
|
||||
|
||||
if(!W && A.Adjacent(src) && (isobj(A) || ismob(A)))
|
||||
var/atom/movable/C = A
|
||||
if(C.can_buckle && C.has_buckled_mobs())
|
||||
if(C.buckled_mobs.len > 1)
|
||||
var/unbuckled = input(src, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in C.buckled_mobs
|
||||
if(C.user_unbuckle_mob(unbuckled,src))
|
||||
return
|
||||
else
|
||||
if(C.user_unbuckle_mob(C.buckled_mobs[1],src))
|
||||
return
|
||||
|
||||
if(!W && get_dist(src,A) <= interaction_range)
|
||||
A.attack_robot(src)
|
||||
return
|
||||
|
||||
if(W)
|
||||
// buckled cannot prevent machine interlinking but stops arm movement
|
||||
if( buckled || incapacitated())
|
||||
return
|
||||
|
||||
if(W == A)
|
||||
W.attack_self(src)
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
W.melee_attack_chain(src, A, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
return
|
||||
|
||||
//Middle click cycles through selected modules.
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
cycle_modules()
|
||||
return
|
||||
|
||||
//Give cyborgs hotkey clicks without breaking existing uses of hotkey clicks
|
||||
// for non-doors/apcs
|
||||
/mob/living/silicon/robot/CtrlShiftClickOn(atom/A)
|
||||
A.BorgCtrlShiftClick(src)
|
||||
/mob/living/silicon/robot/ShiftClickOn(atom/A)
|
||||
A.BorgShiftClick(src)
|
||||
/mob/living/silicon/robot/CtrlClickOn(atom/A)
|
||||
A.BorgCtrlClick(src)
|
||||
/mob/living/silicon/robot/AltClickOn(atom/A)
|
||||
if(!A.BorgAltClick(src))
|
||||
altclick_listed_turf(A)
|
||||
|
||||
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlShiftClick()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
ShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick(mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AIShiftClick()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/BorgCtrlClick(mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/turretid/BorgCtrlClick(mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
AICtrlClick()
|
||||
else
|
||||
..()
|
||||
|
||||
/atom/proc/BorgAltClick(mob/living/silicon/robot/user)
|
||||
return AltClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgAltClick(mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
return AIAltClick()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/turretid/BorgAltClick(mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code.
|
||||
if(get_dist(src,user) <= user.interaction_range)
|
||||
return AIAltClick()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
As with AI, these are not used in click code,
|
||||
because the code for robots is specific, not generic.
|
||||
|
||||
If you would like to add advanced features to robot
|
||||
clicks, you can do so here, but you will have to
|
||||
change attack_robot() above to the proper function
|
||||
*/
|
||||
/mob/living/silicon/robot/UnarmedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
/mob/living/silicon/robot/RangedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
|
||||
/atom/proc/attack_robot(mob/user)
|
||||
attack_ai(user)
|
||||
return
|
||||
|
||||
@@ -1,148 +1,148 @@
|
||||
/*
|
||||
MouseDrop:
|
||||
|
||||
Called on the atom you're dragging. In a lot of circumstances we want to use the
|
||||
receiving object instead, so that's the default action. This allows you to drag
|
||||
almost anything into a trash can.
|
||||
*/
|
||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
if(!usr || !over)
|
||||
return
|
||||
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is receiving will verify themselves for adjacency.
|
||||
return
|
||||
if(over == src)
|
||||
return usr.client.Click(src, src_location, src_control, params)
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
over.MouseDrop_T(src,usr)
|
||||
return
|
||||
|
||||
// receive a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_MOUSEDROPPED_ONTO, dropping, user)
|
||||
return
|
||||
|
||||
|
||||
/client
|
||||
var/list/atom/selected_target[2]
|
||||
var/obj/item/active_mousedown_item = null
|
||||
var/mouseParams = ""
|
||||
var/mouseLocation = null
|
||||
var/mouseObject = null
|
||||
var/mouseControlObject = null
|
||||
var/middragtime = 0
|
||||
var/atom/middragatom
|
||||
|
||||
/client/MouseDown(object, location, control, params)
|
||||
if (mouse_down_icon)
|
||||
mouse_pointer_icon = mouse_down_icon
|
||||
var/delay = mob.CanMobAutoclick(object, location, params)
|
||||
if(delay)
|
||||
selected_target[1] = object
|
||||
selected_target[2] = params
|
||||
while(selected_target[1])
|
||||
Click(selected_target[1], location, control, selected_target[2])
|
||||
sleep(delay)
|
||||
active_mousedown_item = mob.canMobMousedown(object, location, params)
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseDown(object, location, params, mob)
|
||||
|
||||
/client/MouseUp(object, location, control, params)
|
||||
if (mouse_up_icon)
|
||||
mouse_pointer_icon = mouse_up_icon
|
||||
selected_target[1] = null
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseUp(object, location, params, mob)
|
||||
active_mousedown_item = null
|
||||
|
||||
/mob/proc/CanMobAutoclick(object, location, params)
|
||||
|
||||
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
||||
if(!object.IsAutoclickable())
|
||||
return
|
||||
var/obj/item/h = get_active_held_item()
|
||||
if(h)
|
||||
. = h.CanItemAutoclick(object, location, params)
|
||||
|
||||
/mob/proc/canMobMousedown(atom/object, location, params)
|
||||
|
||||
/mob/living/carbon/canMobMousedown(atom/object, location, params)
|
||||
var/obj/item/H = get_active_held_item()
|
||||
if(H)
|
||||
. = H.canItemMouseDown(object, location, params)
|
||||
|
||||
/obj/item/proc/CanItemAutoclick(object, location, params)
|
||||
|
||||
/obj/item/proc/canItemMouseDown(object, location, params)
|
||||
if(canMouseDown)
|
||||
return src
|
||||
|
||||
/obj/item/proc/onMouseDown(object, location, params, mob)
|
||||
return
|
||||
|
||||
/obj/item/proc/onMouseUp(object, location, params, mob)
|
||||
return
|
||||
|
||||
/obj/item
|
||||
var/canMouseDown = FALSE
|
||||
|
||||
/obj/item/gun
|
||||
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
|
||||
|
||||
/obj/item/gun/CanItemAutoclick(object, location, params)
|
||||
. = automatic
|
||||
|
||||
/atom/proc/IsAutoclickable()
|
||||
. = 1
|
||||
|
||||
/obj/screen/IsAutoclickable()
|
||||
. = 0
|
||||
|
||||
/obj/screen/click_catcher/IsAutoclickable()
|
||||
. = 1
|
||||
|
||||
//Please don't roast me too hard
|
||||
/client/MouseMove(object,location,control,params)
|
||||
mouseParams = params
|
||||
mouseLocation = location
|
||||
mouseObject = object
|
||||
mouseControlObject = control
|
||||
if(mob && LAZYLEN(mob.mousemove_intercept_objects))
|
||||
for(var/datum/D in mob.mousemove_intercept_objects)
|
||||
D.onMouseMove(object, location, control, params)
|
||||
if(!show_popup_menus && mob) //CIT CHANGE - passes onmousemove() to mobs
|
||||
mob.onMouseMove(object, location, control, params) //CIT CHANGE - ditto
|
||||
..()
|
||||
|
||||
/datum/proc/onMouseMove(object, location, control, params)
|
||||
return
|
||||
|
||||
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
|
||||
var/list/L = params2list(params)
|
||||
if (L["middle"])
|
||||
if (src_object && src_location != over_location)
|
||||
middragtime = world.time
|
||||
middragatom = src_object
|
||||
else
|
||||
middragtime = 0
|
||||
middragatom = null
|
||||
mouseParams = params
|
||||
mouseLocation = over_location
|
||||
mouseObject = over_object
|
||||
mouseControlObject = over_control
|
||||
if(selected_target[1] && over_object && over_object.IsAutoclickable())
|
||||
selected_target[1] = over_object
|
||||
selected_target[2] = params
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
|
||||
|
||||
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
return
|
||||
|
||||
/client/MouseDrop(src_object, over_object, src_location, over_location, src_control, over_control, params)
|
||||
if (middragatom == src_object)
|
||||
middragtime = 0
|
||||
middragatom = null
|
||||
/*
|
||||
MouseDrop:
|
||||
|
||||
Called on the atom you're dragging. In a lot of circumstances we want to use the
|
||||
receiving object instead, so that's the default action. This allows you to drag
|
||||
almost anything into a trash can.
|
||||
*/
|
||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
if(!usr || !over)
|
||||
return
|
||||
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is receiving will verify themselves for adjacency.
|
||||
return
|
||||
if(over == src)
|
||||
return usr.client.Click(src, src_location, src_control, params)
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
return // should stop you from dragging through windows
|
||||
|
||||
over.MouseDrop_T(src,usr)
|
||||
return
|
||||
|
||||
// receive a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_MOUSEDROPPED_ONTO, dropping, user)
|
||||
return
|
||||
|
||||
|
||||
/client
|
||||
var/list/atom/selected_target[2]
|
||||
var/obj/item/active_mousedown_item = null
|
||||
var/mouseParams = ""
|
||||
var/mouseLocation = null
|
||||
var/mouseObject = null
|
||||
var/mouseControlObject = null
|
||||
var/middragtime = 0
|
||||
var/atom/middragatom
|
||||
|
||||
/client/MouseDown(object, location, control, params)
|
||||
if (mouse_down_icon)
|
||||
mouse_pointer_icon = mouse_down_icon
|
||||
var/delay = mob.CanMobAutoclick(object, location, params)
|
||||
if(delay)
|
||||
selected_target[1] = object
|
||||
selected_target[2] = params
|
||||
while(selected_target[1])
|
||||
Click(selected_target[1], location, control, selected_target[2])
|
||||
sleep(delay)
|
||||
active_mousedown_item = mob.canMobMousedown(object, location, params)
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseDown(object, location, params, mob)
|
||||
|
||||
/client/MouseUp(object, location, control, params)
|
||||
if (mouse_up_icon)
|
||||
mouse_pointer_icon = mouse_up_icon
|
||||
selected_target[1] = null
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseUp(object, location, params, mob)
|
||||
active_mousedown_item = null
|
||||
|
||||
/mob/proc/CanMobAutoclick(object, location, params)
|
||||
|
||||
/mob/living/carbon/CanMobAutoclick(atom/object, location, params)
|
||||
if(!object.IsAutoclickable())
|
||||
return
|
||||
var/obj/item/h = get_active_held_item()
|
||||
if(h)
|
||||
. = h.CanItemAutoclick(object, location, params)
|
||||
|
||||
/mob/proc/canMobMousedown(atom/object, location, params)
|
||||
|
||||
/mob/living/carbon/canMobMousedown(atom/object, location, params)
|
||||
var/obj/item/H = get_active_held_item()
|
||||
if(H)
|
||||
. = H.canItemMouseDown(object, location, params)
|
||||
|
||||
/obj/item/proc/CanItemAutoclick(object, location, params)
|
||||
|
||||
/obj/item/proc/canItemMouseDown(object, location, params)
|
||||
if(canMouseDown)
|
||||
return src
|
||||
|
||||
/obj/item/proc/onMouseDown(object, location, params, mob)
|
||||
return
|
||||
|
||||
/obj/item/proc/onMouseUp(object, location, params, mob)
|
||||
return
|
||||
|
||||
/obj/item
|
||||
var/canMouseDown = FALSE
|
||||
|
||||
/obj/item/gun
|
||||
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
|
||||
|
||||
/obj/item/gun/CanItemAutoclick(object, location, params)
|
||||
. = automatic
|
||||
|
||||
/atom/proc/IsAutoclickable()
|
||||
. = 1
|
||||
|
||||
/obj/screen/IsAutoclickable()
|
||||
. = 0
|
||||
|
||||
/obj/screen/click_catcher/IsAutoclickable()
|
||||
. = 1
|
||||
|
||||
//Please don't roast me too hard
|
||||
/client/MouseMove(object,location,control,params)
|
||||
mouseParams = params
|
||||
mouseLocation = location
|
||||
mouseObject = object
|
||||
mouseControlObject = control
|
||||
if(mob && LAZYLEN(mob.mousemove_intercept_objects))
|
||||
for(var/datum/D in mob.mousemove_intercept_objects)
|
||||
D.onMouseMove(object, location, control, params)
|
||||
if(!show_popup_menus && mob) //CIT CHANGE - passes onmousemove() to mobs
|
||||
mob.onMouseMove(object, location, control, params) //CIT CHANGE - ditto
|
||||
..()
|
||||
|
||||
/datum/proc/onMouseMove(object, location, control, params)
|
||||
return
|
||||
|
||||
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
|
||||
var/list/L = params2list(params)
|
||||
if (L["middle"])
|
||||
if (src_object && src_location != over_location)
|
||||
middragtime = world.time
|
||||
middragatom = src_object
|
||||
else
|
||||
middragtime = 0
|
||||
middragatom = null
|
||||
mouseParams = params
|
||||
mouseLocation = over_location
|
||||
mouseObject = over_object
|
||||
mouseControlObject = over_control
|
||||
if(selected_target[1] && over_object && over_object.IsAutoclickable())
|
||||
selected_target[1] = over_object
|
||||
selected_target[2] = params
|
||||
if(active_mousedown_item)
|
||||
active_mousedown_item.onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
|
||||
|
||||
/obj/item/proc/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
return
|
||||
|
||||
/client/MouseDrop(src_object, over_object, src_location, over_location, src_control, over_control, params)
|
||||
if (middragatom == src_object)
|
||||
middragtime = 0
|
||||
middragatom = null
|
||||
..()
|
||||
@@ -1,165 +1,165 @@
|
||||
/*
|
||||
These defines specificy screen locations. For more information, see the byond documentation on the screen_loc var.
|
||||
|
||||
The short version:
|
||||
|
||||
Everything is encoded as strings because apparently that's how Byond rolls.
|
||||
|
||||
"1,1" is the bottom left square of the user's screen. This aligns perfectly with the turf grid.
|
||||
"1:2,3:4" is the square (1,3) with pixel offsets (+2, +4); slightly right and slightly above the turf grid.
|
||||
Pixel offsets are used so you don't perfectly hide the turf under them, that would be crappy.
|
||||
|
||||
In addition, the keywords NORTH, SOUTH, EAST, WEST and CENTER can be used to represent their respective
|
||||
screen borders. NORTH-1, for example, is the row just below the upper edge. Useful if you want your
|
||||
UI to scale with screen size.
|
||||
|
||||
The size of the user's screen is defined by client.view (indirectly by world.view), in our case "15x15".
|
||||
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
|
||||
*/
|
||||
|
||||
//Lower left, persistent menu
|
||||
#define ui_inventory "WEST:6,SOUTH:5"
|
||||
|
||||
//Middle left indicators
|
||||
#define ui_lingchemdisplay "WEST,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistent menu
|
||||
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
|
||||
#define ui_id "CENTER-4:12,SOUTH:5"
|
||||
#define ui_belt "CENTER-3:14,SOUTH:5"
|
||||
#define ui_back "CENTER-2:14,SOUTH:5"
|
||||
|
||||
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
||||
var/x_off = -(!(i % 2))
|
||||
var/y_off = round((i-1) / 2)
|
||||
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
||||
|
||||
/proc/ui_equip_position(mob/M)
|
||||
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
|
||||
return "CENTER:-16,SOUTH+[y_off+1]:5"
|
||||
|
||||
/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
||||
var/x_off = which == 1 ? -1 : 0
|
||||
var/y_off = round((M.held_items.len-1) / 2)
|
||||
return "CENTER+[x_off]:16,SOUTH+[y_off+1]:5"
|
||||
|
||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:15, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:15, SOUTH:5" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:15, SOUTH:5" //borgs
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5" //borgs
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_language_menu "EAST-1:27,SOUTH+2:8" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-5:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-4:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_neck "CENTER-3:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-2:16,SOUTH:5" //monkey
|
||||
|
||||
//#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
#define ui_alien_language_menu "EAST-3:26,SOUTH:5" //alien
|
||||
|
||||
#define ui_drone_drop "CENTER+1:18,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_pull "CENTER+2:2,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_storage "CENTER-2:14,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_head "CENTER-3:14,SOUTH:5" //maintenance drones
|
||||
|
||||
//Lower right, persistent menu
|
||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||
#define ui_sprintbufferloc "EAST-2:26,SOUTH:18"
|
||||
#define ui_acti "EAST-3:24,SOUTH:5"
|
||||
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
||||
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
|
||||
#define ui_crafting "EAST-5:20,SOUTH:5"//CIT CHANGE - moves this over one tile to accommodate for combat mode toggle
|
||||
#define ui_building "EAST-5:20,SOUTH:21"//CIT CHANGE - ditto
|
||||
#define ui_language_menu "EAST-5:4,SOUTH:21"//CIT CHANGE - ditto
|
||||
#define ui_voremode "EAST-5:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_borg_intents "EAST-2:26,SOUTH:5"
|
||||
|
||||
|
||||
//Upper-middle right (alerts)
|
||||
#define ui_alert1 "EAST-1:28,CENTER+5:27"
|
||||
#define ui_alert2 "EAST-1:28,CENTER+4:25"
|
||||
#define ui_alert3 "EAST-1:28,CENTER+3:23"
|
||||
#define ui_alert4 "EAST-1:28,CENTER+2:21"
|
||||
#define ui_alert5 "EAST-1:28,CENTER+1:19"
|
||||
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_healthdoll "EAST-1:28,CENTER-2:13"
|
||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||
#define ui_internal "EAST-1:28,CENTER+1:19"//CIT CHANGE - moves internal icon up a little bit to accommodate for the stamina meter
|
||||
#define ui_mood "EAST-1:28,CENTER-3:10"
|
||||
|
||||
//living
|
||||
#define ui_living_pull "EAST-1:28,CENTER-2:15"
|
||||
#define ui_living_health "EAST-1:28,CENTER:15"
|
||||
|
||||
//borgs
|
||||
#define ui_borg_health "EAST-1:28,CENTER-1:15" //borgs have the health display where humans have the pressure damage indicator.
|
||||
|
||||
//aliens
|
||||
#define ui_alien_health "EAST,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alienplasmadisplay "EAST,CENTER-2:15"
|
||||
#define ui_alien_queen_finder "EAST,CENTER-3:15"
|
||||
|
||||
//constructs
|
||||
#define ui_construct_pull "EAST,CENTER-2:15"
|
||||
#define ui_construct_health "EAST,CENTER:15" //same as borgs and humans
|
||||
|
||||
// AI
|
||||
|
||||
#define ui_ai_core "SOUTH:6,WEST"
|
||||
#define ui_ai_camera_list "SOUTH:6,WEST+1"
|
||||
#define ui_ai_track_with_camera "SOUTH:6,WEST+2"
|
||||
#define ui_ai_camera_light "SOUTH:6,WEST+3"
|
||||
#define ui_ai_crew_monitor "SOUTH:6,WEST+4"
|
||||
#define ui_ai_crew_manifest "SOUTH:6,WEST+5"
|
||||
#define ui_ai_alerts "SOUTH:6,WEST+6"
|
||||
#define ui_ai_announcement "SOUTH:6,WEST+7"
|
||||
#define ui_ai_shuttle "SOUTH:6,WEST+8"
|
||||
#define ui_ai_state_laws "SOUTH:6,WEST+9"
|
||||
#define ui_ai_pda_send "SOUTH:6,WEST+10"
|
||||
#define ui_ai_pda_log "SOUTH:6,WEST+11"
|
||||
#define ui_ai_take_picture "SOUTH:6,WEST+12"
|
||||
#define ui_ai_view_images "SOUTH:6,WEST+13"
|
||||
#define ui_ai_sensor "SOUTH:6,WEST+14"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+13"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+14"
|
||||
|
||||
//Pop-up inventory
|
||||
#define ui_shoes "WEST+1:8,SOUTH:5"
|
||||
|
||||
#define ui_iclothing "WEST:6,SOUTH+1:7"
|
||||
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
|
||||
#define ui_gloves "WEST+2:10,SOUTH+1:7"
|
||||
|
||||
#define ui_glasses "WEST:6,SOUTH+3:11"
|
||||
#define ui_mask "WEST+1:8,SOUTH+2:9"
|
||||
#define ui_ears "WEST+2:10,SOUTH+2:9"
|
||||
#define ui_neck "WEST:6,SOUTH+2:9"
|
||||
#define ui_head "WEST+1:8,SOUTH+3:11"
|
||||
|
||||
//Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
|
||||
/*
|
||||
These defines specificy screen locations. For more information, see the byond documentation on the screen_loc var.
|
||||
|
||||
The short version:
|
||||
|
||||
Everything is encoded as strings because apparently that's how Byond rolls.
|
||||
|
||||
"1,1" is the bottom left square of the user's screen. This aligns perfectly with the turf grid.
|
||||
"1:2,3:4" is the square (1,3) with pixel offsets (+2, +4); slightly right and slightly above the turf grid.
|
||||
Pixel offsets are used so you don't perfectly hide the turf under them, that would be crappy.
|
||||
|
||||
In addition, the keywords NORTH, SOUTH, EAST, WEST and CENTER can be used to represent their respective
|
||||
screen borders. NORTH-1, for example, is the row just below the upper edge. Useful if you want your
|
||||
UI to scale with screen size.
|
||||
|
||||
The size of the user's screen is defined by client.view (indirectly by world.view), in our case "15x15".
|
||||
Therefore, the top right corner (except during admin shenanigans) is at "15,15"
|
||||
*/
|
||||
|
||||
//Lower left, persistent menu
|
||||
#define ui_inventory "WEST:6,SOUTH:5"
|
||||
|
||||
//Middle left indicators
|
||||
#define ui_lingchemdisplay "WEST,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistent menu
|
||||
#define ui_sstore1 "CENTER-5:10,SOUTH:5"
|
||||
#define ui_id "CENTER-4:12,SOUTH:5"
|
||||
#define ui_belt "CENTER-3:14,SOUTH:5"
|
||||
#define ui_back "CENTER-2:14,SOUTH:5"
|
||||
|
||||
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
||||
var/x_off = -(!(i % 2))
|
||||
var/y_off = round((i-1) / 2)
|
||||
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
||||
|
||||
/proc/ui_equip_position(mob/M)
|
||||
var/y_off = round((M.held_items.len-1) / 2) //values based on old equip ui position (CENTER: +/-16,SOUTH+1:5)
|
||||
return "CENTER:-16,SOUTH+[y_off+1]:5"
|
||||
|
||||
/proc/ui_swaphand_position(mob/M, which = 1) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
||||
var/x_off = which == 1 ? -1 : 0
|
||||
var/y_off = round((M.held_items.len-1) / 2)
|
||||
return "CENTER+[x_off]:16,SOUTH+[y_off+1]:5"
|
||||
|
||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:15, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:15, SOUTH:5" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:15, SOUTH:5" //borgs
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
#define ui_borg_module "CENTER+1:16,SOUTH:5" //borgs
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_language_menu "EAST-1:27,SOUTH+2:8" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-5:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-4:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_neck "CENTER-3:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-2:16,SOUTH:5" //monkey
|
||||
|
||||
//#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
#define ui_alien_language_menu "EAST-3:26,SOUTH:5" //alien
|
||||
|
||||
#define ui_drone_drop "CENTER+1:18,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_pull "CENTER+2:2,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_storage "CENTER-2:14,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_head "CENTER-3:14,SOUTH:5" //maintenance drones
|
||||
|
||||
//Lower right, persistent menu
|
||||
#define ui_drop_throw "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_pull_resist "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_movi "EAST-2:26,SOUTH:5"
|
||||
#define ui_sprintbufferloc "EAST-2:26,SOUTH:18"
|
||||
#define ui_acti "EAST-3:24,SOUTH:5"
|
||||
#define ui_zonesel "EAST-1:28,SOUTH:5"
|
||||
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
|
||||
#define ui_crafting "EAST-5:20,SOUTH:5"//CIT CHANGE - moves this over one tile to accommodate for combat mode toggle
|
||||
#define ui_building "EAST-5:20,SOUTH:21"//CIT CHANGE - ditto
|
||||
#define ui_language_menu "EAST-5:4,SOUTH:21"//CIT CHANGE - ditto
|
||||
#define ui_voremode "EAST-5:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
|
||||
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
|
||||
#define ui_borg_intents "EAST-2:26,SOUTH:5"
|
||||
|
||||
|
||||
//Upper-middle right (alerts)
|
||||
#define ui_alert1 "EAST-1:28,CENTER+5:27"
|
||||
#define ui_alert2 "EAST-1:28,CENTER+4:25"
|
||||
#define ui_alert3 "EAST-1:28,CENTER+3:23"
|
||||
#define ui_alert4 "EAST-1:28,CENTER+2:21"
|
||||
#define ui_alert5 "EAST-1:28,CENTER+1:19"
|
||||
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_healthdoll "EAST-1:28,CENTER-2:13"
|
||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||
#define ui_internal "EAST-1:28,CENTER+1:19"//CIT CHANGE - moves internal icon up a little bit to accommodate for the stamina meter
|
||||
#define ui_mood "EAST-1:28,CENTER-3:10"
|
||||
|
||||
//living
|
||||
#define ui_living_pull "EAST-1:28,CENTER-2:15"
|
||||
#define ui_living_health "EAST-1:28,CENTER:15"
|
||||
|
||||
//borgs
|
||||
#define ui_borg_health "EAST-1:28,CENTER-1:15" //borgs have the health display where humans have the pressure damage indicator.
|
||||
|
||||
//aliens
|
||||
#define ui_alien_health "EAST,CENTER-1:15" //aliens have the health display where humans have the pressure damage indicator.
|
||||
#define ui_alienplasmadisplay "EAST,CENTER-2:15"
|
||||
#define ui_alien_queen_finder "EAST,CENTER-3:15"
|
||||
|
||||
//constructs
|
||||
#define ui_construct_pull "EAST,CENTER-2:15"
|
||||
#define ui_construct_health "EAST,CENTER:15" //same as borgs and humans
|
||||
|
||||
// AI
|
||||
|
||||
#define ui_ai_core "SOUTH:6,WEST"
|
||||
#define ui_ai_camera_list "SOUTH:6,WEST+1"
|
||||
#define ui_ai_track_with_camera "SOUTH:6,WEST+2"
|
||||
#define ui_ai_camera_light "SOUTH:6,WEST+3"
|
||||
#define ui_ai_crew_monitor "SOUTH:6,WEST+4"
|
||||
#define ui_ai_crew_manifest "SOUTH:6,WEST+5"
|
||||
#define ui_ai_alerts "SOUTH:6,WEST+6"
|
||||
#define ui_ai_announcement "SOUTH:6,WEST+7"
|
||||
#define ui_ai_shuttle "SOUTH:6,WEST+8"
|
||||
#define ui_ai_state_laws "SOUTH:6,WEST+9"
|
||||
#define ui_ai_pda_send "SOUTH:6,WEST+10"
|
||||
#define ui_ai_pda_log "SOUTH:6,WEST+11"
|
||||
#define ui_ai_take_picture "SOUTH:6,WEST+12"
|
||||
#define ui_ai_view_images "SOUTH:6,WEST+13"
|
||||
#define ui_ai_sensor "SOUTH:6,WEST+14"
|
||||
#define ui_ai_multicam "SOUTH+1:6,WEST+13"
|
||||
#define ui_ai_add_multicam "SOUTH+1:6,WEST+14"
|
||||
|
||||
//Pop-up inventory
|
||||
#define ui_shoes "WEST+1:8,SOUTH:5"
|
||||
|
||||
#define ui_iclothing "WEST:6,SOUTH+1:7"
|
||||
#define ui_oclothing "WEST+1:8,SOUTH+1:7"
|
||||
#define ui_gloves "WEST+2:10,SOUTH+1:7"
|
||||
|
||||
#define ui_glasses "WEST:6,SOUTH+3:11"
|
||||
#define ui_mask "WEST+1:8,SOUTH+2:9"
|
||||
#define ui_ears "WEST+2:10,SOUTH+2:9"
|
||||
#define ui_neck "WEST:6,SOUTH+2:9"
|
||||
#define ui_head "WEST+1:8,SOUTH+3:11"
|
||||
|
||||
//Ghosts
|
||||
|
||||
#define ui_ghost_jumptomob "SOUTH:6,CENTER-2:24"
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
|
||||
|
||||
@@ -1,69 +1,69 @@
|
||||
#define CREDIT_ROLL_SPEED 125
|
||||
#define CREDIT_SPAWN_SPEED 10
|
||||
#define CREDIT_ANIMATE_HEIGHT (14 * world.icon_size)
|
||||
#define CREDIT_EASE_DURATION 22
|
||||
#define CREDITS_PATH "[global.config.directory]/contributors.dmi"
|
||||
|
||||
/client/proc/RollCredits()
|
||||
set waitfor = FALSE
|
||||
if(!fexists(CREDITS_PATH))
|
||||
return
|
||||
var/icon/credits_icon = new(CREDITS_PATH)
|
||||
LAZYINITLIST(credits)
|
||||
var/list/_credits = credits
|
||||
verbs += /client/proc/ClearCredits
|
||||
var/static/list/credit_order_for_this_round
|
||||
if(isnull(credit_order_for_this_round))
|
||||
credit_order_for_this_round = list("Thanks for playing!") + (shuffle(icon_states(credits_icon)) - "Thanks for playing!")
|
||||
for(var/I in credit_order_for_this_round)
|
||||
if(!credits)
|
||||
return
|
||||
_credits += new /obj/screen/credit(null, I, src, credits_icon)
|
||||
sleep(CREDIT_SPAWN_SPEED)
|
||||
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
|
||||
verbs -= /client/proc/ClearCredits
|
||||
qdel(credits_icon)
|
||||
|
||||
/client/proc/ClearCredits()
|
||||
set name = "Hide Credits"
|
||||
set category = "OOC"
|
||||
verbs -= /client/proc/ClearCredits
|
||||
QDEL_LIST(credits)
|
||||
credits = null
|
||||
|
||||
/obj/screen/credit
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
alpha = 0
|
||||
screen_loc = "12,1"
|
||||
layer = SPLASHSCREEN_LAYER
|
||||
var/client/parent
|
||||
var/matrix/target
|
||||
|
||||
/obj/screen/credit/Initialize(mapload, credited, client/P, icon/I)
|
||||
. = ..()
|
||||
icon = I
|
||||
parent = P
|
||||
icon_state = credited
|
||||
maptext = credited
|
||||
maptext_x = world.icon_size + 8
|
||||
maptext_y = (world.icon_size / 2) - 4
|
||||
maptext_width = world.icon_size * 3
|
||||
var/matrix/M = matrix(transform)
|
||||
M.Translate(0, CREDIT_ANIMATE_HEIGHT)
|
||||
animate(src, transform = M, time = CREDIT_ROLL_SPEED)
|
||||
target = M
|
||||
animate(src, alpha = 255, time = CREDIT_EASE_DURATION, flags = ANIMATION_PARALLEL)
|
||||
addtimer(CALLBACK(src, .proc/FadeOut), CREDIT_ROLL_SPEED - CREDIT_EASE_DURATION)
|
||||
QDEL_IN(src, CREDIT_ROLL_SPEED)
|
||||
P.screen += src
|
||||
|
||||
/obj/screen/credit/Destroy()
|
||||
var/client/P = parent
|
||||
P.screen -= src
|
||||
icon = null
|
||||
LAZYREMOVE(P.credits, src)
|
||||
parent = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/credit/proc/FadeOut()
|
||||
animate(src, alpha = 0, transform = target, time = CREDIT_EASE_DURATION)
|
||||
#define CREDIT_ROLL_SPEED 125
|
||||
#define CREDIT_SPAWN_SPEED 10
|
||||
#define CREDIT_ANIMATE_HEIGHT (14 * world.icon_size)
|
||||
#define CREDIT_EASE_DURATION 22
|
||||
#define CREDITS_PATH "[global.config.directory]/contributors.dmi"
|
||||
|
||||
/client/proc/RollCredits()
|
||||
set waitfor = FALSE
|
||||
if(!fexists(CREDITS_PATH))
|
||||
return
|
||||
var/icon/credits_icon = new(CREDITS_PATH)
|
||||
LAZYINITLIST(credits)
|
||||
var/list/_credits = credits
|
||||
verbs += /client/proc/ClearCredits
|
||||
var/static/list/credit_order_for_this_round
|
||||
if(isnull(credit_order_for_this_round))
|
||||
credit_order_for_this_round = list("Thanks for playing!") + (shuffle(icon_states(credits_icon)) - "Thanks for playing!")
|
||||
for(var/I in credit_order_for_this_round)
|
||||
if(!credits)
|
||||
return
|
||||
_credits += new /obj/screen/credit(null, I, src, credits_icon)
|
||||
sleep(CREDIT_SPAWN_SPEED)
|
||||
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
|
||||
verbs -= /client/proc/ClearCredits
|
||||
qdel(credits_icon)
|
||||
|
||||
/client/proc/ClearCredits()
|
||||
set name = "Hide Credits"
|
||||
set category = "OOC"
|
||||
verbs -= /client/proc/ClearCredits
|
||||
QDEL_LIST(credits)
|
||||
credits = null
|
||||
|
||||
/obj/screen/credit
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
alpha = 0
|
||||
screen_loc = "12,1"
|
||||
layer = SPLASHSCREEN_LAYER
|
||||
var/client/parent
|
||||
var/matrix/target
|
||||
|
||||
/obj/screen/credit/Initialize(mapload, credited, client/P, icon/I)
|
||||
. = ..()
|
||||
icon = I
|
||||
parent = P
|
||||
icon_state = credited
|
||||
maptext = credited
|
||||
maptext_x = world.icon_size + 8
|
||||
maptext_y = (world.icon_size / 2) - 4
|
||||
maptext_width = world.icon_size * 3
|
||||
var/matrix/M = matrix(transform)
|
||||
M.Translate(0, CREDIT_ANIMATE_HEIGHT)
|
||||
animate(src, transform = M, time = CREDIT_ROLL_SPEED)
|
||||
target = M
|
||||
animate(src, alpha = 255, time = CREDIT_EASE_DURATION, flags = ANIMATION_PARALLEL)
|
||||
addtimer(CALLBACK(src, .proc/FadeOut), CREDIT_ROLL_SPEED - CREDIT_EASE_DURATION)
|
||||
QDEL_IN(src, CREDIT_ROLL_SPEED)
|
||||
P.screen += src
|
||||
|
||||
/obj/screen/credit/Destroy()
|
||||
var/client/P = parent
|
||||
P.screen -= src
|
||||
icon = null
|
||||
LAZYREMOVE(P.credits, src)
|
||||
parent = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/credit/proc/FadeOut()
|
||||
animate(src, alpha = 0, transform = target, time = CREDIT_EASE_DURATION)
|
||||
|
||||
@@ -1,181 +1,181 @@
|
||||
|
||||
/mob
|
||||
var/list/screens = list()
|
||||
|
||||
/mob/proc/overlay_fullscreen(category, type, severity)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if (!screen || screen.type != type)
|
||||
// needs to be recreated
|
||||
clear_fullscreen(category, FALSE)
|
||||
screens[category] = screen = new type()
|
||||
else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
|
||||
// doesn't need to be updated
|
||||
return screen
|
||||
|
||||
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
||||
screen.severity = severity
|
||||
if (client && screen.should_show_to(src))
|
||||
screen.update_for_view(client.view)
|
||||
client.screen += screen
|
||||
|
||||
return screen
|
||||
|
||||
/mob/proc/clear_fullscreen(category, animated = 10)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if(!screen)
|
||||
return
|
||||
|
||||
screens -= category
|
||||
|
||||
if(animated)
|
||||
animate(screen, alpha = 0, time = animated)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen_after_animate, screen), animated, TIMER_CLIENT_TIME)
|
||||
else
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen)
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreens()
|
||||
for(var/category in screens)
|
||||
clear_fullscreen(category)
|
||||
|
||||
/mob/proc/hide_fullscreens()
|
||||
if(client)
|
||||
for(var/category in screens)
|
||||
client.screen -= screens[category]
|
||||
|
||||
/mob/proc/reload_fullscreen()
|
||||
if(client)
|
||||
var/obj/screen/fullscreen/screen
|
||||
for(var/category in screens)
|
||||
screen = screens[category]
|
||||
if(screen.should_show_to(src))
|
||||
screen.update_for_view(client.view)
|
||||
client.screen |= screen
|
||||
else
|
||||
client.screen -= screen
|
||||
|
||||
/obj/screen/fullscreen
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/view = 7
|
||||
var/severity = 0
|
||||
var/show_when_dead = FALSE
|
||||
|
||||
/obj/screen/fullscreen/proc/update_for_view(client_view)
|
||||
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
|
||||
var/list/actualview = getviewsize(client_view)
|
||||
view = client_view
|
||||
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
|
||||
|
||||
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
|
||||
if(!show_when_dead && mymob.stat == DEAD)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/screen/fullscreen/Destroy()
|
||||
severity = 0
|
||||
. = ..()
|
||||
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit/vision
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/curse
|
||||
icon_state = "curse"
|
||||
layer = CURSE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
|
||||
/obj/screen/fullscreen/blurry
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "blurry"
|
||||
|
||||
/obj/screen/fullscreen/flash
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
|
||||
/obj/screen/fullscreen/flash/static
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "noise"
|
||||
|
||||
/obj/screen/fullscreen/high
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
|
||||
/obj/screen/fullscreen/color_vision
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
alpha = 80
|
||||
|
||||
/obj/screen/fullscreen/color_vision/green
|
||||
color = "#00ff00"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/red
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/blue
|
||||
color = "#0000ff"
|
||||
|
||||
/obj/screen/fullscreen/lighting_backdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "flash"
|
||||
transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
show_when_dead = TRUE
|
||||
|
||||
//Provides darkness to the back of the lighting plane
|
||||
/obj/screen/fullscreen/lighting_backdrop/lit
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
layer = BACKGROUND_LAYER+21
|
||||
color = "#000"
|
||||
show_when_dead = TRUE
|
||||
|
||||
//Provides whiteness in case you don't see lights so everything is still visible
|
||||
/obj/screen/fullscreen/lighting_backdrop/unlit
|
||||
layer = BACKGROUND_LAYER+20
|
||||
show_when_dead = TRUE
|
||||
|
||||
/obj/screen/fullscreen/see_through_darkness
|
||||
icon_state = "nightvision"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
show_when_dead = TRUE
|
||||
|
||||
/mob
|
||||
var/list/screens = list()
|
||||
|
||||
/mob/proc/overlay_fullscreen(category, type, severity)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if (!screen || screen.type != type)
|
||||
// needs to be recreated
|
||||
clear_fullscreen(category, FALSE)
|
||||
screens[category] = screen = new type()
|
||||
else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
|
||||
// doesn't need to be updated
|
||||
return screen
|
||||
|
||||
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
||||
screen.severity = severity
|
||||
if (client && screen.should_show_to(src))
|
||||
screen.update_for_view(client.view)
|
||||
client.screen += screen
|
||||
|
||||
return screen
|
||||
|
||||
/mob/proc/clear_fullscreen(category, animated = 10)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if(!screen)
|
||||
return
|
||||
|
||||
screens -= category
|
||||
|
||||
if(animated)
|
||||
animate(screen, alpha = 0, time = animated)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen_after_animate, screen), animated, TIMER_CLIENT_TIME)
|
||||
else
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen)
|
||||
if(client)
|
||||
client.screen -= screen
|
||||
qdel(screen)
|
||||
|
||||
/mob/proc/clear_fullscreens()
|
||||
for(var/category in screens)
|
||||
clear_fullscreen(category)
|
||||
|
||||
/mob/proc/hide_fullscreens()
|
||||
if(client)
|
||||
for(var/category in screens)
|
||||
client.screen -= screens[category]
|
||||
|
||||
/mob/proc/reload_fullscreen()
|
||||
if(client)
|
||||
var/obj/screen/fullscreen/screen
|
||||
for(var/category in screens)
|
||||
screen = screens[category]
|
||||
if(screen.should_show_to(src))
|
||||
screen.update_for_view(client.view)
|
||||
client.screen |= screen
|
||||
else
|
||||
client.screen -= screen
|
||||
|
||||
/obj/screen/fullscreen
|
||||
icon = 'icons/mob/screen_full.dmi'
|
||||
icon_state = "default"
|
||||
screen_loc = "CENTER-7,CENTER-7"
|
||||
layer = FULLSCREEN_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/view = 7
|
||||
var/severity = 0
|
||||
var/show_when_dead = FALSE
|
||||
|
||||
/obj/screen/fullscreen/proc/update_for_view(client_view)
|
||||
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
|
||||
var/list/actualview = getviewsize(client_view)
|
||||
view = client_view
|
||||
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
|
||||
|
||||
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
|
||||
if(!show_when_dead && mymob.stat == DEAD)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/screen/fullscreen/Destroy()
|
||||
severity = 0
|
||||
. = ..()
|
||||
|
||||
/obj/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/oxy
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit
|
||||
icon_state = "passage"
|
||||
layer = CRIT_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/crit/vision
|
||||
icon_state = "oxydamageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
|
||||
/obj/screen/fullscreen/blind
|
||||
icon_state = "blackimageoverlay"
|
||||
layer = BLIND_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/curse
|
||||
icon_state = "curse"
|
||||
layer = CURSE_LAYER
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
/obj/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
|
||||
/obj/screen/fullscreen/blurry
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "blurry"
|
||||
|
||||
/obj/screen/fullscreen/flash
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
|
||||
/obj/screen/fullscreen/flash/static
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "noise"
|
||||
|
||||
/obj/screen/fullscreen/high
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "druggy"
|
||||
|
||||
/obj/screen/fullscreen/color_vision
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
icon_state = "flash"
|
||||
alpha = 80
|
||||
|
||||
/obj/screen/fullscreen/color_vision/green
|
||||
color = "#00ff00"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/red
|
||||
color = "#ff0000"
|
||||
|
||||
/obj/screen/fullscreen/color_vision/blue
|
||||
color = "#0000ff"
|
||||
|
||||
/obj/screen/fullscreen/lighting_backdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "flash"
|
||||
transform = matrix(200, 0, 0, 0, 200, 0)
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode = BLEND_OVERLAY
|
||||
show_when_dead = TRUE
|
||||
|
||||
//Provides darkness to the back of the lighting plane
|
||||
/obj/screen/fullscreen/lighting_backdrop/lit
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
layer = BACKGROUND_LAYER+21
|
||||
color = "#000"
|
||||
show_when_dead = TRUE
|
||||
|
||||
//Provides whiteness in case you don't see lights so everything is still visible
|
||||
/obj/screen/fullscreen/lighting_backdrop/unlit
|
||||
layer = BACKGROUND_LAYER+20
|
||||
show_when_dead = TRUE
|
||||
|
||||
/obj/screen/fullscreen/see_through_darkness
|
||||
icon_state = "nightvision"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
show_when_dead = TRUE
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
/obj/screen/ghost
|
||||
icon = 'icons/mob/screen_ghost.dmi'
|
||||
|
||||
/obj/screen/ghost/MouseEntered()
|
||||
flick(icon_state + "_anim", src)
|
||||
|
||||
/obj/screen/ghost/jumptomob
|
||||
name = "Jump to mob"
|
||||
icon_state = "jumptomob"
|
||||
|
||||
/obj/screen/ghost/jumptomob/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.jumptomob()
|
||||
|
||||
/obj/screen/ghost/orbit
|
||||
name = "Orbit"
|
||||
icon_state = "orbit"
|
||||
|
||||
/obj/screen/ghost/orbit/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.follow()
|
||||
|
||||
/obj/screen/ghost/reenter_corpse
|
||||
name = "Reenter corpse"
|
||||
icon_state = "reenter_corpse"
|
||||
|
||||
/obj/screen/ghost/reenter_corpse/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/ghost/teleport
|
||||
name = "Teleport"
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/ghost/teleport/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/teleport()
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
|
||||
// don't show this HUD if observing; show the HUD of the observee
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
plane_masters_update()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client.prefs.ghost_hud)
|
||||
screenmob.client.screen -= static_inventory
|
||||
else
|
||||
screenmob.client.screen += static_inventory
|
||||
/obj/screen/ghost
|
||||
icon = 'icons/mob/screen_ghost.dmi'
|
||||
|
||||
/obj/screen/ghost/MouseEntered()
|
||||
flick(icon_state + "_anim", src)
|
||||
|
||||
/obj/screen/ghost/jumptomob
|
||||
name = "Jump to mob"
|
||||
icon_state = "jumptomob"
|
||||
|
||||
/obj/screen/ghost/jumptomob/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.jumptomob()
|
||||
|
||||
/obj/screen/ghost/orbit
|
||||
name = "Orbit"
|
||||
icon_state = "orbit"
|
||||
|
||||
/obj/screen/ghost/orbit/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.follow()
|
||||
|
||||
/obj/screen/ghost/reenter_corpse
|
||||
name = "Reenter corpse"
|
||||
icon_state = "reenter_corpse"
|
||||
|
||||
/obj/screen/ghost/reenter_corpse/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.reenter_corpse()
|
||||
|
||||
/obj/screen/ghost/teleport
|
||||
name = "Teleport"
|
||||
icon_state = "teleport"
|
||||
|
||||
/obj/screen/ghost/teleport/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
using = new /obj/screen/ghost/jumptomob()
|
||||
using.screen_loc = ui_ghost_jumptomob
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/orbit()
|
||||
using.screen_loc = ui_ghost_orbit
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/reenter_corpse()
|
||||
using.screen_loc = ui_ghost_reenter_corpse
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/teleport()
|
||||
using.screen_loc = ui_ghost_teleport
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
|
||||
// don't show this HUD if observing; show the HUD of the observee
|
||||
var/mob/dead/observer/O = mymob
|
||||
if (istype(O) && O.observetarget)
|
||||
plane_masters_update()
|
||||
return FALSE
|
||||
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client.prefs.ghost_hud)
|
||||
screenmob.client.screen -= static_inventory
|
||||
else
|
||||
screenmob.client.screen += static_inventory
|
||||
|
||||
@@ -1,297 +1,297 @@
|
||||
/*
|
||||
The hud datum
|
||||
Used to show and hide huds for all the different mob types,
|
||||
including inventories and item quick actions.
|
||||
*/
|
||||
|
||||
// The default UI style is the first one in the list
|
||||
GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
"Midnight" = 'icons/mob/screen_midnight.dmi',
|
||||
"Retro" = 'icons/mob/screen_retro.dmi',
|
||||
"Plasmafire" = 'icons/mob/screen_plasmafire.dmi',
|
||||
"Slimecore" = 'icons/mob/screen_slimecore.dmi',
|
||||
"Operative" = 'icons/mob/screen_operative.dmi',
|
||||
"Clockwork" = 'icons/mob/screen_clockwork.dmi'
|
||||
))
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
return GLOB.available_ui_styles[ui_style] || GLOB.available_ui_styles[GLOB.available_ui_styles[1]]
|
||||
|
||||
/datum/hud
|
||||
var/mob/mymob
|
||||
|
||||
var/hud_shown = TRUE //Used for the HUD toggle (F12)
|
||||
var/hud_version = HUD_STYLE_STANDARD //Current displayed version of the HUD
|
||||
var/inventory_shown = FALSE //Equipped item inventory
|
||||
var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
var/obj/screen/ling/chems/lingchemdisplay
|
||||
var/obj/screen/ling/sting/lingstingdisplay
|
||||
|
||||
var/obj/screen/blobpwrdisplay
|
||||
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/alien_queen_finder
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
var/obj/screen/action_intent
|
||||
var/obj/screen/zone_select
|
||||
var/obj/screen/pull_icon
|
||||
var/obj/screen/rest_icon
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
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/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
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = FALSE
|
||||
|
||||
var/obj/screen/healths
|
||||
var/obj/screen/healthdoll
|
||||
var/obj/screen/internals
|
||||
|
||||
// subtypes can override this to force a specific UI style
|
||||
var/ui_style
|
||||
|
||||
//Citadel stuff
|
||||
var/obj/screen/arousal
|
||||
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
|
||||
if (!ui_style)
|
||||
// will fall back to the default if any of these are null
|
||||
ui_style = ui_style2icon(owner.client && owner.client.prefs && owner.client.prefs.UI_style)
|
||||
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
if(mymob.client)
|
||||
hide_actions_toggle.locked = mymob.client.prefs.buttons_locked
|
||||
|
||||
hand_slots = list()
|
||||
|
||||
for(var/mytype in subtypesof(/obj/screen/plane_master))
|
||||
var/obj/screen/plane_master/instance = new mytype()
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
instance.backdrop(mymob)
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
mymob.hud_used = null
|
||||
|
||||
QDEL_NULL(hide_actions_toggle)
|
||||
QDEL_NULL(module_store_icon)
|
||||
QDEL_LIST(static_inventory)
|
||||
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
zone_select = null
|
||||
pull_icon = null
|
||||
|
||||
QDEL_LIST(toggleable_inventory)
|
||||
QDEL_LIST(hotkeybuttons)
|
||||
throw_icon = null
|
||||
QDEL_LIST(infodisplay)
|
||||
|
||||
healths = null
|
||||
healthdoll = null
|
||||
internals = null
|
||||
lingchemdisplay = null
|
||||
devilsouldisplay = null
|
||||
lingstingdisplay = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
alien_queen_finder = null
|
||||
|
||||
QDEL_LIST_ASSOC_VAL(plane_masters)
|
||||
QDEL_LIST(screenoverlays)
|
||||
mymob = null
|
||||
|
||||
return ..()
|
||||
|
||||
/mob
|
||||
var/hud_type = /datum/hud
|
||||
|
||||
/mob/proc/create_mob_hud()
|
||||
if(!client || hud_used)
|
||||
return
|
||||
hud_used = new hud_type(src)
|
||||
update_sight()
|
||||
SEND_SIGNAL(src, COMSIG_MOB_HUD_CREATED)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0, mob/viewmob)
|
||||
if(!ismob(mymob))
|
||||
return FALSE
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client)
|
||||
return FALSE
|
||||
|
||||
screenmob.client.screen = list()
|
||||
screenmob.client.apply_clickcatcher()
|
||||
|
||||
var/display_hud_version = version
|
||||
if(!display_hud_version) //If 0 or blank, display the next hud version
|
||||
display_hud_version = hud_version + 1
|
||||
if(display_hud_version > HUD_VERSIONS) //If the requested version number is greater than the available versions, reset back to the first version
|
||||
display_hud_version = 1
|
||||
|
||||
switch(display_hud_version)
|
||||
if(HUD_STYLE_STANDARD) //Default HUD
|
||||
hud_shown = TRUE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && screenmob.hud_used && screenmob.hud_used.inventory_shown)
|
||||
screenmob.client.screen += toggleable_inventory
|
||||
if(hotkeybuttons.len && !hotkey_ui_hidden)
|
||||
screenmob.client.screen += hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
screenmob.client.screen += hide_actions_toggle
|
||||
|
||||
if(action_intent)
|
||||
action_intent.screen_loc = initial(action_intent.screen_loc) //Restore intent selection to the original position
|
||||
|
||||
if(HUD_STYLE_REDUCED) //Reduced HUD
|
||||
hud_shown = FALSE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/hand = hand_slots[h]
|
||||
if(hand)
|
||||
screenmob.client.screen += hand
|
||||
if(action_intent)
|
||||
screenmob.client.screen += action_intent //we want the intent switcher visible
|
||||
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
|
||||
if(HUD_STYLE_NOHUD) //No HUD
|
||||
hud_shown = FALSE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen -= infodisplay
|
||||
|
||||
hud_version = display_hud_version
|
||||
persistent_inventory_update(screenmob)
|
||||
screenmob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
screenmob.reload_fullscreen()
|
||||
update_parallax_pref(screenmob)
|
||||
|
||||
// ensure observers get an accurate and up-to-date view
|
||||
if (!viewmob)
|
||||
plane_masters_update()
|
||||
for(var/M in mymob.observers)
|
||||
show_hud(hud_version, M)
|
||||
else if (viewmob.hud_used)
|
||||
viewmob.hud_used.plane_masters_update()
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/plane_masters_update()
|
||||
// Plane masters are always shown to OUR mob, never to observers
|
||||
for(var/thing in plane_masters)
|
||||
var/obj/screen/plane_master/PM = plane_masters[thing]
|
||||
PM.backdrop(mymob)
|
||||
mymob.client.screen += PM
|
||||
|
||||
/datum/hud/human/show_hud(version = 0,mob/viewmob)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
hidden_inventory_update(screenmob)
|
||||
|
||||
/datum/hud/robot/show_hud(version = 0, mob/viewmob)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
return
|
||||
|
||||
/datum/hud/proc/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
|
||||
/datum/hud/proc/update_ui_style(new_ui_style)
|
||||
// do nothing if overridden by a subtype or already on that style
|
||||
if (initial(ui_style) || ui_style == new_ui_style)
|
||||
return
|
||||
|
||||
for(var/atom/item in static_inventory + toggleable_inventory + hotkeybuttons + infodisplay + screenoverlays + inv_slots)
|
||||
if (item.icon == ui_style)
|
||||
item.icon = new_ui_style
|
||||
|
||||
ui_style = new_ui_style
|
||||
build_hand_slots()
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
set name = "F12"
|
||||
set hidden = TRUE
|
||||
|
||||
if(hud_used && client)
|
||||
hud_used.show_hud() //Shows the next hud preset
|
||||
to_chat(usr, "<span class ='info'>Switched HUD mode. Press F12 to toggle.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class ='warning'>This mob type does not use a HUD.</span>")
|
||||
|
||||
|
||||
//(re)builds the hand ui slots, throwing away old ones
|
||||
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||
//9/10 this is only called once per mob and only for 2 hands
|
||||
/datum/hud/proc/build_hand_slots()
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||
if(H)
|
||||
static_inventory -= H
|
||||
hand_slots = list()
|
||||
var/obj/screen/inventory/hand/hand_box
|
||||
for(var/i in 1 to mymob.held_items.len)
|
||||
hand_box = new /obj/screen/inventory/hand()
|
||||
hand_box.name = mymob.get_held_index_name(i)
|
||||
hand_box.icon = ui_style
|
||||
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
|
||||
hand_box.screen_loc = ui_hand_position(i)
|
||||
hand_box.held_index = i
|
||||
hand_slots["[i]"] = hand_box
|
||||
hand_box.hud = src
|
||||
static_inventory += hand_box
|
||||
hand_box.update_icon()
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/screen/swap_hand/SH in static_inventory)
|
||||
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
|
||||
i++
|
||||
for(var/obj/screen/human/equip/E in static_inventory)
|
||||
E.screen_loc = ui_equip_position(mymob)
|
||||
|
||||
if(ismob(mymob) && mymob.hud_used == src)
|
||||
show_hud(hud_version)
|
||||
|
||||
/datum/hud/proc/update_locked_slots()
|
||||
return
|
||||
/*
|
||||
The hud datum
|
||||
Used to show and hide huds for all the different mob types,
|
||||
including inventories and item quick actions.
|
||||
*/
|
||||
|
||||
// The default UI style is the first one in the list
|
||||
GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
"Midnight" = 'icons/mob/screen_midnight.dmi',
|
||||
"Retro" = 'icons/mob/screen_retro.dmi',
|
||||
"Plasmafire" = 'icons/mob/screen_plasmafire.dmi',
|
||||
"Slimecore" = 'icons/mob/screen_slimecore.dmi',
|
||||
"Operative" = 'icons/mob/screen_operative.dmi',
|
||||
"Clockwork" = 'icons/mob/screen_clockwork.dmi'
|
||||
))
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
return GLOB.available_ui_styles[ui_style] || GLOB.available_ui_styles[GLOB.available_ui_styles[1]]
|
||||
|
||||
/datum/hud
|
||||
var/mob/mymob
|
||||
|
||||
var/hud_shown = TRUE //Used for the HUD toggle (F12)
|
||||
var/hud_version = HUD_STYLE_STANDARD //Current displayed version of the HUD
|
||||
var/inventory_shown = FALSE //Equipped item inventory
|
||||
var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
|
||||
|
||||
var/obj/screen/ling/chems/lingchemdisplay
|
||||
var/obj/screen/ling/sting/lingstingdisplay
|
||||
|
||||
var/obj/screen/blobpwrdisplay
|
||||
|
||||
var/obj/screen/alien_plasma_display
|
||||
var/obj/screen/alien_queen_finder
|
||||
|
||||
var/obj/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
var/obj/screen/action_intent
|
||||
var/obj/screen/zone_select
|
||||
var/obj/screen/pull_icon
|
||||
var/obj/screen/rest_icon
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
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/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
|
||||
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = FALSE
|
||||
|
||||
var/obj/screen/healths
|
||||
var/obj/screen/healthdoll
|
||||
var/obj/screen/internals
|
||||
|
||||
// subtypes can override this to force a specific UI style
|
||||
var/ui_style
|
||||
|
||||
//Citadel stuff
|
||||
var/obj/screen/arousal
|
||||
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
|
||||
if (!ui_style)
|
||||
// will fall back to the default if any of these are null
|
||||
ui_style = ui_style2icon(owner.client && owner.client.prefs && owner.client.prefs.UI_style)
|
||||
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
if(mymob.client)
|
||||
hide_actions_toggle.locked = mymob.client.prefs.buttons_locked
|
||||
|
||||
hand_slots = list()
|
||||
|
||||
for(var/mytype in subtypesof(/obj/screen/plane_master))
|
||||
var/obj/screen/plane_master/instance = new mytype()
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
instance.backdrop(mymob)
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
mymob.hud_used = null
|
||||
|
||||
QDEL_NULL(hide_actions_toggle)
|
||||
QDEL_NULL(module_store_icon)
|
||||
QDEL_LIST(static_inventory)
|
||||
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
zone_select = null
|
||||
pull_icon = null
|
||||
|
||||
QDEL_LIST(toggleable_inventory)
|
||||
QDEL_LIST(hotkeybuttons)
|
||||
throw_icon = null
|
||||
QDEL_LIST(infodisplay)
|
||||
|
||||
healths = null
|
||||
healthdoll = null
|
||||
internals = null
|
||||
lingchemdisplay = null
|
||||
devilsouldisplay = null
|
||||
lingstingdisplay = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
alien_queen_finder = null
|
||||
|
||||
QDEL_LIST_ASSOC_VAL(plane_masters)
|
||||
QDEL_LIST(screenoverlays)
|
||||
mymob = null
|
||||
|
||||
return ..()
|
||||
|
||||
/mob
|
||||
var/hud_type = /datum/hud
|
||||
|
||||
/mob/proc/create_mob_hud()
|
||||
if(!client || hud_used)
|
||||
return
|
||||
hud_used = new hud_type(src)
|
||||
update_sight()
|
||||
SEND_SIGNAL(src, COMSIG_MOB_HUD_CREATED)
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0, mob/viewmob)
|
||||
if(!ismob(mymob))
|
||||
return FALSE
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client)
|
||||
return FALSE
|
||||
|
||||
screenmob.client.screen = list()
|
||||
screenmob.client.apply_clickcatcher()
|
||||
|
||||
var/display_hud_version = version
|
||||
if(!display_hud_version) //If 0 or blank, display the next hud version
|
||||
display_hud_version = hud_version + 1
|
||||
if(display_hud_version > HUD_VERSIONS) //If the requested version number is greater than the available versions, reset back to the first version
|
||||
display_hud_version = 1
|
||||
|
||||
switch(display_hud_version)
|
||||
if(HUD_STYLE_STANDARD) //Default HUD
|
||||
hud_shown = TRUE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen += static_inventory
|
||||
if(toggleable_inventory.len && screenmob.hud_used && screenmob.hud_used.inventory_shown)
|
||||
screenmob.client.screen += toggleable_inventory
|
||||
if(hotkeybuttons.len && !hotkey_ui_hidden)
|
||||
screenmob.client.screen += hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
screenmob.client.screen += hide_actions_toggle
|
||||
|
||||
if(action_intent)
|
||||
action_intent.screen_loc = initial(action_intent.screen_loc) //Restore intent selection to the original position
|
||||
|
||||
if(HUD_STYLE_REDUCED) //Reduced HUD
|
||||
hud_shown = FALSE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/hand = hand_slots[h]
|
||||
if(hand)
|
||||
screenmob.client.screen += hand
|
||||
if(action_intent)
|
||||
screenmob.client.screen += action_intent //we want the intent switcher visible
|
||||
action_intent.screen_loc = ui_acti_alt //move this to the alternative position, where zone_select usually is.
|
||||
|
||||
if(HUD_STYLE_NOHUD) //No HUD
|
||||
hud_shown = FALSE //Governs behavior of other procs
|
||||
if(static_inventory.len)
|
||||
screenmob.client.screen -= static_inventory
|
||||
if(toggleable_inventory.len)
|
||||
screenmob.client.screen -= toggleable_inventory
|
||||
if(hotkeybuttons.len)
|
||||
screenmob.client.screen -= hotkeybuttons
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen -= infodisplay
|
||||
|
||||
hud_version = display_hud_version
|
||||
persistent_inventory_update(screenmob)
|
||||
screenmob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
screenmob.reload_fullscreen()
|
||||
update_parallax_pref(screenmob)
|
||||
|
||||
// ensure observers get an accurate and up-to-date view
|
||||
if (!viewmob)
|
||||
plane_masters_update()
|
||||
for(var/M in mymob.observers)
|
||||
show_hud(hud_version, M)
|
||||
else if (viewmob.hud_used)
|
||||
viewmob.hud_used.plane_masters_update()
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/plane_masters_update()
|
||||
// Plane masters are always shown to OUR mob, never to observers
|
||||
for(var/thing in plane_masters)
|
||||
var/obj/screen/plane_master/PM = plane_masters[thing]
|
||||
PM.backdrop(mymob)
|
||||
mymob.client.screen += PM
|
||||
|
||||
/datum/hud/human/show_hud(version = 0,mob/viewmob)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
hidden_inventory_update(screenmob)
|
||||
|
||||
/datum/hud/robot/show_hud(version = 0, mob/viewmob)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/hidden_inventory_update()
|
||||
return
|
||||
|
||||
/datum/hud/proc/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
|
||||
/datum/hud/proc/update_ui_style(new_ui_style)
|
||||
// do nothing if overridden by a subtype or already on that style
|
||||
if (initial(ui_style) || ui_style == new_ui_style)
|
||||
return
|
||||
|
||||
for(var/atom/item in static_inventory + toggleable_inventory + hotkeybuttons + infodisplay + screenoverlays + inv_slots)
|
||||
if (item.icon == ui_style)
|
||||
item.icon = new_ui_style
|
||||
|
||||
ui_style = new_ui_style
|
||||
build_hand_slots()
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
set name = "F12"
|
||||
set hidden = TRUE
|
||||
|
||||
if(hud_used && client)
|
||||
hud_used.show_hud() //Shows the next hud preset
|
||||
to_chat(usr, "<span class ='info'>Switched HUD mode. Press F12 to toggle.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class ='warning'>This mob type does not use a HUD.</span>")
|
||||
|
||||
|
||||
//(re)builds the hand ui slots, throwing away old ones
|
||||
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||
//9/10 this is only called once per mob and only for 2 hands
|
||||
/datum/hud/proc/build_hand_slots()
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||
if(H)
|
||||
static_inventory -= H
|
||||
hand_slots = list()
|
||||
var/obj/screen/inventory/hand/hand_box
|
||||
for(var/i in 1 to mymob.held_items.len)
|
||||
hand_box = new /obj/screen/inventory/hand()
|
||||
hand_box.name = mymob.get_held_index_name(i)
|
||||
hand_box.icon = ui_style
|
||||
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
|
||||
hand_box.screen_loc = ui_hand_position(i)
|
||||
hand_box.held_index = i
|
||||
hand_slots["[i]"] = hand_box
|
||||
hand_box.hud = src
|
||||
static_inventory += hand_box
|
||||
hand_box.update_icon()
|
||||
|
||||
var/i = 1
|
||||
for(var/obj/screen/swap_hand/SH in static_inventory)
|
||||
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
|
||||
i++
|
||||
for(var/obj/screen/human/equip/E in static_inventory)
|
||||
E.screen_loc = ui_equip_position(mymob)
|
||||
|
||||
if(ismob(mymob) && mymob.hud_used == src)
|
||||
show_hud(hud_version)
|
||||
|
||||
/datum/hud/proc/update_locked_slots()
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,165 +1,165 @@
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner)
|
||||
..()
|
||||
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
|
||||
action_intent.hud = src
|
||||
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
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots()
|
||||
|
||||
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)
|
||||
using.hud = src
|
||||
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)
|
||||
using.hud = src
|
||||
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
|
||||
throw_icon.hud = src
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
internals.hud = src
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
healths.hud = src
|
||||
infodisplay += healths
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
pull_icon.hud = src
|
||||
pull_icon.update_icon()
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
lingchemdisplay.hud = src
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
lingstingdisplay.hud = src
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon()
|
||||
static_inventory += zone_select
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.hud = src
|
||||
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
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner)
|
||||
..()
|
||||
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
|
||||
action_intent.hud = src
|
||||
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
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_drop_throw
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots()
|
||||
|
||||
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)
|
||||
using.hud = src
|
||||
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)
|
||||
using.hud = src
|
||||
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
|
||||
throw_icon.hud = src
|
||||
hotkeybuttons += throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
internals.hud = src
|
||||
infodisplay += internals
|
||||
|
||||
healths = new /obj/screen/healths()
|
||||
healths.hud = src
|
||||
infodisplay += healths
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
pull_icon.hud = src
|
||||
pull_icon.update_icon()
|
||||
static_inventory += pull_icon
|
||||
|
||||
lingchemdisplay = new /obj/screen/ling/chems()
|
||||
lingchemdisplay.hud = src
|
||||
infodisplay += lingchemdisplay
|
||||
|
||||
lingstingdisplay = new /obj/screen/ling/sting()
|
||||
lingstingdisplay.hud = src
|
||||
infodisplay += lingstingdisplay
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon()
|
||||
static_inventory += zone_select
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
using = new /obj/screen/resist()
|
||||
using.icon = ui_style
|
||||
using.screen_loc = ui_pull_resist
|
||||
using.hud = src
|
||||
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
|
||||
|
||||
@@ -1,307 +1,307 @@
|
||||
/obj/screen/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/obj/screen/robot/module
|
||||
name = "cyborg module"
|
||||
icon_state = "nomod"
|
||||
|
||||
/obj/screen/robot/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/robot/module/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module.type != /obj/item/robot_module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
R.pick_module()
|
||||
|
||||
/obj/screen/robot/module1
|
||||
name = "module1"
|
||||
icon_state = "inv1"
|
||||
|
||||
/obj/screen/robot/module1/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(1)
|
||||
|
||||
/obj/screen/robot/module2
|
||||
name = "module2"
|
||||
icon_state = "inv2"
|
||||
|
||||
/obj/screen/robot/module2/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(2)
|
||||
|
||||
/obj/screen/robot/module3
|
||||
name = "module3"
|
||||
icon_state = "inv3"
|
||||
|
||||
/obj/screen/robot/module3/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
/obj/screen/robot/radio
|
||||
name = "radio"
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio.interact(R)
|
||||
|
||||
/obj/screen/robot/store
|
||||
name = "store"
|
||||
icon_state = "store"
|
||||
|
||||
/obj/screen/robot/store/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.uneq_active()
|
||||
|
||||
/obj/screen/robot/lamp
|
||||
name = "headlamp"
|
||||
icon_state = "lamp0"
|
||||
|
||||
/obj/screen/robot/lamp/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
/obj/screen/robot/thrusters
|
||||
name = "ion thrusters"
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/obj/screen/robot/sensors
|
||||
name = "Sensor Augmentation"
|
||||
icon_state = "cyborg_sensor"
|
||||
|
||||
/obj/screen/robot/sensors/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.toggle_sensors()
|
||||
|
||||
/obj/screen/robot/language_menu
|
||||
name = "silicon language selection"
|
||||
icon_state = "talk_wheel"
|
||||
|
||||
/obj/screen/robot/language_menu/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.open_language_menu(usr)
|
||||
|
||||
/datum/hud/robot
|
||||
ui_style = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/robot/language_menu
|
||||
using.screen_loc = ui_borg_language_menu
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen/robot/radio()
|
||||
using.screen_loc = ui_borg_radio
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Module select
|
||||
using = new /obj/screen/robot/module1()
|
||||
using.screen_loc = ui_inv1
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv1 = using
|
||||
|
||||
using = new /obj/screen/robot/module2()
|
||||
using.screen_loc = ui_inv2
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv2 = using
|
||||
|
||||
using = new /obj/screen/robot/module3()
|
||||
using.screen_loc = ui_inv3
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv3 = using
|
||||
|
||||
//End of module select
|
||||
|
||||
//Photography stuff
|
||||
using = new /obj/screen/ai/image_take()
|
||||
using.screen_loc = ui_borg_camera
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ai/image_view()
|
||||
using.screen_loc = ui_borg_album
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Sec/Med HUDs
|
||||
using = new /obj/screen/robot/sensors()
|
||||
using.screen_loc = ui_borg_sensor
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Headlamp control
|
||||
using = new /obj/screen/robot/lamp()
|
||||
using.screen_loc = ui_borg_lamp
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.lamp_button = using
|
||||
|
||||
//Thrusters
|
||||
using = new /obj/screen/robot/thrusters()
|
||||
using.screen_loc = ui_borg_thrusters
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.thruster_button = using
|
||||
|
||||
//Intent
|
||||
action_intent = new /obj/screen/act_intent/robot()
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
action_intent.hud = src
|
||||
static_inventory += action_intent
|
||||
|
||||
//Health
|
||||
healths = new /obj/screen/healths/robot()
|
||||
healths.hud = src
|
||||
infodisplay += healths
|
||||
|
||||
//Installed Module
|
||||
mymobR.hands = new /obj/screen/robot/module()
|
||||
mymobR.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymobR.hands
|
||||
|
||||
//Store
|
||||
module_store_icon = new /obj/screen/robot/store()
|
||||
module_store_icon.hud = src
|
||||
module_store_icon.screen_loc = ui_borg_store
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
pull_icon.hud = src
|
||||
pull_icon.update_icon()
|
||||
pull_icon.screen_loc = ui_borg_pull
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/robot()
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon()
|
||||
static_inventory += zone_select
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!iscyborg(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
R.shown_robot_modules = !R.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
||||
if(!iscyborg(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(!R.module)
|
||||
return
|
||||
|
||||
if(!R.client)
|
||||
return
|
||||
|
||||
if(R.shown_robot_modules && screenmob.hud_used.hud_shown)
|
||||
//Modules display is shown
|
||||
screenmob.client.screen += module_store_icon //"store" icon
|
||||
|
||||
if(!R.module.modules)
|
||||
to_chat(usr, "<span class='danger'>Selected module has no modules to select</span>")
|
||||
return
|
||||
|
||||
if(!R.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = CEILING(length(R.module.get_inactive_modules()) / 8, 1)
|
||||
R.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
screenmob.client.screen += R.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen += A
|
||||
if(x < 0)
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = ABOVE_HUD_LAYER
|
||||
A.plane = ABOVE_HUD_PLANE
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
x = -4
|
||||
y++
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
screenmob.client.screen -= module_store_icon //"store" icon
|
||||
|
||||
for(var/atom/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen -= A
|
||||
R.shown_robot_modules = 0
|
||||
screenmob.client.screen -= R.robot_modules_background
|
||||
|
||||
/datum/hud/robot/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
for(var/i in 1 to R.held_items.len)
|
||||
var/obj/item/I = R.held_items[i]
|
||||
if(I)
|
||||
switch(i)
|
||||
if(1)
|
||||
I.screen_loc = ui_inv1
|
||||
if(2)
|
||||
I.screen_loc = ui_inv2
|
||||
if(3)
|
||||
I.screen_loc = ui_inv3
|
||||
else
|
||||
return
|
||||
screenmob.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in R.held_items)
|
||||
screenmob.client.screen -= I
|
||||
/obj/screen/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/obj/screen/robot/module
|
||||
name = "cyborg module"
|
||||
icon_state = "nomod"
|
||||
|
||||
/obj/screen/robot/Click()
|
||||
if(isobserver(usr))
|
||||
return 1
|
||||
|
||||
/obj/screen/robot/module/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module.type != /obj/item/robot_module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
R.pick_module()
|
||||
|
||||
/obj/screen/robot/module1
|
||||
name = "module1"
|
||||
icon_state = "inv1"
|
||||
|
||||
/obj/screen/robot/module1/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(1)
|
||||
|
||||
/obj/screen/robot/module2
|
||||
name = "module2"
|
||||
icon_state = "inv2"
|
||||
|
||||
/obj/screen/robot/module2/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(2)
|
||||
|
||||
/obj/screen/robot/module3
|
||||
name = "module3"
|
||||
icon_state = "inv3"
|
||||
|
||||
/obj/screen/robot/module3/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_module(3)
|
||||
|
||||
/obj/screen/robot/radio
|
||||
name = "radio"
|
||||
icon_state = "radio"
|
||||
|
||||
/obj/screen/robot/radio/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.radio.interact(R)
|
||||
|
||||
/obj/screen/robot/store
|
||||
name = "store"
|
||||
icon_state = "store"
|
||||
|
||||
/obj/screen/robot/store/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.uneq_active()
|
||||
|
||||
/obj/screen/robot/lamp
|
||||
name = "headlamp"
|
||||
icon_state = "lamp0"
|
||||
|
||||
/obj/screen/robot/lamp/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_headlamp()
|
||||
|
||||
/obj/screen/robot/thrusters
|
||||
name = "ion thrusters"
|
||||
icon_state = "ionpulse0"
|
||||
|
||||
/obj/screen/robot/thrusters/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/obj/screen/robot/sensors
|
||||
name = "Sensor Augmentation"
|
||||
icon_state = "cyborg_sensor"
|
||||
|
||||
/obj/screen/robot/sensors/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.toggle_sensors()
|
||||
|
||||
/obj/screen/robot/language_menu
|
||||
name = "silicon language selection"
|
||||
icon_state = "talk_wheel"
|
||||
|
||||
/obj/screen/robot/language_menu/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.open_language_menu(usr)
|
||||
|
||||
/datum/hud/robot
|
||||
ui_style = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/robot/language_menu
|
||||
using.screen_loc = ui_borg_language_menu
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen/robot/radio()
|
||||
using.screen_loc = ui_borg_radio
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Module select
|
||||
using = new /obj/screen/robot/module1()
|
||||
using.screen_loc = ui_inv1
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv1 = using
|
||||
|
||||
using = new /obj/screen/robot/module2()
|
||||
using.screen_loc = ui_inv2
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv2 = using
|
||||
|
||||
using = new /obj/screen/robot/module3()
|
||||
using.screen_loc = ui_inv3
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.inv3 = using
|
||||
|
||||
//End of module select
|
||||
|
||||
//Photography stuff
|
||||
using = new /obj/screen/ai/image_take()
|
||||
using.screen_loc = ui_borg_camera
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ai/image_view()
|
||||
using.screen_loc = ui_borg_album
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Sec/Med HUDs
|
||||
using = new /obj/screen/robot/sensors()
|
||||
using.screen_loc = ui_borg_sensor
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
//Headlamp control
|
||||
using = new /obj/screen/robot/lamp()
|
||||
using.screen_loc = ui_borg_lamp
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.lamp_button = using
|
||||
|
||||
//Thrusters
|
||||
using = new /obj/screen/robot/thrusters()
|
||||
using.screen_loc = ui_borg_thrusters
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
mymobR.thruster_button = using
|
||||
|
||||
//Intent
|
||||
action_intent = new /obj/screen/act_intent/robot()
|
||||
action_intent.icon_state = mymob.a_intent
|
||||
action_intent.hud = src
|
||||
static_inventory += action_intent
|
||||
|
||||
//Health
|
||||
healths = new /obj/screen/healths/robot()
|
||||
healths.hud = src
|
||||
infodisplay += healths
|
||||
|
||||
//Installed Module
|
||||
mymobR.hands = new /obj/screen/robot/module()
|
||||
mymobR.hands.screen_loc = ui_borg_module
|
||||
static_inventory += mymobR.hands
|
||||
|
||||
//Store
|
||||
module_store_icon = new /obj/screen/robot/store()
|
||||
module_store_icon.hud = src
|
||||
module_store_icon.screen_loc = ui_borg_store
|
||||
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
|
||||
pull_icon.hud = src
|
||||
pull_icon.update_icon()
|
||||
pull_icon.screen_loc = ui_borg_pull
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/robot()
|
||||
zone_select.hud = src
|
||||
zone_select.update_icon()
|
||||
static_inventory += zone_select
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!iscyborg(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
R.shown_robot_modules = !R.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display(mob/viewer)
|
||||
if(!iscyborg(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(!R.module)
|
||||
return
|
||||
|
||||
if(!R.client)
|
||||
return
|
||||
|
||||
if(R.shown_robot_modules && screenmob.hud_used.hud_shown)
|
||||
//Modules display is shown
|
||||
screenmob.client.screen += module_store_icon //"store" icon
|
||||
|
||||
if(!R.module.modules)
|
||||
to_chat(usr, "<span class='danger'>Selected module has no modules to select</span>")
|
||||
return
|
||||
|
||||
if(!R.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = CEILING(length(R.module.get_inactive_modules()) / 8, 1)
|
||||
R.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
screenmob.client.screen += R.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen += A
|
||||
if(x < 0)
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = ABOVE_HUD_LAYER
|
||||
A.plane = ABOVE_HUD_PLANE
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
x = -4
|
||||
y++
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
screenmob.client.screen -= module_store_icon //"store" icon
|
||||
|
||||
for(var/atom/A in R.module.get_inactive_modules())
|
||||
//Module is not currently active
|
||||
screenmob.client.screen -= A
|
||||
R.shown_robot_modules = 0
|
||||
screenmob.client.screen -= R.robot_modules_background
|
||||
|
||||
/datum/hud/robot/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/silicon/robot/R = mymob
|
||||
|
||||
var/mob/screenmob = viewer || R
|
||||
|
||||
if(screenmob.hud_used)
|
||||
if(screenmob.hud_used.hud_shown)
|
||||
for(var/i in 1 to R.held_items.len)
|
||||
var/obj/item/I = R.held_items[i]
|
||||
if(I)
|
||||
switch(i)
|
||||
if(1)
|
||||
I.screen_loc = ui_inv1
|
||||
if(2)
|
||||
I.screen_loc = ui_inv2
|
||||
if(3)
|
||||
I.screen_loc = ui_inv3
|
||||
else
|
||||
return
|
||||
screenmob.client.screen += I
|
||||
else
|
||||
for(var/obj/item/I in R.held_items)
|
||||
screenmob.client.screen -= I
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,165 +1,167 @@
|
||||
|
||||
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!tool_attack_chain(user, target) && pre_attack(target, user, params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = target.attackby(src, user, params)
|
||||
if(!resolved && target && !QDELETED(src))
|
||||
afterattack(target, user, 1, params) // 1: clicking something Adjacent
|
||||
|
||||
|
||||
//Checks if the item can work as a tool, calling the appropriate tool behavior on the target
|
||||
/obj/item/proc/tool_attack_chain(mob/user, atom/target)
|
||||
if(!tool_behaviour)
|
||||
return FALSE
|
||||
|
||||
return target.tool_act(user, src, tool_behaviour)
|
||||
|
||||
|
||||
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
|
||||
return FALSE
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/attackby(obj/item/I, mob/living/user, params)
|
||||
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user))
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/living/user, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return I.attack(src, user)
|
||||
|
||||
|
||||
/obj/item/proc/attack(mob/living/M, mob/living/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK)
|
||||
return
|
||||
SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user)
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>") // CIT CHANGE - ditto
|
||||
return // CIT CHANGE - ditto
|
||||
|
||||
if(force && damtype != STAMINA && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
|
||||
if(!force)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)
|
||||
else if(hitsound)
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
|
||||
M.lastattacker = user.real_name
|
||||
M.lastattackerckey = user.ckey
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.attacked_by(src, user)
|
||||
|
||||
log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
add_fingerprint(user)
|
||||
|
||||
user.adjustStaminaLossBuffered(getweight()*0.8)//CIT CHANGE - makes attacking things cause stamina loss
|
||||
|
||||
//the equivalent of the standard version of attack() but for object targets.
|
||||
/obj/item/proc/attack_obj(obj/O, mob/living/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
|
||||
return
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>") // CIT CHANGE - ditto
|
||||
return // CIT CHANGE - ditto
|
||||
user.adjustStaminaLossBuffered(getweight()*1.2)//CIT CHANGE - makes attacking things cause stamina loss
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(O)
|
||||
O.attacked_by(src, user)
|
||||
|
||||
/atom/movable/proc/attacked_by()
|
||||
return
|
||||
|
||||
/obj/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
//only witnesses close by and the victim see a hit message.
|
||||
log_combat(user, src, "attacked", I)
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
send_item_attack_message(I, user)
|
||||
if(I.force)
|
||||
//CIT CHANGES START HERE - combatmode and resting checks
|
||||
var/totitemdamage = I.force
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/tempcarb = user
|
||||
if(!tempcarb.combatmode)
|
||||
totitemdamage *= 0.5
|
||||
if(user.resting)
|
||||
totitemdamage *= 0.5
|
||||
//CIT CHANGES END HERE
|
||||
apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage
|
||||
if(I.damtype == BRUTE && !HAS_TRAIT(src, TRAIT_NOMARROW))
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
C.bleed(totitemdamage)
|
||||
else
|
||||
add_splatter_floor(location)
|
||||
if(totitemdamage >= 10 && get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE //successful attack
|
||||
|
||||
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
|
||||
// Click parameters is the params string from byond Click() code, see that documentation.
|
||||
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters)
|
||||
SEND_SIGNAL(user, COMSIG_MOB_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters)
|
||||
|
||||
/obj/item/proc/get_clamped_volume()
|
||||
if(w_class)
|
||||
if(force)
|
||||
return CLAMP((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
|
||||
else
|
||||
return CLAMP(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
var/message_verb = "attacked"
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
else if(!I.force)
|
||||
return
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",\
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(hit_area == BODY_ZONE_HEAD)
|
||||
if(prob(2))
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/proc/getweight()
|
||||
return total_mass || w_class * 1.25
|
||||
|
||||
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
|
||||
if(!tool_attack_chain(user, target) && pre_attack(target, user, params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = target.attackby(src, user, params)
|
||||
if(!resolved && target && !QDELETED(src))
|
||||
afterattack(target, user, 1, params) // 1: clicking something Adjacent
|
||||
|
||||
|
||||
//Checks if the item can work as a tool, calling the appropriate tool behavior on the target
|
||||
/obj/item/proc/tool_attack_chain(mob/user, atom/target)
|
||||
if(!tool_behaviour)
|
||||
return FALSE
|
||||
|
||||
return target.tool_act(user, src, tool_behaviour)
|
||||
|
||||
|
||||
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
|
||||
return FALSE
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user, params)
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/attackby(obj/item/I, mob/living/user, params)
|
||||
return ..() || ((obj_flags & CAN_BE_HIT) && I.attack_obj(src, user))
|
||||
|
||||
/mob/living/attackby(obj/item/I, mob/living/user, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return I.attack(src, user)
|
||||
|
||||
|
||||
/obj/item/proc/attack(mob/living/M, mob/living/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK)
|
||||
return
|
||||
SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user)
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>") // CIT CHANGE - ditto
|
||||
return // CIT CHANGE - ditto
|
||||
|
||||
if(force && damtype != STAMINA && HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm other living beings!</span>")
|
||||
return
|
||||
|
||||
if(!force)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)
|
||||
else if(hitsound)
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
|
||||
M.lastattacker = user.real_name
|
||||
M.lastattackerckey = user.ckey
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.attacked_by(src, user)
|
||||
|
||||
log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
add_fingerprint(user)
|
||||
|
||||
user.adjustStaminaLossBuffered(getweight()*0.8)//CIT CHANGE - makes attacking things cause stamina loss
|
||||
|
||||
//the equivalent of the standard version of attack() but for object targets.
|
||||
/obj/item/proc/attack_obj(obj/O, mob/living/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
|
||||
return
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>") // CIT CHANGE - ditto
|
||||
return // CIT CHANGE - ditto
|
||||
user.adjustStaminaLossBuffered(getweight()*1.2)//CIT CHANGE - makes attacking things cause stamina loss
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(O)
|
||||
O.attacked_by(src, user)
|
||||
|
||||
/atom/movable/proc/attacked_by()
|
||||
return
|
||||
|
||||
/obj/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
//only witnesses close by and the victim see a hit message.
|
||||
log_combat(user, src, "attacked", I)
|
||||
take_damage(I.force, I.damtype, "melee", 1)
|
||||
|
||||
/mob/living/attacked_by(obj/item/I, mob/living/user)
|
||||
//CIT CHANGES START HERE - combatmode and resting checks
|
||||
var/totitemdamage = I.force
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/tempcarb = user
|
||||
if(!tempcarb.combatmode)
|
||||
totitemdamage *= 0.5
|
||||
if(user.resting)
|
||||
totitemdamage *= 0.5
|
||||
//CIT CHANGES END HERE
|
||||
if(user != src && check_shields(I, totitemdamage, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
|
||||
return FALSE
|
||||
send_item_attack_message(I, user)
|
||||
if(I.force)
|
||||
apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage
|
||||
if(I.damtype == BRUTE && !HAS_TRAIT(src, TRAIT_NOMARROW))
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
if(iscarbon(src))
|
||||
var/mob/living/carbon/C = src
|
||||
C.bleed(totitemdamage)
|
||||
else
|
||||
add_splatter_floor(location)
|
||||
if(totitemdamage >= 10 && get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
return TRUE //successful attack
|
||||
|
||||
/mob/living/simple_animal/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.force < force_threshold || I.damtype == STAMINA)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
|
||||
// Click parameters is the params string from byond Click() code, see that documentation.
|
||||
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters)
|
||||
SEND_SIGNAL(user, COMSIG_MOB_ITEM_AFTERATTACK, target, user, proximity_flag, click_parameters)
|
||||
|
||||
/obj/item/proc/get_clamped_volume()
|
||||
if(w_class)
|
||||
if(force)
|
||||
return CLAMP((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
|
||||
else
|
||||
return CLAMP(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
|
||||
var/message_verb = "attacked"
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
else if(!I.force)
|
||||
return
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",\
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(hit_area == BODY_ZONE_HEAD)
|
||||
if(prob(2))
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/proc/getweight()
|
||||
return total_mass || w_class * 1.25
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
|
||||
if(can_reenter_corpse && mind && mind.current)
|
||||
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
|
||||
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
|
||||
return // seems legit.
|
||||
|
||||
// Things you might plausibly want to follow
|
||||
if(ismovableatom(A))
|
||||
ManualFollow(A)
|
||||
|
||||
// Otherwise jump
|
||||
else if(A.loc)
|
||||
forceMove(get_turf(A))
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
if(check_click_intercept(params,A))
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"])
|
||||
ShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["alt"])
|
||||
altclick_listed_turf(A)
|
||||
return
|
||||
if(modifiers["ctrl"])
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(world.time <= next_move)
|
||||
return
|
||||
// You are responsible for checking config.ghost_interaction when you override this function
|
||||
// Not all of them require checking, see below
|
||||
A.attack_ghost(src)
|
||||
|
||||
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
if(user.client)
|
||||
if(IsAdminGhost(user))
|
||||
attack_ai(user)
|
||||
else if(user.client.prefs.inquisitive_ghost)
|
||||
user.examinate(src)
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_ghost(mob/dead/observer/user)
|
||||
if(user.client && user.health_scan)
|
||||
healthscan(user, src, 1, TRUE)
|
||||
return ..()
|
||||
|
||||
// ---------------------------------------
|
||||
// And here are some good things for free:
|
||||
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
|
||||
|
||||
/obj/machinery/gateway/centerstation/attack_ghost(mob/user)
|
||||
if(awaygate)
|
||||
user.forceMove(awaygate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
|
||||
if(stationgate)
|
||||
user.forceMove(stationgate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user)
|
||||
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
|
||||
user.forceMove(get_turf(power_station.teleporter_console.target))
|
||||
return ..()
|
||||
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
|
||||
if(can_reenter_corpse && mind && mind.current)
|
||||
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
|
||||
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
|
||||
return // seems legit.
|
||||
|
||||
// Things you might plausibly want to follow
|
||||
if(ismovableatom(A))
|
||||
ManualFollow(A)
|
||||
|
||||
// Otherwise jump
|
||||
else if(A.loc)
|
||||
forceMove(get_turf(A))
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/dead/observer/ClickOn(var/atom/A, var/params)
|
||||
if(check_click_intercept(params,A))
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"])
|
||||
ShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["alt"])
|
||||
altclick_listed_turf(A)
|
||||
return
|
||||
if(modifiers["ctrl"])
|
||||
CtrlClickOn(A)
|
||||
return
|
||||
|
||||
if(world.time <= next_move)
|
||||
return
|
||||
// You are responsible for checking config.ghost_interaction when you override this function
|
||||
// Not all of them require checking, see below
|
||||
A.attack_ghost(src)
|
||||
|
||||
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
if(user.client)
|
||||
if(IsAdminGhost(user))
|
||||
attack_ai(user)
|
||||
else if(user.client.prefs.inquisitive_ghost)
|
||||
user.examinate(src)
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_ghost(mob/dead/observer/user)
|
||||
if(user.client && user.health_scan)
|
||||
healthscan(user, src, 1, TRUE)
|
||||
return ..()
|
||||
|
||||
// ---------------------------------------
|
||||
// And here are some good things for free:
|
||||
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
|
||||
|
||||
/obj/machinery/gateway/centerstation/attack_ghost(mob/user)
|
||||
if(awaygate)
|
||||
user.forceMove(awaygate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
|
||||
if(stationgate)
|
||||
user.forceMove(stationgate.loc)
|
||||
else
|
||||
to_chat(user, "[src] has no destination.")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/teleport/hub/attack_ghost(mob/user)
|
||||
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
|
||||
user.forceMove(get_turf(power_station.teleporter_console.target))
|
||||
return ..()
|
||||
|
||||
@@ -1,258 +1,260 @@
|
||||
/*
|
||||
Humans:
|
||||
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
||||
|
||||
Otherwise pretty standard.
|
||||
*/
|
||||
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
|
||||
|
||||
if(!has_active_hand()) //can't attack without a hand.
|
||||
to_chat(src, "<span class='notice'>You look at your arm and sigh.</span>")
|
||||
return
|
||||
|
||||
// Special glove functions:
|
||||
// If the gloves do anything, have them return 1 to stop
|
||||
// normal attack_hand() here.
|
||||
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
||||
if(proximity && istype(G) && G.Touch(A,1))
|
||||
return
|
||||
|
||||
var/override = 0
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
override += HM.on_attack_hand(src, A, proximity)
|
||||
|
||||
if(override)
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
A.attack_hand(src)
|
||||
|
||||
//Return TRUE to cancel other attack hand effects that respect it.
|
||||
/atom/proc/attack_hand(mob/user)
|
||||
. = FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
||||
add_fingerprint(user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
. = TRUE
|
||||
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
||||
. = _try_interact(user)
|
||||
|
||||
//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
|
||||
/atom/proc/_try_interact(mob/user)
|
||||
if(IsAdminGhost(user)) //admin abuse
|
||||
return interact(user)
|
||||
if(can_interact(user))
|
||||
return interact(user)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/can_interact(mob/user)
|
||||
if(!user.can_interact_with(src))
|
||||
return FALSE
|
||||
if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/atom/ui_status(mob/user)
|
||||
. = ..()
|
||||
if(!can_interact(user))
|
||||
. = min(., UI_UPDATE)
|
||||
|
||||
/atom/movable/can_interact(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!anchored && (interaction_flags_atom & INTERACT_ATOM_REQUIRES_ANCHORED))
|
||||
return FALSE
|
||||
|
||||
/atom/proc/interact(mob/user)
|
||||
if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT)
|
||||
add_hiddenprint(user)
|
||||
else
|
||||
add_fingerprint(user)
|
||||
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
|
||||
return ui_interact(user)
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
|
||||
. = ..()
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if(istype(G) && G.Touch(A,0)) // for magic gloves
|
||||
return
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_ranged_attack(src, A, mouseparams)
|
||||
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
src.Move_Pulled(A)
|
||||
return
|
||||
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Monkeys
|
||||
*/
|
||||
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
|
||||
A.attack_paw(src)
|
||||
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Monkey RestrainedClickOn() was apparently the
|
||||
one and only use of all of the restrained click code
|
||||
(except to stop you from doing things while handcuffed);
|
||||
moving it here instead of various hand_p's has simplified
|
||||
things considerably
|
||||
*/
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
||||
if(..())
|
||||
return
|
||||
if(a_intent != INTENT_HARM || !ismob(A))
|
||||
return
|
||||
if(is_muzzled())
|
||||
return
|
||||
var/mob/living/carbon/ML = A
|
||||
if(istype(ML))
|
||||
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(ML))
|
||||
var/mob/living/carbon/human/H = ML
|
||||
affecting = H.get_bodypart(ran_zone(dam_zone))
|
||||
var/armor = ML.run_armor_check(affecting, "melee")
|
||||
if(prob(75))
|
||||
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
|
||||
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
|
||||
"<span class='userdanger'>[name] bites [ML]!</span>")
|
||||
if(armor >= 2)
|
||||
return
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
ML.ForceContractDisease(D)
|
||||
else
|
||||
ML.visible_message("<span class='danger'>[src] has attempted to bite [ML]!</span>")
|
||||
|
||||
/*
|
||||
Aliens
|
||||
Defaults to same as monkey in most places
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
|
||||
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
// Babby aliens
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
||||
A.attack_larva(src)
|
||||
/atom/proc/attack_larva(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Slimes
|
||||
Nothing happening here
|
||||
*/
|
||||
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
||||
A.attack_slime(src)
|
||||
/atom/proc/attack_slime(mob/user)
|
||||
return
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Drones
|
||||
*/
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||
A.attack_drone(src)
|
||||
|
||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||
attack_hand(user) //defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
|
||||
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
True Devil
|
||||
*/
|
||||
|
||||
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
/*
|
||||
Brain
|
||||
*/
|
||||
|
||||
/mob/living/brain/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
pAI
|
||||
*/
|
||||
|
||||
/mob/living/silicon/pai/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Simple animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||
if(!dextrous)
|
||||
return ..()
|
||||
if(!ismob(A))
|
||||
A.attack_hand(src)
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/*
|
||||
Hostile animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
if(dextrous && !ismob(A))
|
||||
..()
|
||||
else
|
||||
AttackingTarget()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
New Players:
|
||||
Have no reason to click on anything at all.
|
||||
*/
|
||||
/mob/dead/new_player/ClickOn()
|
||||
return
|
||||
/*
|
||||
Humans:
|
||||
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
||||
|
||||
Otherwise pretty standard.
|
||||
*/
|
||||
/mob/living/carbon/human/UnarmedAttack(atom/A, proximity)
|
||||
|
||||
if(!has_active_hand()) //can't attack without a hand.
|
||||
to_chat(src, "<span class='notice'>You look at your arm and sigh.</span>")
|
||||
return
|
||||
|
||||
// Special glove functions:
|
||||
// If the gloves do anything, have them return 1 to stop
|
||||
// normal attack_hand() here.
|
||||
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
|
||||
if(proximity && istype(G) && G.Touch(A,1))
|
||||
return
|
||||
|
||||
var/override = 0
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
override += HM.on_attack_hand(src, A, proximity)
|
||||
|
||||
if(override)
|
||||
return
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
A.attack_hand(src)
|
||||
|
||||
//Return TRUE to cancel other attack hand effects that respect it.
|
||||
/atom/proc/attack_hand(mob/user)
|
||||
. = FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
||||
add_fingerprint(user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
. = TRUE
|
||||
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
||||
. = _try_interact(user)
|
||||
|
||||
//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
|
||||
/atom/proc/_try_interact(mob/user)
|
||||
if(IsAdminGhost(user)) //admin abuse
|
||||
return interact(user)
|
||||
if(can_interact(user))
|
||||
return interact(user)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/can_interact(mob/user)
|
||||
if(!user.can_interact_with(src))
|
||||
return FALSE
|
||||
if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/atom/ui_status(mob/user)
|
||||
. = ..()
|
||||
if(!can_interact(user))
|
||||
. = min(., UI_UPDATE)
|
||||
|
||||
/atom/movable/can_interact(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!anchored && (interaction_flags_atom & INTERACT_ATOM_REQUIRES_ANCHORED))
|
||||
return FALSE
|
||||
|
||||
/atom/proc/interact(mob/user)
|
||||
if(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_INTERACT)
|
||||
add_hiddenprint(user)
|
||||
else
|
||||
add_fingerprint(user)
|
||||
if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT)
|
||||
return ui_interact(user)
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/RestrainedClickOn(var/atom/A) ---carbons will handle this
|
||||
return
|
||||
*/
|
||||
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
|
||||
. = ..()
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
if(istype(G) && G.Touch(A,0)) // for magic gloves
|
||||
return
|
||||
if (istype(glasses) && glasses.ranged_attack(src,A,mouseparams))
|
||||
return
|
||||
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_ranged_attack(src, A, mouseparams)
|
||||
|
||||
if(isturf(A) && get_dist(src,A) <= 1)
|
||||
src.Move_Pulled(A)
|
||||
return
|
||||
|
||||
/*
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
A.attack_animal(src)
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
/*
|
||||
Monkeys
|
||||
*/
|
||||
/mob/living/carbon/monkey/UnarmedAttack(atom/A)
|
||||
A.attack_paw(src)
|
||||
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Monkey RestrainedClickOn() was apparently the
|
||||
one and only use of all of the restrained click code
|
||||
(except to stop you from doing things while handcuffed);
|
||||
moving it here instead of various hand_p's has simplified
|
||||
things considerably
|
||||
*/
|
||||
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
|
||||
if(..())
|
||||
return
|
||||
if(a_intent != INTENT_HARM || !ismob(A))
|
||||
return
|
||||
if(is_muzzled())
|
||||
return
|
||||
var/mob/living/carbon/ML = A
|
||||
if(istype(ML))
|
||||
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(ML))
|
||||
var/mob/living/carbon/human/H = ML
|
||||
affecting = H.get_bodypart(ran_zone(dam_zone))
|
||||
var/armor = ML.run_armor_check(affecting, "melee")
|
||||
if(prob(75))
|
||||
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
|
||||
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
|
||||
"<span class='userdanger'>[name] bites [ML]!</span>")
|
||||
if(armor >= 2)
|
||||
return
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
ML.ForceContractDisease(D)
|
||||
else
|
||||
ML.visible_message("<span class='danger'>[src] has attempted to bite [ML]!</span>")
|
||||
|
||||
/*
|
||||
Aliens
|
||||
Defaults to same as monkey in most places
|
||||
*/
|
||||
/mob/living/carbon/alien/UnarmedAttack(atom/A)
|
||||
A.attack_alien(src)
|
||||
|
||||
/atom/proc/attack_alien(mob/living/carbon/alien/user)
|
||||
attack_paw(user)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
// Babby aliens
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
||||
A.attack_larva(src)
|
||||
/atom/proc/attack_larva(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Slimes
|
||||
Nothing happening here
|
||||
*/
|
||||
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
||||
A.attack_slime(src)
|
||||
/atom/proc/attack_slime(mob/user)
|
||||
return
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Drones
|
||||
*/
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||
A.attack_drone(src)
|
||||
|
||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||
attack_hand(user) //defaults to attack_hand. Override it when you don't want drones to do same stuff as humans.
|
||||
|
||||
/mob/living/simple_animal/slime/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
True Devil
|
||||
*/
|
||||
|
||||
/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity)
|
||||
A.attack_hand(src)
|
||||
|
||||
/*
|
||||
Brain
|
||||
*/
|
||||
|
||||
/mob/living/brain/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
pAI
|
||||
*/
|
||||
|
||||
/mob/living/silicon/pai/UnarmedAttack(atom/A)//Stops runtimes due to attack_animal being the default
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
Simple animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||
if(!dextrous)
|
||||
return ..()
|
||||
if(!ismob(A))
|
||||
A.attack_hand(src)
|
||||
update_inv_hands()
|
||||
|
||||
|
||||
/*
|
||||
Hostile animals
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
target = A
|
||||
if(dextrous && !ismob(A))
|
||||
..()
|
||||
else
|
||||
AttackingTarget()
|
||||
|
||||
|
||||
|
||||
/*
|
||||
New Players:
|
||||
Have no reason to click on anything at all.
|
||||
*/
|
||||
/mob/dead/new_player/ClickOn()
|
||||
return
|
||||
|
||||
@@ -1,240 +1,240 @@
|
||||
#define VALUE_MODE_NUM 0
|
||||
#define VALUE_MODE_TEXT 1
|
||||
#define VALUE_MODE_FLAG 2
|
||||
#define VALUE_MODE_NUM_LIST 3
|
||||
|
||||
#define KEY_MODE_TEXT 0
|
||||
#define KEY_MODE_TYPE 1
|
||||
|
||||
/datum/config_entry
|
||||
var/name //read-only, this is determined by the last portion of the derived entry type
|
||||
var/config_entry_value
|
||||
var/default //read-only, just set value directly
|
||||
|
||||
var/resident_file //the file which this was loaded from, if any
|
||||
var/modified = FALSE //set to TRUE if the default has been overridden by a config entry
|
||||
|
||||
var/deprecated_by //the /datum/config_entry type that supercedes this one
|
||||
|
||||
var/protection = NONE
|
||||
var/abstract_type = /datum/config_entry //do not instantiate if type matches this
|
||||
|
||||
var/vv_VAS = TRUE //Force validate and set on VV. VAS proccall guard will run regardless.
|
||||
var/postload_required = FALSE //requires running OnPostload()
|
||||
|
||||
var/dupes_allowed = FALSE
|
||||
|
||||
/datum/config_entry/New()
|
||||
if(type == abstract_type)
|
||||
CRASH("Abstract config entry [type] instatiated!")
|
||||
name = lowertext(type2top(type))
|
||||
if(islist(config_entry_value))
|
||||
var/list/L = config_entry_value
|
||||
default = L.Copy()
|
||||
else
|
||||
default = config_entry_value
|
||||
|
||||
/datum/config_entry/Destroy()
|
||||
config.RemoveEntry(src)
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/can_vv_get(var_name)
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, config_entry_value) || var_name == NAMEOF(src, default))
|
||||
. &= !(protection & CONFIG_ENTRY_HIDDEN)
|
||||
|
||||
/datum/config_entry/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list(NAMEOF(src, name), NAMEOF(src, vv_VAS), NAMEOF(src, default), NAMEOF(src, resident_file), NAMEOF(src, protection), NAMEOF(src, abstract_type), NAMEOF(src, modified), NAMEOF(src, dupes_allowed))
|
||||
if(var_name == NAMEOF(src, config_entry_value))
|
||||
if(protection & CONFIG_ENTRY_LOCKED)
|
||||
return FALSE
|
||||
if(vv_VAS)
|
||||
. = ValidateAndSet("[var_value]")
|
||||
if(.)
|
||||
datum_flags |= DF_VAR_EDITED
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
if(var_name in banned_edits)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/proc/VASProcCallGuard(str_val)
|
||||
. = !((protection & CONFIG_ENTRY_LOCKED) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "ValidateAndSet" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
if(!.)
|
||||
log_admin_private("Config set of [type] to [str_val] attempted by [key_name(usr)]")
|
||||
|
||||
/datum/config_entry/proc/ValidateAndSet(str_val)
|
||||
VASProcCallGuard(str_val)
|
||||
CRASH("Invalid config entry type!")
|
||||
|
||||
/datum/config_entry/proc/ValidateListEntry(key_name, key_value)
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/proc/DeprecationUpdate(value)
|
||||
return
|
||||
|
||||
/datum/config_entry/proc/OnPostload()
|
||||
return
|
||||
|
||||
/datum/config_entry/string
|
||||
config_entry_value = ""
|
||||
abstract_type = /datum/config_entry/string
|
||||
var/auto_trim = TRUE
|
||||
|
||||
/datum/config_entry/string/vv_edit_var(var_name, var_value)
|
||||
return var_name != "auto_trim" && ..()
|
||||
|
||||
/datum/config_entry/string/ValidateAndSet(str_val, during_load)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
config_entry_value = auto_trim ? trim(str_val) : str_val
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/number
|
||||
config_entry_value = 0
|
||||
abstract_type = /datum/config_entry/number
|
||||
var/integer = TRUE
|
||||
var/max_val = INFINITY
|
||||
var/min_val = -INFINITY
|
||||
|
||||
/datum/config_entry/number/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
var/temp = text2num(trim(str_val))
|
||||
if(!isnull(temp))
|
||||
config_entry_value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
|
||||
if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED))
|
||||
log_config("Changing [name] from [temp] to [config_entry_value]!")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/config_entry/number/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list("max_val", "min_val", "integer")
|
||||
return !(var_name in banned_edits) && ..()
|
||||
|
||||
/datum/config_entry/flag
|
||||
config_entry_value = FALSE
|
||||
abstract_type = /datum/config_entry/flag
|
||||
|
||||
/datum/config_entry/flag/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
config_entry_value = text2num(trim(str_val)) != 0
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/number_list
|
||||
abstract_type = /datum/config_entry/number_list
|
||||
config_entry_value = list()
|
||||
|
||||
/datum/config_entry/number_list/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
str_val = trim(str_val)
|
||||
var/list/new_list = list()
|
||||
var/list/values = splittext(str_val," ")
|
||||
for(var/I in values)
|
||||
var/temp = text2num(I)
|
||||
if(isnull(temp))
|
||||
return FALSE
|
||||
new_list += temp
|
||||
if(!new_list.len)
|
||||
return FALSE
|
||||
config_entry_value = new_list
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/keyed_list
|
||||
abstract_type = /datum/config_entry/keyed_list
|
||||
config_entry_value = list()
|
||||
dupes_allowed = TRUE
|
||||
vv_VAS = FALSE //VAS will not allow things like deleting from lists, it'll just bug horribly.
|
||||
var/key_mode
|
||||
var/value_mode
|
||||
var/splitter = " "
|
||||
var/lowercase = TRUE
|
||||
|
||||
/datum/config_entry/keyed_list/New()
|
||||
. = ..()
|
||||
if(isnull(key_mode) || isnull(value_mode))
|
||||
CRASH("Keyed list of type [type] created with null key or value mode!")
|
||||
|
||||
/datum/config_entry/keyed_list/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
|
||||
str_val = trim(str_val)
|
||||
var/key_pos = findtext(str_val, splitter)
|
||||
var/key_name = null
|
||||
var/key_value = null
|
||||
|
||||
if(key_pos || value_mode == VALUE_MODE_FLAG)
|
||||
key_name = copytext(str_val, 1, key_pos)
|
||||
if(lowercase)
|
||||
key_name = lowertext(key_name)
|
||||
key_value = copytext(str_val, key_pos + 1)
|
||||
var/new_key
|
||||
var/new_value
|
||||
var/continue_check_value
|
||||
var/continue_check_key
|
||||
switch(key_mode)
|
||||
if(KEY_MODE_TEXT)
|
||||
new_key = key_name
|
||||
continue_check_key = new_key
|
||||
if(KEY_MODE_TYPE)
|
||||
new_key = key_name
|
||||
if(!ispath(new_key))
|
||||
new_key = text2path(new_key)
|
||||
continue_check_key = ispath(new_key)
|
||||
switch(value_mode)
|
||||
if(VALUE_MODE_FLAG)
|
||||
new_value = TRUE
|
||||
continue_check_value = TRUE
|
||||
if(VALUE_MODE_NUM)
|
||||
new_value = text2num(key_value)
|
||||
continue_check_value = !isnull(new_value)
|
||||
if(VALUE_MODE_TEXT)
|
||||
new_value = key_value
|
||||
continue_check_value = new_value
|
||||
if(VALUE_MODE_NUM_LIST)
|
||||
// this is all copy+pasted from number list up there, but it's super basic so I don't see it being changed soon
|
||||
var/list/new_list = list()
|
||||
var/list/values = splittext(key_value," ")
|
||||
for(var/I in values)
|
||||
var/temp = text2num(I)
|
||||
if(isnull(temp))
|
||||
log_admin("invalid number list entry in [key_name]: [I]")
|
||||
continue_check_value = FALSE
|
||||
new_list += temp
|
||||
new_value = new_list
|
||||
continue_check_value = new_list.len
|
||||
if(continue_check_value && continue_check_key && ValidateListEntry(new_key, new_value))
|
||||
config_entry_value[new_key] = new_value
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
|
||||
return var_name != "splitter" && ..()
|
||||
|
||||
//snowflake for donator things being on one line smh
|
||||
/datum/config_entry/multi_keyed_flag
|
||||
vv_VAS = FALSE
|
||||
abstract_type = /datum/config_entry/multi_keyed_flag
|
||||
config_entry_value = list()
|
||||
var/delimiter = "|"
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, delimiter))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
str_val = trim(str_val)
|
||||
var/list/keys = splittext(str_val, delimiter)
|
||||
for(var/i in keys)
|
||||
config_entry_value[process_key(i)] = TRUE
|
||||
return length(keys)? TRUE : FALSE
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/proc/process_key(key)
|
||||
return trim(key)
|
||||
#define VALUE_MODE_NUM 0
|
||||
#define VALUE_MODE_TEXT 1
|
||||
#define VALUE_MODE_FLAG 2
|
||||
#define VALUE_MODE_NUM_LIST 3
|
||||
|
||||
#define KEY_MODE_TEXT 0
|
||||
#define KEY_MODE_TYPE 1
|
||||
|
||||
/datum/config_entry
|
||||
var/name //read-only, this is determined by the last portion of the derived entry type
|
||||
var/config_entry_value
|
||||
var/default //read-only, just set value directly
|
||||
|
||||
var/resident_file //the file which this was loaded from, if any
|
||||
var/modified = FALSE //set to TRUE if the default has been overridden by a config entry
|
||||
|
||||
var/deprecated_by //the /datum/config_entry type that supercedes this one
|
||||
|
||||
var/protection = NONE
|
||||
var/abstract_type = /datum/config_entry //do not instantiate if type matches this
|
||||
|
||||
var/vv_VAS = TRUE //Force validate and set on VV. VAS proccall guard will run regardless.
|
||||
var/postload_required = FALSE //requires running OnPostload()
|
||||
|
||||
var/dupes_allowed = FALSE
|
||||
|
||||
/datum/config_entry/New()
|
||||
if(type == abstract_type)
|
||||
CRASH("Abstract config entry [type] instatiated!")
|
||||
name = lowertext(type2top(type))
|
||||
if(islist(config_entry_value))
|
||||
var/list/L = config_entry_value
|
||||
default = L.Copy()
|
||||
else
|
||||
default = config_entry_value
|
||||
|
||||
/datum/config_entry/Destroy()
|
||||
config.RemoveEntry(src)
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/can_vv_get(var_name)
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, config_entry_value) || var_name == NAMEOF(src, default))
|
||||
. &= !(protection & CONFIG_ENTRY_HIDDEN)
|
||||
|
||||
/datum/config_entry/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list(NAMEOF(src, name), NAMEOF(src, vv_VAS), NAMEOF(src, default), NAMEOF(src, resident_file), NAMEOF(src, protection), NAMEOF(src, abstract_type), NAMEOF(src, modified), NAMEOF(src, dupes_allowed))
|
||||
if(var_name == NAMEOF(src, config_entry_value))
|
||||
if(protection & CONFIG_ENTRY_LOCKED)
|
||||
return FALSE
|
||||
if(vv_VAS)
|
||||
. = ValidateAndSet("[var_value]")
|
||||
if(.)
|
||||
datum_flags |= DF_VAR_EDITED
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
if(var_name in banned_edits)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/proc/VASProcCallGuard(str_val)
|
||||
. = !((protection & CONFIG_ENTRY_LOCKED) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "ValidateAndSet" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
if(!.)
|
||||
log_admin_private("Config set of [type] to [str_val] attempted by [key_name(usr)]")
|
||||
|
||||
/datum/config_entry/proc/ValidateAndSet(str_val)
|
||||
VASProcCallGuard(str_val)
|
||||
CRASH("Invalid config entry type!")
|
||||
|
||||
/datum/config_entry/proc/ValidateListEntry(key_name, key_value)
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/proc/DeprecationUpdate(value)
|
||||
return
|
||||
|
||||
/datum/config_entry/proc/OnPostload()
|
||||
return
|
||||
|
||||
/datum/config_entry/string
|
||||
config_entry_value = ""
|
||||
abstract_type = /datum/config_entry/string
|
||||
var/auto_trim = TRUE
|
||||
|
||||
/datum/config_entry/string/vv_edit_var(var_name, var_value)
|
||||
return var_name != "auto_trim" && ..()
|
||||
|
||||
/datum/config_entry/string/ValidateAndSet(str_val, during_load)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
config_entry_value = auto_trim ? trim(str_val) : str_val
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/number
|
||||
config_entry_value = 0
|
||||
abstract_type = /datum/config_entry/number
|
||||
var/integer = TRUE
|
||||
var/max_val = INFINITY
|
||||
var/min_val = -INFINITY
|
||||
|
||||
/datum/config_entry/number/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
var/temp = text2num(trim(str_val))
|
||||
if(!isnull(temp))
|
||||
config_entry_value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
|
||||
if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED))
|
||||
log_config("Changing [name] from [temp] to [config_entry_value]!")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/config_entry/number/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list("max_val", "min_val", "integer")
|
||||
return !(var_name in banned_edits) && ..()
|
||||
|
||||
/datum/config_entry/flag
|
||||
config_entry_value = FALSE
|
||||
abstract_type = /datum/config_entry/flag
|
||||
|
||||
/datum/config_entry/flag/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
config_entry_value = text2num(trim(str_val)) != 0
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/number_list
|
||||
abstract_type = /datum/config_entry/number_list
|
||||
config_entry_value = list()
|
||||
|
||||
/datum/config_entry/number_list/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
str_val = trim(str_val)
|
||||
var/list/new_list = list()
|
||||
var/list/values = splittext(str_val," ")
|
||||
for(var/I in values)
|
||||
var/temp = text2num(I)
|
||||
if(isnull(temp))
|
||||
return FALSE
|
||||
new_list += temp
|
||||
if(!new_list.len)
|
||||
return FALSE
|
||||
config_entry_value = new_list
|
||||
return TRUE
|
||||
|
||||
/datum/config_entry/keyed_list
|
||||
abstract_type = /datum/config_entry/keyed_list
|
||||
config_entry_value = list()
|
||||
dupes_allowed = TRUE
|
||||
vv_VAS = FALSE //VAS will not allow things like deleting from lists, it'll just bug horribly.
|
||||
var/key_mode
|
||||
var/value_mode
|
||||
var/splitter = " "
|
||||
var/lowercase = TRUE
|
||||
|
||||
/datum/config_entry/keyed_list/New()
|
||||
. = ..()
|
||||
if(isnull(key_mode) || isnull(value_mode))
|
||||
CRASH("Keyed list of type [type] created with null key or value mode!")
|
||||
|
||||
/datum/config_entry/keyed_list/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
|
||||
str_val = trim(str_val)
|
||||
var/key_pos = findtext(str_val, splitter)
|
||||
var/key_name = null
|
||||
var/key_value = null
|
||||
|
||||
if(key_pos || value_mode == VALUE_MODE_FLAG)
|
||||
key_name = copytext(str_val, 1, key_pos)
|
||||
if(lowercase)
|
||||
key_name = lowertext(key_name)
|
||||
key_value = copytext(str_val, key_pos + 1)
|
||||
var/new_key
|
||||
var/new_value
|
||||
var/continue_check_value
|
||||
var/continue_check_key
|
||||
switch(key_mode)
|
||||
if(KEY_MODE_TEXT)
|
||||
new_key = key_name
|
||||
continue_check_key = new_key
|
||||
if(KEY_MODE_TYPE)
|
||||
new_key = key_name
|
||||
if(!ispath(new_key))
|
||||
new_key = text2path(new_key)
|
||||
continue_check_key = ispath(new_key)
|
||||
switch(value_mode)
|
||||
if(VALUE_MODE_FLAG)
|
||||
new_value = TRUE
|
||||
continue_check_value = TRUE
|
||||
if(VALUE_MODE_NUM)
|
||||
new_value = text2num(key_value)
|
||||
continue_check_value = !isnull(new_value)
|
||||
if(VALUE_MODE_TEXT)
|
||||
new_value = key_value
|
||||
continue_check_value = new_value
|
||||
if(VALUE_MODE_NUM_LIST)
|
||||
// this is all copy+pasted from number list up there, but it's super basic so I don't see it being changed soon
|
||||
var/list/new_list = list()
|
||||
var/list/values = splittext(key_value," ")
|
||||
for(var/I in values)
|
||||
var/temp = text2num(I)
|
||||
if(isnull(temp))
|
||||
log_admin("invalid number list entry in [key_name]: [I]")
|
||||
continue_check_value = FALSE
|
||||
new_list += temp
|
||||
new_value = new_list
|
||||
continue_check_value = new_list.len
|
||||
if(continue_check_value && continue_check_key && ValidateListEntry(new_key, new_value))
|
||||
config_entry_value[new_key] = new_value
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
|
||||
return var_name != "splitter" && ..()
|
||||
|
||||
//snowflake for donator things being on one line smh
|
||||
/datum/config_entry/multi_keyed_flag
|
||||
vv_VAS = FALSE
|
||||
abstract_type = /datum/config_entry/multi_keyed_flag
|
||||
config_entry_value = list()
|
||||
var/delimiter = "|"
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, delimiter))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
str_val = trim(str_val)
|
||||
var/list/keys = splittext(str_val, delimiter)
|
||||
for(var/i in keys)
|
||||
config_entry_value[process_key(i)] = TRUE
|
||||
return length(keys)? TRUE : FALSE
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/proc/process_key(key)
|
||||
return trim(key)
|
||||
|
||||
@@ -1,371 +1,384 @@
|
||||
/datum/controller/configuration
|
||||
name = "Configuration"
|
||||
|
||||
var/directory = "config"
|
||||
|
||||
var/warned_deprecated_configs = FALSE
|
||||
var/hiding_entries_by_type = TRUE //Set for readability, admins can set this to FALSE if they want to debug it
|
||||
var/list/entries
|
||||
var/list/entries_by_type
|
||||
|
||||
var/list/maplist
|
||||
var/datum/map_config/defaultmap
|
||||
|
||||
var/list/modes // allowed modes
|
||||
var/list/gamemode_cache
|
||||
var/list/votable_modes // votable modes
|
||||
var/list/mode_names
|
||||
var/list/mode_reports
|
||||
var/list/mode_false_report_weight
|
||||
|
||||
var/motd
|
||||
|
||||
/datum/controller/configuration/proc/admin_reload()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
log_admin("[key_name_admin(usr)] has forcefully reloaded the configuration from disk.")
|
||||
message_admins("[key_name_admin(usr)] has forcefully reloaded the configuration from disk.")
|
||||
full_wipe()
|
||||
Load(world.params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
|
||||
|
||||
/datum/controller/configuration/proc/Load(_directory)
|
||||
if(IsAdminAdvancedProcCall()) //If admin proccall is detected down the line it will horribly break everything.
|
||||
return
|
||||
if(_directory)
|
||||
directory = _directory
|
||||
if(entries)
|
||||
CRASH("/datum/controller/configuration/Load() called more than once!")
|
||||
InitEntries()
|
||||
LoadModes()
|
||||
if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
|
||||
var/list/legacy_configs = list("game_options.txt", "dbconfig.txt", "comms.txt")
|
||||
for(var/I in legacy_configs)
|
||||
if(fexists("[directory]/[I]"))
|
||||
log_config("No $include directives found in config.txt! Loading legacy [legacy_configs.Join("/")] files...")
|
||||
for(var/J in legacy_configs)
|
||||
LoadEntries(J)
|
||||
break
|
||||
loadmaplist(CONFIG_MAPS_FILE)
|
||||
LoadMOTD()
|
||||
|
||||
/datum/controller/configuration/proc/full_wipe()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
entries_by_type.Cut()
|
||||
QDEL_LIST_ASSOC_VAL(entries)
|
||||
entries = null
|
||||
QDEL_LIST_ASSOC_VAL(maplist)
|
||||
maplist = null
|
||||
QDEL_NULL(defaultmap)
|
||||
|
||||
/datum/controller/configuration/Destroy()
|
||||
full_wipe()
|
||||
config = null
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/configuration/proc/InitEntries()
|
||||
var/list/_entries = list()
|
||||
entries = _entries
|
||||
var/list/_entries_by_type = list()
|
||||
entries_by_type = _entries_by_type
|
||||
|
||||
for(var/I in typesof(/datum/config_entry)) //typesof is faster in this case
|
||||
var/datum/config_entry/E = I
|
||||
if(initial(E.abstract_type) == I)
|
||||
continue
|
||||
E = new I
|
||||
var/esname = E.name
|
||||
var/datum/config_entry/test = _entries[esname]
|
||||
if(test)
|
||||
log_config("Error: [test.type] has the same name as [E.type]: [esname]! Not initializing [E.type]!")
|
||||
qdel(E)
|
||||
continue
|
||||
_entries[esname] = E
|
||||
_entries_by_type[I] = E
|
||||
|
||||
/datum/controller/configuration/proc/RemoveEntry(datum/config_entry/CE)
|
||||
entries -= CE.name
|
||||
entries_by_type -= CE.type
|
||||
|
||||
/datum/controller/configuration/proc/LoadEntries(filename, list/stack = list())
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
|
||||
var/filename_to_test = world.system_type == MS_WINDOWS ? lowertext(filename) : filename
|
||||
if(filename_to_test in stack)
|
||||
log_config("Warning: Config recursion detected ([english_list(stack)]), breaking!")
|
||||
return
|
||||
stack = stack + filename_to_test
|
||||
|
||||
log_config("Loading config file [filename]...")
|
||||
var/list/lines = world.file2list("[directory]/[filename]")
|
||||
var/list/_entries = entries
|
||||
var/list/postload_required = list()
|
||||
for(var/L in lines)
|
||||
L = trim(L)
|
||||
if(!L)
|
||||
continue
|
||||
|
||||
var/firstchar = copytext(L, 1, 2)
|
||||
if(firstchar == "#")
|
||||
continue
|
||||
|
||||
var/lockthis = firstchar == "@"
|
||||
if(lockthis)
|
||||
L = copytext(L, 2)
|
||||
|
||||
var/pos = findtext(L, " ")
|
||||
var/entry = null
|
||||
var/value = null
|
||||
|
||||
if(pos)
|
||||
entry = lowertext(copytext(L, 1, pos))
|
||||
value = copytext(L, pos + 1)
|
||||
else
|
||||
entry = lowertext(L)
|
||||
|
||||
if(!entry)
|
||||
continue
|
||||
|
||||
if(entry == "$include")
|
||||
if(!value)
|
||||
log_config("Warning: Invalid $include directive: [value]")
|
||||
else
|
||||
LoadEntries(value, stack)
|
||||
++.
|
||||
continue
|
||||
|
||||
var/datum/config_entry/E = _entries[entry]
|
||||
if(!E)
|
||||
log_config("Unknown setting in configuration: '[entry]'")
|
||||
continue
|
||||
|
||||
if(lockthis)
|
||||
E.protection |= CONFIG_ENTRY_LOCKED
|
||||
|
||||
if(E.deprecated_by)
|
||||
var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by]
|
||||
var/new_value = E.DeprecationUpdate(value)
|
||||
var/good_update = istext(new_value)
|
||||
log_config("Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
if(!warned_deprecated_configs)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
|
||||
warned_deprecated_configs = TRUE
|
||||
if(good_update)
|
||||
value = new_value
|
||||
E = new_ver
|
||||
else
|
||||
warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
|
||||
|
||||
var/validated = E.ValidateAndSet(value, TRUE)
|
||||
if(!validated)
|
||||
log_config("Failed to validate setting \"[value]\" for [entry]")
|
||||
else
|
||||
if(E.modified && !E.dupes_allowed)
|
||||
log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
if(E.postload_required)
|
||||
postload_required[E] = TRUE
|
||||
|
||||
E.resident_file = filename
|
||||
|
||||
if(validated)
|
||||
E.modified = TRUE
|
||||
|
||||
for(var/i in postload_required)
|
||||
var/datum/config_entry/E = i
|
||||
E.OnPostload()
|
||||
|
||||
++.
|
||||
|
||||
/datum/controller/configuration/can_vv_get(var_name)
|
||||
return (var_name != NAMEOF(src, entries_by_type) || !hiding_entries_by_type) && ..()
|
||||
|
||||
/datum/controller/configuration/vv_edit_var(var_name, var_value)
|
||||
var/list/banned_edits = list(NAMEOF(src, entries_by_type), NAMEOF(src, entries), NAMEOF(src, directory))
|
||||
return !(var_name in banned_edits) && ..()
|
||||
|
||||
/datum/controller/configuration/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Edit", src)
|
||||
stat("[name]:", statclick)
|
||||
|
||||
/datum/controller/configuration/proc/Get(entry_type)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
if(entry_is_abstract)
|
||||
CRASH("Tried to retrieve an abstract config_entry: [entry_type]")
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.config_entry_value
|
||||
|
||||
/datum/controller/configuration/proc/Set(entry_type, new_val)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
if(entry_is_abstract)
|
||||
CRASH("Tried to set an abstract config_entry: [entry_type]")
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_LOCKED) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Set" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config rewrite of [entry_type] to [new_val] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.ValidateAndSet("[new_val]")
|
||||
|
||||
/datum/controller/configuration/proc/LoadModes()
|
||||
gamemode_cache = typecacheof(/datum/game_mode, TRUE)
|
||||
modes = list()
|
||||
mode_names = list()
|
||||
mode_reports = list()
|
||||
mode_false_report_weight = list()
|
||||
votable_modes = list()
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
for(var/T in gamemode_cache)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
var/datum/game_mode/M = new T()
|
||||
|
||||
if(M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
modes += M.config_tag
|
||||
mode_names[M.config_tag] = M.name
|
||||
probabilities[M.config_tag] = M.probability
|
||||
mode_reports[M.config_tag] = M.generate_report()
|
||||
if(probabilities[M.config_tag]>0)
|
||||
mode_false_report_weight[M.config_tag] = M.false_report_weight
|
||||
else
|
||||
mode_false_report_weight[M.config_tag] = 1
|
||||
if(M.votable)
|
||||
votable_modes += M.config_tag
|
||||
qdel(M)
|
||||
votable_modes += "secret"
|
||||
|
||||
/datum/controller/configuration/proc/LoadMOTD()
|
||||
motd = file2text("[directory]/motd.txt")
|
||||
var/tm_info = GLOB.revdata.GetTestMergeInfo()
|
||||
if(motd || tm_info)
|
||||
motd = motd ? "[motd]<br>[tm_info]" : tm_info
|
||||
|
||||
/datum/controller/configuration/proc/loadmaplist(filename)
|
||||
log_config("Loading config file [filename]...")
|
||||
filename = "[directory]/[filename]"
|
||||
var/list/Lines = world.file2list(filename)
|
||||
|
||||
var/datum/map_config/currentmap = null
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if(length(t) == 0)
|
||||
continue
|
||||
else if(copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/command = null
|
||||
var/data = null
|
||||
|
||||
if(pos)
|
||||
command = lowertext(copytext(t, 1, pos))
|
||||
data = copytext(t, pos + 1)
|
||||
else
|
||||
command = lowertext(t)
|
||||
|
||||
if(!command)
|
||||
continue
|
||||
|
||||
if (!currentmap && command != "map")
|
||||
continue
|
||||
|
||||
switch (command)
|
||||
if ("map")
|
||||
currentmap = load_map_config("_maps/[data].json")
|
||||
if(currentmap.defaulted)
|
||||
log_config("Failed to load map config for [data]!")
|
||||
currentmap = null
|
||||
if ("minplayers","minplayer")
|
||||
currentmap.config_min_users = text2num(data)
|
||||
if ("maxplayers","maxplayer")
|
||||
currentmap.config_max_users = text2num(data)
|
||||
if ("weight","voteweight")
|
||||
currentmap.voteweight = text2num(data)
|
||||
if ("default","defaultmap")
|
||||
defaultmap = currentmap
|
||||
if ("endmap")
|
||||
LAZYINITLIST(maplist)
|
||||
maplist[currentmap.map_name] = currentmap
|
||||
currentmap = null
|
||||
if ("disabled")
|
||||
currentmap = null
|
||||
else
|
||||
log_config("Unknown command in map vote config: '[command]'")
|
||||
|
||||
|
||||
/datum/controller/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// ^ This guy didn't try hard enough
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = T
|
||||
var/ct = initial(M.config_tag)
|
||||
if(ct && ct == mode_name)
|
||||
return new T
|
||||
return new /datum/game_mode/extended()
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.can_start())
|
||||
var/final_weight = probabilities[M.config_tag]
|
||||
if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
|
||||
var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
|
||||
final_weight *= ((100-adjustment)/100)
|
||||
runnable_modes[M] = final_weight
|
||||
return runnable_modes
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_midround_modes(crew)
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
for(var/T in (gamemode_cache - SSticker.mode.type))
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.required_players <= crew)
|
||||
if(M.maximum_players >= 0 && M.maximum_players < crew)
|
||||
continue
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
return runnable_modes
|
||||
/datum/controller/configuration
|
||||
name = "Configuration"
|
||||
|
||||
var/directory = "config"
|
||||
|
||||
var/warned_deprecated_configs = FALSE
|
||||
var/hiding_entries_by_type = TRUE //Set for readability, admins can set this to FALSE if they want to debug it
|
||||
var/list/entries
|
||||
var/list/entries_by_type
|
||||
|
||||
var/list/maplist
|
||||
var/datum/map_config/defaultmap
|
||||
|
||||
var/list/modes // allowed modes
|
||||
var/list/gamemode_cache
|
||||
var/list/votable_modes // votable modes
|
||||
var/list/storyteller_cache
|
||||
var/list/mode_names
|
||||
var/list/mode_reports
|
||||
var/list/mode_false_report_weight
|
||||
|
||||
var/motd
|
||||
|
||||
/datum/controller/configuration/proc/admin_reload()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
log_admin("[key_name_admin(usr)] has forcefully reloaded the configuration from disk.")
|
||||
message_admins("[key_name_admin(usr)] has forcefully reloaded the configuration from disk.")
|
||||
full_wipe()
|
||||
Load(world.params[OVERRIDE_CONFIG_DIRECTORY_PARAMETER])
|
||||
|
||||
/datum/controller/configuration/proc/Load(_directory)
|
||||
if(IsAdminAdvancedProcCall()) //If admin proccall is detected down the line it will horribly break everything.
|
||||
return
|
||||
if(_directory)
|
||||
directory = _directory
|
||||
if(entries)
|
||||
CRASH("/datum/controller/configuration/Load() called more than once!")
|
||||
InitEntries()
|
||||
LoadModes()
|
||||
storyteller_cache = typecacheof(/datum/dynamic_storyteller, TRUE)
|
||||
if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
|
||||
var/list/legacy_configs = list("game_options.txt", "dbconfig.txt", "comms.txt")
|
||||
for(var/I in legacy_configs)
|
||||
if(fexists("[directory]/[I]"))
|
||||
log_config("No $include directives found in config.txt! Loading legacy [legacy_configs.Join("/")] files...")
|
||||
for(var/J in legacy_configs)
|
||||
LoadEntries(J)
|
||||
break
|
||||
loadmaplist(CONFIG_MAPS_FILE)
|
||||
LoadMOTD()
|
||||
|
||||
/datum/controller/configuration/proc/full_wipe()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
entries_by_type.Cut()
|
||||
QDEL_LIST_ASSOC_VAL(entries)
|
||||
entries = null
|
||||
QDEL_LIST_ASSOC_VAL(maplist)
|
||||
maplist = null
|
||||
QDEL_NULL(defaultmap)
|
||||
|
||||
/datum/controller/configuration/Destroy()
|
||||
full_wipe()
|
||||
config = null
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/configuration/proc/InitEntries()
|
||||
var/list/_entries = list()
|
||||
entries = _entries
|
||||
var/list/_entries_by_type = list()
|
||||
entries_by_type = _entries_by_type
|
||||
|
||||
for(var/I in typesof(/datum/config_entry)) //typesof is faster in this case
|
||||
var/datum/config_entry/E = I
|
||||
if(initial(E.abstract_type) == I)
|
||||
continue
|
||||
E = new I
|
||||
var/esname = E.name
|
||||
var/datum/config_entry/test = _entries[esname]
|
||||
if(test)
|
||||
log_config("Error: [test.type] has the same name as [E.type]: [esname]! Not initializing [E.type]!")
|
||||
qdel(E)
|
||||
continue
|
||||
_entries[esname] = E
|
||||
_entries_by_type[I] = E
|
||||
|
||||
/datum/controller/configuration/proc/RemoveEntry(datum/config_entry/CE)
|
||||
entries -= CE.name
|
||||
entries_by_type -= CE.type
|
||||
|
||||
/datum/controller/configuration/proc/LoadEntries(filename, list/stack = list())
|
||||
if(IsAdminAdvancedProcCall())
|
||||
return
|
||||
|
||||
var/filename_to_test = world.system_type == MS_WINDOWS ? lowertext(filename) : filename
|
||||
if(filename_to_test in stack)
|
||||
log_config("Warning: Config recursion detected ([english_list(stack)]), breaking!")
|
||||
return
|
||||
stack = stack + filename_to_test
|
||||
|
||||
log_config("Loading config file [filename]...")
|
||||
var/list/lines = world.file2list("[directory]/[filename]")
|
||||
var/list/_entries = entries
|
||||
var/list/postload_required = list()
|
||||
for(var/L in lines)
|
||||
L = trim(L)
|
||||
if(!L)
|
||||
continue
|
||||
|
||||
var/firstchar = copytext(L, 1, 2)
|
||||
if(firstchar == "#")
|
||||
continue
|
||||
|
||||
var/lockthis = firstchar == "@"
|
||||
if(lockthis)
|
||||
L = copytext(L, 2)
|
||||
|
||||
var/pos = findtext(L, " ")
|
||||
var/entry = null
|
||||
var/value = null
|
||||
|
||||
if(pos)
|
||||
entry = lowertext(copytext(L, 1, pos))
|
||||
value = copytext(L, pos + 1)
|
||||
else
|
||||
entry = lowertext(L)
|
||||
|
||||
if(!entry)
|
||||
continue
|
||||
|
||||
if(entry == "$include")
|
||||
if(!value)
|
||||
log_config("Warning: Invalid $include directive: [value]")
|
||||
else
|
||||
LoadEntries(value, stack)
|
||||
++.
|
||||
continue
|
||||
|
||||
var/datum/config_entry/E = _entries[entry]
|
||||
if(!E)
|
||||
log_config("Unknown setting in configuration: '[entry]'")
|
||||
continue
|
||||
|
||||
if(lockthis)
|
||||
E.protection |= CONFIG_ENTRY_LOCKED
|
||||
|
||||
if(E.deprecated_by)
|
||||
var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by]
|
||||
var/new_value = E.DeprecationUpdate(value)
|
||||
var/good_update = istext(new_value)
|
||||
log_config("Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
if(!warned_deprecated_configs)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
|
||||
warned_deprecated_configs = TRUE
|
||||
if(good_update)
|
||||
value = new_value
|
||||
E = new_ver
|
||||
else
|
||||
warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
|
||||
|
||||
var/validated = E.ValidateAndSet(value, TRUE)
|
||||
if(!validated)
|
||||
log_config("Failed to validate setting \"[value]\" for [entry]")
|
||||
else
|
||||
if(E.modified && !E.dupes_allowed)
|
||||
log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
if(E.postload_required)
|
||||
postload_required[E] = TRUE
|
||||
|
||||
E.resident_file = filename
|
||||
|
||||
if(validated)
|
||||
E.modified = TRUE
|
||||
|
||||
for(var/i in postload_required)
|
||||
var/datum/config_entry/E = i
|
||||
E.OnPostload()
|
||||
|
||||
++.
|
||||
|
||||
/datum/controller/configuration/can_vv_get(var_name)
|
||||
return (var_name != NAMEOF(src, entries_by_type) || !hiding_entries_by_type) && ..()
|
||||
|
||||
/datum/controller/configuration/vv_edit_var(var_name, var_value)
|
||||
var/list/banned_edits = list(NAMEOF(src, entries_by_type), NAMEOF(src, entries), NAMEOF(src, directory))
|
||||
return !(var_name in banned_edits) && ..()
|
||||
|
||||
/datum/controller/configuration/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Edit", src)
|
||||
stat("[name]:", statclick)
|
||||
|
||||
/datum/controller/configuration/proc/Get(entry_type)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
if(entry_is_abstract)
|
||||
CRASH("Tried to retrieve an abstract config_entry: [entry_type]")
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.config_entry_value
|
||||
|
||||
/datum/controller/configuration/proc/Set(entry_type, new_val)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
if(entry_is_abstract)
|
||||
CRASH("Tried to set an abstract config_entry: [entry_type]")
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_LOCKED) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Set" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config rewrite of [entry_type] to [new_val] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.ValidateAndSet("[new_val]")
|
||||
|
||||
/datum/controller/configuration/proc/LoadModes()
|
||||
gamemode_cache = typecacheof(/datum/game_mode, TRUE)
|
||||
modes = list()
|
||||
mode_names = list()
|
||||
mode_reports = list()
|
||||
mode_false_report_weight = list()
|
||||
votable_modes = list()
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
for(var/T in gamemode_cache)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// for future reference: just use initial() lol
|
||||
var/datum/game_mode/M = new T()
|
||||
|
||||
if(M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
modes += M.config_tag
|
||||
mode_names[M.config_tag] = M.name
|
||||
mode_reports[M.config_tag] = M.generate_report()
|
||||
if(probabilities[M.config_tag]>0)
|
||||
mode_false_report_weight[M.config_tag] = M.false_report_weight
|
||||
else
|
||||
mode_false_report_weight[M.config_tag] = 1
|
||||
if(M.votable)
|
||||
votable_modes += M.config_tag
|
||||
qdel(M)
|
||||
votable_modes += "secret"
|
||||
|
||||
/datum/controller/configuration/proc/LoadMOTD()
|
||||
motd = file2text("[directory]/motd.txt")
|
||||
var/tm_info = GLOB.revdata.GetTestMergeInfo()
|
||||
if(motd || tm_info)
|
||||
motd = motd ? "[motd]<br>[tm_info]" : tm_info
|
||||
|
||||
/datum/controller/configuration/proc/loadmaplist(filename)
|
||||
log_config("Loading config file [filename]...")
|
||||
filename = "[directory]/[filename]"
|
||||
var/list/Lines = world.file2list(filename)
|
||||
|
||||
var/datum/map_config/currentmap = null
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if(length(t) == 0)
|
||||
continue
|
||||
else if(copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/command = null
|
||||
var/data = null
|
||||
|
||||
if(pos)
|
||||
command = lowertext(copytext(t, 1, pos))
|
||||
data = copytext(t, pos + 1)
|
||||
else
|
||||
command = lowertext(t)
|
||||
|
||||
if(!command)
|
||||
continue
|
||||
|
||||
if (!currentmap && command != "map")
|
||||
continue
|
||||
|
||||
switch (command)
|
||||
if ("map")
|
||||
currentmap = load_map_config("_maps/[data].json")
|
||||
if(currentmap.defaulted)
|
||||
log_config("Failed to load map config for [data]!")
|
||||
currentmap = null
|
||||
if ("minplayers","minplayer")
|
||||
currentmap.config_min_users = text2num(data)
|
||||
if ("maxplayers","maxplayer")
|
||||
currentmap.config_max_users = text2num(data)
|
||||
if ("weight","voteweight")
|
||||
currentmap.voteweight = text2num(data)
|
||||
if ("default","defaultmap")
|
||||
defaultmap = currentmap
|
||||
if ("endmap")
|
||||
LAZYINITLIST(maplist)
|
||||
maplist[currentmap.map_name] = currentmap
|
||||
currentmap = null
|
||||
if ("disabled")
|
||||
currentmap = null
|
||||
else
|
||||
log_config("Unknown command in map vote config: '[command]'")
|
||||
|
||||
|
||||
/datum/controller/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// ^ This guy didn't try hard enough
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = T
|
||||
var/ct = initial(M.config_tag)
|
||||
if(ct && ct == mode_name)
|
||||
return new T
|
||||
return new /datum/game_mode/extended()
|
||||
|
||||
/datum/controller/configuration/proc/pick_storyteller(storyteller_name)
|
||||
for(var/T in storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
var/name = initial(S.name)
|
||||
if(name && name == storyteller_name)
|
||||
return T
|
||||
return /datum/dynamic_storyteller/classic
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(M.config_tag in SSvote.stored_modetier_results && SSvote.stored_modetier_results[M.config_tag] < Get(/datum/config_entry/number/dropped_modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.can_start())
|
||||
var/final_weight = probabilities[M.config_tag]
|
||||
if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
|
||||
var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
|
||||
final_weight *= ((100-adjustment)/100)
|
||||
runnable_modes[M] = final_weight
|
||||
return runnable_modes
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_midround_modes(crew)
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
var/list/min_pop = Get(/datum/config_entry/keyed_list/min_pop)
|
||||
var/list/max_pop = Get(/datum/config_entry/keyed_list/max_pop)
|
||||
for(var/T in (gamemode_cache - SSticker.mode.type))
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
if(probabilities[M.config_tag]<=0)
|
||||
qdel(M)
|
||||
continue
|
||||
if(min_pop[M.config_tag])
|
||||
M.required_players = min_pop[M.config_tag]
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.required_players <= crew)
|
||||
if(M.maximum_players >= 0 && M.maximum_players < crew)
|
||||
continue
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
return runnable_modes
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/datum/config_entry/string/comms_key
|
||||
protection = CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/comms_key/ValidateAndSet(str_val)
|
||||
return str_val != "default_pwd" && length(str_val) > 6 && ..()
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_TEXT
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/list/newv = list()
|
||||
for(var/I in config_entry_value)
|
||||
newv[replacetext(I, "+", " ")] = config_entry_value[I]
|
||||
config_entry_value = newv
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server/ValidateListEntry(key_name, key_value)
|
||||
return key_value != "byond:\\address:port" && ..()
|
||||
|
||||
/datum/config_entry/string/cross_comms_name
|
||||
|
||||
/datum/config_entry/string/medal_hub_address
|
||||
|
||||
/datum/config_entry/string/medal_hub_password
|
||||
/datum/config_entry/string/comms_key
|
||||
protection = CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/comms_key/ValidateAndSet(str_val)
|
||||
return str_val != "default_pwd" && length(str_val) > 6 && ..()
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_TEXT
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/list/newv = list()
|
||||
for(var/I in config_entry_value)
|
||||
newv[replacetext(I, "+", " ")] = config_entry_value[I]
|
||||
config_entry_value = newv
|
||||
|
||||
/datum/config_entry/keyed_list/cross_server/ValidateListEntry(key_name, key_value)
|
||||
return key_value != "byond:\\address:port" && ..()
|
||||
|
||||
/datum/config_entry/string/cross_comms_name
|
||||
|
||||
/datum/config_entry/string/medal_hub_address
|
||||
|
||||
/datum/config_entry/string/medal_hub_password
|
||||
protection = CONFIG_ENTRY_HIDDEN
|
||||
@@ -1,51 +1,51 @@
|
||||
/datum/config_entry/flag/sql_enabled // for sql switching
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/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
|
||||
max_val = 65535
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_database
|
||||
config_entry_value = "test"
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_login
|
||||
config_entry_value = "root"
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_password
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/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
|
||||
deprecated_by = /datum/config_entry/number/blocking_query_timeout
|
||||
|
||||
/datum/config_entry/number/query_debug_log_timeout/DeprecationUpdate(value)
|
||||
return value
|
||||
|
||||
/datum/config_entry/number/async_query_timeout
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/number/blocking_query_timeout
|
||||
config_entry_value = 5
|
||||
min_val = 0
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/number/bsql_thread_limit
|
||||
config_entry_value = 50
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/flag/bsql_debug
|
||||
/datum/config_entry/flag/sql_enabled // for sql switching
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/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
|
||||
max_val = 65535
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_database
|
||||
config_entry_value = "test"
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_login
|
||||
config_entry_value = "root"
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/string/feedback_password
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/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
|
||||
deprecated_by = /datum/config_entry/number/blocking_query_timeout
|
||||
|
||||
/datum/config_entry/number/query_debug_log_timeout/DeprecationUpdate(value)
|
||||
return value
|
||||
|
||||
/datum/config_entry/number/async_query_timeout
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/number/blocking_query_timeout
|
||||
config_entry_value = 5
|
||||
min_val = 0
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/number/bsql_thread_limit
|
||||
config_entry_value = 50
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/flag/bsql_debug
|
||||
|
||||
19
code/controllers/configuration/entries/fail2topic.dm
Normal file
19
code/controllers/configuration/entries/fail2topic.dm
Normal file
@@ -0,0 +1,19 @@
|
||||
/datum/config_entry/number/fail2topic_rate_limit
|
||||
config_entry_value = 10 //deciseconds
|
||||
|
||||
/datum/config_entry/number/fail2topic_max_fails
|
||||
config_entry_value = 5
|
||||
|
||||
/datum/config_entry/string/fail2topic_rule_name
|
||||
config_entry_value = "_dd_fail2topic"
|
||||
protection = CONFIG_ENTRY_LOCKED //affects physical server configuration, no touchies!!
|
||||
|
||||
/datum/config_entry/flag/fail2topic_enabled
|
||||
config_entry_value = TRUE
|
||||
|
||||
/datum/config_entry/number/topic_max_size
|
||||
config_entry_value = 8192
|
||||
|
||||
/datum/config_entry/keyed_list/topic_rate_limit_whitelist
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
@@ -1,394 +1,402 @@
|
||||
/datum/config_entry/number_list/repeated_mode_adjust
|
||||
|
||||
/datum/config_entry/keyed_list/probability
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/probability/ValidateListEntry(key_name)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/max_pop
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/min_pop
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/policy
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_TEXT
|
||||
|
||||
/datum/config_entry/number/damage_multiplier
|
||||
config_entry_value = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/minimal_access_threshold //If the number of players is larger than this threshold, minimal access will be turned on.
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/jobs_have_minimal_access //determines whether jobs use minimal access or expanded access.
|
||||
|
||||
/datum/config_entry/flag/assistants_have_maint_access
|
||||
|
||||
/datum/config_entry/flag/security_has_maint_access
|
||||
|
||||
/datum/config_entry/flag/everyone_has_maint_access
|
||||
|
||||
/datum/config_entry/flag/sec_start_brig //makes sec start in brig instead of dept sec posts
|
||||
|
||||
/datum/config_entry/flag/force_random_names
|
||||
|
||||
/datum/config_entry/flag/humans_need_surnames
|
||||
|
||||
/datum/config_entry/flag/allow_ai // allow ai job
|
||||
|
||||
/datum/config_entry/flag/allow_ai_multicam //whether the AI can use their multicam
|
||||
|
||||
/datum/config_entry/flag/disable_human_mood
|
||||
|
||||
/datum/config_entry/flag/disable_borg_flash_knockdown //Should borg flashes be capable of knocking humanoid entities down?
|
||||
|
||||
/datum/config_entry/flag/weaken_secborg //Brings secborgs and k9s back in-line with the other borg modules
|
||||
|
||||
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
|
||||
|
||||
/datum/config_entry/flag/disable_peaceborg
|
||||
|
||||
/datum/config_entry/number/minimum_secborg_alert //Minimum alert level for secborgs to be chosen.
|
||||
config_entry_value = 3
|
||||
|
||||
/datum/config_entry/number/traitor_scaling_coeff //how much does the amount of players get divided by to determine traitors
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/brother_scaling_coeff //how many players per brother team
|
||||
config_entry_value = 25
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/changeling_scaling_coeff //how much does the amount of players get divided by to determine changelings
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/security_scaling_coeff //how much does the amount of players get divided by to determine open security officer positions
|
||||
config_entry_value = 8
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/abductor_scaling_coeff //how many players per abductor team
|
||||
config_entry_value = 15
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/traitor_objectives_amount
|
||||
config_entry_value = 2
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/brother_objectives_amount
|
||||
config_entry_value = 2
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/reactionary_explosions //If we use reactionary explosions, explosions that react to walls and doors
|
||||
|
||||
/datum/config_entry/flag/protect_roles_from_antagonist //If security and such can be traitor/cult/other
|
||||
|
||||
/datum/config_entry/flag/protect_assistant_from_antagonist //If assistants can be traitor/cult/other
|
||||
|
||||
/datum/config_entry/flag/enforce_human_authority //If non-human species are barred from joining as a head of staff
|
||||
|
||||
/datum/config_entry/flag/allow_latejoin_antagonists // If late-joining players can be traitor/changeling
|
||||
|
||||
/datum/config_entry/flag/use_antag_rep // see game_options.txt for details
|
||||
|
||||
/datum/config_entry/number/antag_rep_maximum
|
||||
config_entry_value = 200
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/default_antag_tickets
|
||||
config_entry_value = 100
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/max_tickets_per_roll
|
||||
config_entry_value = 100
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_time_check // How late (in minutes you want the midround antag system to stay on, setting this to 0 will disable the system)
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_life_check // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist
|
||||
config_entry_value = 0.7
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/suicide_reenter_round_timer
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/roundstart_suicide_time_limit
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/shuttle_refuel_delay
|
||||
config_entry_value = 12000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
|
||||
|
||||
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
|
||||
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
|
||||
/datum/config_entry/flag/no_summon_magic //Fun
|
||||
|
||||
/datum/config_entry/flag/no_summon_events //Allowed
|
||||
|
||||
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
|
||||
|
||||
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
|
||||
config_entry_value = 55
|
||||
min_val = 30
|
||||
|
||||
/datum/config_entry/flag/arrivals_shuttle_require_undocked //Require the arrivals shuttle to be undocked before latejoiners can join
|
||||
|
||||
/datum/config_entry/flag/arrivals_shuttle_require_safe_latejoin //Require the arrivals shuttle to be operational in order for latejoiners to join
|
||||
|
||||
/datum/config_entry/string/alert_green
|
||||
config_entry_value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
|
||||
/datum/config_entry/string/alert_blue_upto
|
||||
config_entry_value = "The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted."
|
||||
|
||||
/datum/config_entry/string/alert_blue_downto
|
||||
config_entry_value = "Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted."
|
||||
|
||||
/datum/config_entry/string/alert_amber_upto
|
||||
config_entry_value = "There are significant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised."
|
||||
|
||||
/datum/config_entry/string/alert_amber_downto
|
||||
config_entry_value = "The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored."
|
||||
|
||||
/datum/config_entry/string/alert_red_upto
|
||||
config_entry_value = "There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted."
|
||||
|
||||
/datum/config_entry/string/alert_red_downto
|
||||
config_entry_value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force."
|
||||
|
||||
/datum/config_entry/string/alert_delta
|
||||
config_entry_value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
|
||||
|
||||
/datum/config_entry/flag/revival_pod_plants
|
||||
|
||||
/datum/config_entry/flag/revival_cloning
|
||||
|
||||
/datum/config_entry/number/revival_brain_life
|
||||
config_entry_value = -1
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/flag/ooc_during_round
|
||||
|
||||
/datum/config_entry/flag/emojis
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed
|
||||
key_mode = KEY_MODE_TYPE
|
||||
value_mode = VALUE_MODE_NUM
|
||||
config_entry_value = list( //DEFAULTS
|
||||
/mob/living/simple_animal = 1,
|
||||
/mob/living/silicon/pai = 1,
|
||||
/mob/living/carbon/alien/humanoid/hunter = -1,
|
||||
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
|
||||
/mob/living/carbon/alien/humanoid/royal/queen = 3
|
||||
)
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
|
||||
. = ..()
|
||||
if(.)
|
||||
update_config_movespeed_type_lookup(TRUE)
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(. && (var_name == NAMEOF(src, config_entry_value)))
|
||||
update_config_movespeed_type_lookup(TRUE)
|
||||
|
||||
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
|
||||
abstract_type = /datum/config_entry/number/movedelay
|
||||
|
||||
/datum/config_entry/number/movedelay/ValidateAndSet()
|
||||
. = ..()
|
||||
if(.)
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/datum/config_entry/number/movedelay/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(. && (var_name == NAMEOF(src, config_entry_value)))
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay
|
||||
|
||||
/////////////////////////////////////////////////Outdated move delay
|
||||
/datum/config_entry/number/outdated_movedelay
|
||||
deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed
|
||||
abstract_type = /datum/config_entry/number/outdated_movedelay
|
||||
|
||||
var/movedelay_type
|
||||
|
||||
/datum/config_entry/number/outdated_movedelay/DeprecationUpdate(value)
|
||||
return "[movedelay_type] [value]"
|
||||
|
||||
/datum/config_entry/number/outdated_movedelay/human_delay
|
||||
movedelay_type = /mob/living/carbon/human
|
||||
/datum/config_entry/number/outdated_movedelay/robot_delay
|
||||
movedelay_type = /mob/living/silicon/robot
|
||||
/datum/config_entry/number/outdated_movedelay/monkey_delay
|
||||
movedelay_type = /mob/living/carbon/monkey
|
||||
/datum/config_entry/number/outdated_movedelay/alien_delay
|
||||
movedelay_type = /mob/living/carbon/alien
|
||||
/datum/config_entry/number/outdated_movedelay/slime_delay
|
||||
movedelay_type = /mob/living/simple_animal/slime
|
||||
/datum/config_entry/number/outdated_movedelay/animal_delay
|
||||
movedelay_type = /mob/living/simple_animal
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
|
||||
|
||||
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
|
||||
config_entry_value = 18000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/ghost_interaction
|
||||
|
||||
/datum/config_entry/flag/silent_ai
|
||||
/datum/config_entry/flag/silent_borg
|
||||
|
||||
/datum/config_entry/flag/sandbox_autoclose // close the sandbox panel after spawning an item, potentially reducing griff
|
||||
|
||||
/datum/config_entry/number/default_laws //Controls what laws the AI spawns with.
|
||||
config_entry_value = 0
|
||||
min_val = 0
|
||||
max_val = 3
|
||||
|
||||
/datum/config_entry/number/silicon_max_law_amount
|
||||
config_entry_value = 12
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/keyed_list/random_laws
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/law_weight
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
splitter = ","
|
||||
|
||||
/datum/config_entry/number/overflow_cap
|
||||
config_entry_value = -1
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/string/overflow_job
|
||||
config_entry_value = "Assistant"
|
||||
|
||||
/datum/config_entry/flag/starlight
|
||||
/datum/config_entry/flag/grey_assistants
|
||||
|
||||
/datum/config_entry/number/lavaland_budget
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/space_budget
|
||||
config_entry_value = 16
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/allow_random_events // Enables random events mid-round when set
|
||||
|
||||
/datum/config_entry/number/events_min_time_mul // Multipliers for random events minimal starting time and minimal players amounts
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/events_min_players_mul
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/mice_roundstart
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/bombcap
|
||||
config_entry_value = 14
|
||||
min_val = 4
|
||||
|
||||
/datum/config_entry/number/bombcap/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
GLOB.MAX_EX_DEVESTATION_RANGE = round(config_entry_value / 4)
|
||||
GLOB.MAX_EX_HEAVY_RANGE = round(config_entry_value / 2)
|
||||
GLOB.MAX_EX_LIGHT_RANGE = config_entry_value
|
||||
GLOB.MAX_EX_FLASH_RANGE = config_entry_value
|
||||
GLOB.MAX_EX_FLAME_RANGE = config_entry_value
|
||||
|
||||
/datum/config_entry/number/emergency_shuttle_autocall_threshold
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/ic_printing
|
||||
|
||||
/datum/config_entry/flag/roundstart_traits
|
||||
|
||||
/datum/config_entry/flag/enable_night_shifts
|
||||
|
||||
/datum/config_entry/flag/randomize_shift_time
|
||||
|
||||
/datum/config_entry/flag/shift_time_realtime
|
||||
|
||||
/datum/config_entry/keyed_list/antag_rep
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/number/monkeycap
|
||||
config_entry_value = 64
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/disable_stambuffer
|
||||
|
||||
/datum/config_entry/keyed_list/box_random_engine
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
lowercase = FALSE
|
||||
splitter = "-"
|
||||
|
||||
/datum/config_entry/number/auto_transfer_delay
|
||||
config_entry_value = 72000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/marauder_delay_non_reebe
|
||||
config_entry_value = 1800
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/allow_clockwork_marauder_on_station
|
||||
config_entry_value = TRUE
|
||||
/datum/config_entry/number_list/repeated_mode_adjust
|
||||
|
||||
/datum/config_entry/keyed_list/probability
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/probability/ValidateListEntry(key_name)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/max_pop
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/min_pop
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
|
||||
return key_name in config.modes
|
||||
|
||||
/datum/config_entry/keyed_list/policy
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_TEXT
|
||||
|
||||
/datum/config_entry/number/damage_multiplier
|
||||
config_entry_value = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/minimal_access_threshold //If the number of players is larger than this threshold, minimal access will be turned on.
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/jobs_have_minimal_access //determines whether jobs use minimal access or expanded access.
|
||||
|
||||
/datum/config_entry/flag/assistants_have_maint_access
|
||||
|
||||
/datum/config_entry/flag/security_has_maint_access
|
||||
|
||||
/datum/config_entry/flag/everyone_has_maint_access
|
||||
|
||||
/datum/config_entry/flag/sec_start_brig //makes sec start in brig instead of dept sec posts
|
||||
|
||||
/datum/config_entry/flag/force_random_names
|
||||
|
||||
/datum/config_entry/flag/humans_need_surnames
|
||||
|
||||
/datum/config_entry/flag/allow_ai // allow ai job
|
||||
|
||||
/datum/config_entry/flag/allow_ai_multicam //whether the AI can use their multicam
|
||||
|
||||
/datum/config_entry/flag/disable_human_mood
|
||||
|
||||
/datum/config_entry/flag/disable_borg_flash_knockdown //Should borg flashes be capable of knocking humanoid entities down?
|
||||
|
||||
/datum/config_entry/flag/weaken_secborg //Brings secborgs and k9s back in-line with the other borg modules
|
||||
|
||||
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
|
||||
|
||||
/datum/config_entry/flag/disable_peaceborg
|
||||
|
||||
/datum/config_entry/number/minimum_secborg_alert //Minimum alert level for secborgs to be chosen.
|
||||
config_entry_value = 3
|
||||
|
||||
/datum/config_entry/number/traitor_scaling_coeff //how much does the amount of players get divided by to determine traitors
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/brother_scaling_coeff //how many players per brother team
|
||||
config_entry_value = 25
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/changeling_scaling_coeff //how much does the amount of players get divided by to determine changelings
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/security_scaling_coeff //how much does the amount of players get divided by to determine open security officer positions
|
||||
config_entry_value = 8
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/abductor_scaling_coeff //how many players per abductor team
|
||||
config_entry_value = 15
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/traitor_objectives_amount
|
||||
config_entry_value = 2
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/brother_objectives_amount
|
||||
config_entry_value = 2
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/reactionary_explosions //If we use reactionary explosions, explosions that react to walls and doors
|
||||
|
||||
/datum/config_entry/flag/protect_roles_from_antagonist //If security and such can be traitor/cult/other
|
||||
|
||||
/datum/config_entry/flag/protect_assistant_from_antagonist //If assistants can be traitor/cult/other
|
||||
|
||||
/datum/config_entry/flag/enforce_human_authority //If non-human species are barred from joining as a head of staff
|
||||
|
||||
/datum/config_entry/flag/allow_latejoin_antagonists // If late-joining players can be traitor/changeling
|
||||
|
||||
/datum/config_entry/flag/use_antag_rep // see game_options.txt for details
|
||||
|
||||
/datum/config_entry/number/antag_rep_maximum
|
||||
config_entry_value = 200
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/default_antag_tickets
|
||||
config_entry_value = 100
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/max_tickets_per_roll
|
||||
config_entry_value = 100
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_time_check // How late (in minutes you want the midround antag system to stay on, setting this to 0 will disable the system)
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/midround_antag_life_check // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist
|
||||
config_entry_value = 0.7
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/suicide_reenter_round_timer
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/roundstart_suicide_time_limit
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/shuttle_refuel_delay
|
||||
config_entry_value = 12000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
|
||||
|
||||
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
|
||||
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
|
||||
/datum/config_entry/flag/no_summon_magic //Fun
|
||||
|
||||
/datum/config_entry/flag/no_summon_events //Allowed
|
||||
|
||||
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
|
||||
|
||||
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
|
||||
config_entry_value = 55
|
||||
min_val = 30
|
||||
|
||||
/datum/config_entry/flag/arrivals_shuttle_require_undocked //Require the arrivals shuttle to be undocked before latejoiners can join
|
||||
|
||||
/datum/config_entry/flag/arrivals_shuttle_require_safe_latejoin //Require the arrivals shuttle to be operational in order for latejoiners to join
|
||||
|
||||
/datum/config_entry/string/alert_green
|
||||
config_entry_value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
|
||||
/datum/config_entry/string/alert_blue_upto
|
||||
config_entry_value = "The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted."
|
||||
|
||||
/datum/config_entry/string/alert_blue_downto
|
||||
config_entry_value = "Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted."
|
||||
|
||||
/datum/config_entry/string/alert_amber_upto
|
||||
config_entry_value = "There are significant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised."
|
||||
|
||||
/datum/config_entry/string/alert_amber_downto
|
||||
config_entry_value = "The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored."
|
||||
|
||||
/datum/config_entry/string/alert_red_upto
|
||||
config_entry_value = "There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted."
|
||||
|
||||
/datum/config_entry/string/alert_red_downto
|
||||
config_entry_value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force."
|
||||
|
||||
/datum/config_entry/string/alert_delta
|
||||
config_entry_value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
|
||||
|
||||
/datum/config_entry/flag/revival_pod_plants
|
||||
|
||||
/datum/config_entry/flag/revival_cloning
|
||||
|
||||
/datum/config_entry/number/revival_brain_life
|
||||
config_entry_value = -1
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/flag/ooc_during_round
|
||||
|
||||
/datum/config_entry/flag/emojis
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed
|
||||
key_mode = KEY_MODE_TYPE
|
||||
value_mode = VALUE_MODE_NUM
|
||||
config_entry_value = list( //DEFAULTS
|
||||
/mob/living/simple_animal = 1,
|
||||
/mob/living/silicon/pai = 1,
|
||||
/mob/living/carbon/alien/humanoid/hunter = -1,
|
||||
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
|
||||
/mob/living/carbon/alien/humanoid/royal/queen = 3
|
||||
)
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
|
||||
. = ..()
|
||||
if(.)
|
||||
update_config_movespeed_type_lookup(TRUE)
|
||||
|
||||
/datum/config_entry/keyed_list/multiplicative_movespeed/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(. && (var_name == NAMEOF(src, config_entry_value)))
|
||||
update_config_movespeed_type_lookup(TRUE)
|
||||
|
||||
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
|
||||
abstract_type = /datum/config_entry/number/movedelay
|
||||
|
||||
/datum/config_entry/number/movedelay/ValidateAndSet()
|
||||
. = ..()
|
||||
if(.)
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/datum/config_entry/number/movedelay/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
if(. && (var_name == NAMEOF(src, config_entry_value)))
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay
|
||||
|
||||
/////////////////////////////////////////////////Outdated move delay
|
||||
/datum/config_entry/number/outdated_movedelay
|
||||
deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed
|
||||
abstract_type = /datum/config_entry/number/outdated_movedelay
|
||||
|
||||
var/movedelay_type
|
||||
|
||||
/datum/config_entry/number/outdated_movedelay/DeprecationUpdate(value)
|
||||
return "[movedelay_type] [value]"
|
||||
|
||||
/datum/config_entry/number/outdated_movedelay/human_delay
|
||||
movedelay_type = /mob/living/carbon/human
|
||||
/datum/config_entry/number/outdated_movedelay/robot_delay
|
||||
movedelay_type = /mob/living/silicon/robot
|
||||
/datum/config_entry/number/outdated_movedelay/monkey_delay
|
||||
movedelay_type = /mob/living/carbon/monkey
|
||||
/datum/config_entry/number/outdated_movedelay/alien_delay
|
||||
movedelay_type = /mob/living/carbon/alien
|
||||
/datum/config_entry/number/outdated_movedelay/slime_delay
|
||||
movedelay_type = /mob/living/simple_animal/slime
|
||||
/datum/config_entry/number/outdated_movedelay/animal_delay
|
||||
movedelay_type = /mob/living/simple_animal
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
|
||||
|
||||
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
|
||||
config_entry_value = 18000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/ghost_interaction
|
||||
|
||||
/datum/config_entry/flag/silent_ai
|
||||
/datum/config_entry/flag/silent_borg
|
||||
|
||||
/datum/config_entry/flag/sandbox_autoclose // close the sandbox panel after spawning an item, potentially reducing griff
|
||||
|
||||
/datum/config_entry/number/default_laws //Controls what laws the AI spawns with.
|
||||
config_entry_value = 0
|
||||
min_val = 0
|
||||
max_val = 3
|
||||
|
||||
/datum/config_entry/number/silicon_max_law_amount
|
||||
config_entry_value = 12
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/keyed_list/random_laws
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/keyed_list/law_weight
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
splitter = ","
|
||||
|
||||
/datum/config_entry/number/overflow_cap
|
||||
config_entry_value = -1
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/string/overflow_job
|
||||
config_entry_value = "Assistant"
|
||||
|
||||
/datum/config_entry/flag/starlight
|
||||
/datum/config_entry/flag/grey_assistants
|
||||
|
||||
/datum/config_entry/number/lavaland_budget
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/space_budget
|
||||
config_entry_value = 16
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/allow_random_events // Enables random events mid-round when set
|
||||
|
||||
/datum/config_entry/number/events_min_time_mul // Multipliers for random events minimal starting time and minimal players amounts
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/events_min_players_mul
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/mice_roundstart
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/bombcap
|
||||
config_entry_value = 14
|
||||
min_val = 4
|
||||
|
||||
/datum/config_entry/number/bombcap/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
GLOB.MAX_EX_DEVESTATION_RANGE = round(config_entry_value / 4)
|
||||
GLOB.MAX_EX_HEAVY_RANGE = round(config_entry_value / 2)
|
||||
GLOB.MAX_EX_LIGHT_RANGE = config_entry_value
|
||||
GLOB.MAX_EX_FLASH_RANGE = config_entry_value
|
||||
GLOB.MAX_EX_FLAME_RANGE = config_entry_value
|
||||
|
||||
/datum/config_entry/number/emergency_shuttle_autocall_threshold
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/ic_printing
|
||||
|
||||
/datum/config_entry/flag/roundstart_traits
|
||||
|
||||
/datum/config_entry/flag/enable_night_shifts
|
||||
|
||||
/datum/config_entry/flag/randomize_shift_time
|
||||
|
||||
/datum/config_entry/flag/shift_time_realtime
|
||||
|
||||
/datum/config_entry/keyed_list/antag_rep
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/number/monkeycap
|
||||
config_entry_value = 64
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/disable_stambuffer
|
||||
|
||||
/datum/config_entry/keyed_list/box_random_engine
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
lowercase = FALSE
|
||||
splitter = ","
|
||||
|
||||
/datum/config_entry/number/auto_transfer_delay
|
||||
config_entry_value = 72000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/pai_custom_holoforms
|
||||
|
||||
/datum/config_entry/number/marauder_delay_non_reebe
|
||||
config_entry_value = 1800
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/allow_clockwork_marauder_on_station
|
||||
config_entry_value = TRUE
|
||||
|
||||
/datum/config_entry/flag/modetier_voting
|
||||
config_entry_value = TRUE
|
||||
|
||||
/datum/config_entry/number/dropped_modes
|
||||
config_entry_value = 3
|
||||
|
||||
@@ -1,431 +1,431 @@
|
||||
/datum/config_entry/flag/autoadmin // if autoadmin is enabled
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/autoadmin_rank // the rank for autoadmins
|
||||
config_entry_value = "Game Master"
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/servername // server name (the name of the game window)
|
||||
|
||||
/datum/config_entry/string/servertagline
|
||||
config_entry_value = "We forgot to set the server's tagline in config.txt"
|
||||
|
||||
/datum/config_entry/string/serversqlname // short form server name used for the DB
|
||||
|
||||
/datum/config_entry/string/stationname // station name (the name of the station in-game)
|
||||
|
||||
/datum/config_entry/number/lobby_countdown // In between round countdown.
|
||||
config_entry_value = 120
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/round_end_countdown // Post round murder death kill countdown
|
||||
config_entry_value = 25
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/hub // if the game appears on the hub or not
|
||||
|
||||
/datum/config_entry/flag/log_ooc // log OOC channel
|
||||
|
||||
/datum/config_entry/flag/log_access // log login/logout
|
||||
|
||||
/datum/config_entry/flag/log_say // log client say
|
||||
|
||||
/datum/config_entry/flag/log_admin // log admin actions
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/log_prayer // log prayers
|
||||
|
||||
/datum/config_entry/flag/log_law // log lawchanges
|
||||
|
||||
/datum/config_entry/flag/log_game // log game events
|
||||
|
||||
/datum/config_entry/flag/log_virus // log virology data
|
||||
|
||||
/datum/config_entry/flag/log_vote // log voting
|
||||
|
||||
/datum/config_entry/flag/log_whisper // log client whisper
|
||||
|
||||
/datum/config_entry/flag/log_attack // log attack messages
|
||||
|
||||
/datum/config_entry/flag/log_emote // log emotes
|
||||
|
||||
/datum/config_entry/flag/log_adminchat // log admin chat messages
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/log_pda // log pda messages
|
||||
|
||||
/datum/config_entry/flag/log_telecomms // log telecomms messages
|
||||
|
||||
/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
|
||||
|
||||
/datum/config_entry/flag/log_world_topic // log all world.Topic() calls
|
||||
|
||||
/datum/config_entry/flag/log_manifest // log crew manifest to seperate file
|
||||
|
||||
/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file
|
||||
|
||||
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
|
||||
|
||||
/datum/config_entry/flag/allow_vote_restart // allow votes to restart
|
||||
|
||||
/datum/config_entry/flag/allow_vote_mode // allow votes to change mode
|
||||
|
||||
/datum/config_entry/number/vote_delay // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
config_entry_value = 6000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/vote_period // length of voting period (deciseconds, default 1 minute)
|
||||
config_entry_value = 600
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart
|
||||
|
||||
/datum/config_entry/flag/no_dead_vote // dead people can't vote
|
||||
|
||||
/datum/config_entry/flag/allow_metadata // Metadata is supported.
|
||||
|
||||
/datum/config_entry/flag/popup_admin_pm // adminPMs to non-admins show in a pop-up 'reply' window when set
|
||||
|
||||
/datum/config_entry/number/fps
|
||||
config_entry_value = 20
|
||||
min_val = 1
|
||||
max_val = 100 //byond will start crapping out at 50, so this is just ridic
|
||||
var/sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/fps/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
sync_validate = TRUE
|
||||
var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag]
|
||||
if(!TL.sync_validate)
|
||||
TL.ValidateAndSet(10 / config_entry_value)
|
||||
sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/ticklag
|
||||
integer = FALSE
|
||||
var/sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps
|
||||
var/datum/config_entry/CE = /datum/config_entry/number/fps
|
||||
config_entry_value = 10 / initial(CE.config_entry_value)
|
||||
..()
|
||||
|
||||
/datum/config_entry/number/ticklag/ValidateAndSet(str_val)
|
||||
. = text2num(str_val) > 0 && ..()
|
||||
if(.)
|
||||
sync_validate = TRUE
|
||||
var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps]
|
||||
if(!FPS.sync_validate)
|
||||
FPS.ValidateAndSet(10 / config_entry_value)
|
||||
sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/flag/allow_holidays
|
||||
|
||||
/datum/config_entry/number/tick_limit_mc_init //SSinitialization throttling
|
||||
config_entry_value = TICK_LIMIT_MC_INIT_DEFAULT
|
||||
min_val = 0 //oranges warned us
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/admin_legacy_system //Defines whether the server uses the legacy admin system with admins.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_admins //Stops any admins loaded by the legacy system from having their rank edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_ranks //Stops any ranks loaded by the legacy system from having their flags edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/enable_localhost_rank //Gives the !localhost! rank to any client connecting from 127.0.0.1 or ::1
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/mentors_mobname_only
|
||||
|
||||
/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/hostedby
|
||||
|
||||
/datum/config_entry/flag/norespawn
|
||||
|
||||
/datum/config_entry/flag/guest_jobban
|
||||
|
||||
/datum/config_entry/flag/usewhitelist
|
||||
|
||||
/datum/config_entry/flag/ban_legacy_system //Defines whether the server uses the legacy banning system with the files in /data or the SQL system.
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/use_age_restriction_for_jobs //Do jobs use account age restrictions? --requires database
|
||||
|
||||
/datum/config_entry/flag/use_account_age_for_jobs //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected.
|
||||
|
||||
/datum/config_entry/flag/use_exp_tracking
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_heads
|
||||
|
||||
/datum/config_entry/number/use_exp_restrictions_heads_hours
|
||||
config_entry_value = 0
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_heads_department
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_other
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_admin_bypass
|
||||
|
||||
/datum/config_entry/string/server
|
||||
|
||||
/datum/config_entry/string/banappeals
|
||||
|
||||
/datum/config_entry/string/wikiurl
|
||||
config_entry_value = "https://katlin.dog/citadel-wiki"
|
||||
|
||||
/datum/config_entry/string/wikiurltg
|
||||
config_entry_value = "http://www.tgstation13.org/wiki"
|
||||
|
||||
/datum/config_entry/string/forumurl
|
||||
config_entry_value = "http://tgstation13.org/phpBB/index.php"
|
||||
|
||||
/datum/config_entry/string/rulesurl
|
||||
config_entry_value = "http://www.tgstation13.org/wiki/Rules"
|
||||
|
||||
/datum/config_entry/string/githuburl
|
||||
config_entry_value = "https://www.github.com/tgstation/-tg-station"
|
||||
|
||||
/datum/config_entry/string/roundstatsurl
|
||||
|
||||
/datum/config_entry/string/gamelogurl
|
||||
|
||||
/datum/config_entry/number/githubrepoid
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/guest_ban
|
||||
|
||||
/datum/config_entry/number/id_console_jobslot_delay
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/inactivity_period //time in ds until a player is considered inactive
|
||||
config_entry_value = 3000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/inactivity_period/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
config_entry_value *= 10 //documented as seconds in config.txt
|
||||
|
||||
/datum/config_entry/number/afk_period //time in ds until a player is considered inactive
|
||||
config_entry_value = 3000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/afk_period/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
config_entry_value *= 10 //documented as seconds in config.txt
|
||||
|
||||
/datum/config_entry/flag/kick_inactive //force disconnect for inactive players
|
||||
|
||||
/datum/config_entry/flag/load_jobs_from_txt
|
||||
|
||||
/datum/config_entry/flag/forbid_singulo_possession
|
||||
|
||||
/datum/config_entry/flag/automute_on //enables automuting/spam prevention
|
||||
|
||||
/datum/config_entry/string/panic_server_name
|
||||
|
||||
/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val)
|
||||
return str_val != "\[Put the name here\]" && ..()
|
||||
|
||||
/datum/config_entry/string/panic_server_address //Reconnect a player this linked server if this server isn't accepting new players
|
||||
|
||||
/datum/config_entry/string/panic_server_address/ValidateAndSet(str_val)
|
||||
return str_val != "byond://address:port" && ..()
|
||||
|
||||
/datum/config_entry/string/invoke_youtubedl
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/flag/show_irc_name
|
||||
|
||||
/datum/config_entry/flag/see_own_notes //Can players see their own admin notes
|
||||
|
||||
/datum/config_entry/number/note_fresh_days
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/note_stale_days
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/maprotation
|
||||
|
||||
/datum/config_entry/flag/tgstyle_maprotation
|
||||
|
||||
/datum/config_entry/number/maprotatechancedelta
|
||||
config_entry_value = 0.75
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/soft_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/hard_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/extreme_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/soft_popcap_message
|
||||
config_entry_value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers."
|
||||
|
||||
/datum/config_entry/string/hard_popcap_message
|
||||
config_entry_value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers."
|
||||
|
||||
/datum/config_entry/string/extreme_popcap_message
|
||||
config_entry_value = "The server is currently serving a high number of users, find alternative servers."
|
||||
|
||||
/datum/config_entry/flag/panic_bunker // prevents people the server hasn't seen before from connecting
|
||||
|
||||
/datum/config_entry/number/notify_new_player_age // how long do we notify admins of a new player
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/number/notify_new_player_account_age // how long do we notify admins of a new byond account
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/irc_first_connection_alert // do we notify the irc channel when somebody is connecting for the first time?
|
||||
|
||||
/datum/config_entry/flag/check_randomizer
|
||||
|
||||
/datum/config_entry/string/ipintel_email
|
||||
|
||||
/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val)
|
||||
return str_val != "ch@nge.me" && ..()
|
||||
|
||||
/datum/config_entry/number/ipintel_rating_bad
|
||||
config_entry_value = 1
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/ipintel_save_good
|
||||
config_entry_value = 12
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/ipintel_save_bad
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/ipintel_domain
|
||||
config_entry_value = "check.getipintel.net"
|
||||
|
||||
/datum/config_entry/flag/aggressive_changelog
|
||||
|
||||
/datum/config_entry/flag/autoconvert_notes //if all connecting player's notes should attempt to be converted to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/allow_webclient
|
||||
|
||||
/datum/config_entry/flag/webclient_only_byond_members
|
||||
|
||||
/datum/config_entry/flag/announce_admin_logout
|
||||
|
||||
/datum/config_entry/flag/announce_admin_login
|
||||
|
||||
/datum/config_entry/flag/allow_map_voting
|
||||
|
||||
/datum/config_entry/number/client_warn_version
|
||||
config_entry_value = null
|
||||
min_val = 500
|
||||
|
||||
/datum/config_entry/string/client_warn_message
|
||||
config_entry_value = "Your version of byond may have issues or be blocked from accessing this server in the future."
|
||||
|
||||
/datum/config_entry/flag/client_warn_popup
|
||||
|
||||
/datum/config_entry/number/client_error_version
|
||||
config_entry_value = null
|
||||
min_val = 500
|
||||
|
||||
/datum/config_entry/string/client_error_message
|
||||
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
|
||||
|
||||
/datum/config_entry/number/minute_topic_limit
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/second_topic_limit
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/minute_click_limit
|
||||
config_entry_value = 400
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/second_click_limit
|
||||
config_entry_value = 15
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error
|
||||
config_entry_value = 600
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/error_limit // How many occurrences before the next will silence them
|
||||
config_entry_value = 50
|
||||
|
||||
/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for
|
||||
config_entry_value = 6000
|
||||
|
||||
/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error
|
||||
config_entry_value = 50
|
||||
|
||||
/datum/config_entry/flag/irc_announce_new_game
|
||||
|
||||
/datum/config_entry/flag/debug_admin_hrefs
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/base_mc_tick_rate
|
||||
integer = FALSE
|
||||
config_entry_value = 1
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/high_pop_mc_tick_rate
|
||||
integer = FALSE
|
||||
config_entry_value = 1.1
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/high_pop_mc_mode_amount
|
||||
config_entry_value = 65
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/disable_high_pop_mc_mode_amount
|
||||
config_entry_value = 60
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate
|
||||
abstract_type = /datum/config_entry/number/mc_tick_rate
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if (.)
|
||||
Master.UpdateTickRate()
|
||||
|
||||
/datum/config_entry/flag/resume_after_initializations
|
||||
|
||||
/datum/config_entry/flag/resume_after_initializations/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(. && Master.current_runlevel)
|
||||
world.sleep_offline = !config_entry_value
|
||||
|
||||
/datum/config_entry/number/rounds_until_hard_restart
|
||||
config_entry_value = -1
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/default_view
|
||||
config_entry_value = "15x15"
|
||||
|
||||
/datum/config_entry/flag/log_pictures
|
||||
|
||||
/datum/config_entry/flag/picture_logging_camera
|
||||
/datum/config_entry/flag/autoadmin // if autoadmin is enabled
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/autoadmin_rank // the rank for autoadmins
|
||||
config_entry_value = "Game Master"
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/servername // server name (the name of the game window)
|
||||
|
||||
/datum/config_entry/string/servertagline
|
||||
config_entry_value = "We forgot to set the server's tagline in config.txt"
|
||||
|
||||
/datum/config_entry/string/serversqlname // short form server name used for the DB
|
||||
|
||||
/datum/config_entry/string/stationname // station name (the name of the station in-game)
|
||||
|
||||
/datum/config_entry/number/lobby_countdown // In between round countdown.
|
||||
config_entry_value = 120
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/round_end_countdown // Post round murder death kill countdown
|
||||
config_entry_value = 25
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/hub // if the game appears on the hub or not
|
||||
|
||||
/datum/config_entry/flag/log_ooc // log OOC channel
|
||||
|
||||
/datum/config_entry/flag/log_access // log login/logout
|
||||
|
||||
/datum/config_entry/flag/log_say // log client say
|
||||
|
||||
/datum/config_entry/flag/log_admin // log admin actions
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/log_prayer // log prayers
|
||||
|
||||
/datum/config_entry/flag/log_law // log lawchanges
|
||||
|
||||
/datum/config_entry/flag/log_game // log game events
|
||||
|
||||
/datum/config_entry/flag/log_virus // log virology data
|
||||
|
||||
/datum/config_entry/flag/log_vote // log voting
|
||||
|
||||
/datum/config_entry/flag/log_whisper // log client whisper
|
||||
|
||||
/datum/config_entry/flag/log_attack // log attack messages
|
||||
|
||||
/datum/config_entry/flag/log_emote // log emotes
|
||||
|
||||
/datum/config_entry/flag/log_adminchat // log admin chat messages
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/log_pda // log pda messages
|
||||
|
||||
/datum/config_entry/flag/log_telecomms // log telecomms messages
|
||||
|
||||
/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
|
||||
|
||||
/datum/config_entry/flag/log_world_topic // log all world.Topic() calls
|
||||
|
||||
/datum/config_entry/flag/log_manifest // log crew manifest to seperate file
|
||||
|
||||
/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file
|
||||
|
||||
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
|
||||
|
||||
/datum/config_entry/flag/allow_vote_restart // allow votes to restart
|
||||
|
||||
/datum/config_entry/flag/allow_vote_mode // allow votes to change mode
|
||||
|
||||
/datum/config_entry/number/vote_delay // minimum time between voting sessions (deciseconds, 10 minute default)
|
||||
config_entry_value = 6000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/vote_period // length of voting period (deciseconds, default 1 minute)
|
||||
config_entry_value = 600
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart
|
||||
|
||||
/datum/config_entry/flag/no_dead_vote // dead people can't vote
|
||||
|
||||
/datum/config_entry/flag/allow_metadata // Metadata is supported.
|
||||
|
||||
/datum/config_entry/flag/popup_admin_pm // adminPMs to non-admins show in a pop-up 'reply' window when set
|
||||
|
||||
/datum/config_entry/number/fps
|
||||
config_entry_value = 20
|
||||
min_val = 1
|
||||
max_val = 100 //byond will start crapping out at 50, so this is just ridic
|
||||
var/sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/fps/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
sync_validate = TRUE
|
||||
var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag]
|
||||
if(!TL.sync_validate)
|
||||
TL.ValidateAndSet(10 / config_entry_value)
|
||||
sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/ticklag
|
||||
integer = FALSE
|
||||
var/sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps
|
||||
var/datum/config_entry/CE = /datum/config_entry/number/fps
|
||||
config_entry_value = 10 / initial(CE.config_entry_value)
|
||||
..()
|
||||
|
||||
/datum/config_entry/number/ticklag/ValidateAndSet(str_val)
|
||||
. = text2num(str_val) > 0 && ..()
|
||||
if(.)
|
||||
sync_validate = TRUE
|
||||
var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps]
|
||||
if(!FPS.sync_validate)
|
||||
FPS.ValidateAndSet(10 / config_entry_value)
|
||||
sync_validate = FALSE
|
||||
|
||||
/datum/config_entry/flag/allow_holidays
|
||||
|
||||
/datum/config_entry/number/tick_limit_mc_init //SSinitialization throttling
|
||||
config_entry_value = TICK_LIMIT_MC_INIT_DEFAULT
|
||||
min_val = 0 //oranges warned us
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/admin_legacy_system //Defines whether the server uses the legacy admin system with admins.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_admins //Stops any admins loaded by the legacy system from having their rank edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/protect_legacy_ranks //Stops any ranks loaded by the legacy system from having their flags edited by the permissions panel
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/enable_localhost_rank //Gives the !localhost! rank to any client connecting from 127.0.0.1 or ::1
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/mentors_mobname_only
|
||||
|
||||
/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/hostedby
|
||||
|
||||
/datum/config_entry/flag/norespawn
|
||||
|
||||
/datum/config_entry/flag/guest_jobban
|
||||
|
||||
/datum/config_entry/flag/usewhitelist
|
||||
|
||||
/datum/config_entry/flag/ban_legacy_system //Defines whether the server uses the legacy banning system with the files in /data or the SQL system.
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/use_age_restriction_for_jobs //Do jobs use account age restrictions? --requires database
|
||||
|
||||
/datum/config_entry/flag/use_account_age_for_jobs //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected.
|
||||
|
||||
/datum/config_entry/flag/use_exp_tracking
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_heads
|
||||
|
||||
/datum/config_entry/number/use_exp_restrictions_heads_hours
|
||||
config_entry_value = 0
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_heads_department
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_other
|
||||
|
||||
/datum/config_entry/flag/use_exp_restrictions_admin_bypass
|
||||
|
||||
/datum/config_entry/string/server
|
||||
|
||||
/datum/config_entry/string/banappeals
|
||||
|
||||
/datum/config_entry/string/wikiurl
|
||||
config_entry_value = "https://katlin.dog/citadel-wiki"
|
||||
|
||||
/datum/config_entry/string/wikiurltg
|
||||
config_entry_value = "http://www.tgstation13.org/wiki"
|
||||
|
||||
/datum/config_entry/string/forumurl
|
||||
config_entry_value = "http://tgstation13.org/phpBB/index.php"
|
||||
|
||||
/datum/config_entry/string/rulesurl
|
||||
config_entry_value = "http://www.tgstation13.org/wiki/Rules"
|
||||
|
||||
/datum/config_entry/string/githuburl
|
||||
config_entry_value = "https://www.github.com/tgstation/-tg-station"
|
||||
|
||||
/datum/config_entry/string/roundstatsurl
|
||||
|
||||
/datum/config_entry/string/gamelogurl
|
||||
|
||||
/datum/config_entry/number/githubrepoid
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/guest_ban
|
||||
|
||||
/datum/config_entry/number/id_console_jobslot_delay
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/inactivity_period //time in ds until a player is considered inactive
|
||||
config_entry_value = 3000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/inactivity_period/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
config_entry_value *= 10 //documented as seconds in config.txt
|
||||
|
||||
/datum/config_entry/number/afk_period //time in ds until a player is considered inactive
|
||||
config_entry_value = 3000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/afk_period/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(.)
|
||||
config_entry_value *= 10 //documented as seconds in config.txt
|
||||
|
||||
/datum/config_entry/flag/kick_inactive //force disconnect for inactive players
|
||||
|
||||
/datum/config_entry/flag/load_jobs_from_txt
|
||||
|
||||
/datum/config_entry/flag/forbid_singulo_possession
|
||||
|
||||
/datum/config_entry/flag/automute_on //enables automuting/spam prevention
|
||||
|
||||
/datum/config_entry/string/panic_server_name
|
||||
|
||||
/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val)
|
||||
return str_val != "\[Put the name here\]" && ..()
|
||||
|
||||
/datum/config_entry/string/panic_server_address //Reconnect a player this linked server if this server isn't accepting new players
|
||||
|
||||
/datum/config_entry/string/panic_server_address/ValidateAndSet(str_val)
|
||||
return str_val != "byond://address:port" && ..()
|
||||
|
||||
/datum/config_entry/string/invoke_youtubedl
|
||||
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
|
||||
|
||||
/datum/config_entry/flag/show_irc_name
|
||||
|
||||
/datum/config_entry/flag/see_own_notes //Can players see their own admin notes
|
||||
|
||||
/datum/config_entry/number/note_fresh_days
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/note_stale_days
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/flag/maprotation
|
||||
|
||||
/datum/config_entry/flag/tgstyle_maprotation
|
||||
|
||||
/datum/config_entry/number/maprotatechancedelta
|
||||
config_entry_value = 0.75
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/soft_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/hard_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/extreme_popcap
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/soft_popcap_message
|
||||
config_entry_value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers."
|
||||
|
||||
/datum/config_entry/string/hard_popcap_message
|
||||
config_entry_value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers."
|
||||
|
||||
/datum/config_entry/string/extreme_popcap_message
|
||||
config_entry_value = "The server is currently serving a high number of users, find alternative servers."
|
||||
|
||||
/datum/config_entry/flag/panic_bunker // prevents people the server hasn't seen before from connecting
|
||||
|
||||
/datum/config_entry/number/notify_new_player_age // how long do we notify admins of a new player
|
||||
min_val = -1
|
||||
|
||||
/datum/config_entry/number/notify_new_player_account_age // how long do we notify admins of a new byond account
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/flag/irc_first_connection_alert // do we notify the irc channel when somebody is connecting for the first time?
|
||||
|
||||
/datum/config_entry/flag/check_randomizer
|
||||
|
||||
/datum/config_entry/string/ipintel_email
|
||||
|
||||
/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val)
|
||||
return str_val != "ch@nge.me" && ..()
|
||||
|
||||
/datum/config_entry/number/ipintel_rating_bad
|
||||
config_entry_value = 1
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/ipintel_save_good
|
||||
config_entry_value = 12
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/ipintel_save_bad
|
||||
config_entry_value = 1
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/ipintel_domain
|
||||
config_entry_value = "check.getipintel.net"
|
||||
|
||||
/datum/config_entry/flag/aggressive_changelog
|
||||
|
||||
/datum/config_entry/flag/autoconvert_notes //if all connecting player's notes should attempt to be converted to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/allow_webclient
|
||||
|
||||
/datum/config_entry/flag/webclient_only_byond_members
|
||||
|
||||
/datum/config_entry/flag/announce_admin_logout
|
||||
|
||||
/datum/config_entry/flag/announce_admin_login
|
||||
|
||||
/datum/config_entry/flag/allow_map_voting
|
||||
|
||||
/datum/config_entry/number/client_warn_version
|
||||
config_entry_value = null
|
||||
min_val = 500
|
||||
|
||||
/datum/config_entry/string/client_warn_message
|
||||
config_entry_value = "Your version of byond may have issues or be blocked from accessing this server in the future."
|
||||
|
||||
/datum/config_entry/flag/client_warn_popup
|
||||
|
||||
/datum/config_entry/number/client_error_version
|
||||
config_entry_value = null
|
||||
min_val = 500
|
||||
|
||||
/datum/config_entry/string/client_error_message
|
||||
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
|
||||
|
||||
/datum/config_entry/number/minute_topic_limit
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/second_topic_limit
|
||||
config_entry_value = null
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/minute_click_limit
|
||||
config_entry_value = 400
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/second_click_limit
|
||||
config_entry_value = 15
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error
|
||||
config_entry_value = 600
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/error_limit // How many occurrences before the next will silence them
|
||||
config_entry_value = 50
|
||||
|
||||
/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for
|
||||
config_entry_value = 6000
|
||||
|
||||
/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error
|
||||
config_entry_value = 50
|
||||
|
||||
/datum/config_entry/flag/irc_announce_new_game
|
||||
|
||||
/datum/config_entry/flag/debug_admin_hrefs
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/base_mc_tick_rate
|
||||
integer = FALSE
|
||||
config_entry_value = 1
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/high_pop_mc_tick_rate
|
||||
integer = FALSE
|
||||
config_entry_value = 1.1
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/high_pop_mc_mode_amount
|
||||
config_entry_value = 65
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/disable_high_pop_mc_mode_amount
|
||||
config_entry_value = 60
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate
|
||||
abstract_type = /datum/config_entry/number/mc_tick_rate
|
||||
|
||||
/datum/config_entry/number/mc_tick_rate/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if (.)
|
||||
Master.UpdateTickRate()
|
||||
|
||||
/datum/config_entry/flag/resume_after_initializations
|
||||
|
||||
/datum/config_entry/flag/resume_after_initializations/ValidateAndSet(str_val)
|
||||
. = ..()
|
||||
if(. && Master.current_runlevel)
|
||||
world.sleep_offline = !config_entry_value
|
||||
|
||||
/datum/config_entry/number/rounds_until_hard_restart
|
||||
config_entry_value = -1
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/string/default_view
|
||||
config_entry_value = "15x15"
|
||||
|
||||
/datum/config_entry/flag/log_pictures
|
||||
|
||||
/datum/config_entry/flag/picture_logging_camera
|
||||
|
||||
@@ -1,102 +1,102 @@
|
||||
/**
|
||||
* Failsafe
|
||||
*
|
||||
* Pretty much pokes the MC to make sure it's still alive.
|
||||
**/
|
||||
|
||||
GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
|
||||
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
|
||||
name = "Failsafe"
|
||||
|
||||
// The length of time to check on the MC (in deciseconds).
|
||||
// Set to 0 to disable.
|
||||
var/processing_interval = 20
|
||||
// The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC.
|
||||
var/defcon = 5
|
||||
//the world.time of the last check, so the mc can restart US if we hang.
|
||||
// (Real friends look out for *eachother*)
|
||||
var/lasttick = 0
|
||||
|
||||
// Track the MC iteration to make sure its still on track.
|
||||
var/master_iteration = 0
|
||||
var/running = TRUE
|
||||
|
||||
/datum/controller/failsafe/New()
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
if(Failsafe != src)
|
||||
if(istype(Failsafe))
|
||||
qdel(Failsafe)
|
||||
Failsafe = src
|
||||
Initialize()
|
||||
|
||||
/datum/controller/failsafe/Initialize()
|
||||
set waitfor = 0
|
||||
Failsafe.Loop()
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
|
||||
|
||||
/datum/controller/failsafe/Destroy()
|
||||
running = FALSE
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/datum/controller/failsafe/proc/Loop()
|
||||
while(running)
|
||||
lasttick = world.time
|
||||
if(!Master)
|
||||
// Replace the missing Master! This should never, ever happen.
|
||||
new /datum/controller/master()
|
||||
// Only poke it if overrides are not in effect.
|
||||
if(processing_interval > 0)
|
||||
if(Master.processing && Master.iteration)
|
||||
// Check if processing is done yet.
|
||||
if(Master.iteration == master_iteration)
|
||||
switch(defcon)
|
||||
if(4,5)
|
||||
--defcon
|
||||
if(3)
|
||||
message_admins("<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(2)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(1)
|
||||
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
|
||||
--defcon
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else if(rtn < 0)
|
||||
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
|
||||
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
|
||||
//no need to handle that specially when defcon 0 can handle it
|
||||
if(0) //DEFCON 0! (mc failed to restart)
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else
|
||||
defcon = min(defcon + 1,5)
|
||||
master_iteration = Master.iteration
|
||||
if (defcon <= 1)
|
||||
sleep(processing_interval*2)
|
||||
else
|
||||
sleep(processing_interval)
|
||||
else
|
||||
defcon = 5
|
||||
sleep(initial(processing_interval))
|
||||
|
||||
/datum/controller/failsafe/proc/defcon_pretty()
|
||||
return defcon
|
||||
|
||||
/datum/controller/failsafe/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
|
||||
/**
|
||||
* Failsafe
|
||||
*
|
||||
* Pretty much pokes the MC to make sure it's still alive.
|
||||
**/
|
||||
|
||||
GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
|
||||
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
|
||||
name = "Failsafe"
|
||||
|
||||
// The length of time to check on the MC (in deciseconds).
|
||||
// Set to 0 to disable.
|
||||
var/processing_interval = 20
|
||||
// The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC.
|
||||
var/defcon = 5
|
||||
//the world.time of the last check, so the mc can restart US if we hang.
|
||||
// (Real friends look out for *eachother*)
|
||||
var/lasttick = 0
|
||||
|
||||
// Track the MC iteration to make sure its still on track.
|
||||
var/master_iteration = 0
|
||||
var/running = TRUE
|
||||
|
||||
/datum/controller/failsafe/New()
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
if(Failsafe != src)
|
||||
if(istype(Failsafe))
|
||||
qdel(Failsafe)
|
||||
Failsafe = src
|
||||
Initialize()
|
||||
|
||||
/datum/controller/failsafe/Initialize()
|
||||
set waitfor = 0
|
||||
Failsafe.Loop()
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
|
||||
|
||||
/datum/controller/failsafe/Destroy()
|
||||
running = FALSE
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/datum/controller/failsafe/proc/Loop()
|
||||
while(running)
|
||||
lasttick = world.time
|
||||
if(!Master)
|
||||
// Replace the missing Master! This should never, ever happen.
|
||||
new /datum/controller/master()
|
||||
// Only poke it if overrides are not in effect.
|
||||
if(processing_interval > 0)
|
||||
if(Master.processing && Master.iteration)
|
||||
// Check if processing is done yet.
|
||||
if(Master.iteration == master_iteration)
|
||||
switch(defcon)
|
||||
if(4,5)
|
||||
--defcon
|
||||
if(3)
|
||||
message_admins("<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(2)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
|
||||
--defcon
|
||||
if(1)
|
||||
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
|
||||
--defcon
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else if(rtn < 0)
|
||||
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
|
||||
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
|
||||
//no need to handle that specially when defcon 0 can handle it
|
||||
if(0) //DEFCON 0! (mc failed to restart)
|
||||
var/rtn = Recreate_MC()
|
||||
if(rtn > 0)
|
||||
defcon = 4
|
||||
master_iteration = 0
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
|
||||
else
|
||||
defcon = min(defcon + 1,5)
|
||||
master_iteration = Master.iteration
|
||||
if (defcon <= 1)
|
||||
sleep(processing_interval*2)
|
||||
else
|
||||
sleep(processing_interval)
|
||||
else
|
||||
defcon = 5
|
||||
sleep(initial(processing_interval))
|
||||
|
||||
/datum/controller/failsafe/proc/defcon_pretty()
|
||||
return defcon
|
||||
|
||||
/datum/controller/failsafe/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Failsafe Controller:", statclick.update("Defcon: [defcon_pretty()] (Interval: [Failsafe.processing_interval] | Iteration: [Failsafe.master_iteration])"))
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
|
||||
/datum/controller/global_vars
|
||||
name = "Global Variables"
|
||||
|
||||
var/static/list/gvars_datum_protected_varlist
|
||||
var/list/gvars_datum_in_built_vars
|
||||
var/list/gvars_datum_init_order
|
||||
|
||||
/datum/controller/global_vars/New()
|
||||
if(GLOB)
|
||||
CRASH("Multiple instances of global variable controller created")
|
||||
GLOB = src
|
||||
|
||||
var/datum/controller/exclude_these = new
|
||||
gvars_datum_in_built_vars = exclude_these.vars + list(NAMEOF(src, gvars_datum_protected_varlist), NAMEOF(src, gvars_datum_in_built_vars), NAMEOF(src, gvars_datum_init_order))
|
||||
QDEL_IN(exclude_these, 0) //signal logging isn't ready
|
||||
|
||||
log_world("[vars.len - gvars_datum_in_built_vars.len] global variables")
|
||||
|
||||
Initialize()
|
||||
|
||||
/datum/controller/global_vars/Destroy()
|
||||
//fuck off kevinz
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/datum/controller/global_vars/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Globals:", statclick.update("Edit"))
|
||||
|
||||
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
|
||||
if(gvars_datum_protected_varlist[var_name])
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/global_vars/Initialize()
|
||||
gvars_datum_init_order = list()
|
||||
gvars_datum_protected_varlist = list(NAMEOF(src, gvars_datum_protected_varlist) = TRUE)
|
||||
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
|
||||
var/expected_len = vars.len - gvars_datum_in_built_vars.len
|
||||
if(global_procs.len != expected_len)
|
||||
warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
|
||||
if(global_procs.len)
|
||||
var/list/expected_global_procs = vars - gvars_datum_in_built_vars
|
||||
for(var/I in global_procs)
|
||||
expected_global_procs -= replacetext("[I]", "InitGlobal", "")
|
||||
log_world("Missing procs: [expected_global_procs.Join(", ")]")
|
||||
for(var/I in global_procs)
|
||||
var/start_tick = world.time
|
||||
call(src, I)()
|
||||
var/end_tick = world.time
|
||||
if(end_tick - start_tick)
|
||||
warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
|
||||
GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
|
||||
/datum/controller/global_vars
|
||||
name = "Global Variables"
|
||||
|
||||
var/static/list/gvars_datum_protected_varlist
|
||||
var/list/gvars_datum_in_built_vars
|
||||
var/list/gvars_datum_init_order
|
||||
|
||||
/datum/controller/global_vars/New()
|
||||
if(GLOB)
|
||||
CRASH("Multiple instances of global variable controller created")
|
||||
GLOB = src
|
||||
|
||||
var/datum/controller/exclude_these = new
|
||||
gvars_datum_in_built_vars = exclude_these.vars + list(NAMEOF(src, gvars_datum_protected_varlist), NAMEOF(src, gvars_datum_in_built_vars), NAMEOF(src, gvars_datum_init_order))
|
||||
QDEL_IN(exclude_these, 0) //signal logging isn't ready
|
||||
|
||||
log_world("[vars.len - gvars_datum_in_built_vars.len] global variables")
|
||||
|
||||
Initialize()
|
||||
|
||||
/datum/controller/global_vars/Destroy()
|
||||
//fuck off kevinz
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/datum/controller/global_vars/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Globals:", statclick.update("Edit"))
|
||||
|
||||
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
|
||||
if(gvars_datum_protected_varlist[var_name])
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/global_vars/Initialize()
|
||||
gvars_datum_init_order = list()
|
||||
gvars_datum_protected_varlist = list(NAMEOF(src, gvars_datum_protected_varlist) = TRUE)
|
||||
var/list/global_procs = typesof(/datum/controller/global_vars/proc)
|
||||
var/expected_len = vars.len - gvars_datum_in_built_vars.len
|
||||
if(global_procs.len != expected_len)
|
||||
warning("Unable to detect all global initialization procs! Expected [expected_len] got [global_procs.len]!")
|
||||
if(global_procs.len)
|
||||
var/list/expected_global_procs = vars - gvars_datum_in_built_vars
|
||||
for(var/I in global_procs)
|
||||
expected_global_procs -= replacetext("[I]", "InitGlobal", "")
|
||||
log_world("Missing procs: [expected_global_procs.Join(", ")]")
|
||||
for(var/I in global_procs)
|
||||
var/start_tick = world.time
|
||||
call(src, I)()
|
||||
var/end_tick = world.time
|
||||
if(end_tick - start_tick)
|
||||
warning("Global [replacetext("[I]", "InitGlobal", "")] slept during initialization!")
|
||||
|
||||
@@ -54,7 +54,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
var/static/restart_clear = 0
|
||||
var/static/restart_timeout = 0
|
||||
var/static/restart_count = 0
|
||||
|
||||
|
||||
var/static/random_seed
|
||||
|
||||
//current tick limit, assigned before running a subsystem.
|
||||
@@ -69,7 +69,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
if(!random_seed)
|
||||
random_seed = (TEST_RUN_PARAMETER in world.params) ? 29051994 : rand(1, 1e9)
|
||||
rand_seed(random_seed)
|
||||
|
||||
|
||||
var/list/_subsystems = list()
|
||||
subsystems = _subsystems
|
||||
if (Master != src)
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
if(SS_SLEEPING)
|
||||
state = SS_PAUSING
|
||||
|
||||
/datum/controller/subsystem/proc/subsystem_log(msg)
|
||||
return log_subsystem(name, msg)
|
||||
|
||||
//used to initialize the subsystem AFTER the map has loaded
|
||||
/datum/controller/subsystem/Initialize(start_timeofday)
|
||||
@@ -162,7 +164,7 @@
|
||||
var/time = (REALTIMEOFDAY - start_timeofday) / 10
|
||||
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
|
||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||
log_world(msg)
|
||||
log_subsystem("INIT", msg)
|
||||
return time
|
||||
|
||||
//hook for printing stats to the "MC" statuspanel for admins to see performance and related stats etc.
|
||||
|
||||
@@ -315,7 +315,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/starting_ats = active_turfs.len
|
||||
sleep(world.tick_lag)
|
||||
var/timer = world.timeofday
|
||||
warning("There are [starting_ats] active turfs at roundstart, this is a mapping error caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required)")
|
||||
log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).")
|
||||
for(var/turf/T in active_turfs)
|
||||
GLOB.active_turfs_startlist += T
|
||||
|
||||
|
||||
@@ -1,151 +1,151 @@
|
||||
#define BAD_INIT_QDEL_BEFORE 1
|
||||
#define BAD_INIT_DIDNT_INIT 2
|
||||
#define BAD_INIT_SLEPT 4
|
||||
#define BAD_INIT_NO_HINT 8
|
||||
|
||||
SUBSYSTEM_DEF(atoms)
|
||||
name = "Atoms"
|
||||
init_order = INIT_ORDER_ATOMS
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/old_initialized
|
||||
|
||||
var/list/late_loaders
|
||||
|
||||
var/list/BadInitializeCalls = list()
|
||||
|
||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||
GLOB.fire_overlay.appearance_flags = RESET_COLOR
|
||||
setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation.
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
InitializeAtoms()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
return
|
||||
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
|
||||
LAZYINITLIST(late_loaders)
|
||||
|
||||
var/count
|
||||
var/list/mapload_arg = list(TRUE)
|
||||
if(atoms)
|
||||
count = atoms.len
|
||||
for(var/I in atoms)
|
||||
var/atom/A = I
|
||||
if(!(A.flags_1 & INITIALIZED_1))
|
||||
InitAtom(I, mapload_arg)
|
||||
CHECK_TICK
|
||||
else
|
||||
count = 0
|
||||
for(var/atom/A in world)
|
||||
if(!(A.flags_1 & INITIALIZED_1))
|
||||
InitAtom(A, mapload_arg)
|
||||
++count
|
||||
CHECK_TICK
|
||||
|
||||
testing("Initialized [count] atoms")
|
||||
pass(count)
|
||||
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
if(late_loaders.len)
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
A.LateInitialize()
|
||||
testing("Late initialized [late_loaders.len] atoms")
|
||||
late_loaders.Cut()
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
|
||||
var/the_type = A.type
|
||||
if(QDELING(A))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_QDEL_BEFORE
|
||||
return TRUE
|
||||
|
||||
var/start_tick = world.time
|
||||
|
||||
var/result = A.Initialize(arglist(arguments))
|
||||
|
||||
if(start_tick != world.time)
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
|
||||
|
||||
var/qdeleted = FALSE
|
||||
|
||||
if(result != INITIALIZE_HINT_NORMAL)
|
||||
switch(result)
|
||||
if(INITIALIZE_HINT_LATELOAD)
|
||||
if(arguments[1]) //mapload
|
||||
late_loaders += A
|
||||
else
|
||||
A.LateInitialize()
|
||||
if(INITIALIZE_HINT_QDEL)
|
||||
qdel(A)
|
||||
qdeleted = TRUE
|
||||
else
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_NO_HINT
|
||||
|
||||
if(!A) //possible harddel
|
||||
qdeleted = TRUE
|
||||
else if(!(A.flags_1 & INITIALIZED_1))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
|
||||
|
||||
return qdeleted || QDELING(A)
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_begin()
|
||||
old_initialized = initialized
|
||||
initialized = INITIALIZATION_INSSATOMS
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_stop()
|
||||
initialized = old_initialized
|
||||
|
||||
/datum/controller/subsystem/atoms/Recover()
|
||||
initialized = SSatoms.initialized
|
||||
if(initialized == INITIALIZATION_INNEW_MAPLOAD)
|
||||
InitializeAtoms()
|
||||
old_initialized = SSatoms.old_initialized
|
||||
BadInitializeCalls = SSatoms.BadInitializeCalls
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/setupGenetics()
|
||||
var/list/avnums = new /list(DNA_STRUC_ENZYMES_BLOCKS)
|
||||
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
|
||||
avnums[i] = i
|
||||
CHECK_TICK
|
||||
|
||||
for(var/A in subtypesof(/datum/mutation/human))
|
||||
var/datum/mutation/human/B = new A()
|
||||
if(B.dna_block == NON_SCANNABLE)
|
||||
continue
|
||||
B.dna_block = pick_n_take(avnums)
|
||||
if(B.quality == POSITIVE)
|
||||
GLOB.good_mutations |= B
|
||||
else if(B.quality == NEGATIVE)
|
||||
GLOB.bad_mutations |= B
|
||||
else if(B.quality == MINOR_NEGATIVE)
|
||||
GLOB.not_good_mutations |= B
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitLog()
|
||||
. = ""
|
||||
for(var/path in BadInitializeCalls)
|
||||
. += "Path : [path] \n"
|
||||
var/fails = BadInitializeCalls[path]
|
||||
if(fails & BAD_INIT_DIDNT_INIT)
|
||||
. += "- Didn't call atom/Initialize()\n"
|
||||
if(fails & BAD_INIT_NO_HINT)
|
||||
. += "- Didn't return an Initialize hint\n"
|
||||
if(fails & BAD_INIT_QDEL_BEFORE)
|
||||
. += "- Qdel'd in New()\n"
|
||||
if(fails & BAD_INIT_SLEPT)
|
||||
. += "- Slept during Initialize()\n"
|
||||
|
||||
/datum/controller/subsystem/atoms/Shutdown()
|
||||
var/initlog = InitLog()
|
||||
if(initlog)
|
||||
text2file(initlog, "[GLOB.log_directory]/initialize.log")
|
||||
|
||||
#undef BAD_INIT_QDEL_BEFORE
|
||||
#undef BAD_INIT_DIDNT_INIT
|
||||
#undef BAD_INIT_SLEPT
|
||||
#undef BAD_INIT_NO_HINT
|
||||
#define BAD_INIT_QDEL_BEFORE 1
|
||||
#define BAD_INIT_DIDNT_INIT 2
|
||||
#define BAD_INIT_SLEPT 4
|
||||
#define BAD_INIT_NO_HINT 8
|
||||
|
||||
SUBSYSTEM_DEF(atoms)
|
||||
name = "Atoms"
|
||||
init_order = INIT_ORDER_ATOMS
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/old_initialized
|
||||
|
||||
var/list/late_loaders
|
||||
|
||||
var/list/BadInitializeCalls = list()
|
||||
|
||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||
GLOB.fire_overlay.appearance_flags = RESET_COLOR
|
||||
setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation.
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
InitializeAtoms()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
return
|
||||
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
|
||||
LAZYINITLIST(late_loaders)
|
||||
|
||||
var/count
|
||||
var/list/mapload_arg = list(TRUE)
|
||||
if(atoms)
|
||||
count = atoms.len
|
||||
for(var/I in atoms)
|
||||
var/atom/A = I
|
||||
if(!(A.flags_1 & INITIALIZED_1))
|
||||
InitAtom(I, mapload_arg)
|
||||
CHECK_TICK
|
||||
else
|
||||
count = 0
|
||||
for(var/atom/A in world)
|
||||
if(!(A.flags_1 & INITIALIZED_1))
|
||||
InitAtom(A, mapload_arg)
|
||||
++count
|
||||
CHECK_TICK
|
||||
|
||||
testing("Initialized [count] atoms")
|
||||
pass(count)
|
||||
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
if(late_loaders.len)
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
A.LateInitialize()
|
||||
testing("Late initialized [late_loaders.len] atoms")
|
||||
late_loaders.Cut()
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
|
||||
var/the_type = A.type
|
||||
if(QDELING(A))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_QDEL_BEFORE
|
||||
return TRUE
|
||||
|
||||
var/start_tick = world.time
|
||||
|
||||
var/result = A.Initialize(arglist(arguments))
|
||||
|
||||
if(start_tick != world.time)
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_SLEPT
|
||||
|
||||
var/qdeleted = FALSE
|
||||
|
||||
if(result != INITIALIZE_HINT_NORMAL)
|
||||
switch(result)
|
||||
if(INITIALIZE_HINT_LATELOAD)
|
||||
if(arguments[1]) //mapload
|
||||
late_loaders += A
|
||||
else
|
||||
A.LateInitialize()
|
||||
if(INITIALIZE_HINT_QDEL)
|
||||
qdel(A)
|
||||
qdeleted = TRUE
|
||||
else
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_NO_HINT
|
||||
|
||||
if(!A) //possible harddel
|
||||
qdeleted = TRUE
|
||||
else if(!(A.flags_1 & INITIALIZED_1))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
|
||||
|
||||
return qdeleted || QDELING(A)
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_begin()
|
||||
old_initialized = initialized
|
||||
initialized = INITIALIZATION_INSSATOMS
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_stop()
|
||||
initialized = old_initialized
|
||||
|
||||
/datum/controller/subsystem/atoms/Recover()
|
||||
initialized = SSatoms.initialized
|
||||
if(initialized == INITIALIZATION_INNEW_MAPLOAD)
|
||||
InitializeAtoms()
|
||||
old_initialized = SSatoms.old_initialized
|
||||
BadInitializeCalls = SSatoms.BadInitializeCalls
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/setupGenetics()
|
||||
var/list/avnums = new /list(DNA_STRUC_ENZYMES_BLOCKS)
|
||||
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
|
||||
avnums[i] = i
|
||||
CHECK_TICK
|
||||
|
||||
for(var/A in subtypesof(/datum/mutation/human))
|
||||
var/datum/mutation/human/B = new A()
|
||||
if(B.dna_block == NON_SCANNABLE)
|
||||
continue
|
||||
B.dna_block = pick_n_take(avnums)
|
||||
if(B.quality == POSITIVE)
|
||||
GLOB.good_mutations |= B
|
||||
else if(B.quality == NEGATIVE)
|
||||
GLOB.bad_mutations |= B
|
||||
else if(B.quality == MINOR_NEGATIVE)
|
||||
GLOB.not_good_mutations |= B
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitLog()
|
||||
. = ""
|
||||
for(var/path in BadInitializeCalls)
|
||||
. += "Path : [path] \n"
|
||||
var/fails = BadInitializeCalls[path]
|
||||
if(fails & BAD_INIT_DIDNT_INIT)
|
||||
. += "- Didn't call atom/Initialize()\n"
|
||||
if(fails & BAD_INIT_NO_HINT)
|
||||
. += "- Didn't return an Initialize hint\n"
|
||||
if(fails & BAD_INIT_QDEL_BEFORE)
|
||||
. += "- Qdel'd in New()\n"
|
||||
if(fails & BAD_INIT_SLEPT)
|
||||
. += "- Slept during Initialize()\n"
|
||||
|
||||
/datum/controller/subsystem/atoms/Shutdown()
|
||||
var/initlog = InitLog()
|
||||
if(initlog)
|
||||
text2file(initlog, "[GLOB.log_directory]/initialize.log")
|
||||
|
||||
#undef BAD_INIT_QDEL_BEFORE
|
||||
#undef BAD_INIT_DIDNT_INIT
|
||||
#undef BAD_INIT_SLEPT
|
||||
#undef BAD_INIT_NO_HINT
|
||||
|
||||
@@ -1,335 +1,335 @@
|
||||
SUBSYSTEM_DEF(blackbox)
|
||||
name = "Blackbox"
|
||||
wait = 6000
|
||||
flags = SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
init_order = INIT_ORDER_BLACKBOX
|
||||
|
||||
var/list/feedback = list() //list of datum/feedback_variable
|
||||
var/list/first_death = list() //the first death of this round, assoc. vars keep track of different things
|
||||
var/triggertime = 0
|
||||
var/sealed = FALSE //time to stop tracking stats?
|
||||
var/list/versions = list("antagonists" = 3,
|
||||
"admin_secrets_fun_used" = 2,
|
||||
"explosion" = 2,
|
||||
"time_dilation_current" = 3,
|
||||
"science_techweb_unlock" = 2,
|
||||
"round_end_stats" = 2) //associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this
|
||||
|
||||
/datum/controller/subsystem/blackbox/Initialize()
|
||||
triggertime = world.time
|
||||
record_feedback("amount", "random_seed", Master.random_seed)
|
||||
record_feedback("amount", "dm_version", DM_VERSION)
|
||||
record_feedback("amount", "byond_version", world.byond_version)
|
||||
record_feedback("amount", "byond_build", world.byond_build)
|
||||
. = ..()
|
||||
|
||||
//poll population
|
||||
/datum/controller/subsystem/blackbox/fire()
|
||||
set waitfor = FALSE //for population query
|
||||
|
||||
CheckPlayerCount()
|
||||
|
||||
if(CONFIG_GET(flag/use_exp_tracking))
|
||||
if((triggertime < 0) || (world.time > (triggertime +3000))) //subsystem fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire. The <0 is midnight rollover check
|
||||
update_exp(10,FALSE)
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/CheckPlayerCount()
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return
|
||||
var/playercount = 0
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/admincount = GLOB.admins.len
|
||||
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port, round_id) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]')")
|
||||
query_record_playercount.Execute()
|
||||
qdel(query_record_playercount)
|
||||
|
||||
/datum/controller/subsystem/blackbox/Recover()
|
||||
feedback = SSblackbox.feedback
|
||||
sealed = SSblackbox.sealed
|
||||
|
||||
//no touchie
|
||||
/datum/controller/subsystem/blackbox/vv_get_var(var_name)
|
||||
if(var_name == "feedback")
|
||||
return debug_variable(var_name, deepCopyList(feedback), 0, src)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("feedback")
|
||||
return FALSE
|
||||
if("sealed")
|
||||
if(var_value)
|
||||
return Seal()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
//Recorded on subsystem shutdown
|
||||
/datum/controller/subsystem/blackbox/proc/FinalFeedback()
|
||||
record_feedback("tally", "ahelp_stats", GLOB.ahelp_tickets.active_tickets.len, "unresolved")
|
||||
for (var/obj/machinery/telecomms/message_server/MS in GLOB.telecomms_list)
|
||||
if (MS.pda_msgs.len)
|
||||
record_feedback("tally", "radio_usage", MS.pda_msgs.len, "PDA")
|
||||
if (MS.rc_msgs.len)
|
||||
record_feedback("tally", "radio_usage", MS.rc_msgs.len, "request console")
|
||||
|
||||
for(var/player_key in GLOB.player_details)
|
||||
var/datum/player_details/PD = GLOB.player_details[player_key]
|
||||
record_feedback("tally", "client_byond_version", 1, PD.byond_version)
|
||||
|
||||
/datum/controller/subsystem/blackbox/Shutdown()
|
||||
sealed = FALSE
|
||||
FinalFeedback()
|
||||
|
||||
if (!SSdbcore.Connect())
|
||||
return
|
||||
|
||||
var/list/sqlrowlist = list()
|
||||
|
||||
for (var/datum/feedback_variable/FV in feedback)
|
||||
var/sqlversion = 1
|
||||
if(FV.key in versions)
|
||||
sqlversion = versions[FV.key]
|
||||
sqlrowlist += list(list("datetime" = "Now()", "round_id" = GLOB.round_id, "key_name" = "'[sanitizeSQL(FV.key)]'", "key_type" = "'[FV.key_type]'", "version" = "[sqlversion]", "json" = "'[sanitizeSQL(json_encode(FV.json))]'"))
|
||||
|
||||
if (!length(sqlrowlist))
|
||||
return
|
||||
|
||||
SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE)
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/Seal()
|
||||
if(sealed)
|
||||
return FALSE
|
||||
if(IsAdminAdvancedProcCall())
|
||||
message_admins("[key_name_admin(usr)] sealed the blackbox!")
|
||||
log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].")
|
||||
sealed = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/LogBroadcast(freq)
|
||||
if(sealed)
|
||||
return
|
||||
switch(freq)
|
||||
if(FREQ_COMMON)
|
||||
record_feedback("tally", "radio_usage", 1, "common")
|
||||
if(FREQ_SCIENCE)
|
||||
record_feedback("tally", "radio_usage", 1, "science")
|
||||
if(FREQ_COMMAND)
|
||||
record_feedback("tally", "radio_usage", 1, "command")
|
||||
if(FREQ_MEDICAL)
|
||||
record_feedback("tally", "radio_usage", 1, "medical")
|
||||
if(FREQ_ENGINEERING)
|
||||
record_feedback("tally", "radio_usage", 1, "engineering")
|
||||
if(FREQ_SECURITY)
|
||||
record_feedback("tally", "radio_usage", 1, "security")
|
||||
if(FREQ_SYNDICATE)
|
||||
record_feedback("tally", "radio_usage", 1, "syndicate")
|
||||
if(FREQ_SERVICE)
|
||||
record_feedback("tally", "radio_usage", 1, "service")
|
||||
if(FREQ_SUPPLY)
|
||||
record_feedback("tally", "radio_usage", 1, "supply")
|
||||
if(FREQ_CENTCOM)
|
||||
record_feedback("tally", "radio_usage", 1, "centcom")
|
||||
if(FREQ_AI_PRIVATE)
|
||||
record_feedback("tally", "radio_usage", 1, "ai private")
|
||||
if(FREQ_CTF_RED)
|
||||
record_feedback("tally", "radio_usage", 1, "CTF red team")
|
||||
if(FREQ_CTF_BLUE)
|
||||
record_feedback("tally", "radio_usage", 1, "CTF blue team")
|
||||
else
|
||||
record_feedback("tally", "radio_usage", 1, "other")
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/find_feedback_datum(key, key_type)
|
||||
for(var/datum/feedback_variable/FV in feedback)
|
||||
if(FV.key == key)
|
||||
return FV
|
||||
|
||||
var/datum/feedback_variable/FV = new(key, key_type)
|
||||
feedback += FV
|
||||
return FV
|
||||
/*
|
||||
feedback data can be recorded in 5 formats:
|
||||
"text"
|
||||
used for simple single-string records i.e. the current map
|
||||
further calls to the same key will append saved data unless the overwrite argument is true or it already exists
|
||||
when encoded calls made with overwrite will lack square brackets
|
||||
calls: SSblackbox.record_feedback("text", "example", 1, "sample text")
|
||||
SSblackbox.record_feedback("text", "example", 1, "other text")
|
||||
json: {"data":["sample text","other text"]}
|
||||
"amount"
|
||||
used to record simple counts of data i.e. the number of ahelps received
|
||||
further calls to the same key will add or subtract (if increment argument is a negative) from the saved amount
|
||||
calls: SSblackbox.record_feedback("amount", "example", 8)
|
||||
SSblackbox.record_feedback("amount", "example", 2)
|
||||
json: {"data":10}
|
||||
"tally"
|
||||
used to track the number of occurances of multiple related values i.e. how many times each type of gun is fired
|
||||
further calls to the same key will:
|
||||
add or subtract from the saved value of the data key if it already exists
|
||||
append the key and it's value if it doesn't exist
|
||||
calls: SSblackbox.record_feedback("tally", "example", 1, "sample data")
|
||||
SSblackbox.record_feedback("tally", "example", 4, "sample data")
|
||||
SSblackbox.record_feedback("tally", "example", 2, "other data")
|
||||
json: {"data":{"sample data":5,"other data":2}}
|
||||
"nested tally"
|
||||
used to track the number of occurances of structured semi-relational values i.e. the results of arcade machines
|
||||
similar to running total, but related values are nested in a multi-dimensional array built
|
||||
the final element in the data list is used as the tracking key, all prior elements are used for nesting
|
||||
all data list elements must be strings
|
||||
further calls to the same key will:
|
||||
add or subtract from the saved value of the data key if it already exists in the same multi-dimensional position
|
||||
append the key and it's value if it doesn't exist
|
||||
calls: SSblackbox.record_feedback("nested tally", "example", 1, list("fruit", "orange", "apricot"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 2, list("fruit", "orange", "orange"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange", "apricot"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 10, list("fruit", "red", "apple"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 1, list("vegetable", "orange", "carrot"))
|
||||
json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10}},"vegetable":{"orange":{"carrot":1}}}}
|
||||
tracking values associated with a number can't merge with a nesting value, trying to do so will append the list
|
||||
call: SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange"))
|
||||
json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10},"orange":3},"vegetable":{"orange":{"carrot":1}}}}
|
||||
"associative"
|
||||
used to record text that's associated with a value i.e. coordinates
|
||||
further calls to the same key will append a new list to existing data
|
||||
calls: SSblackbox.record_feedback("associative", "example", 1, list("text" = "example", "path" = /obj/item, "number" = 4))
|
||||
SSblackbox.record_feedback("associative", "example", 1, list("number" = 7, "text" = "example", "other text" = "sample"))
|
||||
json: {"data":{"1":{"text":"example","path":"/obj/item","number":"4"},"2":{"number":"7","text":"example","other text":"sample"}}}
|
||||
|
||||
Versioning
|
||||
If the format of a feedback variable is ever changed, i.e. how many levels of nesting are used or a new type of data is added to it, add it to the versions list
|
||||
When feedback is being saved if a key is in the versions list the value specified there will be used, otherwise all keys are assumed to be version = 1
|
||||
versions is an associative list, remember to use the same string in it as defined on a feedback variable, example:
|
||||
list/versions = list("round_end_stats" = 4,
|
||||
"admin_toggle" = 2,
|
||||
"gun_fired" = 2)
|
||||
*/
|
||||
/datum/controller/subsystem/blackbox/proc/record_feedback(key_type, key, increment, data, overwrite)
|
||||
if(sealed || !key_type || !istext(key) || !isnum(increment || !data))
|
||||
return
|
||||
var/datum/feedback_variable/FV = find_feedback_datum(key, key_type)
|
||||
switch(key_type)
|
||||
if("text")
|
||||
if(!istext(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
if(overwrite)
|
||||
FV.json["data"] = data
|
||||
else
|
||||
FV.json["data"] |= data
|
||||
if("amount")
|
||||
FV.json["data"] += increment
|
||||
if("tally")
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
FV.json["data"]["[data]"] += increment
|
||||
if("nested tally")
|
||||
if(!islist(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
FV.json["data"] = record_feedback_recurse_list(FV.json["data"], data, increment)
|
||||
if("associative")
|
||||
if(!islist(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
var/pos = length(FV.json["data"]) + 1
|
||||
FV.json["data"]["[pos]"] = list() //in 512 "pos" can be replaced with "[FV.json["data"].len+1]"
|
||||
for(var/i in data)
|
||||
if(islist(data[i]))
|
||||
FV.json["data"]["[pos]"]["[i]"] = data[i] //and here with "[FV.json["data"].len]"
|
||||
else
|
||||
FV.json["data"]["[pos]"]["[i]"] = "[data[i]]"
|
||||
else
|
||||
CRASH("Invalid feedback key_type: [key_type]")
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/record_feedback_recurse_list(list/L, list/key_list, increment, depth = 1)
|
||||
if(depth == key_list.len)
|
||||
if(L.Find(key_list[depth]))
|
||||
L["[key_list[depth]]"] += increment
|
||||
else
|
||||
var/list/LFI = list(key_list[depth] = increment)
|
||||
L += LFI
|
||||
else
|
||||
if(!L.Find(key_list[depth]))
|
||||
var/list/LGD = list(key_list[depth] = list())
|
||||
L += LGD
|
||||
L["[key_list[depth-1]]"] = .(L["[key_list[depth]]"], key_list, increment, ++depth)
|
||||
return L
|
||||
|
||||
/datum/feedback_variable
|
||||
var/key
|
||||
var/key_type
|
||||
var/list/json = list()
|
||||
|
||||
/datum/feedback_variable/New(new_key, new_key_type)
|
||||
key = new_key
|
||||
key_type = new_key_type
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L)
|
||||
set waitfor = FALSE
|
||||
if(sealed)
|
||||
return
|
||||
if(!L || !L.key || !L.mind)
|
||||
return
|
||||
if(!L.suiciding && !first_death.len)
|
||||
first_death["name"] = "[(L.real_name == L.name) ? L.real_name : "[L.real_name] as [L.name]"]"
|
||||
first_death["role"] = null
|
||||
if(L.mind.assigned_role)
|
||||
first_death["role"] = L.mind.assigned_role
|
||||
first_death["area"] = "[AREACOORD(L)]"
|
||||
first_death["damage"] = "<font color='#FF5555'>[L.getBruteLoss()]</font>/<font color='orange'>[L.getFireLoss()]</font>/<font color='lightgreen'>[L.getToxLoss()]</font>/<font color='lightblue'>[L.getOxyLoss()]</font>/<font color='pink'>[L.getCloneLoss()]</font>"
|
||||
first_death["last_words"] = L.last_words
|
||||
var/sqlname = L.real_name
|
||||
var/sqlkey = L.ckey
|
||||
var/sqljob = L.mind.assigned_role
|
||||
var/sqlspecial = L.mind.special_role
|
||||
var/sqlpod = get_area_name(L, TRUE)
|
||||
var/laname = L.lastattacker
|
||||
var/lakey = L.lastattackerckey
|
||||
var/sqlbrute = L.getBruteLoss()
|
||||
var/sqlfire = L.getFireLoss()
|
||||
var/sqlbrain = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
var/sqloxy = L.getOxyLoss()
|
||||
var/sqltox = L.getToxLoss()
|
||||
var/sqlclone = L.getCloneLoss()
|
||||
var/sqlstamina = L.getStaminaLoss()
|
||||
var/x_coord = L.x
|
||||
var/y_coord = L.y
|
||||
var/z_coord = L.z
|
||||
var/last_words = L.last_words
|
||||
var/suicide = L.suiciding
|
||||
var/map = SSmapping.config.map_name
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return
|
||||
|
||||
sqlname = sanitizeSQL(sqlname)
|
||||
sqlkey = sanitizeSQL(sqlkey)
|
||||
sqljob = sanitizeSQL(sqljob)
|
||||
sqlspecial = sanitizeSQL(sqlspecial)
|
||||
sqlpod = sanitizeSQL(sqlpod)
|
||||
laname = sanitizeSQL(laname)
|
||||
lakey = sanitizeSQL(lakey)
|
||||
sqlbrute = sanitizeSQL(sqlbrute)
|
||||
sqlfire = sanitizeSQL(sqlfire)
|
||||
sqlbrain = sanitizeSQL(sqlbrain)
|
||||
sqloxy = sanitizeSQL(sqloxy)
|
||||
sqltox = sanitizeSQL(sqltox)
|
||||
sqlclone = sanitizeSQL(sqlclone)
|
||||
sqlstamina = sanitizeSQL(sqlstamina)
|
||||
x_coord = sanitizeSQL(x_coord)
|
||||
y_coord = sanitizeSQL(y_coord)
|
||||
z_coord = sanitizeSQL(z_coord)
|
||||
last_words = sanitizeSQL(last_words)
|
||||
suicide = sanitizeSQL(suicide)
|
||||
map = sanitizeSQL(map)
|
||||
var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (pod, x_coord, y_coord, z_coord, mapname, server_ip, server_port, round_id, tod, job, special, name, byondkey, laname, lakey, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, last_words, suicide) VALUES ('[sqlpod]', '[x_coord]', '[y_coord]', '[z_coord]', '[map]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', [GLOB.round_id], '[SQLtime()]', '[sqljob]', '[sqlspecial]', '[sqlname]', '[sqlkey]', '[laname]', '[lakey]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[last_words]', [suicide])")
|
||||
if(query_report_death)
|
||||
query_report_death.Execute(async = TRUE)
|
||||
qdel(query_report_death)
|
||||
SUBSYSTEM_DEF(blackbox)
|
||||
name = "Blackbox"
|
||||
wait = 6000
|
||||
flags = SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
init_order = INIT_ORDER_BLACKBOX
|
||||
|
||||
var/list/feedback = list() //list of datum/feedback_variable
|
||||
var/list/first_death = list() //the first death of this round, assoc. vars keep track of different things
|
||||
var/triggertime = 0
|
||||
var/sealed = FALSE //time to stop tracking stats?
|
||||
var/list/versions = list("antagonists" = 3,
|
||||
"admin_secrets_fun_used" = 2,
|
||||
"explosion" = 2,
|
||||
"time_dilation_current" = 3,
|
||||
"science_techweb_unlock" = 2,
|
||||
"round_end_stats" = 2) //associative list of any feedback variables that have had their format changed since creation and their current version, remember to update this
|
||||
|
||||
/datum/controller/subsystem/blackbox/Initialize()
|
||||
triggertime = world.time
|
||||
record_feedback("amount", "random_seed", Master.random_seed)
|
||||
record_feedback("amount", "dm_version", DM_VERSION)
|
||||
record_feedback("amount", "byond_version", world.byond_version)
|
||||
record_feedback("amount", "byond_build", world.byond_build)
|
||||
. = ..()
|
||||
|
||||
//poll population
|
||||
/datum/controller/subsystem/blackbox/fire()
|
||||
set waitfor = FALSE //for population query
|
||||
|
||||
CheckPlayerCount()
|
||||
|
||||
if(CONFIG_GET(flag/use_exp_tracking))
|
||||
if((triggertime < 0) || (world.time > (triggertime +3000))) //subsystem fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire. The <0 is midnight rollover check
|
||||
update_exp(10,FALSE)
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/CheckPlayerCount()
|
||||
set waitfor = FALSE
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return
|
||||
var/playercount = 0
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
var/admincount = GLOB.admins.len
|
||||
var/datum/DBQuery/query_record_playercount = SSdbcore.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, admincount, time, server_ip, server_port, round_id) VALUES ([playercount], [admincount], '[SQLtime()]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]')")
|
||||
query_record_playercount.Execute()
|
||||
qdel(query_record_playercount)
|
||||
|
||||
/datum/controller/subsystem/blackbox/Recover()
|
||||
feedback = SSblackbox.feedback
|
||||
sealed = SSblackbox.sealed
|
||||
|
||||
//no touchie
|
||||
/datum/controller/subsystem/blackbox/vv_get_var(var_name)
|
||||
if(var_name == "feedback")
|
||||
return debug_variable(var_name, deepCopyList(feedback), 0, src)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/blackbox/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("feedback")
|
||||
return FALSE
|
||||
if("sealed")
|
||||
if(var_value)
|
||||
return Seal()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
//Recorded on subsystem shutdown
|
||||
/datum/controller/subsystem/blackbox/proc/FinalFeedback()
|
||||
record_feedback("tally", "ahelp_stats", GLOB.ahelp_tickets.active_tickets.len, "unresolved")
|
||||
for (var/obj/machinery/telecomms/message_server/MS in GLOB.telecomms_list)
|
||||
if (MS.pda_msgs.len)
|
||||
record_feedback("tally", "radio_usage", MS.pda_msgs.len, "PDA")
|
||||
if (MS.rc_msgs.len)
|
||||
record_feedback("tally", "radio_usage", MS.rc_msgs.len, "request console")
|
||||
|
||||
for(var/player_key in GLOB.player_details)
|
||||
var/datum/player_details/PD = GLOB.player_details[player_key]
|
||||
record_feedback("tally", "client_byond_version", 1, PD.byond_version)
|
||||
|
||||
/datum/controller/subsystem/blackbox/Shutdown()
|
||||
sealed = FALSE
|
||||
FinalFeedback()
|
||||
|
||||
if (!SSdbcore.Connect())
|
||||
return
|
||||
|
||||
var/list/sqlrowlist = list()
|
||||
|
||||
for (var/datum/feedback_variable/FV in feedback)
|
||||
var/sqlversion = 1
|
||||
if(FV.key in versions)
|
||||
sqlversion = versions[FV.key]
|
||||
sqlrowlist += list(list("datetime" = "Now()", "round_id" = GLOB.round_id, "key_name" = "'[sanitizeSQL(FV.key)]'", "key_type" = "'[FV.key_type]'", "version" = "[sqlversion]", "json" = "'[sanitizeSQL(json_encode(FV.json))]'"))
|
||||
|
||||
if (!length(sqlrowlist))
|
||||
return
|
||||
|
||||
SSdbcore.MassInsert(format_table_name("feedback"), sqlrowlist, ignore_errors = TRUE, delayed = TRUE)
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/Seal()
|
||||
if(sealed)
|
||||
return FALSE
|
||||
if(IsAdminAdvancedProcCall())
|
||||
message_admins("[key_name_admin(usr)] sealed the blackbox!")
|
||||
log_game("Blackbox sealed[IsAdminAdvancedProcCall() ? " by [key_name(usr)]" : ""].")
|
||||
sealed = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/LogBroadcast(freq)
|
||||
if(sealed)
|
||||
return
|
||||
switch(freq)
|
||||
if(FREQ_COMMON)
|
||||
record_feedback("tally", "radio_usage", 1, "common")
|
||||
if(FREQ_SCIENCE)
|
||||
record_feedback("tally", "radio_usage", 1, "science")
|
||||
if(FREQ_COMMAND)
|
||||
record_feedback("tally", "radio_usage", 1, "command")
|
||||
if(FREQ_MEDICAL)
|
||||
record_feedback("tally", "radio_usage", 1, "medical")
|
||||
if(FREQ_ENGINEERING)
|
||||
record_feedback("tally", "radio_usage", 1, "engineering")
|
||||
if(FREQ_SECURITY)
|
||||
record_feedback("tally", "radio_usage", 1, "security")
|
||||
if(FREQ_SYNDICATE)
|
||||
record_feedback("tally", "radio_usage", 1, "syndicate")
|
||||
if(FREQ_SERVICE)
|
||||
record_feedback("tally", "radio_usage", 1, "service")
|
||||
if(FREQ_SUPPLY)
|
||||
record_feedback("tally", "radio_usage", 1, "supply")
|
||||
if(FREQ_CENTCOM)
|
||||
record_feedback("tally", "radio_usage", 1, "centcom")
|
||||
if(FREQ_AI_PRIVATE)
|
||||
record_feedback("tally", "radio_usage", 1, "ai private")
|
||||
if(FREQ_CTF_RED)
|
||||
record_feedback("tally", "radio_usage", 1, "CTF red team")
|
||||
if(FREQ_CTF_BLUE)
|
||||
record_feedback("tally", "radio_usage", 1, "CTF blue team")
|
||||
else
|
||||
record_feedback("tally", "radio_usage", 1, "other")
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/find_feedback_datum(key, key_type)
|
||||
for(var/datum/feedback_variable/FV in feedback)
|
||||
if(FV.key == key)
|
||||
return FV
|
||||
|
||||
var/datum/feedback_variable/FV = new(key, key_type)
|
||||
feedback += FV
|
||||
return FV
|
||||
/*
|
||||
feedback data can be recorded in 5 formats:
|
||||
"text"
|
||||
used for simple single-string records i.e. the current map
|
||||
further calls to the same key will append saved data unless the overwrite argument is true or it already exists
|
||||
when encoded calls made with overwrite will lack square brackets
|
||||
calls: SSblackbox.record_feedback("text", "example", 1, "sample text")
|
||||
SSblackbox.record_feedback("text", "example", 1, "other text")
|
||||
json: {"data":["sample text","other text"]}
|
||||
"amount"
|
||||
used to record simple counts of data i.e. the number of ahelps received
|
||||
further calls to the same key will add or subtract (if increment argument is a negative) from the saved amount
|
||||
calls: SSblackbox.record_feedback("amount", "example", 8)
|
||||
SSblackbox.record_feedback("amount", "example", 2)
|
||||
json: {"data":10}
|
||||
"tally"
|
||||
used to track the number of occurances of multiple related values i.e. how many times each type of gun is fired
|
||||
further calls to the same key will:
|
||||
add or subtract from the saved value of the data key if it already exists
|
||||
append the key and it's value if it doesn't exist
|
||||
calls: SSblackbox.record_feedback("tally", "example", 1, "sample data")
|
||||
SSblackbox.record_feedback("tally", "example", 4, "sample data")
|
||||
SSblackbox.record_feedback("tally", "example", 2, "other data")
|
||||
json: {"data":{"sample data":5,"other data":2}}
|
||||
"nested tally"
|
||||
used to track the number of occurances of structured semi-relational values i.e. the results of arcade machines
|
||||
similar to running total, but related values are nested in a multi-dimensional array built
|
||||
the final element in the data list is used as the tracking key, all prior elements are used for nesting
|
||||
all data list elements must be strings
|
||||
further calls to the same key will:
|
||||
add or subtract from the saved value of the data key if it already exists in the same multi-dimensional position
|
||||
append the key and it's value if it doesn't exist
|
||||
calls: SSblackbox.record_feedback("nested tally", "example", 1, list("fruit", "orange", "apricot"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 2, list("fruit", "orange", "orange"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange", "apricot"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 10, list("fruit", "red", "apple"))
|
||||
SSblackbox.record_feedback("nested tally", "example", 1, list("vegetable", "orange", "carrot"))
|
||||
json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10}},"vegetable":{"orange":{"carrot":1}}}}
|
||||
tracking values associated with a number can't merge with a nesting value, trying to do so will append the list
|
||||
call: SSblackbox.record_feedback("nested tally", "example", 3, list("fruit", "orange"))
|
||||
json: {"data":{"fruit":{"orange":{"apricot":4,"orange":2},"red":{"apple":10},"orange":3},"vegetable":{"orange":{"carrot":1}}}}
|
||||
"associative"
|
||||
used to record text that's associated with a value i.e. coordinates
|
||||
further calls to the same key will append a new list to existing data
|
||||
calls: SSblackbox.record_feedback("associative", "example", 1, list("text" = "example", "path" = /obj/item, "number" = 4))
|
||||
SSblackbox.record_feedback("associative", "example", 1, list("number" = 7, "text" = "example", "other text" = "sample"))
|
||||
json: {"data":{"1":{"text":"example","path":"/obj/item","number":"4"},"2":{"number":"7","text":"example","other text":"sample"}}}
|
||||
|
||||
Versioning
|
||||
If the format of a feedback variable is ever changed, i.e. how many levels of nesting are used or a new type of data is added to it, add it to the versions list
|
||||
When feedback is being saved if a key is in the versions list the value specified there will be used, otherwise all keys are assumed to be version = 1
|
||||
versions is an associative list, remember to use the same string in it as defined on a feedback variable, example:
|
||||
list/versions = list("round_end_stats" = 4,
|
||||
"admin_toggle" = 2,
|
||||
"gun_fired" = 2)
|
||||
*/
|
||||
/datum/controller/subsystem/blackbox/proc/record_feedback(key_type, key, increment, data, overwrite)
|
||||
if(sealed || !key_type || !istext(key) || !isnum(increment || !data))
|
||||
return
|
||||
var/datum/feedback_variable/FV = find_feedback_datum(key, key_type)
|
||||
switch(key_type)
|
||||
if("text")
|
||||
if(!istext(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
if(overwrite)
|
||||
FV.json["data"] = data
|
||||
else
|
||||
FV.json["data"] |= data
|
||||
if("amount")
|
||||
FV.json["data"] += increment
|
||||
if("tally")
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
FV.json["data"]["[data]"] += increment
|
||||
if("nested tally")
|
||||
if(!islist(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
FV.json["data"] = record_feedback_recurse_list(FV.json["data"], data, increment)
|
||||
if("associative")
|
||||
if(!islist(data))
|
||||
return
|
||||
if(!islist(FV.json["data"]))
|
||||
FV.json["data"] = list()
|
||||
var/pos = length(FV.json["data"]) + 1
|
||||
FV.json["data"]["[pos]"] = list() //in 512 "pos" can be replaced with "[FV.json["data"].len+1]"
|
||||
for(var/i in data)
|
||||
if(islist(data[i]))
|
||||
FV.json["data"]["[pos]"]["[i]"] = data[i] //and here with "[FV.json["data"].len]"
|
||||
else
|
||||
FV.json["data"]["[pos]"]["[i]"] = "[data[i]]"
|
||||
else
|
||||
CRASH("Invalid feedback key_type: [key_type]")
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/record_feedback_recurse_list(list/L, list/key_list, increment, depth = 1)
|
||||
if(depth == key_list.len)
|
||||
if(L.Find(key_list[depth]))
|
||||
L["[key_list[depth]]"] += increment
|
||||
else
|
||||
var/list/LFI = list(key_list[depth] = increment)
|
||||
L += LFI
|
||||
else
|
||||
if(!L.Find(key_list[depth]))
|
||||
var/list/LGD = list(key_list[depth] = list())
|
||||
L += LGD
|
||||
L["[key_list[depth-1]]"] = .(L["[key_list[depth]]"], key_list, increment, ++depth)
|
||||
return L
|
||||
|
||||
/datum/feedback_variable
|
||||
var/key
|
||||
var/key_type
|
||||
var/list/json = list()
|
||||
|
||||
/datum/feedback_variable/New(new_key, new_key_type)
|
||||
key = new_key
|
||||
key_type = new_key_type
|
||||
|
||||
/datum/controller/subsystem/blackbox/proc/ReportDeath(mob/living/L)
|
||||
set waitfor = FALSE
|
||||
if(sealed)
|
||||
return
|
||||
if(!L || !L.key || !L.mind)
|
||||
return
|
||||
if(!L.suiciding && !first_death.len)
|
||||
first_death["name"] = "[(L.real_name == L.name) ? L.real_name : "[L.real_name] as [L.name]"]"
|
||||
first_death["role"] = null
|
||||
if(L.mind.assigned_role)
|
||||
first_death["role"] = L.mind.assigned_role
|
||||
first_death["area"] = "[AREACOORD(L)]"
|
||||
first_death["damage"] = "<font color='#FF5555'>[L.getBruteLoss()]</font>/<font color='orange'>[L.getFireLoss()]</font>/<font color='lightgreen'>[L.getToxLoss()]</font>/<font color='lightblue'>[L.getOxyLoss()]</font>/<font color='pink'>[L.getCloneLoss()]</font>"
|
||||
first_death["last_words"] = L.last_words
|
||||
var/sqlname = L.real_name
|
||||
var/sqlkey = L.ckey
|
||||
var/sqljob = L.mind.assigned_role
|
||||
var/sqlspecial = L.mind.special_role
|
||||
var/sqlpod = get_area_name(L, TRUE)
|
||||
var/laname = L.lastattacker
|
||||
var/lakey = L.lastattackerckey
|
||||
var/sqlbrute = L.getBruteLoss()
|
||||
var/sqlfire = L.getFireLoss()
|
||||
var/sqlbrain = L.getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
var/sqloxy = L.getOxyLoss()
|
||||
var/sqltox = L.getToxLoss()
|
||||
var/sqlclone = L.getCloneLoss()
|
||||
var/sqlstamina = L.getStaminaLoss()
|
||||
var/x_coord = L.x
|
||||
var/y_coord = L.y
|
||||
var/z_coord = L.z
|
||||
var/last_words = L.last_words
|
||||
var/suicide = L.suiciding
|
||||
var/map = SSmapping.config.map_name
|
||||
|
||||
if(!SSdbcore.Connect())
|
||||
return
|
||||
|
||||
sqlname = sanitizeSQL(sqlname)
|
||||
sqlkey = sanitizeSQL(sqlkey)
|
||||
sqljob = sanitizeSQL(sqljob)
|
||||
sqlspecial = sanitizeSQL(sqlspecial)
|
||||
sqlpod = sanitizeSQL(sqlpod)
|
||||
laname = sanitizeSQL(laname)
|
||||
lakey = sanitizeSQL(lakey)
|
||||
sqlbrute = sanitizeSQL(sqlbrute)
|
||||
sqlfire = sanitizeSQL(sqlfire)
|
||||
sqlbrain = sanitizeSQL(sqlbrain)
|
||||
sqloxy = sanitizeSQL(sqloxy)
|
||||
sqltox = sanitizeSQL(sqltox)
|
||||
sqlclone = sanitizeSQL(sqlclone)
|
||||
sqlstamina = sanitizeSQL(sqlstamina)
|
||||
x_coord = sanitizeSQL(x_coord)
|
||||
y_coord = sanitizeSQL(y_coord)
|
||||
z_coord = sanitizeSQL(z_coord)
|
||||
last_words = sanitizeSQL(last_words)
|
||||
suicide = sanitizeSQL(suicide)
|
||||
map = sanitizeSQL(map)
|
||||
var/datum/DBQuery/query_report_death = SSdbcore.NewQuery("INSERT INTO [format_table_name("death")] (pod, x_coord, y_coord, z_coord, mapname, server_ip, server_port, round_id, tod, job, special, name, byondkey, laname, lakey, bruteloss, fireloss, brainloss, oxyloss, toxloss, cloneloss, staminaloss, last_words, suicide) VALUES ('[sqlpod]', '[x_coord]', '[y_coord]', '[z_coord]', '[map]', INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', [GLOB.round_id], '[SQLtime()]', '[sqljob]', '[sqlspecial]', '[sqlname]', '[sqlkey]', '[laname]', '[lakey]', [sqlbrute], [sqlfire], [sqlbrain], [sqloxy], [sqltox], [sqlclone], [sqlstamina], '[last_words]', [suicide])")
|
||||
if(query_report_death)
|
||||
query_report_death.Execute(async = TRUE)
|
||||
qdel(query_report_death)
|
||||
|
||||
@@ -1,365 +1,365 @@
|
||||
SUBSYSTEM_DEF(dbcore)
|
||||
name = "Database"
|
||||
flags = SS_BACKGROUND
|
||||
wait = 1 MINUTES
|
||||
init_order = INIT_ORDER_DBCORE
|
||||
var/const/FAILED_DB_CONNECTION_CUTOFF = 5
|
||||
|
||||
var/schema_mismatch = 0
|
||||
var/db_minor = 0
|
||||
var/db_major = 0
|
||||
var/failed_connections = 0
|
||||
|
||||
var/last_error
|
||||
var/list/active_queries = list()
|
||||
|
||||
var/datum/BSQL_Connection/connection
|
||||
var/datum/BSQL_Operation/connectOperation
|
||||
|
||||
/datum/controller/subsystem/dbcore/Initialize()
|
||||
//We send warnings to the admins during subsystem init, as the clients will be New'd and messages
|
||||
//will queue properly with goonchat
|
||||
switch(schema_mismatch)
|
||||
if(1)
|
||||
message_admins("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
if(2)
|
||||
message_admins("Could not get schema version from database")
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/fire()
|
||||
for(var/I in active_queries)
|
||||
var/datum/DBQuery/Q = I
|
||||
if(world.time - Q.last_activity_time > (5 MINUTES))
|
||||
message_admins("Found undeleted query, please check the server logs and notify coders.")
|
||||
log_sql("Undeleted query: \"[Q.sql]\" LA: [Q.last_activity] LAT: [Q.last_activity_time]")
|
||||
qdel(Q)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/dbcore/Recover()
|
||||
connection = SSdbcore.connection
|
||||
connectOperation = SSdbcore.connectOperation
|
||||
|
||||
/datum/controller/subsystem/dbcore/Shutdown()
|
||||
//This is as close as we can get to the true round end before Disconnect() without changing where it's called, defeating the reason this is a subsystem
|
||||
if(SSdbcore.Connect())
|
||||
var/datum/DBQuery/query_round_shutdown = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shutdown_datetime = Now(), end_state = '[sanitizeSQL(SSticker.end_state)]' WHERE id = [GLOB.round_id]")
|
||||
query_round_shutdown.Execute()
|
||||
qdel(query_round_shutdown)
|
||||
if(IsConnected())
|
||||
Disconnect()
|
||||
world.BSQL_Shutdown()
|
||||
|
||||
//nu
|
||||
/datum/controller/subsystem/dbcore/can_vv_get(var_name)
|
||||
return var_name != NAMEOF(src, connection) && var_name != NAMEOF(src, active_queries) && var_name != NAMEOF(src, connectOperation) && ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, connection) || var_name == NAMEOF(src, connectOperation))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Connect()
|
||||
if(IsConnected())
|
||||
return TRUE
|
||||
|
||||
if(failed_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to connect anymore.
|
||||
return FALSE
|
||||
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return FALSE
|
||||
|
||||
var/user = CONFIG_GET(string/feedback_login)
|
||||
var/pass = CONFIG_GET(string/feedback_password)
|
||||
var/db = CONFIG_GET(string/feedback_database)
|
||||
var/address = CONFIG_GET(string/address)
|
||||
var/port = CONFIG_GET(number/port)
|
||||
|
||||
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout), CONFIG_GET(number/bsql_thread_limit))
|
||||
var/error
|
||||
if(QDELETED(connection))
|
||||
connection = null
|
||||
error = last_error
|
||||
else
|
||||
SSdbcore.last_error = null
|
||||
connectOperation = connection.BeginConnect(address, port, user, pass, db)
|
||||
if(SSdbcore.last_error)
|
||||
CRASH(SSdbcore.last_error)
|
||||
UNTIL(connectOperation.IsComplete())
|
||||
error = connectOperation.GetError()
|
||||
. = !error
|
||||
if (!.)
|
||||
last_error = error
|
||||
log_sql("Connect() failed | [error]")
|
||||
++failed_connections
|
||||
QDEL_NULL(connection)
|
||||
QDEL_NULL(connectOperation)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/CheckSchemaVersion()
|
||||
if(CONFIG_GET(flag/sql_enabled))
|
||||
if(Connect())
|
||||
log_world("Database connection established.")
|
||||
var/datum/DBQuery/query_db_version = NewQuery("SELECT major, minor FROM [format_table_name("schema_revision")] ORDER BY date DESC LIMIT 1")
|
||||
query_db_version.Execute()
|
||||
if(query_db_version.NextRow())
|
||||
db_major = text2num(query_db_version.item[1])
|
||||
db_minor = text2num(query_db_version.item[2])
|
||||
if(db_major != DB_MAJOR_VERSION || db_minor != DB_MINOR_VERSION)
|
||||
schema_mismatch = 1 // flag admin message about mismatch
|
||||
log_sql("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
else
|
||||
schema_mismatch = 2 //flag admin message about no schema version
|
||||
log_sql("Could not get schema version from database")
|
||||
qdel(query_db_version)
|
||||
else
|
||||
log_sql("Your server failed to establish a connection with the database.")
|
||||
else
|
||||
log_sql("Database is not enabled in configuration.")
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundID()
|
||||
if(!Connect())
|
||||
return
|
||||
var/datum/DBQuery/query_round_initialize = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (initialize_datetime, server_ip, server_port) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]')")
|
||||
query_round_initialize.Execute()
|
||||
qdel(query_round_initialize)
|
||||
var/datum/DBQuery/query_round_last_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()")
|
||||
query_round_last_id.Execute()
|
||||
if(query_round_last_id.NextRow())
|
||||
GLOB.round_id = query_round_last_id.item[1]
|
||||
qdel(query_round_last_id)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundStart()
|
||||
if(!Connect())
|
||||
return
|
||||
var/datum/DBQuery/query_round_start = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET start_datetime = Now() WHERE id = [GLOB.round_id]")
|
||||
query_round_start.Execute()
|
||||
qdel(query_round_start)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundEnd()
|
||||
if(!Connect())
|
||||
return
|
||||
var/sql_station_name = sanitizeSQL(station_name())
|
||||
var/datum/DBQuery/query_round_end = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET end_datetime = Now(), game_mode_result = '[sanitizeSQL(SSticker.mode_result)]', station_name = '[sql_station_name]' WHERE id = [GLOB.round_id]")
|
||||
query_round_end.Execute()
|
||||
qdel(query_round_end)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Disconnect()
|
||||
failed_connections = 0
|
||||
QDEL_NULL(connectOperation)
|
||||
QDEL_NULL(connection)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/IsConnected()
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return FALSE
|
||||
//block until any connect operations finish
|
||||
var/datum/BSQL_Connection/_connection = connection
|
||||
var/datum/BSQL_Operation/op = connectOperation
|
||||
UNTIL(QDELETED(_connection) || op.IsComplete())
|
||||
return !QDELETED(connection) && !op.GetError()
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Quote(str)
|
||||
if(connection)
|
||||
return connection.Quote(str)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/ErrorMsg()
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return "Database disabled by configuration"
|
||||
return last_error
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/ReportError(error)
|
||||
last_error = error
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/NewQuery(sql_query)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
log_admin_private("ERROR: Advanced admin proc call led to sql query: [sql_query]. Query has been blocked")
|
||||
message_admins("ERROR: Advanced admin proc call led to sql query. Query has been blocked")
|
||||
return FALSE
|
||||
return new /datum/DBQuery(sql_query, connection)
|
||||
|
||||
/*
|
||||
Takes a list of rows (each row being an associated list of column => value) and inserts them via a single mass query.
|
||||
Rows missing columns present in other rows will resolve to SQL NULL
|
||||
You are expected to do your own escaping of the data, and expected to provide your own quotes for strings.
|
||||
The duplicate_key arg can be true to automatically generate this part of the query
|
||||
or set to a string that is appended to the end of the query
|
||||
Ignore_errors instructes mysql to continue inserting rows if some of them have errors.
|
||||
the erroneous row(s) aren't inserted and there isn't really any way to know why or why errored
|
||||
Delayed insert mode was removed in mysql 7 and only works with MyISAM type tables,
|
||||
It was included because it is still supported in mariadb.
|
||||
It does not work with duplicate_key and the mysql server ignores it in those cases
|
||||
*/
|
||||
/datum/controller/subsystem/dbcore/proc/MassInsert(table, list/rows, duplicate_key = FALSE, ignore_errors = FALSE, delayed = FALSE, warn = FALSE, async = TRUE)
|
||||
if (!table || !rows || !istype(rows))
|
||||
return
|
||||
var/list/columns = list()
|
||||
var/list/sorted_rows = list()
|
||||
|
||||
for (var/list/row in rows)
|
||||
var/list/sorted_row = list()
|
||||
sorted_row.len = columns.len
|
||||
for (var/column in row)
|
||||
var/idx = columns[column]
|
||||
if (!idx)
|
||||
idx = columns.len + 1
|
||||
columns[column] = idx
|
||||
sorted_row.len = columns.len
|
||||
|
||||
sorted_row[idx] = row[column]
|
||||
sorted_rows[++sorted_rows.len] = sorted_row
|
||||
|
||||
if (duplicate_key == TRUE)
|
||||
var/list/column_list = list()
|
||||
for (var/column in columns)
|
||||
column_list += "[column] = VALUES([column])"
|
||||
duplicate_key = "ON DUPLICATE KEY UPDATE [column_list.Join(", ")]\n"
|
||||
else if (duplicate_key == FALSE)
|
||||
duplicate_key = null
|
||||
|
||||
if (ignore_errors)
|
||||
ignore_errors = " IGNORE"
|
||||
else
|
||||
ignore_errors = null
|
||||
|
||||
if (delayed)
|
||||
delayed = " DELAYED"
|
||||
else
|
||||
delayed = null
|
||||
|
||||
var/list/sqlrowlist = list()
|
||||
var/len = columns.len
|
||||
for (var/list/row in sorted_rows)
|
||||
if (length(row) != len)
|
||||
row.len = len
|
||||
for (var/value in row)
|
||||
if (value == null)
|
||||
value = "NULL"
|
||||
sqlrowlist += "([row.Join(", ")])"
|
||||
|
||||
sqlrowlist = " [sqlrowlist.Join(",\n ")]"
|
||||
var/datum/DBQuery/Query = NewQuery("INSERT[delayed][ignore_errors] INTO [table]\n([columns.Join(", ")])\nVALUES\n[sqlrowlist]\n[duplicate_key]")
|
||||
if (warn)
|
||||
. = Query.warn_execute(async)
|
||||
else
|
||||
. = Query.Execute(async)
|
||||
qdel(Query)
|
||||
|
||||
/datum/DBQuery
|
||||
var/sql // The sql query being executed.
|
||||
var/list/item //list of data values populated by NextRow()
|
||||
|
||||
var/last_activity
|
||||
var/last_activity_time
|
||||
|
||||
var/last_error
|
||||
var/skip_next_is_complete
|
||||
var/in_progress
|
||||
var/datum/BSQL_Connection/connection
|
||||
var/datum/BSQL_Operation/Query/query
|
||||
|
||||
/datum/DBQuery/New(sql_query, datum/BSQL_Connection/connection)
|
||||
SSdbcore.active_queries[src] = TRUE
|
||||
Activity("Created")
|
||||
item = list()
|
||||
src.connection = connection
|
||||
sql = sql_query
|
||||
|
||||
/datum/DBQuery/Destroy()
|
||||
Close()
|
||||
SSdbcore.active_queries -= src
|
||||
return ..()
|
||||
|
||||
/datum/DBQuery/CanProcCall(proc_name)
|
||||
//fuck off kevinz
|
||||
return FALSE
|
||||
|
||||
/datum/DBQuery/proc/SetQuery(new_sql)
|
||||
if(in_progress)
|
||||
CRASH("Attempted to set new sql while waiting on active query")
|
||||
Close()
|
||||
sql = new_sql
|
||||
|
||||
/datum/DBQuery/proc/Activity(activity)
|
||||
last_activity = activity
|
||||
last_activity_time = world.time
|
||||
|
||||
/datum/DBQuery/proc/warn_execute(async = FALSE)
|
||||
. = Execute(async)
|
||||
if(!.)
|
||||
to_chat(usr, "<span class='danger'>A SQL error occurred during this operation, check the server logs.</span>")
|
||||
|
||||
/datum/DBQuery/proc/Execute(async = FALSE, log_error = TRUE)
|
||||
Activity("Execute")
|
||||
if(in_progress)
|
||||
CRASH("Attempted to start a new query while waiting on the old one")
|
||||
|
||||
if(QDELETED(connection))
|
||||
last_error = "No connection!"
|
||||
return FALSE
|
||||
|
||||
var/start_time
|
||||
var/timed_out
|
||||
if(!async)
|
||||
start_time = REALTIMEOFDAY
|
||||
Close()
|
||||
query = connection.BeginQuery(sql)
|
||||
if(!async)
|
||||
timed_out = !query.WaitForCompletion()
|
||||
else
|
||||
in_progress = TRUE
|
||||
UNTIL(query.IsComplete())
|
||||
in_progress = FALSE
|
||||
skip_next_is_complete = TRUE
|
||||
var/error = QDELETED(query) ? "Query object deleted!" : query.GetError()
|
||||
last_error = error
|
||||
. = !error
|
||||
if(!. && log_error)
|
||||
log_sql("[error] | Query used: [sql]")
|
||||
if(!async && timed_out)
|
||||
log_query_debug("Query execution started at [start_time]")
|
||||
log_query_debug("Query execution ended at [REALTIMEOFDAY]")
|
||||
log_query_debug("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 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(async)
|
||||
Activity("NextRow")
|
||||
UNTIL(!in_progress)
|
||||
if(!skip_next_is_complete)
|
||||
if(!async)
|
||||
query.WaitForCompletion()
|
||||
else
|
||||
in_progress = TRUE
|
||||
UNTIL(query.IsComplete())
|
||||
in_progress = FALSE
|
||||
else
|
||||
skip_next_is_complete = FALSE
|
||||
|
||||
last_error = query.GetError()
|
||||
var/list/results = query.CurrentRow()
|
||||
. = results != null
|
||||
|
||||
item.Cut()
|
||||
//populate item array
|
||||
for(var/I in results)
|
||||
item += results[I]
|
||||
|
||||
/datum/DBQuery/proc/ErrorMsg()
|
||||
return last_error
|
||||
|
||||
/datum/DBQuery/proc/Close()
|
||||
item.Cut()
|
||||
QDEL_NULL(query)
|
||||
|
||||
/world/BSQL_Debug(message)
|
||||
if(!CONFIG_GET(flag/bsql_debug))
|
||||
return
|
||||
|
||||
//strip sensitive stuff
|
||||
if(findtext(message, ": CreateConnection("))
|
||||
message = "CreateConnection CENSORED"
|
||||
|
||||
log_sql("BSQL_DEBUG: [message]")
|
||||
SUBSYSTEM_DEF(dbcore)
|
||||
name = "Database"
|
||||
flags = SS_BACKGROUND
|
||||
wait = 1 MINUTES
|
||||
init_order = INIT_ORDER_DBCORE
|
||||
var/const/FAILED_DB_CONNECTION_CUTOFF = 5
|
||||
|
||||
var/schema_mismatch = 0
|
||||
var/db_minor = 0
|
||||
var/db_major = 0
|
||||
var/failed_connections = 0
|
||||
|
||||
var/last_error
|
||||
var/list/active_queries = list()
|
||||
|
||||
var/datum/BSQL_Connection/connection
|
||||
var/datum/BSQL_Operation/connectOperation
|
||||
|
||||
/datum/controller/subsystem/dbcore/Initialize()
|
||||
//We send warnings to the admins during subsystem init, as the clients will be New'd and messages
|
||||
//will queue properly with goonchat
|
||||
switch(schema_mismatch)
|
||||
if(1)
|
||||
message_admins("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
if(2)
|
||||
message_admins("Could not get schema version from database")
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/fire()
|
||||
for(var/I in active_queries)
|
||||
var/datum/DBQuery/Q = I
|
||||
if(world.time - Q.last_activity_time > (5 MINUTES))
|
||||
message_admins("Found undeleted query, please check the server logs and notify coders.")
|
||||
log_sql("Undeleted query: \"[Q.sql]\" LA: [Q.last_activity] LAT: [Q.last_activity_time]")
|
||||
qdel(Q)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/dbcore/Recover()
|
||||
connection = SSdbcore.connection
|
||||
connectOperation = SSdbcore.connectOperation
|
||||
|
||||
/datum/controller/subsystem/dbcore/Shutdown()
|
||||
//This is as close as we can get to the true round end before Disconnect() without changing where it's called, defeating the reason this is a subsystem
|
||||
if(SSdbcore.Connect())
|
||||
var/datum/DBQuery/query_round_shutdown = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET shutdown_datetime = Now(), end_state = '[sanitizeSQL(SSticker.end_state)]' WHERE id = [GLOB.round_id]")
|
||||
query_round_shutdown.Execute()
|
||||
qdel(query_round_shutdown)
|
||||
if(IsConnected())
|
||||
Disconnect()
|
||||
world.BSQL_Shutdown()
|
||||
|
||||
//nu
|
||||
/datum/controller/subsystem/dbcore/can_vv_get(var_name)
|
||||
return var_name != NAMEOF(src, connection) && var_name != NAMEOF(src, active_queries) && var_name != NAMEOF(src, connectOperation) && ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, connection) || var_name == NAMEOF(src, connectOperation))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Connect()
|
||||
if(IsConnected())
|
||||
return TRUE
|
||||
|
||||
if(failed_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to connect anymore.
|
||||
return FALSE
|
||||
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return FALSE
|
||||
|
||||
var/user = CONFIG_GET(string/feedback_login)
|
||||
var/pass = CONFIG_GET(string/feedback_password)
|
||||
var/db = CONFIG_GET(string/feedback_database)
|
||||
var/address = CONFIG_GET(string/address)
|
||||
var/port = CONFIG_GET(number/port)
|
||||
|
||||
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout), CONFIG_GET(number/bsql_thread_limit))
|
||||
var/error
|
||||
if(QDELETED(connection))
|
||||
connection = null
|
||||
error = last_error
|
||||
else
|
||||
SSdbcore.last_error = null
|
||||
connectOperation = connection.BeginConnect(address, port, user, pass, db)
|
||||
if(SSdbcore.last_error)
|
||||
CRASH(SSdbcore.last_error)
|
||||
UNTIL(connectOperation.IsComplete())
|
||||
error = connectOperation.GetError()
|
||||
. = !error
|
||||
if (!.)
|
||||
last_error = error
|
||||
log_sql("Connect() failed | [error]")
|
||||
++failed_connections
|
||||
QDEL_NULL(connection)
|
||||
QDEL_NULL(connectOperation)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/CheckSchemaVersion()
|
||||
if(CONFIG_GET(flag/sql_enabled))
|
||||
if(Connect())
|
||||
log_world("Database connection established.")
|
||||
var/datum/DBQuery/query_db_version = NewQuery("SELECT major, minor FROM [format_table_name("schema_revision")] ORDER BY date DESC LIMIT 1")
|
||||
query_db_version.Execute()
|
||||
if(query_db_version.NextRow())
|
||||
db_major = text2num(query_db_version.item[1])
|
||||
db_minor = text2num(query_db_version.item[2])
|
||||
if(db_major != DB_MAJOR_VERSION || db_minor != DB_MINOR_VERSION)
|
||||
schema_mismatch = 1 // flag admin message about mismatch
|
||||
log_sql("Database schema ([db_major].[db_minor]) doesn't match the latest schema version ([DB_MAJOR_VERSION].[DB_MINOR_VERSION]), this may lead to undefined behaviour or errors")
|
||||
else
|
||||
schema_mismatch = 2 //flag admin message about no schema version
|
||||
log_sql("Could not get schema version from database")
|
||||
qdel(query_db_version)
|
||||
else
|
||||
log_sql("Your server failed to establish a connection with the database.")
|
||||
else
|
||||
log_sql("Database is not enabled in configuration.")
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundID()
|
||||
if(!Connect())
|
||||
return
|
||||
var/datum/DBQuery/query_round_initialize = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (initialize_datetime, server_ip, server_port) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]')")
|
||||
query_round_initialize.Execute()
|
||||
qdel(query_round_initialize)
|
||||
var/datum/DBQuery/query_round_last_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()")
|
||||
query_round_last_id.Execute()
|
||||
if(query_round_last_id.NextRow())
|
||||
GLOB.round_id = query_round_last_id.item[1]
|
||||
qdel(query_round_last_id)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundStart()
|
||||
if(!Connect())
|
||||
return
|
||||
var/datum/DBQuery/query_round_start = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET start_datetime = Now() WHERE id = [GLOB.round_id]")
|
||||
query_round_start.Execute()
|
||||
qdel(query_round_start)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/SetRoundEnd()
|
||||
if(!Connect())
|
||||
return
|
||||
var/sql_station_name = sanitizeSQL(station_name())
|
||||
var/datum/DBQuery/query_round_end = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET end_datetime = Now(), game_mode_result = '[sanitizeSQL(SSticker.mode_result)]', station_name = '[sql_station_name]' WHERE id = [GLOB.round_id]")
|
||||
query_round_end.Execute()
|
||||
qdel(query_round_end)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Disconnect()
|
||||
failed_connections = 0
|
||||
QDEL_NULL(connectOperation)
|
||||
QDEL_NULL(connection)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/IsConnected()
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return FALSE
|
||||
//block until any connect operations finish
|
||||
var/datum/BSQL_Connection/_connection = connection
|
||||
var/datum/BSQL_Operation/op = connectOperation
|
||||
UNTIL(QDELETED(_connection) || op.IsComplete())
|
||||
return !QDELETED(connection) && !op.GetError()
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/Quote(str)
|
||||
if(connection)
|
||||
return connection.Quote(str)
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/ErrorMsg()
|
||||
if(!CONFIG_GET(flag/sql_enabled))
|
||||
return "Database disabled by configuration"
|
||||
return last_error
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/ReportError(error)
|
||||
last_error = error
|
||||
|
||||
/datum/controller/subsystem/dbcore/proc/NewQuery(sql_query)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
log_admin_private("ERROR: Advanced admin proc call led to sql query: [sql_query]. Query has been blocked")
|
||||
message_admins("ERROR: Advanced admin proc call led to sql query. Query has been blocked")
|
||||
return FALSE
|
||||
return new /datum/DBQuery(sql_query, connection)
|
||||
|
||||
/*
|
||||
Takes a list of rows (each row being an associated list of column => value) and inserts them via a single mass query.
|
||||
Rows missing columns present in other rows will resolve to SQL NULL
|
||||
You are expected to do your own escaping of the data, and expected to provide your own quotes for strings.
|
||||
The duplicate_key arg can be true to automatically generate this part of the query
|
||||
or set to a string that is appended to the end of the query
|
||||
Ignore_errors instructes mysql to continue inserting rows if some of them have errors.
|
||||
the erroneous row(s) aren't inserted and there isn't really any way to know why or why errored
|
||||
Delayed insert mode was removed in mysql 7 and only works with MyISAM type tables,
|
||||
It was included because it is still supported in mariadb.
|
||||
It does not work with duplicate_key and the mysql server ignores it in those cases
|
||||
*/
|
||||
/datum/controller/subsystem/dbcore/proc/MassInsert(table, list/rows, duplicate_key = FALSE, ignore_errors = FALSE, delayed = FALSE, warn = FALSE, async = TRUE)
|
||||
if (!table || !rows || !istype(rows))
|
||||
return
|
||||
var/list/columns = list()
|
||||
var/list/sorted_rows = list()
|
||||
|
||||
for (var/list/row in rows)
|
||||
var/list/sorted_row = list()
|
||||
sorted_row.len = columns.len
|
||||
for (var/column in row)
|
||||
var/idx = columns[column]
|
||||
if (!idx)
|
||||
idx = columns.len + 1
|
||||
columns[column] = idx
|
||||
sorted_row.len = columns.len
|
||||
|
||||
sorted_row[idx] = row[column]
|
||||
sorted_rows[++sorted_rows.len] = sorted_row
|
||||
|
||||
if (duplicate_key == TRUE)
|
||||
var/list/column_list = list()
|
||||
for (var/column in columns)
|
||||
column_list += "[column] = VALUES([column])"
|
||||
duplicate_key = "ON DUPLICATE KEY UPDATE [column_list.Join(", ")]\n"
|
||||
else if (duplicate_key == FALSE)
|
||||
duplicate_key = null
|
||||
|
||||
if (ignore_errors)
|
||||
ignore_errors = " IGNORE"
|
||||
else
|
||||
ignore_errors = null
|
||||
|
||||
if (delayed)
|
||||
delayed = " DELAYED"
|
||||
else
|
||||
delayed = null
|
||||
|
||||
var/list/sqlrowlist = list()
|
||||
var/len = columns.len
|
||||
for (var/list/row in sorted_rows)
|
||||
if (length(row) != len)
|
||||
row.len = len
|
||||
for (var/value in row)
|
||||
if (value == null)
|
||||
value = "NULL"
|
||||
sqlrowlist += "([row.Join(", ")])"
|
||||
|
||||
sqlrowlist = " [sqlrowlist.Join(",\n ")]"
|
||||
var/datum/DBQuery/Query = NewQuery("INSERT[delayed][ignore_errors] INTO [table]\n([columns.Join(", ")])\nVALUES\n[sqlrowlist]\n[duplicate_key]")
|
||||
if (warn)
|
||||
. = Query.warn_execute(async)
|
||||
else
|
||||
. = Query.Execute(async)
|
||||
qdel(Query)
|
||||
|
||||
/datum/DBQuery
|
||||
var/sql // The sql query being executed.
|
||||
var/list/item //list of data values populated by NextRow()
|
||||
|
||||
var/last_activity
|
||||
var/last_activity_time
|
||||
|
||||
var/last_error
|
||||
var/skip_next_is_complete
|
||||
var/in_progress
|
||||
var/datum/BSQL_Connection/connection
|
||||
var/datum/BSQL_Operation/Query/query
|
||||
|
||||
/datum/DBQuery/New(sql_query, datum/BSQL_Connection/connection)
|
||||
SSdbcore.active_queries[src] = TRUE
|
||||
Activity("Created")
|
||||
item = list()
|
||||
src.connection = connection
|
||||
sql = sql_query
|
||||
|
||||
/datum/DBQuery/Destroy()
|
||||
Close()
|
||||
SSdbcore.active_queries -= src
|
||||
return ..()
|
||||
|
||||
/datum/DBQuery/CanProcCall(proc_name)
|
||||
//fuck off kevinz
|
||||
return FALSE
|
||||
|
||||
/datum/DBQuery/proc/SetQuery(new_sql)
|
||||
if(in_progress)
|
||||
CRASH("Attempted to set new sql while waiting on active query")
|
||||
Close()
|
||||
sql = new_sql
|
||||
|
||||
/datum/DBQuery/proc/Activity(activity)
|
||||
last_activity = activity
|
||||
last_activity_time = world.time
|
||||
|
||||
/datum/DBQuery/proc/warn_execute(async = FALSE)
|
||||
. = Execute(async)
|
||||
if(!.)
|
||||
to_chat(usr, "<span class='danger'>A SQL error occurred during this operation, check the server logs.</span>")
|
||||
|
||||
/datum/DBQuery/proc/Execute(async = FALSE, log_error = TRUE)
|
||||
Activity("Execute")
|
||||
if(in_progress)
|
||||
CRASH("Attempted to start a new query while waiting on the old one")
|
||||
|
||||
if(QDELETED(connection))
|
||||
last_error = "No connection!"
|
||||
return FALSE
|
||||
|
||||
var/start_time
|
||||
var/timed_out
|
||||
if(!async)
|
||||
start_time = REALTIMEOFDAY
|
||||
Close()
|
||||
query = connection.BeginQuery(sql)
|
||||
if(!async)
|
||||
timed_out = !query.WaitForCompletion()
|
||||
else
|
||||
in_progress = TRUE
|
||||
UNTIL(query.IsComplete())
|
||||
in_progress = FALSE
|
||||
skip_next_is_complete = TRUE
|
||||
var/error = QDELETED(query) ? "Query object deleted!" : query.GetError()
|
||||
last_error = error
|
||||
. = !error
|
||||
if(!. && log_error)
|
||||
log_sql("[error] | Query used: [sql]")
|
||||
if(!async && timed_out)
|
||||
log_query_debug("Query execution started at [start_time]")
|
||||
log_query_debug("Query execution ended at [REALTIMEOFDAY]")
|
||||
log_query_debug("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 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(async)
|
||||
Activity("NextRow")
|
||||
UNTIL(!in_progress)
|
||||
if(!skip_next_is_complete)
|
||||
if(!async)
|
||||
query.WaitForCompletion()
|
||||
else
|
||||
in_progress = TRUE
|
||||
UNTIL(query.IsComplete())
|
||||
in_progress = FALSE
|
||||
else
|
||||
skip_next_is_complete = FALSE
|
||||
|
||||
last_error = query.GetError()
|
||||
var/list/results = query.CurrentRow()
|
||||
. = results != null
|
||||
|
||||
item.Cut()
|
||||
//populate item array
|
||||
for(var/I in results)
|
||||
item += results[I]
|
||||
|
||||
/datum/DBQuery/proc/ErrorMsg()
|
||||
return last_error
|
||||
|
||||
/datum/DBQuery/proc/Close()
|
||||
item.Cut()
|
||||
QDEL_NULL(query)
|
||||
|
||||
/world/BSQL_Debug(message)
|
||||
if(!CONFIG_GET(flag/bsql_debug))
|
||||
return
|
||||
|
||||
//strip sensitive stuff
|
||||
if(findtext(message, ": CreateConnection("))
|
||||
message = "CreateConnection CENSORED"
|
||||
|
||||
log_sql("BSQL_DEBUG: [message]")
|
||||
|
||||
113
code/controllers/subsystem/fail2topic.dm
Normal file
113
code/controllers/subsystem/fail2topic.dm
Normal file
@@ -0,0 +1,113 @@
|
||||
SUBSYSTEM_DEF(fail2topic)
|
||||
name = "Fail2Topic"
|
||||
init_order = INIT_ORDER_FAIL2TOPIC
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = ALL
|
||||
|
||||
var/list/rate_limiting = list()
|
||||
var/list/fail_counts = list()
|
||||
var/list/active_bans = list()
|
||||
|
||||
var/rate_limit
|
||||
var/max_fails
|
||||
var/rule_name
|
||||
var/enabled = FALSE
|
||||
|
||||
/datum/controller/subsystem/fail2topic/Initialize(timeofday)
|
||||
rate_limit = CONFIG_GET(number/fail2topic_rate_limit)
|
||||
max_fails = CONFIG_GET(number/fail2topic_max_fails)
|
||||
rule_name = CONFIG_GET(string/fail2topic_rule_name)
|
||||
enabled = CONFIG_GET(flag/fail2topic_enabled)
|
||||
|
||||
DropFirewallRule() // Clear the old bans if any still remain
|
||||
|
||||
if (world.system_type == UNIX && enabled)
|
||||
enabled = FALSE
|
||||
subsystem_log("DISABLED - UNIX systems are not supported.")
|
||||
if(!enabled)
|
||||
flags |= SS_NO_FIRE
|
||||
can_fire = FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/fail2topic/fire()
|
||||
while (rate_limiting.len)
|
||||
var/ip = rate_limiting[1]
|
||||
var/last_attempt = rate_limiting[ip]
|
||||
|
||||
if (world.time - last_attempt > rate_limit)
|
||||
rate_limiting -= ip
|
||||
fail_counts -= ip
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/fail2topic/Shutdown()
|
||||
DropFirewallRule()
|
||||
|
||||
/datum/controller/subsystem/fail2topic/proc/IsRateLimited(ip)
|
||||
var/last_attempt = rate_limiting[ip]
|
||||
|
||||
var/static/datum/config_entry/keyed_list/topic_rate_limit_whitelist/cached_whitelist_entry
|
||||
if(!istype(cached_whitelist_entry))
|
||||
cached_whitelist_entry = CONFIG_GET(keyed_list/topic_rate_limit_whitelist)
|
||||
|
||||
if(istype(cached_whitelist_entry))
|
||||
if(cached_whitelist_entry.config_entry_value[ip])
|
||||
return FALSE
|
||||
|
||||
if (active_bans[ip])
|
||||
return TRUE
|
||||
|
||||
rate_limiting[ip] = world.time
|
||||
|
||||
if (isnull(last_attempt))
|
||||
return FALSE
|
||||
|
||||
if (world.time - last_attempt > rate_limit)
|
||||
fail_counts -= ip
|
||||
return FALSE
|
||||
else
|
||||
var/failures = fail_counts[ip]
|
||||
|
||||
if (isnull(failures))
|
||||
fail_counts[ip] = 1
|
||||
return TRUE
|
||||
else if (failures > max_fails)
|
||||
BanFromFirewall(ip)
|
||||
return TRUE
|
||||
else
|
||||
fail_counts[ip] = failures + 1
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/fail2topic/proc/BanFromFirewall(ip)
|
||||
if (!enabled)
|
||||
return
|
||||
|
||||
active_bans[ip] = world.time
|
||||
fail_counts -= ip
|
||||
rate_limiting -= ip
|
||||
|
||||
. = shell("netsh advfirewall firewall add rule name=\"[rule_name]\" dir=in interface=any action=block remoteip=[ip]")
|
||||
|
||||
if (.)
|
||||
subsystem_log("Failed to ban [ip]. Exit code: [.].")
|
||||
else if (isnull(.))
|
||||
subsystem_log("Failed to invoke shell to ban [ip].")
|
||||
else
|
||||
subsystem_log("Banned [ip].")
|
||||
|
||||
/datum/controller/subsystem/fail2topic/proc/DropFirewallRule()
|
||||
if (!enabled)
|
||||
return
|
||||
|
||||
active_bans = list()
|
||||
|
||||
. = shell("netsh advfirewall firewall delete rule name=\"[rule_name]\"")
|
||||
|
||||
if (.)
|
||||
subsystem_log("Failed to drop firewall rule. Exit code: [.].")
|
||||
else if (isnull(.))
|
||||
subsystem_log("Failed to invoke shell for firewall rule drop.")
|
||||
else
|
||||
subsystem_log("Firewall rule dropped.")
|
||||
@@ -658,7 +658,7 @@ SUBSYSTEM_DEF(job)
|
||||
message_admins(msg)
|
||||
CRASH(msg)
|
||||
|
||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff)
|
||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE)
|
||||
var/mob/the_mob = N
|
||||
if(!the_mob)
|
||||
the_mob = M // cause this doesn't get assigned if player is a latejoiner
|
||||
@@ -671,7 +671,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(!G)
|
||||
continue
|
||||
var/permitted = TRUE
|
||||
if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
|
||||
if(!bypass_prereqs && G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
|
||||
permitted = FALSE
|
||||
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
|
||||
permitted = FALSE
|
||||
|
||||
@@ -1,87 +1,87 @@
|
||||
SUBSYSTEM_DEF(medals)
|
||||
name = "Medals"
|
||||
flags = SS_NO_FIRE
|
||||
var/hub_enabled = FALSE
|
||||
|
||||
/datum/controller/subsystem/medals/Initialize(timeofday)
|
||||
if(CONFIG_GET(string/medal_hub_address) && CONFIG_GET(string/medal_hub_password))
|
||||
hub_enabled = TRUE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/medals/proc/UnlockMedal(medal, client/player)
|
||||
set waitfor = FALSE
|
||||
if(!medal || !hub_enabled)
|
||||
return
|
||||
if(isnull(world.SetMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to award medal:[medal] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to award [medal] medal to [player.key]!")
|
||||
return
|
||||
to_chat(player, "<span class='greenannounce'><B>Achievement unlocked: [medal]!</B></span>")
|
||||
|
||||
|
||||
/datum/controller/subsystem/medals/proc/SetScore(score, client/player, increment, force)
|
||||
set waitfor = FALSE
|
||||
if(!score || !hub_enabled)
|
||||
return
|
||||
|
||||
var/list/oldscore = GetScore(score, player, TRUE)
|
||||
if(increment)
|
||||
if(!oldscore[score])
|
||||
oldscore[score] = 1
|
||||
else
|
||||
oldscore[score] = (text2num(oldscore[score]) + 1)
|
||||
else
|
||||
oldscore[score] = force
|
||||
|
||||
var/newscoreparam = list2params(oldscore)
|
||||
|
||||
if(isnull(world.SetScores(player.ckey, newscoreparam, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to set score. Score:[score] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to set [score] score for [player.key]!")
|
||||
|
||||
/datum/controller/subsystem/medals/proc/GetScore(score, client/player, returnlist)
|
||||
if(!score || !hub_enabled)
|
||||
return
|
||||
|
||||
var/scoreget = world.GetScores(player.ckey, score, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))
|
||||
if(isnull(scoreget))
|
||||
hub_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to get score. Score:[score] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to get score: [score] for [player.key]!")
|
||||
return
|
||||
. = params2list(scoreget)
|
||||
if(!returnlist)
|
||||
return .[score]
|
||||
|
||||
/datum/controller/subsystem/medals/proc/CheckMedal(medal, client/player)
|
||||
if(!medal || !hub_enabled)
|
||||
return
|
||||
|
||||
if(isnull(world.GetMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to get medal:[medal] player: [player.key]")
|
||||
message_admins("Error! Failed to contact hub to get [medal] medal for [player.key]!")
|
||||
return
|
||||
to_chat(player, "[medal] is unlocked")
|
||||
|
||||
/datum/controller/subsystem/medals/proc/LockMedal(medal, client/player)
|
||||
if(!player || !medal || !hub_enabled)
|
||||
return
|
||||
var/result = world.ClearMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))
|
||||
switch(result)
|
||||
if(null)
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to clear medal:[medal] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to clear [medal] medal for [player.key]!")
|
||||
if(TRUE)
|
||||
message_admins("Medal: [medal] removed for [player.key]")
|
||||
if(FALSE)
|
||||
message_admins("Medal: [medal] was not found for [player.key]. Unable to clear.")
|
||||
|
||||
|
||||
/datum/controller/subsystem/medals/proc/ClearScore(client/player)
|
||||
if(isnull(world.SetScores(player.ckey, "", CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
log_game("MEDAL ERROR: Could not contact hub to clear scores for [player.key]!")
|
||||
message_admins("Error! Failed to contact hub to clear scores for [player.key]!")
|
||||
SUBSYSTEM_DEF(medals)
|
||||
name = "Medals"
|
||||
flags = SS_NO_FIRE
|
||||
var/hub_enabled = FALSE
|
||||
|
||||
/datum/controller/subsystem/medals/Initialize(timeofday)
|
||||
if(CONFIG_GET(string/medal_hub_address) && CONFIG_GET(string/medal_hub_password))
|
||||
hub_enabled = TRUE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/medals/proc/UnlockMedal(medal, client/player)
|
||||
set waitfor = FALSE
|
||||
if(!medal || !hub_enabled)
|
||||
return
|
||||
if(isnull(world.SetMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to award medal:[medal] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to award [medal] medal to [player.key]!")
|
||||
return
|
||||
to_chat(player, "<span class='greenannounce'><B>Achievement unlocked: [medal]!</B></span>")
|
||||
|
||||
|
||||
/datum/controller/subsystem/medals/proc/SetScore(score, client/player, increment, force)
|
||||
set waitfor = FALSE
|
||||
if(!score || !hub_enabled)
|
||||
return
|
||||
|
||||
var/list/oldscore = GetScore(score, player, TRUE)
|
||||
if(increment)
|
||||
if(!oldscore[score])
|
||||
oldscore[score] = 1
|
||||
else
|
||||
oldscore[score] = (text2num(oldscore[score]) + 1)
|
||||
else
|
||||
oldscore[score] = force
|
||||
|
||||
var/newscoreparam = list2params(oldscore)
|
||||
|
||||
if(isnull(world.SetScores(player.ckey, newscoreparam, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to set score. Score:[score] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to set [score] score for [player.key]!")
|
||||
|
||||
/datum/controller/subsystem/medals/proc/GetScore(score, client/player, returnlist)
|
||||
if(!score || !hub_enabled)
|
||||
return
|
||||
|
||||
var/scoreget = world.GetScores(player.ckey, score, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))
|
||||
if(isnull(scoreget))
|
||||
hub_enabled = FALSE
|
||||
log_game("SCORE ERROR: Could not contact hub to get score. Score:[score] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to get score: [score] for [player.key]!")
|
||||
return
|
||||
. = params2list(scoreget)
|
||||
if(!returnlist)
|
||||
return .[score]
|
||||
|
||||
/datum/controller/subsystem/medals/proc/CheckMedal(medal, client/player)
|
||||
if(!medal || !hub_enabled)
|
||||
return
|
||||
|
||||
if(isnull(world.GetMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to get medal:[medal] player: [player.key]")
|
||||
message_admins("Error! Failed to contact hub to get [medal] medal for [player.key]!")
|
||||
return
|
||||
to_chat(player, "[medal] is unlocked")
|
||||
|
||||
/datum/controller/subsystem/medals/proc/LockMedal(medal, client/player)
|
||||
if(!player || !medal || !hub_enabled)
|
||||
return
|
||||
var/result = world.ClearMedal(medal, player, CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))
|
||||
switch(result)
|
||||
if(null)
|
||||
hub_enabled = FALSE
|
||||
log_game("MEDAL ERROR: Could not contact hub to clear medal:[medal] player:[player.key]")
|
||||
message_admins("Error! Failed to contact hub to clear [medal] medal for [player.key]!")
|
||||
if(TRUE)
|
||||
message_admins("Medal: [medal] removed for [player.key]")
|
||||
if(FALSE)
|
||||
message_admins("Medal: [medal] was not found for [player.key]. Unable to clear.")
|
||||
|
||||
|
||||
/datum/controller/subsystem/medals/proc/ClearScore(client/player)
|
||||
if(isnull(world.SetScores(player.ckey, "", CONFIG_GET(string/medal_hub_address), CONFIG_GET(string/medal_hub_password))))
|
||||
log_game("MEDAL ERROR: Could not contact hub to clear scores for [player.key]!")
|
||||
message_admins("Error! Failed to contact hub to clear scores for [player.key]!")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(mood)
|
||||
name = "Mood"
|
||||
flags = SS_NO_INIT | SS_BACKGROUND
|
||||
priority = 20
|
||||
PROCESSING_SUBSYSTEM_DEF(mood)
|
||||
name = "Mood"
|
||||
flags = SS_NO_INIT | SS_BACKGROUND
|
||||
priority = 20
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
SUBSYSTEM_DEF(nightshift)
|
||||
name = "Night Shift"
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK
|
||||
|
||||
var/nightshift_active = FALSE
|
||||
var/nightshift_start_time = 702000 //7:30 PM, station time
|
||||
var/nightshift_end_time = 270000 //7:30 AM, station time
|
||||
var/nightshift_first_check = 30 SECONDS
|
||||
|
||||
var/high_security_mode = FALSE
|
||||
|
||||
/datum/controller/subsystem/nightshift/Initialize()
|
||||
if(!CONFIG_GET(flag/enable_night_shifts))
|
||||
can_fire = FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
|
||||
if(world.time - SSticker.round_start_time < nightshift_first_check)
|
||||
return
|
||||
check_nightshift()
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/announce(message)
|
||||
priority_announce(message, sound='sound/misc/notice2.ogg', sender_override="Automated Lighting System Announcement")
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/check_nightshift()
|
||||
var/emergency = GLOB.security_level >= SEC_LEVEL_RED
|
||||
var/announcing = TRUE
|
||||
var/time = STATION_TIME(FALSE)
|
||||
var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time)
|
||||
if(high_security_mode != emergency)
|
||||
high_security_mode = emergency
|
||||
if(night_time)
|
||||
announcing = FALSE
|
||||
if(!emergency)
|
||||
announce("Restoring night lighting configuration to normal operation.")
|
||||
else
|
||||
announce("Disabling night lighting: Station is in a state of emergency.")
|
||||
if(emergency)
|
||||
night_time = FALSE
|
||||
if(nightshift_active != night_time)
|
||||
update_nightshift(night_time, announcing)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE)
|
||||
nightshift_active = active
|
||||
if(announce)
|
||||
if (active)
|
||||
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
|
||||
else
|
||||
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
|
||||
for(var/A in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/APC = A
|
||||
if (APC.area && (APC.area.type in GLOB.the_station_areas))
|
||||
APC.set_nightshift(active)
|
||||
CHECK_TICK
|
||||
SUBSYSTEM_DEF(nightshift)
|
||||
name = "Night Shift"
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK
|
||||
|
||||
var/nightshift_active = FALSE
|
||||
var/nightshift_start_time = 702000 //7:30 PM, station time
|
||||
var/nightshift_end_time = 270000 //7:30 AM, station time
|
||||
var/nightshift_first_check = 30 SECONDS
|
||||
|
||||
var/high_security_mode = FALSE
|
||||
|
||||
/datum/controller/subsystem/nightshift/Initialize()
|
||||
if(!CONFIG_GET(flag/enable_night_shifts))
|
||||
can_fire = FALSE
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
|
||||
if(world.time - SSticker.round_start_time < nightshift_first_check)
|
||||
return
|
||||
check_nightshift()
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/announce(message)
|
||||
priority_announce(message, sound='sound/misc/notice2.ogg', sender_override="Automated Lighting System Announcement")
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/check_nightshift()
|
||||
var/emergency = GLOB.security_level >= SEC_LEVEL_RED
|
||||
var/announcing = TRUE
|
||||
var/time = STATION_TIME(FALSE)
|
||||
var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time)
|
||||
if(high_security_mode != emergency)
|
||||
high_security_mode = emergency
|
||||
if(night_time)
|
||||
announcing = FALSE
|
||||
if(!emergency)
|
||||
announce("Restoring night lighting configuration to normal operation.")
|
||||
else
|
||||
announce("Disabling night lighting: Station is in a state of emergency.")
|
||||
if(emergency)
|
||||
night_time = FALSE
|
||||
if(nightshift_active != night_time)
|
||||
update_nightshift(night_time, announcing)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE)
|
||||
nightshift_active = active
|
||||
if(announce)
|
||||
if (active)
|
||||
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
|
||||
else
|
||||
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
|
||||
for(var/A in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/APC = A
|
||||
if (APC.area && (APC.area.type in GLOB.the_station_areas))
|
||||
APC.set_nightshift(active)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
SUBSYSTEM_DEF(npcpool)
|
||||
name = "NPC Pool"
|
||||
flags = SS_KEEP_TIMING | SS_NO_INIT
|
||||
priority = FIRE_PRIORITY_NPC
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/npcpool/stat_entry()
|
||||
var/list/activelist = GLOB.simple_animals[AI_ON]
|
||||
..("NPCS:[activelist.len]")
|
||||
|
||||
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
|
||||
|
||||
if (!resumed)
|
||||
var/list/activelist = GLOB.simple_animals[AI_ON]
|
||||
src.currentrun = activelist.Copy()
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while(currentrun.len)
|
||||
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
|
||||
--currentrun.len
|
||||
|
||||
if(!SA.ckey && !SA.notransform)
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_movement()
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_action()
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_speech()
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
SUBSYSTEM_DEF(npcpool)
|
||||
name = "NPC Pool"
|
||||
flags = SS_KEEP_TIMING | SS_NO_INIT
|
||||
priority = FIRE_PRIORITY_NPC
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/npcpool/stat_entry()
|
||||
var/list/activelist = GLOB.simple_animals[AI_ON]
|
||||
..("NPCS:[activelist.len]")
|
||||
|
||||
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
|
||||
|
||||
if (!resumed)
|
||||
var/list/activelist = GLOB.simple_animals[AI_ON]
|
||||
src.currentrun = activelist.Copy()
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while(currentrun.len)
|
||||
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
|
||||
--currentrun.len
|
||||
|
||||
if(!SA.ckey && !SA.notransform)
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_movement()
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_action()
|
||||
if(SA.stat != DEAD)
|
||||
SA.handle_automated_speech()
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(pai)
|
||||
var/spam_delay = 100
|
||||
var/list/pai_card_list = list()
|
||||
|
||||
/datum/controller/subsystem/pai/Topic(href, href_list[])
|
||||
/datum/controller/subsystem/pai/Topic(href, href_list)
|
||||
if(href_list["download"])
|
||||
var/datum/paiCandidate/candidate = locate(href_list["candidate"]) in candidates
|
||||
var/obj/item/paicard/card = locate(href_list["device"]) in pai_card_list
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
SUBSYSTEM_DEF(pathfinder)
|
||||
name = "Pathfinder"
|
||||
init_order = INIT_ORDER_PATH
|
||||
flags = SS_NO_FIRE
|
||||
var/datum/flowcache/mobs
|
||||
var/datum/flowcache/circuits
|
||||
var/static/space_type_cache
|
||||
|
||||
/datum/controller/subsystem/pathfinder/Initialize()
|
||||
space_type_cache = typecacheof(/turf/open/space)
|
||||
mobs = new(10)
|
||||
circuits = new(3)
|
||||
return ..()
|
||||
|
||||
/datum/flowcache
|
||||
var/lcount
|
||||
var/run
|
||||
var/free
|
||||
var/list/flow
|
||||
|
||||
/datum/flowcache/New(var/n)
|
||||
. = ..()
|
||||
lcount = n
|
||||
run = 0
|
||||
free = 1
|
||||
flow = new/list(lcount)
|
||||
|
||||
/datum/flowcache/proc/getfree(atom/M)
|
||||
if(run < lcount)
|
||||
run += 1
|
||||
while(flow[free])
|
||||
CHECK_TICK
|
||||
free = (free % lcount) + 1
|
||||
var/t = addtimer(CALLBACK(src, /datum/flowcache.proc/toolong, free), 150, TIMER_STOPPABLE)
|
||||
flow[free] = t
|
||||
flow[t] = M
|
||||
return free
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/flowcache/proc/toolong(l)
|
||||
log_game("Pathfinder route took longer than 150 ticks, src bot [flow[flow[l]]]")
|
||||
found(l)
|
||||
|
||||
/datum/flowcache/proc/found(l)
|
||||
deltimer(flow[l])
|
||||
flow[l] = null
|
||||
run -= 1
|
||||
SUBSYSTEM_DEF(pathfinder)
|
||||
name = "Pathfinder"
|
||||
init_order = INIT_ORDER_PATH
|
||||
flags = SS_NO_FIRE
|
||||
var/datum/flowcache/mobs
|
||||
var/datum/flowcache/circuits
|
||||
var/static/space_type_cache
|
||||
|
||||
/datum/controller/subsystem/pathfinder/Initialize()
|
||||
space_type_cache = typecacheof(/turf/open/space)
|
||||
mobs = new(10)
|
||||
circuits = new(3)
|
||||
return ..()
|
||||
|
||||
/datum/flowcache
|
||||
var/lcount
|
||||
var/run
|
||||
var/free
|
||||
var/list/flow
|
||||
|
||||
/datum/flowcache/New(var/n)
|
||||
. = ..()
|
||||
lcount = n
|
||||
run = 0
|
||||
free = 1
|
||||
flow = new/list(lcount)
|
||||
|
||||
/datum/flowcache/proc/getfree(atom/M)
|
||||
if(run < lcount)
|
||||
run += 1
|
||||
while(flow[free])
|
||||
CHECK_TICK
|
||||
free = (free % lcount) + 1
|
||||
var/t = addtimer(CALLBACK(src, /datum/flowcache.proc/toolong, free), 150, TIMER_STOPPABLE)
|
||||
flow[free] = t
|
||||
flow[t] = M
|
||||
return free
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/flowcache/proc/toolong(l)
|
||||
log_game("Pathfinder route took longer than 150 ticks, src bot [flow[flow[l]]]")
|
||||
found(l)
|
||||
|
||||
/datum/flowcache/proc/found(l)
|
||||
deltimer(flow[l])
|
||||
flow[l] = null
|
||||
run -= 1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user