Merge branch 'master' of https://github.com/SandPoot/Citadel-Station-13 into balloon-alert-port
This commit is contained in:
@@ -54,7 +54,10 @@
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"m" = (
|
||||
/obj/structure/mineral_door/wood,
|
||||
/obj/effect/decal/cleanable/trail_holder,
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 8
|
||||
},
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"n" = (
|
||||
@@ -68,7 +71,10 @@
|
||||
/obj/machinery/light/broken{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/decal/cleanable/trail_holder,
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 6
|
||||
},
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"q" = (
|
||||
@@ -93,13 +99,33 @@
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"s" = (
|
||||
/obj/effect/decal/cleanable/trail_holder,
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 9
|
||||
},
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"x" = (
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 8
|
||||
},
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
"N" = (
|
||||
/obj/effect/decal/cleanable/trail_holder,
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 8
|
||||
},
|
||||
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
|
||||
/area/lavaland/surface/outdoors)
|
||||
"Q" = (
|
||||
/obj/effect/decal/cleanable/trail_holder{
|
||||
color = "#dc0000";
|
||||
dir = 6
|
||||
},
|
||||
/turf/open/floor/wood,
|
||||
/area/ruin/lavaland/unpowered)
|
||||
|
||||
(1,1,1) = {"
|
||||
i
|
||||
@@ -440,7 +466,7 @@ f
|
||||
f
|
||||
f
|
||||
f
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -467,7 +493,7 @@ g
|
||||
f
|
||||
f
|
||||
f
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -494,7 +520,7 @@ f
|
||||
f
|
||||
f
|
||||
f
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -521,7 +547,7 @@ j
|
||||
f
|
||||
f
|
||||
f
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -548,7 +574,7 @@ k
|
||||
f
|
||||
f
|
||||
f
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -575,7 +601,7 @@ l
|
||||
f
|
||||
f
|
||||
s
|
||||
s
|
||||
Q
|
||||
b
|
||||
b
|
||||
i
|
||||
@@ -627,7 +653,7 @@ i
|
||||
b
|
||||
b
|
||||
b
|
||||
s
|
||||
x
|
||||
b
|
||||
b
|
||||
b
|
||||
@@ -654,7 +680,7 @@ i
|
||||
i
|
||||
i
|
||||
b
|
||||
s
|
||||
x
|
||||
b
|
||||
i
|
||||
i
|
||||
@@ -681,7 +707,7 @@ i
|
||||
i
|
||||
i
|
||||
b
|
||||
s
|
||||
x
|
||||
b
|
||||
i
|
||||
i
|
||||
@@ -708,7 +734,7 @@ i
|
||||
i
|
||||
i
|
||||
b
|
||||
s
|
||||
x
|
||||
b
|
||||
i
|
||||
i
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -111,3 +111,12 @@ GLOBAL_LIST_EMPTY(living_heart_cache) //A list of all living hearts in existance
|
||||
#define BLOB_SPREAD_COST 4
|
||||
#define BLOB_ATTACK_REFUND 2 //blob refunds this much if it attacks and doesn't spread
|
||||
#define BLOB_REFLECTOR_COST 15
|
||||
|
||||
/// How many telecrystals a normal traitor starts with
|
||||
#define TELECRYSTALS_DEFAULT 20
|
||||
/// How many telecrystals mapper/admin only "precharged" uplink implant
|
||||
#define TELECRYSTALS_PRELOADED_IMPLANT 10
|
||||
/// The normal cost of an uplink implant; used for calcuating how many
|
||||
/// TC to charge someone if they get a free implant through choice or
|
||||
/// because they have nothing else that supports an implant.
|
||||
#define UPLINK_IMPLANT_TELECRYSTAL_COST 4
|
||||
|
||||
@@ -68,6 +68,20 @@
|
||||
|
||||
#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 SYNTH_PASSIVE_HEAT_GAIN 10 //Degrees C per handle_environment() Synths passively heat up. Mitigated by cooling efficiency. Can lead to overheating if not managed.
|
||||
#define SYNTH_MAX_PASSIVE_GAIN_TEMP 250 //Degrees C that a synth can be heated up to by their internal heat gain, provided their cooling is insufficient to mitigate it.
|
||||
#define SYNTH_MIN_PASSIVE_COOLING_TEMP -30 //Degrees C a synth can cool towards at very high cooling efficiency.
|
||||
#define SYNTH_HEAT_EFFICIENCY_COEFF 0.005 //How quick the difference between the Synth and the environment starts to matter. The smaller the higher the difference has to be for the same change.
|
||||
#define SYNTH_SINGLE_INFLUENCE_COOLING_EFFECT_CAP 3 //How big can the multiplier for heat / pressure cooling be in an optimal environment
|
||||
#define SYNTH_TOTAL_ENVIRONMENT_EFFECT_CAP 2 //How big of an multiplier can the environment give in an optimal scenario (maximum efficiency in the end is at a lower cap, this mostly counters low coolant levels)
|
||||
#define SYNTH_MAX_COOLING_EFFICIENCY 1.5 //The maximum possible cooling efficiency one can achieve at optimal conditions.
|
||||
#define SYNTH_ACTIVE_COOLING_TEMP_BOUNDARY 10 //The minimum distance from room temperature a Synth needs to have for active cooling to actively cool.
|
||||
#define SYNTH_ACTIVE_COOLING_LOW_PRESSURE_THRESHOLD 0.05 //At how much percentage of default pressure (or lower) active cooling gets a massive cost penalty.
|
||||
#define SYNTH_ACTIVE_COOLING_LOW_PRESSURE_PENALTY 2.5 //By how much is active cooling cost multiplied if in a very-low-pressure environment?
|
||||
#define SYNTH_ACTIVE_COOLING_MIN_ADJUSTMENT 5 //What is the minimum amount of temp you move towards the target point, even if it would be less with default calculations?
|
||||
#define SYNTH_INTEGRATION_COOLANT_PENALTY 0.4 //Integrating coolant is multiplied with this for calculation of impact on passive cooling.
|
||||
#define SYNTH_INTEGRATION_COOLANT_CAP 0.25 //Integrating coolant is capped at counting as current_blood * this number. This is so you can't just run on salglu or whatever.
|
||||
|
||||
#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.
|
||||
@@ -128,6 +142,7 @@
|
||||
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
|
||||
#define TANK_MIN_RELEASE_PRESSURE 0
|
||||
#define TANK_DEFAULT_RELEASE_PRESSURE 17
|
||||
#define TANK_POST_FRAGMENT_REACTIONS 5
|
||||
|
||||
//CANATMOSPASS
|
||||
#define ATMOS_PASS_YES 1
|
||||
@@ -260,6 +275,7 @@
|
||||
#define GAS_HYPERNOB "nob"
|
||||
#define GAS_NITROUS "n2o"
|
||||
#define GAS_NITRYL "no2"
|
||||
#define GAS_HYDROGEN "hydrogen"
|
||||
#define GAS_TRITIUM "tritium"
|
||||
#define GAS_BZ "bz"
|
||||
#define GAS_STIMULUM "stim"
|
||||
@@ -267,9 +283,16 @@
|
||||
#define GAS_MIASMA "miasma"
|
||||
#define GAS_METHANE "methane"
|
||||
#define GAS_METHYL_BROMIDE "methyl_bromide"
|
||||
#define GAS_BROMINE "bromine"
|
||||
#define GAS_AMMONIA "ammonia"
|
||||
#define GAS_FLUORINE "fluorine"
|
||||
#define GAS_ETHANOL "ethanol"
|
||||
|
||||
#define GAS_GROUP_CHEMICALS "Chemicals"
|
||||
|
||||
#define GAS_FLAG_DANGEROUS (1<<0)
|
||||
#define GAS_FLAG_BREATH_PROC (1<<1)
|
||||
#define GAS_FLAG_CHEMICAL (1<<2)
|
||||
|
||||
//SUPERMATTER DEFINES
|
||||
#define HEAT_PENALTY "heat penalties"
|
||||
|
||||
+191
-56
@@ -1,62 +1,197 @@
|
||||
// This is eventually for wjohn to add more color standardization stuff like I keep asking him >:(
|
||||
|
||||
#define COLOR_INPUT_DISABLED "#F0F0F0"
|
||||
#define COLOR_INPUT_ENABLED "#D3B5B5"
|
||||
#define COLOR_FLOORTILE_GRAY "#8D8B8B"
|
||||
#define COLOR_ALMOST_BLACK "#333333"
|
||||
#define COLOR_BLACK "#000000"
|
||||
#define COLOR_RED "#FF0000"
|
||||
#define COLOR_RED_LIGHT "#FF3333"
|
||||
#define COLOR_MAROON "#800000"
|
||||
#define COLOR_YELLOW "#FFFF00"
|
||||
#define COLOR_OLIVE "#808000"
|
||||
#define COLOR_LIME "#32CD32"
|
||||
#define COLOR_GREEN "#008000"
|
||||
#define COLOR_CYAN "#00FFFF"
|
||||
#define COLOR_TEAL "#008080"
|
||||
#define COLOR_BLUE "#0000FF"
|
||||
#define COLOR_BLUE_LIGHT "#33CCFF"
|
||||
#define COLOR_NAVY "#000080"
|
||||
#define COLOR_PINK "#FFC0CB"
|
||||
#define COLOR_MAGENTA "#FF00FF"
|
||||
#define COLOR_PURPLE "#800080"
|
||||
#define COLOR_ORANGE "#FF9900"
|
||||
#define COLOR_BEIGE "#CEB689"
|
||||
#define COLOR_BLUE_GRAY "#75A2BB"
|
||||
#define COLOR_BROWN "#BA9F6D"
|
||||
#define COLOR_SOFT_RED "#FA8282"
|
||||
#define COLOR_DARK_BROWN "#997C4F"
|
||||
#define COLOR_DARK_ORANGE "#C3630C"
|
||||
#define COLOR_GREEN_GRAY "#99BB76"
|
||||
#define COLOR_RED_GRAY "#B4696A"
|
||||
#define COLOR_PALE_BLUE_GRAY "#98C5DF"
|
||||
#define COLOR_PALE_GREEN_GRAY "#B7D993"
|
||||
#define COLOR_PALE_ORANGE "#FFC066"
|
||||
#define COLOR_PALE_RED_GRAY "#D59998"
|
||||
#define COLOR_PALE_PURPLE_GRAY "#CBB1CA"
|
||||
#define COLOR_PURPLE_GRAY "#AE8CA8"
|
||||
#define COLOR_INPUT_DISABLED "#F0F0F0"
|
||||
#define COLOR_INPUT_ENABLED "#D3B5B5"
|
||||
|
||||
// Color defines used by the assembly detailer.
|
||||
#define COLOR_ASSEMBLY_BLACK "#545454"
|
||||
#define COLOR_ASSEMBLY_BGRAY "#9497AB"
|
||||
#define COLOR_ASSEMBLY_WHITE "#E2E2E2"
|
||||
#define COLOR_ASSEMBLY_RED "#CC4242"
|
||||
#define COLOR_ASSEMBLY_ORANGE "#E39751"
|
||||
#define COLOR_ASSEMBLY_BEIGE "#AF9366"
|
||||
#define COLOR_ASSEMBLY_BROWN "#97670E"
|
||||
#define COLOR_ASSEMBLY_GOLD "#AA9100"
|
||||
#define COLOR_ASSEMBLY_YELLOW "#CECA2B"
|
||||
#define COLOR_ASSEMBLY_GURKHA "#999875"
|
||||
#define COLOR_ASSEMBLY_LGREEN "#789876"
|
||||
#define COLOR_ASSEMBLY_GREEN "#44843C"
|
||||
#define COLOR_ASSEMBLY_LBLUE "#5D99BE"
|
||||
#define COLOR_ASSEMBLY_BLUE "#38559E"
|
||||
#define COLOR_ASSEMBLY_PURPLE "#6F6192"
|
||||
#define COLOR_ASSEMBLY_PINK "#ff4adc"
|
||||
#define COLOR_DARKMODE_BACKGROUND "#202020"
|
||||
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
|
||||
#define COLOR_DARKMODE_TEXT "#a4bad6"
|
||||
|
||||
#define COLOR_WHITE "#FFFFFF"
|
||||
#define COLOR_VERY_LIGHT_GRAY "#EEEEEE"
|
||||
#define COLOR_SILVER "#C0C0C0"
|
||||
#define COLOR_GRAY "#808080"
|
||||
#define COLOR_WHITE "#FFFFFF"
|
||||
#define COLOR_VERY_LIGHT_GRAY "#EEEEEE"
|
||||
#define COLOR_SILVER "#C0C0C0"
|
||||
#define COLOR_GRAY "#808080"
|
||||
#define COLOR_FLOORTILE_GRAY "#8D8B8B"
|
||||
#define COLOR_DARK "#454545"
|
||||
#define COLOR_ALMOST_BLACK "#333333"
|
||||
#define COLOR_BLACK "#000000"
|
||||
#define COLOR_HALF_TRANSPARENT_BLACK "#0000007A"
|
||||
|
||||
#define COLOR_RED "#FF0000"
|
||||
#define COLOR_MOSTLY_PURE_RED "#FF3300"
|
||||
#define COLOR_DARK_RED "#A50824"
|
||||
#define COLOR_RED_LIGHT "#FF3333"
|
||||
#define COLOR_MAROON "#800000"
|
||||
#define COLOR_VIVID_RED "#FF3232"
|
||||
#define COLOR_LIGHT_GRAYISH_RED "#E4C7C5"
|
||||
#define COLOR_SOFT_RED "#FA8282"
|
||||
#define COLOR_BUBBLEGUM_RED "#950A0A"
|
||||
|
||||
#define COLOR_YELLOW "#FFFF00"
|
||||
#define COLOR_VIVID_YELLOW "#FBFF23"
|
||||
#define COLOR_VERY_SOFT_YELLOW "#FAE48E"
|
||||
|
||||
#define COLOR_OLIVE "#808000"
|
||||
#define COLOR_VIBRANT_LIME "#00FF00"
|
||||
#define COLOR_LIME "#32CD32"
|
||||
#define COLOR_DARK_LIME "#00aa00"
|
||||
#define COLOR_VERY_PALE_LIME_GREEN "#DDFFD3"
|
||||
#define COLOR_VERY_DARK_LIME_GREEN "#003300"
|
||||
#define COLOR_GREEN "#008000"
|
||||
#define COLOR_DARK_MODERATE_LIME_GREEN "#44964A"
|
||||
|
||||
#define COLOR_CYAN "#00FFFF"
|
||||
#define COLOR_DARK_CYAN "#00A2FF"
|
||||
#define COLOR_TEAL "#008080"
|
||||
#define COLOR_BLUE "#0000FF"
|
||||
#define COLOR_STRONG_BLUE "#1919c8"
|
||||
#define COLOR_BRIGHT_BLUE "#2CB2E8"
|
||||
#define COLOR_MODERATE_BLUE "#555CC2"
|
||||
#define COLOR_AMETHYST "#822BFF"
|
||||
#define COLOR_BLUE_LIGHT "#33CCFF"
|
||||
#define COLOR_NAVY "#000080"
|
||||
#define COLOR_BLUE_GRAY "#75A2BB"
|
||||
|
||||
#define COLOR_PINK "#FFC0CB"
|
||||
#define COLOR_LIGHT_PINK "#ff3cc8"
|
||||
#define COLOR_MOSTLY_PURE_PINK "#E4005B"
|
||||
#define COLOR_MAGENTA "#FF00FF"
|
||||
#define COLOR_STRONG_MAGENTA "#B800B8"
|
||||
#define COLOR_PURPLE "#800080"
|
||||
#define COLOR_VIOLET "#B900F7"
|
||||
#define COLOR_STRONG_VIOLET "#6927c5"
|
||||
|
||||
#define COLOR_ORANGE "#FF9900"
|
||||
#define COLOR_MOSTLY_PURE_ORANGE "#ff8000"
|
||||
#define COLOR_TAN_ORANGE "#FF7B00"
|
||||
#define COLOR_BRIGHT_ORANGE "#E2853D"
|
||||
#define COLOR_LIGHT_ORANGE "#ffc44d"
|
||||
#define COLOR_PALE_ORANGE "#FFBE9D"
|
||||
#define COLOR_BEIGE "#CEB689"
|
||||
#define COLOR_DARK_ORANGE "#C3630C"
|
||||
#define COLOR_DARK_MODERATE_ORANGE "#8B633B"
|
||||
|
||||
#define COLOR_BROWN "#BA9F6D"
|
||||
#define COLOR_DARK_BROWN "#997C4F"
|
||||
#define COLOR_ORANGE_BROWN "#a9734f"
|
||||
|
||||
//Color defines used by the soapstone (based on readability against grey tiles)
|
||||
#define COLOR_SOAPSTONE_PLASTIC "#a19d94"
|
||||
#define COLOR_SOAPSTONE_IRON "#b2b2b2"
|
||||
#define COLOR_SOAPSTONE_BRONZE "#FE8001"
|
||||
#define COLOR_SOAPSTONE_SILVER "#FFFFFF"
|
||||
#define COLOR_SOAPSTONE_GOLD "#FFD900"
|
||||
#define COLOR_SOAPSTONE_DIAMOND "#00ffee"
|
||||
|
||||
#define COLOR_GREEN_GRAY "#99BB76"
|
||||
#define COLOR_RED_GRAY "#B4696A"
|
||||
#define COLOR_PALE_BLUE_GRAY "#98C5DF"
|
||||
#define COLOR_PALE_GREEN_GRAY "#B7D993"
|
||||
#define COLOR_PALE_RED_GRAY "#D59998"
|
||||
#define COLOR_PALE_PURPLE_GRAY "#CBB1CA"
|
||||
#define COLOR_PURPLE_GRAY "#AE8CA8"
|
||||
|
||||
//Color defines used by the assembly detailer.
|
||||
#define COLOR_ASSEMBLY_BLACK "#545454"
|
||||
#define COLOR_ASSEMBLY_BGRAY "#9497AB"
|
||||
#define COLOR_ASSEMBLY_WHITE "#E2E2E2"
|
||||
#define COLOR_ASSEMBLY_RED "#CC4242"
|
||||
#define COLOR_ASSEMBLY_ORANGE "#E39751"
|
||||
#define COLOR_ASSEMBLY_BEIGE "#AF9366"
|
||||
#define COLOR_ASSEMBLY_BROWN "#97670E"
|
||||
#define COLOR_ASSEMBLY_GOLD "#AA9100"
|
||||
#define COLOR_ASSEMBLY_YELLOW "#CECA2B"
|
||||
#define COLOR_ASSEMBLY_GURKHA "#999875"
|
||||
#define COLOR_ASSEMBLY_LGREEN "#789876"
|
||||
#define COLOR_ASSEMBLY_GREEN "#44843C"
|
||||
#define COLOR_ASSEMBLY_LBLUE "#5D99BE"
|
||||
#define COLOR_ASSEMBLY_BLUE "#38559E"
|
||||
#define COLOR_ASSEMBLY_PURPLE "#6F6192"
|
||||
|
||||
///Colors for xenobiology vatgrowing
|
||||
#define COLOR_SAMPLE_YELLOW "#c0b823"
|
||||
#define COLOR_SAMPLE_PURPLE "#342941"
|
||||
#define COLOR_SAMPLE_GREEN "#98b944"
|
||||
#define COLOR_SAMPLE_BROWN "#91542d"
|
||||
#define COLOR_SAMPLE_GRAY "#5e5856"
|
||||
|
||||
///Main colors for UI themes
|
||||
#define COLOR_THEME_MIDNIGHT "#6086A0"
|
||||
#define COLOR_THEME_PLASMAFIRE "#FFB200"
|
||||
#define COLOR_THEME_RETRO "#24CA00"
|
||||
#define COLOR_THEME_SLIMECORE "#4FB259"
|
||||
#define COLOR_THEME_OPERATIVE "#B8221F"
|
||||
#define COLOR_THEME_GLASS "#75A4C4"
|
||||
#define COLOR_THEME_CLOCKWORK "#CFBA47"
|
||||
|
||||
///Colors for eigenstates
|
||||
#define COLOR_PERIWINKLEE "#9999FF"
|
||||
/**
|
||||
* Some defines to generalise colours used in lighting.
|
||||
*
|
||||
* Important note: colors can end up significantly different from the basic html picture, especially when saturated
|
||||
*/
|
||||
/// Bright but quickly dissipating neon green. rgb(100, 200, 100)
|
||||
#define LIGHT_COLOR_GREEN "#64C864"
|
||||
/// Electric green. rgb(0, 255, 0)
|
||||
#define LIGHT_COLOR_ELECTRIC_GREEN "#00FF00"
|
||||
/// Cold, diluted blue. rgb(100, 150, 250)
|
||||
#define LIGHT_COLOR_BLUE "#6496FA"
|
||||
/// Light blueish green. rgb(125, 225, 175)
|
||||
#define LIGHT_COLOR_BLUEGREEN "#7DE1AF"
|
||||
/// Diluted cyan. rgb(125, 225, 225)
|
||||
#define LIGHT_COLOR_CYAN "#7DE1E1"
|
||||
/// Electric cyan rgb(0, 255, 255)
|
||||
#define LIGHT_COLOR_ELECTRIC_CYAN "#00FFFF"
|
||||
/// More-saturated cyan. rgb(64, 206, 255)
|
||||
#define LIGHT_COLOR_LIGHT_CYAN "#40CEFF"
|
||||
/// Saturated blue. rgb(51, 117, 248)
|
||||
#define LIGHT_COLOR_DARK_BLUE "#6496FA"
|
||||
/// Diluted, mid-warmth pink. rgb(225, 125, 225)
|
||||
#define LIGHT_COLOR_PINK "#E17DE1"
|
||||
/// Dimmed yellow, leaning kaki. rgb(225, 225, 125)
|
||||
#define LIGHT_COLOR_YELLOW "#E1E17D"
|
||||
/// Clear brown, mostly dim. rgb(150, 100, 50)
|
||||
#define LIGHT_COLOR_BROWN "#966432"
|
||||
/// Mostly pure orange. rgb(250, 150, 50)
|
||||
#define LIGHT_COLOR_ORANGE "#FA9632"
|
||||
/// Light Purple. rgb(149, 44, 244)
|
||||
#define LIGHT_COLOR_PURPLE "#952CF4"
|
||||
/// Less-saturated light purple. rgb(155, 81, 255)
|
||||
#define LIGHT_COLOR_LAVENDER "#9B51FF"
|
||||
///slightly desaturated bright yellow.
|
||||
#define LIGHT_COLOR_HOLY_MAGIC "#FFF743"
|
||||
/// deep crimson
|
||||
#define LIGHT_COLOR_BLOOD_MAGIC "#D00000"
|
||||
|
||||
/* These ones aren't a direct colour like the ones above, because nothing would fit */
|
||||
/// Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
|
||||
#define LIGHT_COLOR_FIRE "#FAA019"
|
||||
/// Very warm yellow, leaning slightly towards orange. rgb(196, 138, 24)
|
||||
#define LIGHT_COLOR_LAVA "#C48A18"
|
||||
/// Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
|
||||
#define LIGHT_COLOR_FLARE "#FA644B"
|
||||
/// Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
|
||||
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B"
|
||||
/// Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
||||
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF"
|
||||
/// Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
||||
#define LIGHT_COLOR_HALOGEN "#F0FAFA"
|
||||
|
||||
//The GAGS greyscale_colors for each department's computer/machine circuits
|
||||
#define CIRCUIT_COLOR_GENERIC "#1A7A13"
|
||||
#define CIRCUIT_COLOR_COMMAND "#1B4594"
|
||||
#define CIRCUIT_COLOR_SECURITY "#9A151E"
|
||||
#define CIRCUIT_COLOR_SCIENCE "#BC4A9B"
|
||||
#define CIRCUIT_COLOR_SERVICE "#92DCBA"
|
||||
#define CIRCUIT_COLOR_MEDICAL "#00CCFF"
|
||||
#define CIRCUIT_COLOR_ENGINEERING "#F8D700"
|
||||
#define CIRCUIT_COLOR_SUPPLY "#C47749"
|
||||
|
||||
/// Colors for pride week
|
||||
#define COLOR_PRIDE_RED "#FF6666"
|
||||
#define COLOR_PRIDE_ORANGE "#FC9F3C"
|
||||
#define COLOR_PRIDE_YELLOW "#EAFF51"
|
||||
#define COLOR_PRIDE_GREEN "#41FC66"
|
||||
#define COLOR_PRIDE_BLUE "#42FFF2"
|
||||
#define COLOR_PRIDE_PURPLE "#5D5DFC"
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
/// Do not allow this random event to continue.
|
||||
#define CANCEL_PRE_RANDOM_EVENT (1<<0)
|
||||
|
||||
/// a weather event of some kind occured
|
||||
#define COMSIG_WEATHER_TELEGRAPH(event_type) "!weather_telegraph [event_type]"
|
||||
#define COMSIG_WEATHER_START(event_type) "!weather_start [event_type]"
|
||||
#define COMSIG_WEATHER_WINDDOWN(event_type) "!weather_winddown [event_type]"
|
||||
#define COMSIG_WEATHER_END(event_type) "!weather_end [event_type]"
|
||||
|
||||
/// called by auxgm add_gas: (gas_id)
|
||||
#define COMSIG_GLOB_NEW_GAS "!new_gas"
|
||||
|
||||
// signals from globally accessible objects
|
||||
/// from SSsun when the sun changes position : (primary_sun, suns)
|
||||
#define COMSIG_SUN_MOVED "sun_moved"
|
||||
@@ -45,6 +54,8 @@
|
||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting"
|
||||
/// generic topic handler (usr, href_list)
|
||||
#define COMSIG_TOPIC "handle_topic"
|
||||
/// from datum ui_act (usr, action)
|
||||
#define COMSIG_UI_ACT "COMSIG_UI_ACT"
|
||||
|
||||
/// fires on the target datum when an element is attached to it (/datum/element)
|
||||
#define COMSIG_ELEMENT_ATTACH "element_attach"
|
||||
@@ -415,6 +426,12 @@
|
||||
///from /obj/machinery/obj_break(damage_flag): (damage_flag)
|
||||
#define COMSIG_MACHINERY_BROKEN "machinery_broken"
|
||||
|
||||
// /obj/machinery/power/supermatter_crystal signals
|
||||
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM delam reaches the point of sounding alarms
|
||||
#define COMSIG_SUPERMATTER_DELAM_START_ALARM "sm_delam_start_alarm"
|
||||
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM sounds an audible alarm
|
||||
#define COMSIG_SUPERMATTER_DELAM_ALARM "sm_delam_alarm"
|
||||
|
||||
// /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)
|
||||
|
||||
@@ -79,7 +79,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
#define isangel(A) (is_species(A, /datum/species/angel))
|
||||
#define ismush(A) (is_species(A, /datum/species/mush))
|
||||
#define isshadow(A) (is_species(A, /datum/species/shadow))
|
||||
#define isrobotic(A) (is_species(A, /datum/species/ipc) || is_species(A, /datum/species/synthliz))
|
||||
#define isrobotic(A) (is_species(A, /datum/species/ipc) || is_species(A, /datum/species/synthliz) || is_species(A, /datum/species/mammal/synthetic))
|
||||
#define isdwarf(A) (is_species(A, /datum/species/dwarf))
|
||||
|
||||
// Citadel specific species
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
|
||||
#define CHAT_PLANE -1 //We don't want heard messages to be hidden by FoV.
|
||||
|
||||
/// Plane for balloon text (text that fades up)
|
||||
#define BALLOON_CHAT_PLANE -1.2
|
||||
|
||||
#define CHAT_LAYER 12.0001 // Do not insert layers between these two values
|
||||
#define CHAT_LAYER_MAX 12.9999
|
||||
|
||||
|
||||
@@ -30,31 +30,6 @@
|
||||
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
|
||||
#define LIGHT_COLOR_WHITE "#FFFFFF"
|
||||
#define LIGHT_COLOR_RED "#FA8282" //Warm but extremely diluted red. rgb(250, 130, 130)
|
||||
#define LIGHT_COLOR_GREEN "#64C864" //Bright but quickly dissipating neon green. rgb(100, 200, 100)
|
||||
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
|
||||
|
||||
#define LIGHT_COLOR_BLUEGREEN "#7DE1AF" //Light blueish green. rgb(125, 225, 175)
|
||||
#define LIGHT_COLOR_PALEBLUE "#7DAFE1" //A pale blue-ish color. rgb(125, 175, 225)
|
||||
#define LIGHT_COLOR_CYAN "#7DE1E1" //Diluted cyan. rgb(125, 225, 225)
|
||||
#define LIGHT_COLOR_LIGHT_CYAN "#40CEFF" //More-saturated cyan. rgb(64, 206, 255)
|
||||
#define LIGHT_COLOR_DARK_BLUE "#6496FA" //Saturated blue. rgb(51, 117, 248)
|
||||
#define LIGHT_COLOR_PINK "#E17DE1" //Diluted, mid-warmth pink. rgb(225, 125, 225)
|
||||
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
|
||||
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
|
||||
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
|
||||
#define LIGHT_COLOR_PURPLE "#952CF4" //Light Purple. rgb(149, 44, 244)
|
||||
#define LIGHT_COLOR_LAVENDER "#9B51FF" //Less-saturated light purple. rgb(155, 81, 255)
|
||||
|
||||
#define LIGHT_COLOR_HOLY_MAGIC "#FFF743" //slightly desaturated bright yellow.
|
||||
#define LIGHT_COLOR_BLOOD_MAGIC "#D00000" //deep crimson
|
||||
|
||||
//These ones aren't a direct colour like the ones above, because nothing would fit
|
||||
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
|
||||
#define LIGHT_COLOR_LAVA "#C48A18" //Very warm yellow, leaning slightly towards orange. rgb(196, 138, 24)
|
||||
#define LIGHT_COLOR_FLARE "#FA644B" //Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
|
||||
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
|
||||
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
||||
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
||||
|
||||
#define LIGHT_RANGE_FIRE 3 //How many tiles standard fires glow.
|
||||
|
||||
|
||||
+18
-11
@@ -48,32 +48,39 @@
|
||||
#define MC_CHARGE "CHARGE"
|
||||
#define MC_AI "AI"
|
||||
#define MC_SENSORS "SENSORS"
|
||||
#define MC_SIGNALER "SIGNALER"
|
||||
|
||||
//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.
|
||||
#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
|
||||
#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)
|
||||
#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
|
||||
//Program categories
|
||||
#define PROGRAM_CATEGORY_CREW "Crew"
|
||||
#define PROGRAM_CATEGORY_ENGI "Engineering"
|
||||
#define PROGRAM_CATEGORY_ROBO "Robotics"
|
||||
#define PROGRAM_CATEGORY_SUPL "Supply"
|
||||
#define PROGRAM_CATEGORY_MISC "Other"
|
||||
|
||||
#define FIREDOOR_OPEN 1
|
||||
#define FIREDOOR_CLOSED 2
|
||||
|
||||
@@ -323,6 +323,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define FIRST_DIAG_STEP 1
|
||||
#define SECOND_DIAG_STEP 2
|
||||
|
||||
#define DEADCHAT_ANNOUNCEMENT "announcement"
|
||||
#define DEADCHAT_ARRIVALRATTLE "arrivalrattle"
|
||||
#define DEADCHAT_DEATHRATTLE "deathrattle"
|
||||
#define DEADCHAT_REGULAR "regular-deadchat"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define NITRYL_FORMATION_ENERGY 100000
|
||||
#define TRITIUM_BURN_OXY_FACTOR 100
|
||||
#define TRITIUM_BURN_TRIT_FACTOR 10
|
||||
#define TRITIUM_BURN_RADIOACTIVITY_FACTOR 50000 //The neutrons gotta go somewhere. Completely arbitrary number.
|
||||
#define TRITIUM_BURN_RADIOACTIVITY_FACTOR 5000 //The neutrons gotta go somewhere. Completely arbitrary number.
|
||||
#define TRITIUM_MINIMUM_RADIATION_ENERGY 0.1 //minimum 0.01 moles trit or 10 moles oxygen to start producing rads
|
||||
#define SUPER_SATURATION_THRESHOLD 96
|
||||
#define STIMULUM_HEAT_SCALE 100000
|
||||
|
||||
@@ -73,4 +73,6 @@
|
||||
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 BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve.
|
||||
#define BOMB_TARGET_SIZE 200 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
|
||||
#define BOMB_SUB_TARGET_EXPONENT 2 // The power of the points curve below the target size. Higher = less points for worse bombs, below target.
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
* if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer,
|
||||
* and returns the id of the existing timer
|
||||
*/
|
||||
#define TIMER_UNIQUE (1<<0)
|
||||
#define TIMER_UNIQUE (1<<0)
|
||||
|
||||
///For unique timers: Replace the old timer rather then not start this one
|
||||
#define TIMER_OVERRIDE (1<<1)
|
||||
#define TIMER_OVERRIDE (1<<1)
|
||||
|
||||
/**
|
||||
* Timing should be based on how timing progresses on clients, not the server.
|
||||
@@ -41,20 +41,23 @@
|
||||
* should only be used in conjuction with things that have to progress client side, such as
|
||||
* animate() or sound()
|
||||
*/
|
||||
#define TIMER_CLIENT_TIME (1<<2)
|
||||
#define TIMER_CLIENT_TIME (1<<2)
|
||||
|
||||
///Timer can be stopped using deltimer()
|
||||
#define TIMER_STOPPABLE (1<<3)
|
||||
#define TIMER_STOPPABLE (1<<3)
|
||||
|
||||
///prevents distinguishing identical timers with the wait variable
|
||||
///
|
||||
///To be used with TIMER_UNIQUE
|
||||
#define TIMER_NO_HASH_WAIT (1<<4)
|
||||
#define TIMER_NO_HASH_WAIT (1<<4)
|
||||
|
||||
///Loops the timer repeatedly until qdeleted
|
||||
///
|
||||
///In most cases you want a subsystem instead, so don't use this unless you have a good reason
|
||||
#define TIMER_LOOP (1<<5)
|
||||
#define TIMER_LOOP (1<<5)
|
||||
|
||||
///Delete the timer on parent datum Destroy() and when deltimer'd
|
||||
#define TIMER_DELETE_ME (1<<6)
|
||||
|
||||
///Empty ID define
|
||||
#define TIMER_ID_NULL -1
|
||||
@@ -188,6 +191,7 @@
|
||||
#define FIRE_PRIORITY_CALLBACKS 600
|
||||
// #define FIRE_PRIORITY_EXPLOSIONS 666
|
||||
#define FIRE_PRIORITY_TIMER 700
|
||||
#define FIRE_PRIORITY_SOUND_LOOPS 800
|
||||
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
||||
|
||||
// SS runlevels
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
#define TRAIT_ROBOTIC_ORGANISM "robotic_organism"
|
||||
#define TRAIT_ROBOT_RADSHIELDING "robot_radshielding"
|
||||
#define TRAIT_NOBREATH "no_breath"
|
||||
#define TRAIT_AUXILIARY_LUNGS "auxiliary_lungs" //Lungs not neccessary required due to nobreath, but provides some other helpful function.
|
||||
#define TRAIT_ANTIMAGIC "anti_magic"
|
||||
#define TRAIT_HOLY "holy"
|
||||
#define TRAIT_DEPRESSION "depression"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// These are used in uplink_devices.dm to determine whether or not an item is purchasable.
|
||||
|
||||
/// This item is purchasable to traitors
|
||||
#define UPLINK_TRAITORS (1 << 0)
|
||||
|
||||
/// This item is purchasable to nuke ops
|
||||
#define UPLINK_NUKE_OPS (1 << 1)
|
||||
|
||||
/// This item is purchasable to clown ops
|
||||
#define UPLINK_CLOWN_OPS (1 << 2)
|
||||
+92
-50
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Holds procs to help with list operations
|
||||
* Contains groups:
|
||||
* Misc
|
||||
* Sorting
|
||||
* Misc
|
||||
* Sorting
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -11,22 +11,29 @@
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) { L = list(); }
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
#define LAZYCOPY(L) (L ? L.Copy() : list() )
|
||||
///Like LAZYCOPY - copies an input list if the list has entries, If it doesn't the assigned list is nulled
|
||||
#define LAZYLISTDUPLICATE(L) (L ? L.Copy() : null )
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
|
||||
#define LAZYFIND(L, V) (L ? L.Find(V) : 0)
|
||||
///returns L[I] if L exists and I is a valid index of L, runtimes if L is not a list
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null)
|
||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||
#define LAZYLEN(L) length(L)
|
||||
//Sets a list to null
|
||||
///Sets a list to null
|
||||
#define LAZYNULL(L) L = null
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
#define reverseList(L) reverseRange(L.Copy())
|
||||
#define LAZYADDASSOC_TG(L, K, V) if(!L) { L = list(); } L[K] += V;
|
||||
///This is used to add onto lazy assoc list when the value you're adding is a /list/. This one has extra safety over lazyaddassoc because the value could be null (and thus cant be used to += objects)
|
||||
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V);
|
||||
#define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; }
|
||||
#define LAZYACCESSASSOC(L, I, K) L ? L[I] ? L[I][K] ? L[I][K] : null : null : null
|
||||
#define QDEL_LAZYLIST(L) for(var/I in L) qdel(I); L = null;
|
||||
//These methods don't null the list
|
||||
#define LAZYCOPY(L) (L ? L.Copy() : list() ) //Use LAZYLISTDUPLICATE instead if you want it to null with no entries
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut() // Consider LAZYNULL instead
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
#define reverseList(L) reverseRange(L.Copy())
|
||||
|
||||
/// Performs an insertion on the given lazy list with the given key and value. If the value already exists, a new one will not be made.
|
||||
#define LAZYORASSOCLIST(lazy_list, key, value) \
|
||||
@@ -75,7 +82,7 @@
|
||||
} while(FALSE)
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "")
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = length(input)
|
||||
switch(total)
|
||||
if (0)
|
||||
@@ -98,6 +105,7 @@
|
||||
|
||||
/**
|
||||
* English_list but associative supporting. Higher overhead.
|
||||
* @depricated
|
||||
*/
|
||||
/proc/english_list_assoc(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "")
|
||||
var/total = length(input)
|
||||
@@ -125,6 +133,7 @@
|
||||
return "[output][and_text][input[index]]"
|
||||
|
||||
//Returns list element or null. Should prevent "index out of bounds" error.
|
||||
/// @depricated
|
||||
/proc/listgetindex(list/L, index)
|
||||
if(LAZYLEN(L))
|
||||
if(isnum(index) && ISINTEGER(index))
|
||||
@@ -135,17 +144,19 @@
|
||||
return
|
||||
|
||||
//Return either pick(list) or null if list is not of type /list or is empty
|
||||
/// @depricated
|
||||
/proc/safepick(list/L)
|
||||
if(LAZYLEN(L))
|
||||
return pick(L)
|
||||
|
||||
//Checks if the list is empty
|
||||
/// @depricated
|
||||
/proc/isemptylist(list/L)
|
||||
if(!L.len)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Checks for specific types in a list
|
||||
//Checks for specific types in a listc
|
||||
/proc/is_type_in_list(atom/A, list/L)
|
||||
if(!LAZYLEN(L) || !A)
|
||||
return FALSE
|
||||
@@ -186,43 +197,45 @@
|
||||
/proc/typecache_filter_list_reverse(list/atoms, list/typecache)
|
||||
RETURN_TYPE(/list)
|
||||
. = list()
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(!typecache[A.type])
|
||||
. += A
|
||||
for(var/atom/atom as anything in atoms)
|
||||
if(!typecache[atom.type])
|
||||
. += atom
|
||||
|
||||
/proc/typecache_filter_multi_list_exclusion(list/atoms, list/typecache_include, list/typecache_exclude)
|
||||
. = list()
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(typecache_include[A.type] && !typecache_exclude[A.type])
|
||||
. += A
|
||||
for(var/atom/atom as anything in atoms)
|
||||
if(typecache_include[atom.type] && !typecache_exclude[atom.type])
|
||||
. += atom
|
||||
|
||||
//Like typesof() or subtypesof(), but returns a typecache instead of a list
|
||||
///Like typesof() or subtypesof(), but returns a typecache instead of a list
|
||||
/proc/typecacheof(path, ignore_root_path, only_root_path = FALSE)
|
||||
if(ispath(path))
|
||||
var/list/types = list()
|
||||
var/list/types
|
||||
var/list/output = list()
|
||||
if(only_root_path)
|
||||
types = list(path)
|
||||
output[path] = TRUE
|
||||
else
|
||||
types = ignore_root_path ? subtypesof(path) : typesof(path)
|
||||
var/list/L = list()
|
||||
for(var/T in types)
|
||||
L[T] = TRUE
|
||||
return L
|
||||
for(var/T in types)
|
||||
output[T] = TRUE
|
||||
return output
|
||||
else if(islist(path))
|
||||
var/list/pathlist = path
|
||||
var/list/L = list()
|
||||
var/list/output = list()
|
||||
if(ignore_root_path)
|
||||
for(var/P in pathlist)
|
||||
for(var/T in subtypesof(P))
|
||||
L[T] = TRUE
|
||||
for(var/current_path in pathlist)
|
||||
for(var/subtype in subtypesof(current_path))
|
||||
output[subtype] = TRUE
|
||||
return output
|
||||
|
||||
if(only_root_path)
|
||||
for(var/current_path in pathlist)
|
||||
output[current_path] = TRUE
|
||||
else
|
||||
for(var/P in pathlist)
|
||||
if(only_root_path)
|
||||
L[P] = TRUE
|
||||
else
|
||||
for(var/T in typesof(P))
|
||||
L[T] = TRUE
|
||||
return L
|
||||
for(var/current_path in pathlist)
|
||||
for(var/subpath in typesof(current_path))
|
||||
output[subpath] = TRUE
|
||||
return output
|
||||
|
||||
/proc/typecacheof_assoc_list(list/pathlist, ignore_root_path = FALSE)
|
||||
. = list()
|
||||
@@ -281,9 +294,10 @@
|
||||
|
||||
//Picks a random element from a list based on a weighting system:
|
||||
//1. Adds up the total of weights for each element
|
||||
//2. Gets the total from 0% to 100% of previous total value.
|
||||
//2. Gets a number between 1 and that total
|
||||
//3. For each element in the list, subtracts its weighting from that number
|
||||
//4. If that makes the number 0 or less, return that element.
|
||||
//Will output null sometimes if you use decimals (e.g. 0.1 instead of 10) as rand() uses integers, not floats
|
||||
/proc/pickweight(list/L, base_weight = 1)
|
||||
var/total = 0
|
||||
var/item
|
||||
@@ -292,12 +306,14 @@
|
||||
L[item] = base_weight
|
||||
total += L[item]
|
||||
|
||||
total = rand() * total
|
||||
total = rand(base_weight, total)
|
||||
for (item in L)
|
||||
total -= L[item]
|
||||
total -=L [item]
|
||||
if (total <= 0)
|
||||
return item
|
||||
|
||||
return null
|
||||
|
||||
/proc/pickweightAllowZero(list/L) //The original pickweight proc will sometimes pick entries with zero weight. I'm not sure if changing the original will break anything, so I left it be.
|
||||
var/total = 0
|
||||
var/item
|
||||
@@ -369,13 +385,13 @@
|
||||
//Results will have a length of quality
|
||||
return results
|
||||
|
||||
//Pick a random element from the list and remove it from the list.
|
||||
/// Pick a random element from the list and remove it from the list.
|
||||
/proc/pick_n_take(list/L)
|
||||
RETURN_TYPE(L[_].type)
|
||||
if(L.len)
|
||||
var/picked = rand(1,L.len)
|
||||
. = L[picked]
|
||||
L.Cut(picked,picked+1) //Cut is far more efficient that Remove()
|
||||
L.Cut(picked,picked+1) //Cut is far more efficient that Remove()
|
||||
|
||||
//Pick a random element from the list by weight and remove it from the list.
|
||||
//Result is returned as a list in the format list(key, value)
|
||||
@@ -471,7 +487,7 @@
|
||||
|
||||
//uses sortList() but uses the var's name specifically. This should probably be using mergeAtom() instead
|
||||
/proc/sortNames(list/L, order=1)
|
||||
return sortTim(L, order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
|
||||
return sortTim(L.Copy(), order >= 0 ? /proc/cmp_name_asc : /proc/cmp_name_dsc)
|
||||
|
||||
|
||||
//Converts a bitfield to a list of numbers (or words if a wordlist is provided)
|
||||
@@ -507,10 +523,12 @@
|
||||
if (L[i] == val)
|
||||
.++
|
||||
|
||||
/// Returns datum/data/record
|
||||
/proc/find_record(field, value, list/L)
|
||||
for(var/datum/data/record/R in L)
|
||||
if(R.fields[field] == value)
|
||||
return R
|
||||
return null
|
||||
|
||||
|
||||
//Move a single element from position fromIndex within a list, to position toIndex
|
||||
@@ -520,10 +538,10 @@
|
||||
//fromIndex and toIndex must be in the range [1,L.len+1]
|
||||
//This will preserve associations ~Carnie
|
||||
/proc/moveElement(list/L, fromIndex, toIndex)
|
||||
if(fromIndex == toIndex || fromIndex+1 == toIndex) //no need to move
|
||||
if(fromIndex == toIndex || fromIndex+1 == toIndex) //no need to move
|
||||
return
|
||||
if(fromIndex > toIndex)
|
||||
++fromIndex //since a null will be inserted before fromIndex, the index needs to be nudged right by one
|
||||
++fromIndex //since a null will be inserted before fromIndex, the index needs to be nudged right by one
|
||||
|
||||
L.Insert(toIndex, null)
|
||||
L.Swap(fromIndex, toIndex)
|
||||
@@ -535,10 +553,10 @@
|
||||
//This will preserve associations ~Carnie
|
||||
/proc/moveRange(list/L, fromIndex, toIndex, len=1)
|
||||
var/distance = abs(toIndex - fromIndex)
|
||||
if(len >= distance) //there are more elements to be moved than the distance to be moved. Therefore the same result can be achieved (with fewer operations) by moving elements between where we are and where we are going. The result being, our range we are moving is shifted left or right by dist elements
|
||||
if(len >= distance) //there are more elements to be moved than the distance to be moved. Therefore the same result can be achieved (with fewer operations) by moving elements between where we are and where we are going. The result being, our range we are moving is shifted left or right by dist elements
|
||||
if(fromIndex <= toIndex)
|
||||
return //no need to move
|
||||
fromIndex += len //we want to shift left instead of right
|
||||
return //no need to move
|
||||
fromIndex += len //we want to shift left instead of right
|
||||
|
||||
for(var/i=0, i<distance, ++i)
|
||||
L.Insert(fromIndex, null)
|
||||
@@ -558,7 +576,7 @@
|
||||
//Note: if the two ranges overlap, only the destination order will be preserved fully, since some elements will be within both ranges ~Carnie
|
||||
/proc/swapRange(list/L, fromIndex, toIndex, len=1)
|
||||
var/distance = abs(toIndex - fromIndex)
|
||||
if(len > distance) //there is an overlap, therefore swapping each element will require more swaps than inserting new elements
|
||||
if(len > distance) //there is an overlap, therefore swapping each element will require more swaps than inserting new elements
|
||||
if(fromIndex < toIndex)
|
||||
toIndex += len
|
||||
else
|
||||
@@ -604,6 +622,12 @@
|
||||
if(D.vars[varname] == value)
|
||||
return D
|
||||
|
||||
//remove all nulls from a list
|
||||
/proc/removeNullsFromList(list/L)
|
||||
while(L.Remove(null))
|
||||
continue
|
||||
return L
|
||||
|
||||
//Copies a list, and all lists inside it recusively
|
||||
//Does not copy any other reference type
|
||||
/proc/deepCopyList(list/l)
|
||||
@@ -636,11 +660,6 @@
|
||||
used_key_list[input_key] = 1
|
||||
return input_key
|
||||
|
||||
#if DM_VERSION > 514
|
||||
#error Remie said that lummox was adding a way to get a lists
|
||||
#error contents via list.values, if that is true remove this
|
||||
#error otherwise, update the version and bug lummox
|
||||
#endif
|
||||
//Flattens a keyed list into a list of it's contents
|
||||
/proc/flatten_list(list/key_list)
|
||||
if(!islist(key_list))
|
||||
@@ -717,6 +736,29 @@
|
||||
ret += key
|
||||
return ret
|
||||
|
||||
/proc/compare_list(list/l,list/d)
|
||||
if(!islist(l) || !islist(d))
|
||||
return FALSE
|
||||
|
||||
if(l.len != d.len)
|
||||
return FALSE
|
||||
|
||||
for(var/i in 1 to l.len)
|
||||
if(l[i] != d[i])
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
#define LAZY_LISTS_OR(left_list, right_list)\
|
||||
( length(left_list)\
|
||||
? length(right_list)\
|
||||
? (left_list | right_list)\
|
||||
: left_list.Copy()\
|
||||
: length(right_list)\
|
||||
? right_list.Copy()\
|
||||
: null\
|
||||
)
|
||||
|
||||
/proc/is_type_in_ref_list(path, list/L)
|
||||
if(!ispath(path))//not a path
|
||||
return
|
||||
|
||||
@@ -88,6 +88,19 @@
|
||||
if (CONFIG_GET(flag/log_access))
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]")
|
||||
|
||||
/**
|
||||
* Writes to a special log file if the log_suspicious_login config flag is set,
|
||||
* which is intended to contain all logins that failed under suspicious circumstances.
|
||||
*
|
||||
* Mirrors this log entry to log_access when access_log_mirror is TRUE, so this proc
|
||||
* doesn't need to be used alongside log_access and can replace it where appropriate.
|
||||
*/
|
||||
/proc/log_suspicious_login(text, access_log_mirror = TRUE)
|
||||
if (CONFIG_GET(flag/log_suspicious_login))
|
||||
WRITE_LOG(GLOB.world_suspicious_login_log, "SUSPICIOUS_ACCESS: [text]")
|
||||
if(access_log_mirror)
|
||||
log_access(text)
|
||||
|
||||
/proc/log_law(text)
|
||||
if (CONFIG_GET(flag/log_law))
|
||||
WRITE_LOG(GLOB.world_game_log, "LAW: [text]")
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
|
||||
if(!isobj(O))
|
||||
O = new /atom/movable/screen/text()
|
||||
O.maptext = maptext
|
||||
O.maptext = MAPTEXT(maptext)
|
||||
O.maptext_height = maptext_height
|
||||
O.maptext_width = maptext_width
|
||||
O.screen_loc = screen_loc
|
||||
|
||||
@@ -86,16 +86,6 @@
|
||||
// Keybindings
|
||||
init_keybindings()
|
||||
|
||||
//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)
|
||||
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /proc/init_ref_coin_values) //so the current procedure doesn't sleep because of UNTIL()
|
||||
|
||||
@@ -992,7 +992,7 @@ world
|
||||
letter = lowertext(letter)
|
||||
|
||||
var/image/text_image = new(loc = A)
|
||||
text_image.maptext = "<font size = 4>[letter]</font>"
|
||||
text_image.maptext = MAPTEXT("<font size = 4>[letter]</font>")
|
||||
text_image.pixel_x = 7
|
||||
text_image.pixel_y = 5
|
||||
qdel(atom_icon)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/proc/priority_announce(text, title = "", sound = "attention", type , sender_override)
|
||||
/proc/priority_announce(text, title = "", sound, type , sender_override, has_important_message)
|
||||
if(!text)
|
||||
return
|
||||
|
||||
var/announcement
|
||||
if(!sound)
|
||||
sound = "attention"
|
||||
|
||||
if(type == "Priority")
|
||||
announcement += "<h1 class='alert'>Priority Announcement</h1>"
|
||||
@@ -26,7 +28,11 @@
|
||||
else
|
||||
GLOB.news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
||||
|
||||
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
|
||||
///If the announcer overrides alert messages, use that message.
|
||||
// if(SSstation.announcer.custom_alert_message && !has_important_message)
|
||||
// announcement += SSstation.announcer.custom_alert_message
|
||||
// else
|
||||
announcement += "<br>[span_alert("[html_encode(text)]")]<br>"
|
||||
announcement += "<br>"
|
||||
|
||||
var/s = sound(get_announcer_sound(sound))
|
||||
@@ -127,12 +133,44 @@
|
||||
if("welcome")
|
||||
. = 'sound/announcer/medibot/welcome.ogg'
|
||||
|
||||
/**
|
||||
* Summon the crew for an emergency meeting
|
||||
*
|
||||
* Teleports the crew to a specified area, and tells everyone (via an announcement) who called the meeting. Should only be used during april fools!
|
||||
* Arguments:
|
||||
* * user - Mob who called the meeting
|
||||
* * button_zone - Area where the meeting was called and where everyone will get teleported to
|
||||
*/
|
||||
/proc/call_emergency_meeting(mob/living/user, area/button_zone)
|
||||
var/meeting_sound = sound('sound/misc/emergency_meeting.ogg')
|
||||
var/announcement
|
||||
announcement += "<h1 class='alert'>Captain Alert</h1>"
|
||||
announcement += "<br>[span_alert("[user] has called an Emergency Meeting!")]<br><br>"
|
||||
|
||||
for(var/mob/mob_to_teleport in GLOB.player_list) //gotta make sure the whole crew's here!
|
||||
if(isnewplayer(mob_to_teleport) || iscameramob(mob_to_teleport))
|
||||
continue
|
||||
to_chat(mob_to_teleport, announcement)
|
||||
SEND_SOUND(mob_to_teleport, meeting_sound) //no preferences here, you must hear the funny sound
|
||||
mob_to_teleport.overlay_fullscreen("emergency_meeting", /atom/movable/screen/fullscreen/emergency_meeting, 1)
|
||||
addtimer(CALLBACK(mob_to_teleport, /mob/.proc/clear_fullscreen, "emergency_meeting"), 3 SECONDS)
|
||||
|
||||
if (is_station_level(mob_to_teleport.z)) //teleport the mob to the crew meeting
|
||||
var/turf/target
|
||||
var/list/turf_list = get_area_turfs(button_zone)
|
||||
while (!target && turf_list.len)
|
||||
target = pick_n_take(turf_list)
|
||||
if (isclosedturf(target))
|
||||
target = null
|
||||
continue
|
||||
mob_to_teleport.forceMove(target)
|
||||
|
||||
/proc/print_command_report(text = "", title = null, announce=TRUE)
|
||||
if(!title)
|
||||
title = "Classified [command_name()] Update"
|
||||
|
||||
if(announce)
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport")
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport", has_important_message = TRUE)
|
||||
|
||||
var/datum/comm_message/M = new
|
||||
M.title = title
|
||||
@@ -140,13 +178,17 @@
|
||||
|
||||
SScommunications.send_message(M)
|
||||
|
||||
/proc/minor_announce(message, title = "Attention:", alert)
|
||||
/proc/minor_announce(message, title = "Attention:", alert, html_encode = TRUE)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
if (html_encode)
|
||||
title = html_encode(title)
|
||||
message = html_encode(message)
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M) && M.can_hear())
|
||||
to_chat(M, "<span class='big bold'><font color = red>[html_encode(title)]</font color><BR>[html_encode(message)]</span><BR>")
|
||||
to_chat(M, "[span_minorannounce("<font color = red>[title]</font color><BR>[message]")]<BR>")
|
||||
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
||||
if(alert)
|
||||
SEND_SOUND(M, sound('sound/misc/notice1.ogg'))
|
||||
|
||||
+17
-3
@@ -1,4 +1,4 @@
|
||||
// Ensure the frequency is within bounds of what it should be sending/receiving at
|
||||
/// Ensure the frequency is within bounds of what it should be sending/receiving at
|
||||
/proc/sanitize_frequency(frequency, free = FALSE)
|
||||
frequency = round(frequency)
|
||||
if(free)
|
||||
@@ -8,12 +8,26 @@
|
||||
if(!(. % 2)) // Ensure the last digit is an odd number
|
||||
. += 1
|
||||
|
||||
// Format frequency by moving the decimal.
|
||||
/// 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
|
||||
///Opposite of format, returns as a number
|
||||
/proc/unformat_frequency(frequency)
|
||||
frequency = text2num(frequency)
|
||||
return frequency * 10
|
||||
|
||||
///returns a random unused frequency between MIN_FREE_FREQ & MAX_FREE_FREQ if free = TRUE, and MIN_FREQ & MAX_FREQ if FALSE
|
||||
/proc/return_unused_frequency(free = FALSE)
|
||||
var/start = free ? MIN_FREE_FREQ : MIN_FREQ
|
||||
var/end = free ? MAX_FREE_FREQ : MAX_FREQ
|
||||
|
||||
var/freq_to_check = 0
|
||||
do
|
||||
freq_to_check = rand(start, end)
|
||||
if(!(freq_to_check % 2)) // Ensure the last digit is an odd number
|
||||
freq_to_check++
|
||||
while((freq_to_check == 0) || ("[freq_to_check]" in GLOB.reverseradiochannels))
|
||||
|
||||
return freq_to_check
|
||||
|
||||
@@ -663,10 +663,10 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
return locate(final_x, final_y, T.z)
|
||||
|
||||
//Finds the distance between two atoms, in pixels
|
||||
//centered = 0 counts from turf edge to edge
|
||||
//centered = 1 counts from turf center to turf center
|
||||
//centered = FALSE counts from turf edge to edge
|
||||
//centered = TRUE counts from turf center to turf center
|
||||
//of course mathematically this is just adding world.icon_size on again
|
||||
/proc/getPixelDistance(atom/A, atom/B, centered = 1)
|
||||
/proc/getPixelDistance(atom/A, atom/B, centered = TRUE)
|
||||
if(!istype(A)||!istype(B))
|
||||
return 0
|
||||
. = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2)))
|
||||
|
||||
@@ -216,7 +216,13 @@ GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT))
|
||||
#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))
|
||||
#define UPLINK_IMPLANT "Implant"
|
||||
#define UPLINK_IMPLANT_WITH_PRICE "[UPLINK_IMPLANT] (-[UPLINK_IMPLANT_TELECRYSTAL_COST] TC)"
|
||||
// What we show to the user
|
||||
GLOBAL_LIST_INIT(uplink_spawn_loc_list, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN, UPLINK_IMPLANT_WITH_PRICE))
|
||||
// What is actually saved; if the uplink implant price changes, it won't affect save files then
|
||||
GLOBAL_LIST_INIT(uplink_spawn_loc_list_save, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN, UPLINK_IMPLANT))
|
||||
|
||||
|
||||
//List of cached alpha masked icons.
|
||||
GLOBAL_LIST_EMPTY(alpha_masked_worn_icons)
|
||||
|
||||
@@ -19,7 +19,6 @@ GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction d
|
||||
GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
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.
|
||||
|
||||
@@ -2,6 +2,9 @@ GLOBAL_VAR(log_directory)
|
||||
GLOBAL_PROTECT(log_directory)
|
||||
GLOBAL_VAR(world_game_log)
|
||||
GLOBAL_PROTECT(world_game_log)
|
||||
/// Log associated with [/proc/log_suspicious_login()] - Intended to hold all logins that failed due to suspicious circumstances such as ban detection, CID randomisation etc.
|
||||
GLOBAL_VAR(world_suspicious_login_log)
|
||||
GLOBAL_PROTECT(world_suspicious_login_log)
|
||||
GLOBAL_VAR(world_runtime_log)
|
||||
GLOBAL_PROTECT(world_runtime_log)
|
||||
GLOBAL_VAR(world_qdel_log)
|
||||
|
||||
@@ -55,6 +55,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_ROBOTIC_ORGANISM" = TRAIT_ROBOTIC_ORGANISM,
|
||||
"TRAIT_ROBOT_RADSHIELDING" = TRAIT_ROBOT_RADSHIELDING,
|
||||
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
|
||||
"TRAIT_AUXILIARY_LUNGS" = TRAIT_AUXILIARY_LUNGS,
|
||||
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
|
||||
"TRAIT_HOLY" = TRAIT_HOLY,
|
||||
"TRAIT_DEPRESSION" = TRAIT_DEPRESSION,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon = I
|
||||
parent = P
|
||||
icon_state = credited
|
||||
maptext = credited
|
||||
maptext = MAPTEXT(credited)
|
||||
maptext_x = world.icon_size + 8
|
||||
maptext_y = (world.icon_size / 2) - 4
|
||||
maptext_width = world.icon_size * 3
|
||||
|
||||
@@ -82,6 +82,12 @@
|
||||
severity = 0
|
||||
. = ..()
|
||||
|
||||
/atom/movable/screen/fullscreen/emergency_meeting
|
||||
icon_state = "emergency_meeting"
|
||||
show_when_dead = TRUE
|
||||
layer = CURSE_LAYER
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
|
||||
/atom/movable/screen/fullscreen/brute
|
||||
icon_state = "brutedamageoverlay"
|
||||
layer = UI_DAMAGE_LAYER
|
||||
|
||||
@@ -35,6 +35,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
|
||||
var/atom/movable/screen/devil/soul_counter/devilsouldisplay
|
||||
|
||||
var/atom/movable/screen/synth/coolant_counter/coolant_display
|
||||
|
||||
var/atom/movable/screen/action_intent
|
||||
var/atom/movable/screen/zone_select
|
||||
var/atom/movable/screen/pull_icon
|
||||
|
||||
@@ -80,6 +80,98 @@
|
||||
icon_state = "power_display"
|
||||
screen_loc = ui_lingchemdisplay
|
||||
|
||||
#define ui_coolant_display "EAST,SOUTH+3:15"
|
||||
|
||||
/atom/movable/screen/synth
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
|
||||
/atom/movable/screen/synth/proc/clear()
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/atom/movable/screen/synth/proc/update_counter(mob/living/carbon/human/owner)
|
||||
invisibility = 0
|
||||
|
||||
/atom/movable/screen/synth/coolant_counter
|
||||
icon = 'icons/mob/screen_synth.dmi'
|
||||
name = "Coolant System Readout"
|
||||
icon_state = "coolant-3-1"
|
||||
screen_loc = ui_coolant_display
|
||||
var/jammed = 0
|
||||
|
||||
/atom/movable/screen/synth/coolant_counter/update_counter(mob/living/carbon/owner)
|
||||
..()
|
||||
var/valuecolor = "#ff2525"
|
||||
if(owner.stat == DEAD)
|
||||
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>ERR-0F</font></div>"
|
||||
icon_state = "coolant-3-1"
|
||||
return
|
||||
var/coolant_efficiency
|
||||
var/coolant
|
||||
if(!jammed)
|
||||
coolant_efficiency = owner.get_cooling_efficiency()
|
||||
coolant = owner.blood_volume
|
||||
else
|
||||
coolant_efficiency = rand(1, 15) / 10
|
||||
coolant = rand(1, 600)
|
||||
jammed--
|
||||
if(coolant > BLOOD_VOLUME_SAFE * owner.blood_ratio) //I unfortunately have to use this else-if stack because switch doesn't support variables.
|
||||
valuecolor = "#4bbd34"
|
||||
else if(coolant > BLOOD_VOLUME_OKAY * owner.blood_ratio)
|
||||
valuecolor = "#dabb0d"
|
||||
else if(coolant > BLOOD_VOLUME_BAD * owner.blood_ratio)
|
||||
valuecolor = "#dd8109"
|
||||
else if(coolant > BLOOD_VOLUME_SURVIVE * owner.blood_ratio)
|
||||
valuecolor = "#e7520d"
|
||||
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round((coolant / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 1)]</font></div>"
|
||||
|
||||
var/efficiency_suffix
|
||||
var/state_suffix
|
||||
switch(coolant_efficiency)
|
||||
if(-INFINITY to 0.4)
|
||||
efficiency_suffix = "1"
|
||||
if(0.4 to 0.75)
|
||||
efficiency_suffix = "2"
|
||||
if(0.75 to 0.95)
|
||||
efficiency_suffix = "3"
|
||||
if(0.95 to 1.3)
|
||||
efficiency_suffix = "4"
|
||||
else
|
||||
efficiency_suffix = "5"
|
||||
var/obj/item/organ/lungs/ipc/L = owner.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if(istype(L) && L.is_cooling)
|
||||
state_suffix = "2"
|
||||
else
|
||||
state_suffix = "1"
|
||||
icon_state = "coolant-[efficiency_suffix]-[state_suffix]"
|
||||
|
||||
/atom/movable/screen/synth/coolant_counter/examine(mob/user)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/owner = hud.mymob
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
var/coolant
|
||||
var/total_efficiency
|
||||
var/environ_efficiency
|
||||
var/suitlink_efficiency
|
||||
if(!jammed)
|
||||
coolant = owner.blood_volume
|
||||
total_efficiency = owner.get_cooling_efficiency()
|
||||
environ_efficiency = owner.get_environment_cooling_efficiency()
|
||||
suitlink_efficiency = owner.check_suitlinking()
|
||||
else
|
||||
coolant = rand(1, 600)
|
||||
total_efficiency = rand(1, 15) / 10
|
||||
environ_efficiency = rand(1, 20) / 10
|
||||
. += "<span class='notice'>Performing internal cooling system diagnostics:</span>"
|
||||
. += "<span class='notice'>Coolant level: [coolant] units, [round((coolant / (BLOOD_VOLUME_NORMAL * owner.blood_ratio)) * 100, 0.1)] percent</span>"
|
||||
. += "<span class='notice'>Current Cooling Efficiency: [round(total_efficiency * 100, 0.1)] percent, [suitlink_efficiency ? "<font color='green'>active suitlink detected</font>, guaranteeing <font color='green'>[suitlink_efficiency * 100]%</font> environmental cooling efficiency." : "environment viability: [round(environ_efficiency * 100, 0.1)] percent."]</span>"
|
||||
|
||||
/atom/movable/screen/synth/coolant_counter/proc/jam(amount, cap = 20)
|
||||
if(jammed > cap) //Preserve previous more impactful event.
|
||||
return
|
||||
jammed = min(jammed + amount, cap)
|
||||
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner)
|
||||
..()
|
||||
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
|
||||
@@ -359,6 +451,10 @@
|
||||
sunlight_display.hud = src
|
||||
infodisplay += sunlight_display
|
||||
|
||||
coolant_display = new /atom/movable/screen/synth/coolant_counter //Coolant & cooling efficiency readouts for Synths.
|
||||
coolant_display.hud = src
|
||||
infodisplay += coolant_display
|
||||
|
||||
zone_select = new /atom/movable/screen/zone_sel()
|
||||
zone_select.icon = ui_style
|
||||
zone_select.hud = src
|
||||
|
||||
@@ -56,16 +56,12 @@
|
||||
maptext_width = 480
|
||||
|
||||
/atom/movable/screen/swap_hand
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/atom/movable/screen/swap_hand/Click()
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
// return 1
|
||||
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
|
||||
@@ -74,6 +70,17 @@
|
||||
M.swap_hand()
|
||||
return 1
|
||||
|
||||
// /atom/movable/screen/skills
|
||||
// name = "skills"
|
||||
// icon = 'icons/mob/screen_midnight.dmi'
|
||||
// icon_state = "skills"
|
||||
// screen_loc = ui_skill_menu
|
||||
|
||||
// /atom/movable/screen/skills/Click()
|
||||
// if(ishuman(usr))
|
||||
// var/mob/living/carbon/human/H = usr
|
||||
// H.mind.print_levels(H)
|
||||
|
||||
/atom/movable/screen/craft
|
||||
name = "crafting menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
@@ -91,7 +98,7 @@
|
||||
return TRUE
|
||||
var/area/A = get_area(usr)
|
||||
if(!A.outdoors)
|
||||
to_chat(usr, "<span class='warning'>There is already a defined structure here.</span>")
|
||||
to_chat(usr, span_warning("There is already a defined structure here."))
|
||||
return TRUE
|
||||
create_area(usr)
|
||||
|
||||
@@ -114,15 +121,12 @@
|
||||
/// Icon when contains an item. For now used only by humans.
|
||||
var/icon_full
|
||||
/// The overlay when hovering over with an item in your hand
|
||||
var/list/object_overlays = list()
|
||||
layer = HUD_LAYER
|
||||
var/image/object_overlay
|
||||
plane = HUD_PLANE
|
||||
|
||||
/atom/movable/screen/inventory/Click(location, control, params)
|
||||
// At this point in client Click() code we have passed the 1/10 sec check and little else
|
||||
// We don't even know if it's a middle click
|
||||
// if(world.time <= usr.next_move)
|
||||
// return TRUE
|
||||
|
||||
if(usr.incapacitated()) // ignore_stasis = TRUE
|
||||
return TRUE
|
||||
@@ -138,42 +142,23 @@
|
||||
usr.update_inv_hands()
|
||||
return TRUE
|
||||
|
||||
/atom/movable/screen/inventory/MouseEntered()
|
||||
..()
|
||||
/atom/movable/screen/inventory/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
add_overlays()
|
||||
//Apply the outline affect
|
||||
add_stored_outline()
|
||||
|
||||
/atom/movable/screen/inventory/MouseExited()
|
||||
..()
|
||||
cut_overlay(object_overlays)
|
||||
object_overlays.Cut()
|
||||
remove_stored_outline()
|
||||
|
||||
/atom/movable/screen/inventory/proc/add_stored_outline()
|
||||
if(hud?.mymob && slot_id)
|
||||
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
|
||||
if(inv_item)
|
||||
if(hud?.mymob.incapacitated() || (slot_id in hud?.mymob.check_obscured_slots()) || !hud?.mymob.canUnEquip(inv_item))
|
||||
inv_item.apply_outline(_size = 3)
|
||||
else
|
||||
inv_item.apply_outline()
|
||||
|
||||
/atom/movable/screen/inventory/proc/remove_stored_outline()
|
||||
if(hud?.mymob && slot_id)
|
||||
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
|
||||
if(inv_item)
|
||||
inv_item.remove_outline()
|
||||
cut_overlay(object_overlay)
|
||||
QDEL_NULL(object_overlay)
|
||||
|
||||
/atom/movable/screen/inventory/update_icon_state()
|
||||
if(!icon_empty)
|
||||
icon_empty = icon_state
|
||||
|
||||
if(hud?.mymob && slot_id && icon_full)
|
||||
if(hud.mymob.get_item_by_slot(slot_id))
|
||||
icon_state = icon_full
|
||||
else
|
||||
icon_state = icon_empty
|
||||
if(!hud?.mymob || !slot_id || !icon_full)
|
||||
return ..()
|
||||
icon_state = hud.mymob.get_item_by_slot(slot_id) ? icon_full : icon_empty
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/inventory/proc/add_overlays()
|
||||
var/mob/user = hud?.mymob
|
||||
@@ -189,14 +174,14 @@
|
||||
var/image/item_overlay = image(holding)
|
||||
item_overlay.alpha = 92
|
||||
|
||||
if(!user.can_equip(holding, slot_id, TRUE, TRUE))
|
||||
if(!user.can_equip(holding, slot_id, disable_warning = TRUE, bypass_equip_delay_self = TRUE))
|
||||
item_overlay.color = "#FF0000"
|
||||
else
|
||||
item_overlay.color = "#00ff00"
|
||||
|
||||
cut_overlay(object_overlays)
|
||||
// object_overlay = item_overlay
|
||||
add_overlay(object_overlays)
|
||||
cut_overlay(object_overlay)
|
||||
object_overlay = item_overlay
|
||||
add_overlay(object_overlay)
|
||||
|
||||
/atom/movable/screen/inventory/hand
|
||||
var/mutable_appearance/handcuff_overlay
|
||||
@@ -232,8 +217,6 @@
|
||||
var/mob/user = hud?.mymob
|
||||
if(usr != user)
|
||||
return TRUE
|
||||
// if(world.time <= user.next_move)
|
||||
// return TRUE
|
||||
if(user.incapacitated())
|
||||
return TRUE
|
||||
if (ismecha(user.loc)) // stops inventory actions in a mech
|
||||
@@ -247,12 +230,24 @@
|
||||
user.swap_hand(held_index)
|
||||
return TRUE
|
||||
|
||||
// /atom/movable/screen/close
|
||||
// name = "close"
|
||||
// plane = ABOVE_HUD_PLANE
|
||||
// icon_state = "backpack_close"
|
||||
|
||||
// /atom/movable/screen/close/Initialize(mapload, new_master)
|
||||
// . = ..()
|
||||
// master = new_master
|
||||
|
||||
// /atom/movable/screen/close/Click()
|
||||
// var/datum/component/storage/S = master
|
||||
// S.hide_from(usr)
|
||||
// return TRUE
|
||||
|
||||
/atom/movable/screen/drop
|
||||
name = "drop"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_drop"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/atom/movable/screen/drop/Click()
|
||||
@@ -308,12 +303,12 @@
|
||||
|
||||
if(C.internal)
|
||||
C.internal = null
|
||||
to_chat(C, "<span class='notice'>You are no longer running on internals.</span>")
|
||||
to_chat(C, span_notice("You are no longer running on internals."))
|
||||
icon_state = "internal0"
|
||||
else
|
||||
if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(HAS_TRAIT(C, TRAIT_NO_INTERNALS))
|
||||
to_chat(C, "<span class='warning'>Due to cumbersome equipment or anatomy, you are currently unable to use internals!</span>")
|
||||
to_chat(C, span_warning("Due to cumbersome equipment or anatomy, you are currently unable to use internals!"))
|
||||
return
|
||||
var/obj/item/clothing/check
|
||||
var/internals = FALSE
|
||||
@@ -326,37 +321,37 @@
|
||||
if((check.clothing_flags & ALLOWINTERNALS))
|
||||
internals = TRUE
|
||||
if(!internals)
|
||||
to_chat(C, "<span class='warning'>You are not wearing an internals mask!</span>")
|
||||
to_chat(C, span_warning("You are not wearing an internals mask!"))
|
||||
return
|
||||
|
||||
var/obj/item/I = C.is_holding_item_of_type(/obj/item/tank)
|
||||
if(I)
|
||||
to_chat(C, "<span class='notice'>You are now running on internals from [I] in your [C.get_held_index_name(C.get_held_index_of_item(I))].</span>")
|
||||
to_chat(C, span_notice("You are now running on internals from [I] in your [C.get_held_index_name(C.get_held_index_of_item(I))]."))
|
||||
C.internal = I
|
||||
else if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.s_store, /obj/item/tank))
|
||||
to_chat(H, "<span class='notice'>You are now running on internals from [H.s_store] on your [H.wear_suit.name].</span>")
|
||||
to_chat(H, span_notice("You are now running on internals from [H.s_store] on your [H.wear_suit.name]."))
|
||||
H.internal = H.s_store
|
||||
else if(istype(H.belt, /obj/item/tank))
|
||||
to_chat(H, "<span class='notice'>You are now running on internals from [H.belt] on your belt.</span>")
|
||||
to_chat(H, span_notice("You are now running on internals from [H.belt] on your belt."))
|
||||
H.internal = H.belt
|
||||
else if(istype(H.l_store, /obj/item/tank))
|
||||
to_chat(H, "<span class='notice'>You are now running on internals from [H.l_store] in your left pocket.</span>")
|
||||
to_chat(H, span_notice("You are now running on internals from [H.l_store] in your left pocket."))
|
||||
H.internal = H.l_store
|
||||
else if(istype(H.r_store, /obj/item/tank))
|
||||
to_chat(H, "<span class='notice'>You are now running on internals from [H.r_store] in your right pocket.</span>")
|
||||
to_chat(H, span_notice("You are now running on internals from [H.r_store] in your right pocket."))
|
||||
H.internal = H.r_store
|
||||
|
||||
//Separate so CO2 jetpacks are a little less cumbersome.
|
||||
if(!C.internal && istype(C.back, /obj/item/tank))
|
||||
to_chat(C, "<span class='notice'>You are now running on internals from [C.back] on your back.</span>")
|
||||
to_chat(C, span_notice("You are now running on internals from [C.back] on your back."))
|
||||
C.internal = C.back
|
||||
|
||||
if(C.internal)
|
||||
icon_state = "internal1"
|
||||
else
|
||||
to_chat(C, "<span class='warning'>You don't have an oxygen tank!</span>")
|
||||
to_chat(C, span_warning("You don't have an oxygen tank!"))
|
||||
return
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
@@ -378,6 +373,7 @@
|
||||
icon_state = CONFIG_GET(flag/sprint_enabled)? "walking" : "walking_nosprint"
|
||||
if(MOVE_INTENT_RUN)
|
||||
icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint"
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/mov_intent/proc/toggle(mob/user)
|
||||
if(isobserver(user))
|
||||
@@ -399,12 +395,12 @@
|
||||
icon_state = "pull"
|
||||
else
|
||||
icon_state = "pull0"
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/resist
|
||||
name = "resist"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/atom/movable/screen/resist/Click()
|
||||
@@ -416,7 +412,6 @@
|
||||
name = "rest"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_rest"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/atom/movable/screen/rest/Click()
|
||||
@@ -427,11 +422,12 @@
|
||||
/atom/movable/screen/rest/update_icon_state()
|
||||
var/mob/living/user = hud?.mymob
|
||||
if(!istype(user))
|
||||
return
|
||||
return ..()
|
||||
if(!user.resting)
|
||||
icon_state = "act_rest"
|
||||
else
|
||||
icon_state = "act_rest0"
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/throw_catch
|
||||
name = "throw/catch"
|
||||
@@ -455,9 +451,9 @@
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
var/list/modifiers = params2list(params)
|
||||
var/icon_x = text2num(LAZYACCESS(modifiers, "icon-x"))
|
||||
var/icon_y = text2num(LAZYACCESS(modifiers, "icon-y"))
|
||||
var/choice = get_zone_at(icon_x, icon_y)
|
||||
if (!choice)
|
||||
return 1
|
||||
@@ -465,15 +461,16 @@
|
||||
return set_selected_zone(choice, usr)
|
||||
|
||||
/atom/movable/screen/zone_sel/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
MouseMove(location, control, params)
|
||||
|
||||
/atom/movable/screen/zone_sel/MouseMove(location, control, params)
|
||||
if(isobserver(usr))
|
||||
return
|
||||
|
||||
var/list/PL = params2list(params)
|
||||
var/icon_x = text2num(PL["icon-x"])
|
||||
var/icon_y = text2num(PL["icon-y"])
|
||||
var/list/modifiers = params2list(params)
|
||||
var/icon_x = text2num(LAZYACCESS(modifiers, "icon-x"))
|
||||
var/icon_y = text2num(LAZYACCESS(modifiers, "icon-y"))
|
||||
var/choice = get_zone_at(icon_x, icon_y)
|
||||
|
||||
if(hovering == choice)
|
||||
@@ -493,7 +490,6 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
alpha = 128
|
||||
anchored = TRUE
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
/atom/movable/screen/zone_sel/MouseExited(location, control, params)
|
||||
@@ -545,7 +541,7 @@
|
||||
|
||||
if(choice != hud.mymob.zone_selected)
|
||||
hud.mymob.zone_selected = choice
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -562,7 +558,6 @@
|
||||
/atom/movable/screen/zone_sel/robot
|
||||
icon = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
|
||||
/atom/movable/screen/flash
|
||||
name = "flash"
|
||||
icon_state = "blank"
|
||||
@@ -651,6 +646,11 @@
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
|
||||
/atom/movable/screen/healthdoll/Click()
|
||||
if (iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.check_self_for_injuries()
|
||||
|
||||
/atom/movable/screen/healthdoll/living
|
||||
icon_state = "fullhealth0"
|
||||
screen_loc = ui_living_healthdoll
|
||||
@@ -661,6 +661,9 @@
|
||||
icon_state = "mood5"
|
||||
screen_loc = ui_mood
|
||||
|
||||
/atom/movable/screen/mood/attack_tk()
|
||||
return
|
||||
|
||||
/atom/movable/screen/splash
|
||||
icon = 'icons/blank_title.png'
|
||||
icon_state = ""
|
||||
@@ -671,6 +674,8 @@
|
||||
|
||||
/atom/movable/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
|
||||
. = ..()
|
||||
if(!istype(C))
|
||||
return
|
||||
|
||||
holder = C
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
/datum/config_entry/flag/log_access // log login/logout
|
||||
config_entry_value = TRUE
|
||||
|
||||
/// Config entry which special logging of failed logins under suspicious circumstances.
|
||||
/datum/config_entry/flag/log_suspicious_login
|
||||
config_entry_value = TRUE
|
||||
|
||||
/datum/config_entry/flag/log_say // log client say
|
||||
config_entry_value = TRUE
|
||||
|
||||
|
||||
@@ -116,6 +116,11 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
/datum/controller/subsystem/air/proc/auxtools_update_reactions()
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_reaction(datum/gas_reaction/r)
|
||||
gas_reactions += r
|
||||
sortTim(gas_reactions, /proc/cmp_gas_reaction)
|
||||
auxtools_update_reactions()
|
||||
|
||||
/proc/reset_all_air()
|
||||
SSair.can_fire = 0
|
||||
message_admins("Air reset begun.")
|
||||
|
||||
@@ -1,33 +1,67 @@
|
||||
#define COMMUNICATION_COOLDOWN 300
|
||||
#define COMMUNICATION_COOLDOWN_AI 300
|
||||
#define COMMUNICATION_COOLDOWN (30 SECONDS)
|
||||
#define COMMUNICATION_COOLDOWN_AI (30 SECONDS)
|
||||
#define COMMUNICATION_COOLDOWN_MEETING (5 MINUTES)
|
||||
|
||||
SUBSYSTEM_DEF(communications)
|
||||
name = "Communications"
|
||||
flags = SS_NO_INIT | SS_NO_FIRE
|
||||
|
||||
var/silicon_message_cooldown
|
||||
var/nonsilicon_message_cooldown
|
||||
COOLDOWN_DECLARE(silicon_message_cooldown)
|
||||
COOLDOWN_DECLARE(nonsilicon_message_cooldown)
|
||||
COOLDOWN_DECLARE(emergency_meeting_cooldown)
|
||||
|
||||
/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon)
|
||||
if(is_silicon && silicon_message_cooldown > world.time)
|
||||
. = FALSE
|
||||
else if(!is_silicon && nonsilicon_message_cooldown > world.time)
|
||||
. = FALSE
|
||||
if(is_silicon && COOLDOWN_FINISHED(src, silicon_message_cooldown))
|
||||
return TRUE
|
||||
else if(!is_silicon && COOLDOWN_FINISHED(src, nonsilicon_message_cooldown))
|
||||
return TRUE
|
||||
else
|
||||
. = TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/controller/subsystem/communications/proc/make_announcement(mob/living/user, is_silicon, input)
|
||||
if(!can_announce(user, is_silicon))
|
||||
return FALSE
|
||||
if(is_silicon)
|
||||
minor_announce(html_decode(input),"[user.name] Announces:")
|
||||
silicon_message_cooldown = world.time + COMMUNICATION_COOLDOWN_AI
|
||||
COOLDOWN_START(src, silicon_message_cooldown, COMMUNICATION_COOLDOWN_AI)
|
||||
else
|
||||
priority_announce(html_decode(user.treat_message(input)), null, 'sound/misc/announce.ogg', "Captain")
|
||||
nonsilicon_message_cooldown = world.time + COMMUNICATION_COOLDOWN
|
||||
priority_announce(html_decode(user.treat_message(input)), null, 'sound/misc/announce.ogg', "Captain", has_important_message = TRUE)
|
||||
COOLDOWN_START(src, nonsilicon_message_cooldown, COMMUNICATION_COOLDOWN)
|
||||
user.log_talk(input, LOG_SAY, tag="priority announcement")
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has made a priority announcement.")
|
||||
|
||||
/**
|
||||
* Check if a mob can call an emergency meeting
|
||||
*
|
||||
* Should only really happen during april fools.
|
||||
* Checks to see that it's been at least 5 minutes since the last emergency meeting call.
|
||||
* Arguments:
|
||||
* * user - Mob who called the meeting
|
||||
*/
|
||||
/datum/controller/subsystem/communications/proc/can_make_emergency_meeting(mob/living/user)
|
||||
if(!(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
|
||||
return FALSE
|
||||
else if(COOLDOWN_FINISHED(src, emergency_meeting_cooldown))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Call an emergency meeting
|
||||
*
|
||||
* Communications subsystem wrapper for the call_emergency_meeting world proc.
|
||||
* Checks to make sure the proc can be called, and handles
|
||||
* relevant logging and timing. See that proc definition for more detail.
|
||||
* Arguments:
|
||||
* * user - Mob who called the meeting
|
||||
*/
|
||||
/datum/controller/subsystem/communications/proc/emergency_meeting(mob/living/user)
|
||||
if(!can_make_emergency_meeting(user))
|
||||
return FALSE
|
||||
call_emergency_meeting(user, get_area(user))
|
||||
COOLDOWN_START(src, emergency_meeting_cooldown, COMMUNICATION_COOLDOWN_MEETING)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has called an emergency meeting.")
|
||||
|
||||
/datum/controller/subsystem/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && is_station_level(C.z))
|
||||
@@ -40,7 +74,7 @@ SUBSYSTEM_DEF(communications)
|
||||
var/obj/item/paper/P = new /obj/item/paper(C.loc)
|
||||
P.name = "paper - '[sending.title]'"
|
||||
P.info = sending.content
|
||||
P.update_icon()
|
||||
P.update_appearance()
|
||||
|
||||
#undef COMMUNICATION_COOLDOWN
|
||||
#undef COMMUNICATION_COOLDOWN_AI
|
||||
|
||||
@@ -17,7 +17,6 @@ SUBSYSTEM_DEF(processing)
|
||||
/datum/controller/subsystem/processing/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
currentrun = processing.Copy()
|
||||
var/delta_time = (flags & SS_TICKER)? (wait * world.tick_lag * 0.1) : (wait * 0.1)
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/current_run = currentrun
|
||||
|
||||
@@ -26,7 +25,7 @@ SUBSYSTEM_DEF(processing)
|
||||
current_run.len--
|
||||
if(QDELETED(thing))
|
||||
processing -= thing
|
||||
else if(thing.process(delta_time) == PROCESS_KILL)
|
||||
else if(thing.process(wait * 0.1) == PROCESS_KILL)
|
||||
// fully stop so that a future START_PROCESSING will work
|
||||
STOP_PROCESSING(src, thing)
|
||||
if (MC_TICK_CHECK)
|
||||
@@ -47,5 +46,5 @@ SUBSYSTEM_DEF(processing)
|
||||
* If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
|
||||
*/
|
||||
/datum/proc/process(delta_time)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
set waitfor = FALSE
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -48,6 +48,13 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
cli.prefs.save_character()
|
||||
if (!silent && LAZYLEN(cut))
|
||||
to_chat(to_chat_target || user, "<span class='boldwarning'>Some quirks have been cut from your character because of these quirks conflicting with your job assignment: [english_list(cut)].</span>")
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.dna?.species)
|
||||
var/datum/species/S = H.dna.species
|
||||
if(S.remove_blacklisted_quirks(H))
|
||||
to_chat(to_chat_target || user, "<span class='boldwarning'>Some quirks have been cut from your character due to them conflicting with your species: [english_list(S.removed_quirks)]</span>")
|
||||
|
||||
|
||||
/datum/controller/subsystem/processing/quirks/proc/quirk_path_by_name(name)
|
||||
return quirks[name]
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(sound_loops)
|
||||
name = "Sound Loops"
|
||||
priority = FIRE_PRIORITY_SOUND_LOOPS
|
||||
@@ -4,7 +4,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
name = "Sounds"
|
||||
flags = SS_NO_FIRE
|
||||
init_order = INIT_ORDER_SOUNDS
|
||||
var/static/using_channels_max = CHANNEL_HIGHEST_AVAILABLE //BYOND max channels
|
||||
var/static/using_channels_max = CHANNEL_HIGHEST_AVAILABLE //BYOND max channels
|
||||
/// Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up.
|
||||
var/static/random_channels_min = 50
|
||||
|
||||
@@ -42,7 +42,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
var/text_channel = num2text(channel)
|
||||
var/using = using_channels[text_channel]
|
||||
using_channels -= text_channel
|
||||
if(using != TRUE) // datum channel
|
||||
if(using != TRUE) // datum channel
|
||||
using_channels_by_datum[using] -= channel
|
||||
if(!length(using_channels_by_datum[using]))
|
||||
using_channels_by_datum -= using
|
||||
@@ -65,7 +65,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
/// NO AUTOMATIC CLEANUP - If you use this, you better manually free it later! Returns an integer for channel.
|
||||
/datum/controller/subsystem/sounds/proc/reserve_sound_channel_datumless()
|
||||
. = reserve_channel()
|
||||
if(!.) //oh no..
|
||||
if(!.) //oh no..
|
||||
return FALSE
|
||||
var/text_channel = num2text(.)
|
||||
using_channels[text_channel] = DATUMLESS
|
||||
@@ -74,7 +74,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
|
||||
/// Reserves a channel for a datum. Automatic cleanup only when the datum is deleted. Returns an integer for channel.
|
||||
/datum/controller/subsystem/sounds/proc/reserve_sound_channel(datum/D)
|
||||
if(!D) //i don't like typechecks but someone will fuck it up
|
||||
if(!D) //i don't like typechecks but someone will fuck it up
|
||||
CRASH("Attempted to reserve sound channel without datum using the managed proc.")
|
||||
.= reserve_channel()
|
||||
if(!.)
|
||||
@@ -89,7 +89,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
*/
|
||||
/datum/controller/subsystem/sounds/proc/reserve_channel()
|
||||
PRIVATE_PROC(TRUE)
|
||||
if(channel_reserve_high <= random_channels_min) // out of channels
|
||||
if(channel_reserve_high <= random_channels_min) // out of channels
|
||||
return
|
||||
var/channel = channel_list[channel_reserve_high]
|
||||
reserved_channels[num2text(channel)] = channel_reserve_high--
|
||||
@@ -112,7 +112,7 @@ SUBSYSTEM_DEF(sounds)
|
||||
// now, an existing reserved channel will likely (exception: unreserving last reserved channel) be at index
|
||||
// get it, and update position.
|
||||
var/text_reserved = num2text(channel_list[index])
|
||||
if(!reserved_channels[text_reserved]) //if it isn't already reserved make sure we don't accidently mistakenly put it on reserved list!
|
||||
if(!reserved_channels[text_reserved]) //if it isn't already reserved make sure we don't accidently mistakenly put it on reserved list!
|
||||
return
|
||||
reserved_channels[text_reserved] = index
|
||||
|
||||
|
||||
+62
-35
@@ -4,7 +4,7 @@
|
||||
var/window_id // window_id is used as the window name for browse and onclose
|
||||
var/width = 0
|
||||
var/height = 0
|
||||
var/atom/ref = null
|
||||
var/datum/weakref/ref = null
|
||||
var/window_options = "can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
|
||||
var/stylesheets[0]
|
||||
var/scripts[0]
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
RegisterSignal(user, COMSIG_PARENT_QDELETING, .proc/user_deleted)
|
||||
window_id = nwindow_id
|
||||
if (ntitle)
|
||||
title = format_text(ntitle)
|
||||
@@ -26,7 +26,11 @@
|
||||
if (nheight)
|
||||
height = nheight
|
||||
if (nref)
|
||||
ref = nref
|
||||
ref = WEAKREF(nref)
|
||||
|
||||
/datum/browser/proc/user_deleted(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
user = null
|
||||
|
||||
/datum/browser/proc/add_head_content(nhead_content)
|
||||
head_content = nhead_content
|
||||
@@ -35,7 +39,7 @@
|
||||
window_options = nwindow_options
|
||||
|
||||
/datum/browser/proc/add_stylesheet(name, file)
|
||||
if(istype(name, /datum/asset/spritesheet))
|
||||
if (istype(name, /datum/asset/spritesheet))
|
||||
var/datum/asset/spritesheet/sheet = name
|
||||
stylesheets["spritesheet_[sheet.name].css"] = "data/spritesheets/[sheet.name]"
|
||||
else
|
||||
@@ -94,27 +98,32 @@
|
||||
"}
|
||||
|
||||
/datum/browser/proc/open(use_onclose = TRUE)
|
||||
if(isnull(window_id)) //null check because this can potentially nuke goonchat
|
||||
if(isnull(window_id)) //null check because this can potentially nuke goonchat
|
||||
WARNING("Browser [title] tried to open with a null ID")
|
||||
to_chat(user, "<span class='userdanger'>The [title] browser you tried to open failed a sanity check! Please report this on github!</span>")
|
||||
to_chat(user, span_userdanger("The [title] browser you tried to open failed a sanity check! Please report this on github!"))
|
||||
return
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
if (width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
common_asset.send(user)
|
||||
if(stylesheets.len)
|
||||
if (stylesheets.len)
|
||||
SSassets.transport.send_assets(user, stylesheets)
|
||||
if(scripts.len)
|
||||
if (scripts.len)
|
||||
SSassets.transport.send_assets(user, scripts)
|
||||
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
|
||||
if(use_onclose)
|
||||
if (use_onclose)
|
||||
setup_onclose()
|
||||
|
||||
/datum/browser/proc/setup_onclose()
|
||||
set waitfor = 0 //winexists sleeps, so we don't need to.
|
||||
for (var/i in 1 to 10)
|
||||
if (user && winexists(user, window_id))
|
||||
onclose(user, window_id, ref)
|
||||
if (user?.client && winexists(user, window_id))
|
||||
var/atom/send_ref
|
||||
if(ref)
|
||||
send_ref = ref.resolve()
|
||||
if(!send_ref)
|
||||
ref = null
|
||||
onclose(user, window_id, send_ref)
|
||||
break
|
||||
|
||||
/datum/browser/proc/close()
|
||||
@@ -153,11 +162,35 @@
|
||||
opentime = 0
|
||||
close()
|
||||
|
||||
//designed as a drop in replacement for alert(); functions the same. (outside of needing User specified)
|
||||
/proc/tgalert(mob/User, Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1, Timeout = 6000)
|
||||
/**
|
||||
* **DEPRECATED: USE tgui_alert(...) INSTEAD**
|
||||
*
|
||||
* Designed as a drop in replacement for alert(); functions the same. (outside of needing User specified)
|
||||
* Arguments:
|
||||
* * User - The user to show the alert to.
|
||||
* * Message - The textual body of the alert.
|
||||
* * Title - The title of the alert's window.
|
||||
* * Button1 - The first button option.
|
||||
* * Button2 - The second button option.
|
||||
* * Button3 - The third button option.
|
||||
* * StealFocus - Boolean operator controlling if the alert will steal the user's window focus.
|
||||
* * Timeout - The timeout of the window, after which no responses will be valid.
|
||||
*/
|
||||
/proc/tgalert(mob/User, Message, Title, Button1="Ok", Button2, Button3, StealFocus = TRUE, Timeout = 6000)
|
||||
if (!User)
|
||||
User = usr
|
||||
switch(askuser(User, Message, Title, Button1, Button2, Button3, StealFocus, Timeout))
|
||||
if (!istype(User))
|
||||
if (istype(User, /client))
|
||||
var/client/client = User
|
||||
User = client.mob
|
||||
else
|
||||
return
|
||||
|
||||
// Get user's response using a modal
|
||||
var/datum/browser/modal/alert/A = new(User, Message, Title, Button1, Button2, Button3, StealFocus, Timeout)
|
||||
A.open()
|
||||
A.wait()
|
||||
switch(A.selectedbutton)
|
||||
if (1)
|
||||
return Button1
|
||||
if (2)
|
||||
@@ -197,8 +230,8 @@
|
||||
.=..()
|
||||
opentime = 0
|
||||
|
||||
/datum/browser/modal/open(use_onclose = 1)
|
||||
set waitfor = 0
|
||||
/datum/browser/modal/open(use_onclose)
|
||||
set waitfor = FALSE
|
||||
opentime = world.time
|
||||
|
||||
if (stealfocus)
|
||||
@@ -277,7 +310,7 @@
|
||||
opentime = 0
|
||||
close()
|
||||
|
||||
/proc/presentpicker(var/mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1,Timeout = 6000,list/values, inputtype = "checkbox", width, height, slidecolor)
|
||||
/proc/presentpicker(mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1,Timeout = 6000,list/values, inputtype = "checkbox", width, height, slidecolor)
|
||||
if (!istype(User))
|
||||
if (istype(User, /client/))
|
||||
var/client/C = User
|
||||
@@ -290,7 +323,7 @@
|
||||
if (A.selectedbutton)
|
||||
return list("button" = A.selectedbutton, "values" = A.valueslist)
|
||||
|
||||
/proc/input_bitfield(var/mob/User, title, bitfield, current_value, nwidth = 350, nheight = 350, nslidecolor, allowed_edit_list = null)
|
||||
/proc/input_bitfield(mob/User, title, bitfield, current_value, nwidth = 350, nheight = 350, nslidecolor, allowed_edit_list = null)
|
||||
if (!User || !(bitfield in GLOB.bitfields))
|
||||
return
|
||||
var/list/pickerlist = list()
|
||||
@@ -401,7 +434,7 @@
|
||||
opentime = 0
|
||||
close()
|
||||
|
||||
/proc/presentpreflikepicker(var/mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1,Timeout = 6000,list/settings, width, height, slidecolor)
|
||||
/proc/presentpreflikepicker(mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1,Timeout = 6000,list/settings, width, height, slidecolor)
|
||||
if (!istype(User))
|
||||
if (istype(User, /client/))
|
||||
var/client/C = User
|
||||
@@ -414,12 +447,6 @@
|
||||
if (A.selectedbutton)
|
||||
return list("button" = A.selectedbutton, "settings" = A.settings)
|
||||
|
||||
// This will allow you to show an icon in the browse window
|
||||
// This is added to mob so that it can be used without a reference to the browser object
|
||||
// There is probably a better place for this...
|
||||
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
|
||||
|
||||
|
||||
// Registers the on-close verb for a browse window (client/verb/.windowclose)
|
||||
// this will be called when the close-button of a window is pressed.
|
||||
//
|
||||
@@ -427,8 +454,8 @@
|
||||
// e.g. canisters, timers, etc.
|
||||
//
|
||||
// windowid should be the specified window name
|
||||
// e.g. code is : user << browse(text, "window=fred")
|
||||
// then use : onclose(user, "fred")
|
||||
// e.g. code is : user << browse(text, "window=fred")
|
||||
// then use : onclose(user, "fred")
|
||||
//
|
||||
// Optionally, specify the "ref" parameter as the controlled atom (usually src)
|
||||
// to pass a "close=1" parameter to the atom's Topic() proc for special handling.
|
||||
@@ -451,18 +478,18 @@
|
||||
// otherwise, just reset the client mob's machine var.
|
||||
//
|
||||
/client/verb/windowclose(atomref as text)
|
||||
set hidden = TRUE // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
set hidden = TRUE // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
if(atomref!="null") // if passed a real atomref
|
||||
var/hsrc = locate(atomref) // find the reffed atom
|
||||
if(atomref!="null") // if passed a real atomref
|
||||
var/hsrc = locate(atomref) // find the reffed atom
|
||||
var/href = "close=1"
|
||||
if(hsrc)
|
||||
usr = src.mob
|
||||
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
|
||||
return // Topic() proc via client.Topic()
|
||||
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
|
||||
return // Topic() proc via client.Topic()
|
||||
|
||||
// no atomref specified (or not found)
|
||||
// so just reset the user mob's machine var
|
||||
if(src && src.mob)
|
||||
if(src?.mob)
|
||||
src.mob.unset_machine()
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
// Append radio icon if from a virtual speaker
|
||||
if (extra_classes.Find("virtual-speaker"))
|
||||
var/image/r_icon = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "radio")
|
||||
var/image/r_icon = image('icons/ui_icons/chat/chat_icons.dmi', icon_state = "radio")
|
||||
text = "\icon[r_icon] " + text
|
||||
|
||||
// We dim italicized text to make it more distinguishable from regular text
|
||||
@@ -163,7 +163,7 @@
|
||||
message.maptext_width = CHAT_MESSAGE_WIDTH
|
||||
message.maptext_height = mheight
|
||||
message.maptext_x = (CHAT_MESSAGE_WIDTH - owner.bound_width) * -0.5
|
||||
message.maptext = complete_text
|
||||
message.maptext = MAPTEXT(complete_text)
|
||||
|
||||
// View the message
|
||||
LAZYADDASSOC(owned_by.seen_messages, message_loc, src)
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
///Allows you to set a theme for a set of areas without tying them to looping sounds explicitly
|
||||
/datum/component/area_sound_manager
|
||||
///area -> looping sound type
|
||||
var/list/area_to_looping_type = list()
|
||||
///Current sound loop
|
||||
var/datum/looping_sound/our_loop
|
||||
///A list of "acceptable" z levels to be on. If you leave this, we're gonna delete ourselves
|
||||
var/list/accepted_zs
|
||||
///The timer id of our current start delay, if it exists
|
||||
var/timerid
|
||||
|
||||
/datum/component/area_sound_manager/Initialize(area_loop_pairs, change_on, remove_on, acceptable_zs)
|
||||
if(!ismovable(parent))
|
||||
return
|
||||
area_to_looping_type = area_loop_pairs
|
||||
accepted_zs = acceptable_zs
|
||||
change_the_track()
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/react_to_move)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_Z_CHANGED, .proc/react_to_z_move)
|
||||
RegisterSignal(parent, change_on, .proc/handle_change)
|
||||
RegisterSignal(parent, remove_on, .proc/handle_removal)
|
||||
|
||||
/datum/component/area_sound_manager/Destroy(force, silent)
|
||||
QDEL_NULL(our_loop)
|
||||
. = ..()
|
||||
|
||||
/datum/component/area_sound_manager/proc/react_to_move(datum/source, atom/oldloc, dir, forced)
|
||||
SIGNAL_HANDLER
|
||||
var/list/loop_lookup = area_to_looping_type
|
||||
if(loop_lookup[get_area(oldloc)] == loop_lookup[get_area(parent)])
|
||||
return
|
||||
change_the_track(TRUE)
|
||||
|
||||
/datum/component/area_sound_manager/proc/react_to_z_move(datum/source, old_z, new_z)
|
||||
SIGNAL_HANDLER
|
||||
if(!length(accepted_zs) || (new_z in accepted_zs))
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
/datum/component/area_sound_manager/proc/handle_removal(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
qdel(src)
|
||||
|
||||
/datum/component/area_sound_manager/proc/handle_change(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
change_the_track()
|
||||
|
||||
/datum/component/area_sound_manager/proc/change_the_track(skip_start = FALSE)
|
||||
var/time_remaining = 0
|
||||
|
||||
if(our_loop)
|
||||
var/our_id = our_loop.timerid || timerid
|
||||
if(our_id)
|
||||
time_remaining = timeleft(our_id, SSsound_loops) || 0
|
||||
//Time left will sometimes return negative values, just ignore them and start a new sound loop now
|
||||
time_remaining = max(time_remaining, 0)
|
||||
QDEL_NULL(our_loop)
|
||||
|
||||
var/area/our_area = get_area(parent)
|
||||
var/new_loop_type = area_to_looping_type[our_area]
|
||||
if(!new_loop_type)
|
||||
return
|
||||
|
||||
our_loop = new new_loop_type(parent, FALSE, TRUE, skip_start)
|
||||
|
||||
//If we're still playing, wait a bit before changing the sound so we don't double up
|
||||
if(time_remaining)
|
||||
timerid = addtimer(CALLBACK(src, .proc/start_looping_sound), time_remaining, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_NO_HASH_WAIT | TIMER_DELETE_ME, SSsound_loops)
|
||||
return
|
||||
timerid = null
|
||||
our_loop.start()
|
||||
|
||||
/datum/component/area_sound_manager/proc/start_looping_sound()
|
||||
timerid = null
|
||||
if(our_loop)
|
||||
our_loop.start()
|
||||
@@ -66,7 +66,7 @@
|
||||
/datum/component/storage/concrete/_insert_physical_item(obj/item/I, override = FALSE)
|
||||
. = TRUE
|
||||
var/atom/real_location = real_location()
|
||||
if(I.loc != real_location && real_location)
|
||||
if(real_location && I.loc != real_location)
|
||||
I.forceMove(real_location)
|
||||
refresh_mob_views()
|
||||
|
||||
@@ -95,16 +95,19 @@
|
||||
return FALSE
|
||||
|
||||
/datum/component/storage/concrete/proc/on_contents_del(datum/source, atom/A)
|
||||
SIGNAL_HANDLER
|
||||
var/atom/real_location = parent
|
||||
if(A in real_location)
|
||||
usr = null
|
||||
remove_from_storage(A, null)
|
||||
|
||||
/datum/component/storage/concrete/proc/on_deconstruct(datum/source, disassembled)
|
||||
SIGNAL_HANDLER
|
||||
if(drop_all_on_deconstruct)
|
||||
do_quick_empty()
|
||||
|
||||
/datum/component/storage/concrete/proc/on_break(datum/source, damage_flag)
|
||||
SIGNAL_HANDLER
|
||||
if(drop_all_on_break)
|
||||
do_quick_empty()
|
||||
if(unlock_on_break)
|
||||
@@ -131,14 +134,16 @@
|
||||
var/list/seeing_mobs = can_see_contents()
|
||||
for(var/mob/M in seeing_mobs)
|
||||
M.client.screen -= AM
|
||||
if(ismob(parent.loc) && isitem(AM))
|
||||
var/obj/item/I = AM
|
||||
var/mob/M = parent.loc
|
||||
I.dropped(M)
|
||||
I.item_flags &= ~IN_STORAGE
|
||||
I.remove_outline()
|
||||
if(isitem(AM))
|
||||
var/obj/item/removed_item = AM
|
||||
removed_item.item_flags &= ~IN_STORAGE
|
||||
if(ismob(parent.loc))
|
||||
var/mob/carrying_mob = parent.loc
|
||||
removed_item.dropped(carrying_mob, TRUE)
|
||||
if(new_location)
|
||||
AM.forceMove(new_location) // exited comsig will handle removal reset.
|
||||
//Reset the items values
|
||||
_removal_reset(AM)
|
||||
AM.forceMove(new_location)
|
||||
//We don't want to call this if the item is being destroyed
|
||||
AM.on_exit_storage(src)
|
||||
else
|
||||
@@ -147,7 +152,7 @@
|
||||
refresh_mob_views()
|
||||
if(isobj(parent))
|
||||
var/obj/O = parent
|
||||
O.update_icon()
|
||||
O.update_appearance()
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/concrete/proc/slave_can_insert_object(datum/component/storage/slave, obj/item/I, stop_messages = FALSE, mob/M)
|
||||
@@ -158,7 +163,7 @@
|
||||
if(. && !prevent_warning)
|
||||
slave.mob_item_insertion_feedback(usr, M, I)
|
||||
|
||||
/datum/component/storage/concrete/handle_item_insertion(obj/item/I, prevent_warning = FALSE, mob/M, datum/component/storage/remote) //Remote is null or the slave datum
|
||||
/datum/component/storage/concrete/handle_item_insertion(obj/item/I, prevent_warning = FALSE, mob/M, datum/component/storage/remote) //Remote is null or the slave datum
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
var/atom/parent = src.parent
|
||||
var/moved = FALSE
|
||||
@@ -168,7 +173,7 @@
|
||||
if(!M.temporarilyRemoveItemFromInventory(I))
|
||||
return FALSE
|
||||
else
|
||||
moved = TRUE //At this point if the proc fails we need to manually move the object back to the turf/mob/whatever.
|
||||
moved = TRUE //At this point if the proc fails we need to manually move the object back to the turf/mob/whatever.
|
||||
if(I.pulledby)
|
||||
I.pulledby.stop_pulling()
|
||||
if(silent)
|
||||
@@ -203,7 +208,7 @@
|
||||
/datum/component/storage/concrete/update_icon()
|
||||
if(isobj(parent))
|
||||
var/obj/O = parent
|
||||
O.update_icon()
|
||||
O.update_appearance()
|
||||
for(var/i in slaves)
|
||||
var/datum/component/storage/slave = i
|
||||
slave.update_icon()
|
||||
|
||||
@@ -418,38 +418,38 @@
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/proc/mousedrop_onto(datum/source, atom/over_object, mob/M)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
set waitfor = FALSE
|
||||
. = COMPONENT_NO_MOUSEDROP
|
||||
if(!ismob(M))
|
||||
return
|
||||
if(!over_object)
|
||||
return
|
||||
if(ismecha(M.loc)) // stops inventory actions in a mech
|
||||
return
|
||||
if(M.incapacitated() || !M.canUseStorage())
|
||||
return
|
||||
var/atom/A = parent
|
||||
if(ismob(M)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
|
||||
A.add_fingerprint(M)
|
||||
if(istype(A, /obj/item))
|
||||
var/obj/item/I = A
|
||||
I.remove_outline() //Removes the outline when we drag
|
||||
if(!over_object)
|
||||
return FALSE
|
||||
if(ismecha(M.loc)) // stops inventory actions in a mech
|
||||
return FALSE
|
||||
// this must come before the screen objects only block, dunno why it wasn't before
|
||||
if(over_object == M)
|
||||
user_show_to_mob(M, trigger_on_found = TRUE)
|
||||
return
|
||||
if(isrevenant(M))
|
||||
RevenantThrow(over_object, M, source)
|
||||
return
|
||||
if(!M.incapacitated())
|
||||
if(!istype(over_object, /atom/movable/screen))
|
||||
dump_content_at(over_object, M)
|
||||
return
|
||||
if(A.loc != M)
|
||||
return
|
||||
playsound(A, "rustle", 50, 1, -5)
|
||||
A.do_jiggle()
|
||||
if(istype(over_object, /atom/movable/screen/inventory/hand))
|
||||
var/atom/movable/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(A, H.held_index)
|
||||
return
|
||||
A.add_fingerprint(M)
|
||||
A.add_fingerprint(M)
|
||||
// this must come before the screen objects only block, dunno why it wasn't before
|
||||
if(over_object == M)
|
||||
user_show_to_mob(M, trigger_on_found = TRUE)
|
||||
if(isrevenant(M))
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/RevenantThrow, over_object, M, source)
|
||||
return
|
||||
if(!istype(over_object, /atom/movable/screen))
|
||||
INVOKE_ASYNC(src, .proc/dump_content_at, over_object, M)
|
||||
return
|
||||
if(A.loc != M)
|
||||
return
|
||||
playsound(A, "rustle", 50, TRUE, -5)
|
||||
A.do_jiggle()
|
||||
if(istype(over_object, /atom/movable/screen/inventory/hand))
|
||||
var/atom/movable/screen/inventory/hand/H = over_object
|
||||
M.putItemFromInventoryInHandIfPossible(A, H.held_index)
|
||||
return
|
||||
A.add_fingerprint(M)
|
||||
|
||||
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE, trigger_on_found = FALSE)
|
||||
var/atom/A = parent
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
#define PEN_ROTATIONS 2
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
@@ -17,7 +18,7 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/telecrystals
|
||||
var/selected_cat
|
||||
var/owner = null
|
||||
var/datum/game_mode/gamemode
|
||||
var/uplink_flag
|
||||
var/datum/uplink_purchase_log/purchase_log
|
||||
var/list/uplink_items
|
||||
var/hidden_crystals = 0
|
||||
@@ -26,11 +27,11 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/failsafe_code
|
||||
var/compact_mode = FALSE
|
||||
var/debug = FALSE
|
||||
var/saved_player_population = 0
|
||||
var/list/filters = list()
|
||||
///Instructions on how to access the uplink based on location
|
||||
var/unlock_text
|
||||
var/list/previous_attempts
|
||||
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20, datum/traitor_class/traitor_class)
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, uplink_flag = UPLINK_TRAITORS, starting_tc = TELECRYSTALS_DEFAULT)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -44,16 +45,13 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
RegisterSignal(parent, COMSIG_IMPLANT_EXISTING_UPLINK, .proc/new_implant)
|
||||
else if(istype(parent, /obj/item/pda))
|
||||
RegisterSignal(parent, COMSIG_PDA_CHANGE_RINGTONE, .proc/new_ringtone)
|
||||
// RegisterSignal(parent, COMSIG_PDA_CHECK_DETONATE, .proc/check_detonate)
|
||||
else if(istype(parent, /obj/item/radio))
|
||||
RegisterSignal(parent, COMSIG_RADIO_NEW_FREQUENCY, .proc/new_frequency)
|
||||
else if(istype(parent, /obj/item/pen))
|
||||
RegisterSignal(parent, COMSIG_PEN_ROTATED, .proc/pen_rotation)
|
||||
|
||||
GLOB.uplinks += src
|
||||
if(istype(traitor_class))
|
||||
filters = traitor_class.uplink_filters
|
||||
starting_tc = traitor_class.TC
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted, filters)
|
||||
GLOB.uplinks |= src
|
||||
|
||||
if(_owner)
|
||||
owner = _owner
|
||||
@@ -64,44 +62,58 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
purchase_log = new(owner, src)
|
||||
lockable = _lockable
|
||||
active = _enabled
|
||||
gamemode = _gamemode
|
||||
src.uplink_flag = uplink_flag
|
||||
update_items()
|
||||
telecrystals = starting_tc
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
saved_player_population = GLOB.joined_player_list.len
|
||||
|
||||
previous_attempts = list()
|
||||
|
||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||
lockable |= U.lockable
|
||||
active |= U.active
|
||||
if(!gamemode)
|
||||
gamemode = U.gamemode
|
||||
uplink_flag |= U.uplink_flag
|
||||
telecrystals += U.telecrystals
|
||||
if(purchase_log && U.purchase_log)
|
||||
purchase_log.MergeWithAndDel(U.purchase_log)
|
||||
|
||||
/datum/component/uplink/Destroy()
|
||||
GLOB.uplinks -= src
|
||||
gamemode = null
|
||||
purchase_log = null
|
||||
return ..()
|
||||
|
||||
/datum/component/uplink/proc/update_items()
|
||||
var/updated_items
|
||||
updated_items = get_uplink_items(uplink_flag, TRUE, allow_restricted)
|
||||
update_sales(updated_items)
|
||||
uplink_items = updated_items
|
||||
|
||||
/datum/component/uplink/proc/update_sales(updated_items)
|
||||
var/discount_categories = list("Discounted Gear", "Discounted Team Gear", "Limited Stock Team Gear")
|
||||
if (uplink_items == null)
|
||||
return
|
||||
for (var/category in discount_categories) // Makes sure discounted items aren't renewed or replaced
|
||||
if (uplink_items[category] != null && updated_items[category] != null)
|
||||
updated_items[category] = uplink_items[category]
|
||||
|
||||
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
||||
to_chat(user, span_notice("You slot [TC] into [parent] and charge its internal uplink."))
|
||||
var/amt = TC.amount
|
||||
telecrystals += amt
|
||||
TC.use(amt)
|
||||
|
||||
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
||||
gamemode = _gamemode
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
// log_uplink("[key_name(user)] loaded [amt] telecrystals into [parent]'s uplink")
|
||||
|
||||
/datum/component/uplink/proc/OnAttackBy(datum/source, obj/item/I, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!active)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
// CIT SPECIFIC: STEALING from unlocked uplink.
|
||||
if(active)
|
||||
if(I.GetComponent(/datum/component/uplink))
|
||||
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
|
||||
@@ -118,31 +130,26 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/cost = UI.refund_amount || UI.cost
|
||||
if(I.type == path && UI.refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
// log_uplink("[key_name(user)] refunded [UI] for [cost] telecrystals using [parent]'s uplink")
|
||||
if(purchase_log)
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, span_notice("[I] refunded."))
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/datum/component/uplink/proc/interact(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(locked)
|
||||
return
|
||||
active = TRUE
|
||||
update_items()
|
||||
if(user)
|
||||
//update the saved population
|
||||
var/previous_player_population = saved_player_population
|
||||
saved_player_population = GLOB.joined_player_list.len
|
||||
//if population has changed, update uplink items
|
||||
if(saved_player_population != previous_player_population)
|
||||
//make sure discounts are not rerolled
|
||||
var/old_discounts = uplink_items["Discounted Gear"]
|
||||
uplink_items = get_uplink_items(gamemode, FALSE, allow_restricted, filters)
|
||||
if(old_discounts)
|
||||
uplink_items["Discounted Gear"] = old_discounts
|
||||
ui_interact(user)
|
||||
|
||||
INVOKE_ASYNC(src, .proc/ui_interact, user)
|
||||
// an unlocked uplink blocks also opening the PDA or headset menu
|
||||
return COMPONENT_NO_INTERACT
|
||||
|
||||
|
||||
/datum/component/uplink/ui_state(mob/user)
|
||||
if(istype(parent, /obj/item/implant/uplink))
|
||||
return GLOB.not_incapacitated_state
|
||||
@@ -178,15 +185,10 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = TRUE
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role || debug)
|
||||
is_inaccessible = FALSE
|
||||
if(is_inaccessible)
|
||||
if(length(I.restricted_roles))
|
||||
if(!debug && !(user.mind.assigned_role in I.restricted_roles))
|
||||
continue
|
||||
/*
|
||||
if(I.restricted_species) //catpeople specfic gloves.
|
||||
if(I.restricted_species)
|
||||
if(ishuman(user))
|
||||
var/is_inaccessible = TRUE
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -196,7 +198,6 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
break
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
*/
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
@@ -255,25 +256,41 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
// Implant signal responses
|
||||
|
||||
/datum/component/uplink/proc/implant_activation()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/obj/item/implant/implant = parent
|
||||
locked = FALSE
|
||||
interact(null, implant.imp_in)
|
||||
|
||||
/datum/component/uplink/proc/implanting(datum/source, list/arguments)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/mob/user = arguments[2]
|
||||
owner = "[user.key]"
|
||||
owner = user?.key
|
||||
if(owner && !purchase_log)
|
||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
||||
else
|
||||
purchase_log = new(owner, src)
|
||||
|
||||
/datum/component/uplink/proc/old_implant(datum/source, list/arguments, obj/item/implant/new_implant)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
// It kinda has to be weird like this until implants are components
|
||||
return SEND_SIGNAL(new_implant, COMSIG_IMPLANT_EXISTING_UPLINK, src)
|
||||
|
||||
/datum/component/uplink/proc/new_implant(datum/source, datum/component/uplink/uplink)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
uplink.telecrystals += telecrystals
|
||||
return COMPONENT_DELETE_NEW_IMPLANT
|
||||
|
||||
// PDA signal responses
|
||||
|
||||
/datum/component/uplink/proc/new_ringtone(datum/source, mob/living/user, new_ring_text)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/obj/item/pda/master = parent
|
||||
if(trim(lowertext(new_ring_text)) != trim(lowertext(unlock_code)))
|
||||
if(trim(lowertext(new_ring_text)) == trim(lowertext(failsafe_code)))
|
||||
@@ -282,14 +299,21 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
return
|
||||
locked = FALSE
|
||||
interact(null, user)
|
||||
to_chat(user, "<span class='hear'>The PDA softly beeps.</span>")
|
||||
to_chat(user, span_hear("The PDA softly beeps."))
|
||||
user << browse(null, "window=pda")
|
||||
master.mode = 0
|
||||
return COMPONENT_STOP_RINGTONE_CHANGE
|
||||
|
||||
/datum/component/uplink/proc/check_detonate()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
// return COMPONENT_PDA_NO_DETONATE
|
||||
|
||||
// Radio signal responses
|
||||
|
||||
/datum/component/uplink/proc/new_frequency(datum/source, list/arguments)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/obj/item/radio/master = parent
|
||||
var/frequency = arguments[1]
|
||||
if(frequency != unlock_code)
|
||||
@@ -303,15 +327,22 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
// Pen signal responses
|
||||
|
||||
/datum/component/uplink/proc/pen_rotation(datum/source, degrees, mob/living/carbon/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/obj/item/pen/master = parent
|
||||
if(degrees != unlock_code)
|
||||
if(degrees == failsafe_code) //Getting failsafes on pens is risky business
|
||||
failsafe()
|
||||
return
|
||||
locked = FALSE
|
||||
master.degrees = 0
|
||||
interact(null, user)
|
||||
to_chat(user, "<span class='warning'>Your pen makes a clicking noise, before quickly rotating back to 0 degrees!</span>")
|
||||
previous_attempts += degrees
|
||||
if(length(previous_attempts) > PEN_ROTATIONS)
|
||||
popleft(previous_attempts)
|
||||
|
||||
if(compare_list(previous_attempts, unlock_code))
|
||||
locked = FALSE
|
||||
previous_attempts.Cut()
|
||||
master.degrees = 0
|
||||
interact(null, user)
|
||||
to_chat(user, span_warning("Your pen makes a clicking noise, before quickly rotating back to 0 degrees!"))
|
||||
|
||||
else if(compare_list(previous_attempts, failsafe_code))
|
||||
failsafe(user)
|
||||
|
||||
/datum/component/uplink/proc/setup_unlock_code()
|
||||
unlock_code = generate_code()
|
||||
@@ -321,15 +352,18 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
else if(istype(parent,/obj/item/radio))
|
||||
unlock_note = "<B>Radio Frequency:</B> [format_frequency(unlock_code)] ([P.name])."
|
||||
else if(istype(parent,/obj/item/pen))
|
||||
unlock_note = "<B>Uplink Degrees:</B> [unlock_code] ([P.name])."
|
||||
unlock_note = "<B>Uplink Degrees:</B> [english_list(unlock_code)] ([P.name])."
|
||||
|
||||
/datum/component/uplink/proc/generate_code()
|
||||
if(istype(parent,/obj/item/pda))
|
||||
return "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]"
|
||||
else if(istype(parent,/obj/item/radio))
|
||||
return sanitize_frequency(rand(MIN_FREQ, MAX_FREQ))
|
||||
return return_unused_frequency()
|
||||
else if(istype(parent,/obj/item/pen))
|
||||
return rand(1, 360)
|
||||
var/list/L = list()
|
||||
for(var/i in 1 to PEN_ROTATIONS)
|
||||
L += rand(1, 360)
|
||||
return L
|
||||
|
||||
/datum/component/uplink/proc/failsafe(mob/living/carbon/user)
|
||||
if(!parent)
|
||||
@@ -339,5 +373,5 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
return
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has triggered an uplink failsafe explosion at [AREACOORD(T)] The owner of the uplink was [ADMIN_LOOKUPFLW(owner)].")
|
||||
log_game("[key_name(user)] triggered an uplink failsafe explosion. The owner of the uplink was [key_name(owner)].")
|
||||
explosion(T,1,2,3)
|
||||
explosion(parent, devastation_range = 1, heavy_impact_range = 2, light_impact_range = 3)
|
||||
qdel(parent) //Alternatively could brick the uplink.
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
active_timers = null
|
||||
for(var/thing in timers)
|
||||
var/datum/timedevent/timer = thing
|
||||
if (timer.spent)
|
||||
if (timer.spent && !(timer.flags & TIMER_DELETE_ME))
|
||||
continue
|
||||
qdel(timer)
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
///This element just handles creating and destroying an area sound manager that's hooked into weather stuff
|
||||
/datum/element/weather_listener
|
||||
element_flags = ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
var/weather_type
|
||||
//What events to change the track on
|
||||
var/list/sound_change_signals
|
||||
//The weather type we're working with
|
||||
var/weather_trait
|
||||
//The playlist of sounds to draw from. Pass by ref
|
||||
var/list/playlist
|
||||
|
||||
|
||||
/datum/element/weather_listener/Attach(datum/target, w_type, trait, weather_playlist)
|
||||
. = ..()
|
||||
if(!weather_type)
|
||||
weather_type = w_type
|
||||
sound_change_signals = list(
|
||||
COMSIG_WEATHER_TELEGRAPH(weather_type),
|
||||
COMSIG_WEATHER_START(weather_type),
|
||||
COMSIG_WEATHER_WINDDOWN(weather_type),
|
||||
COMSIG_WEATHER_END(weather_type)
|
||||
)
|
||||
weather_trait = trait
|
||||
playlist = weather_playlist
|
||||
|
||||
RegisterSignal(target, COMSIG_MOVABLE_Z_CHANGED, .proc/handle_z_level_change, override = TRUE)
|
||||
RegisterSignal(target, COMSIG_MOB_CLIENT_LOGOUT, .proc/handle_logout, override = TRUE)
|
||||
|
||||
/datum/element/weather_listener/Detach(datum/source)
|
||||
. = ..()
|
||||
UnregisterSignal(source, COMSIG_MOVABLE_Z_CHANGED, COMSIG_MOB_CLIENT_LOGOUT)
|
||||
|
||||
/datum/element/weather_listener/proc/handle_z_level_change(datum/source, old_z, new_z)
|
||||
SIGNAL_HANDLER
|
||||
var/list/fitting_z_levels = SSmapping.levels_by_trait(weather_trait)
|
||||
if(!(new_z in fitting_z_levels))
|
||||
return
|
||||
var/datum/component/our_comp = source.AddComponent(/datum/component/area_sound_manager, playlist, list(), COMSIG_MOB_CLIENT_LOGOUT, fitting_z_levels)
|
||||
our_comp.RegisterSignal(SSdcs, sound_change_signals, /datum/component/area_sound_manager/proc/handle_change)
|
||||
|
||||
/datum/element/weather_listener/proc/handle_logout(datum/source, client/this_is_a_null_ref)
|
||||
SIGNAL_HANDLER
|
||||
source.RemoveElement(/datum/element/weather_listener, weather_type, weather_trait, playlist)
|
||||
@@ -1,21 +1,21 @@
|
||||
/*
|
||||
output_atoms (list of atoms) The destination(s) for the sounds
|
||||
output_atoms (list of atoms) The destination(s) for the sounds
|
||||
|
||||
mid_sounds (list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.
|
||||
mid_length (num) The length to wait between playing mid_sounds
|
||||
mid_sounds (list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.
|
||||
mid_length (num) The length to wait between playing mid_sounds
|
||||
|
||||
start_sound (soundfile) Played before starting the mid_sounds loop
|
||||
start_length (num) How long to wait before starting the main loop after playing start_sound
|
||||
start_sound (soundfile) Played before starting the mid_sounds loop
|
||||
start_length (num) How long to wait before starting the main loop after playing start_sound
|
||||
|
||||
end_sound (soundfile) The sound played after the main loop has concluded
|
||||
end_sound (soundfile) The sound played after the main loop has concluded
|
||||
|
||||
chance (num) Chance per loop to play a mid_sound
|
||||
volume (num) Sound output volume
|
||||
max_loops (num) The max amount of loops to run for.
|
||||
direct (bool) If true plays directly to provided atoms instead of from them
|
||||
chance (num) Chance per loop to play a mid_sound
|
||||
volume (num) Sound output volume
|
||||
max_loops (num) The max amount of loops to run for.
|
||||
direct (bool) If true plays directly to provided atoms instead of from them
|
||||
*/
|
||||
/datum/looping_sound
|
||||
var/list/atom/output_atoms
|
||||
var/atom/parent
|
||||
var/mid_sounds
|
||||
var/mid_length
|
||||
///Override for volume of start sound
|
||||
@@ -34,38 +34,46 @@
|
||||
var/falloff_exponent
|
||||
var/timerid
|
||||
var/falloff_distance
|
||||
var/skip_starting_sounds = FALSE
|
||||
var/loop_started = FALSE
|
||||
|
||||
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE)
|
||||
/datum/looping_sound/New(_parent, start_immediately=FALSE, _direct=FALSE, _skip_starting_sounds = FALSE)
|
||||
if(!mid_sounds)
|
||||
WARNING("A looping sound datum was created without sounds to play.")
|
||||
return
|
||||
|
||||
output_atoms = _output_atoms
|
||||
set_parent(_parent)
|
||||
direct = _direct
|
||||
skip_starting_sounds = _skip_starting_sounds
|
||||
|
||||
if(start_immediately)
|
||||
start()
|
||||
|
||||
/datum/looping_sound/Destroy()
|
||||
stop()
|
||||
output_atoms = null
|
||||
stop(TRUE)
|
||||
return ..()
|
||||
|
||||
/datum/looping_sound/proc/start(atom/add_thing)
|
||||
if(add_thing)
|
||||
output_atoms |= add_thing
|
||||
/datum/looping_sound/proc/start(on_behalf_of)
|
||||
if(on_behalf_of)
|
||||
set_parent(on_behalf_of)
|
||||
if(timerid)
|
||||
return
|
||||
on_start()
|
||||
|
||||
/datum/looping_sound/proc/stop(atom/remove_thing)
|
||||
if(remove_thing)
|
||||
output_atoms -= remove_thing
|
||||
/datum/looping_sound/proc/stop(null_parent)
|
||||
if(null_parent)
|
||||
set_parent(null)
|
||||
if(!timerid)
|
||||
return
|
||||
on_stop()
|
||||
deltimer(timerid)
|
||||
deltimer(timerid, SSsound_loops)
|
||||
timerid = null
|
||||
loop_started = FALSE
|
||||
|
||||
/datum/looping_sound/proc/start_sound_loop()
|
||||
loop_started = TRUE
|
||||
sound_loop()
|
||||
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP | TIMER_DELETE_ME, SSsound_loops)
|
||||
|
||||
/datum/looping_sound/proc/sound_loop(starttime)
|
||||
if(max_loops && world.time >= starttime + mid_length * max_loops)
|
||||
@@ -73,21 +81,15 @@
|
||||
return
|
||||
if(!chance || prob(chance))
|
||||
play(get_sound(starttime))
|
||||
if(!timerid)
|
||||
timerid = addtimer(CALLBACK(src, .proc/sound_loop, world.time), mid_length, TIMER_CLIENT_TIME | TIMER_STOPPABLE | TIMER_LOOP)
|
||||
|
||||
/datum/looping_sound/proc/play(soundfile, volume_override)
|
||||
var/list/atoms_cache = output_atoms
|
||||
var/sound/S = sound(soundfile)
|
||||
if(direct)
|
||||
S.channel = SSsounds.random_available_channel()
|
||||
S.volume = volume_override || volume //Use volume as fallback if theres no override
|
||||
for(var/i in 1 to atoms_cache.len)
|
||||
var/atom/thing = atoms_cache[i]
|
||||
if(direct)
|
||||
SEND_SOUND(thing, S)
|
||||
else
|
||||
playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance)
|
||||
SEND_SOUND(parent, S)
|
||||
else
|
||||
playsound(parent, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance)
|
||||
|
||||
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
|
||||
. = _mid_sounds || mid_sounds
|
||||
@@ -96,11 +98,22 @@
|
||||
|
||||
/datum/looping_sound/proc/on_start()
|
||||
var/start_wait = 0
|
||||
if(start_sound)
|
||||
if(start_sound && !skip_starting_sounds)
|
||||
play(start_sound, start_volume)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME)
|
||||
timerid = addtimer(CALLBACK(src, .proc/start_sound_loop), start_wait, TIMER_CLIENT_TIME | TIMER_DELETE_ME | TIMER_STOPPABLE, SSsound_loops)
|
||||
|
||||
/datum/looping_sound/proc/on_stop()
|
||||
if(end_sound)
|
||||
if(end_sound && loop_started)
|
||||
play(end_sound, end_volume)
|
||||
|
||||
/datum/looping_sound/proc/set_parent(new_parent)
|
||||
if(parent)
|
||||
UnregisterSignal(parent, COMSIG_PARENT_QDELETING)
|
||||
parent = new_parent
|
||||
if(parent)
|
||||
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/handle_parent_del)
|
||||
|
||||
/datum/looping_sound/proc/handle_parent_del(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
set_parent(null)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define RAD_GEIGER_LOW 100 // Geiger counter sound thresholds
|
||||
#define RAD_GEIGER_LOW 100 // Geiger counter sound thresholds
|
||||
#define RAD_GEIGER_MEDIUM 500
|
||||
#define RAD_GEIGER_HIGH 1000
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random = 40, /obj/structure/spawner/lavaland = 2, \
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/random = 30, /obj/structure/spawner/lavaland/legion = 3, \
|
||||
SPAWN_MEGAFAUNA = 4, /mob/living/simple_animal/hostile/asteroid/goldgrub = 10)
|
||||
flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2 , /obj/structure/flora/ash/cap_shroom = 2 , /obj/structure/flora/ash/stem_shroom = 2 , /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2)
|
||||
flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2 , /obj/structure/flora/ash/cap_shroom = 2 , /obj/structure/flora/ash/stem_shroom = 2 , /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2, /obj/structure/flora/ashtree = 1)
|
||||
feature_spawn_list = list(/obj/structure/geyser/random = 1)
|
||||
|
||||
initial_closed_chance = 45
|
||||
|
||||
@@ -120,7 +120,7 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
return
|
||||
I.hitsound = item_sound_override
|
||||
I.usesound = item_sound_override
|
||||
I.throwhitsound = item_sound_override
|
||||
I.mob_throw_hit_sound = item_sound_override
|
||||
// I.mob_throw_hit_sound = item_sound_override
|
||||
// I.equip_sound = item_sound_override
|
||||
// I.pickup_sound = item_sound_override
|
||||
|
||||
+40
-36
@@ -267,11 +267,17 @@
|
||||
remove_rev()
|
||||
SSticker.mode.update_cult_icons_removed(src)
|
||||
|
||||
/datum/mind/proc/equip_traitor(datum/traitor_class/traitor_class, silent = FALSE, datum/antagonist/uplink_owner)
|
||||
/**
|
||||
* ## give_uplink
|
||||
*
|
||||
* A mind proc for giving anyone an uplink.
|
||||
* arguments:
|
||||
* * silent: if this should send a message to the mind getting the uplink. traitors do not use this silence, but the silence var on their antag datum.
|
||||
* * antag_datum: the antag datum of the uplink owner, for storing it in antag memory. optional!
|
||||
*/
|
||||
/datum/mind/proc/equip_traitor(silent = FALSE, datum/antagonist/antag_datum)
|
||||
if(!current)
|
||||
return
|
||||
if(!traitor_class)
|
||||
traitor_class = GLOB.traitor_classes[TRAITOR_HUMAN]
|
||||
var/mob/living/carbon/human/traitor_mob = current
|
||||
if (!istype(traitor_mob))
|
||||
return
|
||||
@@ -285,16 +291,9 @@
|
||||
P = locate() in PDA
|
||||
if (!P) // If we couldn't find a pen in the PDA, or we didn't even have a PDA, do it the old way
|
||||
P = locate() in all_contents
|
||||
if(!P) // I do not have a pen.
|
||||
var/obj/item/pen/inowhaveapen
|
||||
if(istype(traitor_mob.back,/obj/item/storage)) //ok buddy you better have a backpack!
|
||||
inowhaveapen = new /obj/item/pen(traitor_mob.back)
|
||||
else
|
||||
inowhaveapen = new /obj/item/pen(traitor_mob.loc)
|
||||
traitor_mob.put_in_hands(inowhaveapen) // I hope you don't have arms and your traitor pen gets stolen for all this trouble you've caused.
|
||||
P = inowhaveapen
|
||||
|
||||
var/obj/item/uplink_loc
|
||||
var/implant = FALSE
|
||||
|
||||
if(traitor_mob.client && traitor_mob.client.prefs)
|
||||
switch(traitor_mob.client.prefs.uplink_spawn_loc)
|
||||
@@ -312,33 +311,38 @@
|
||||
uplink_loc = P
|
||||
if(UPLINK_PEN)
|
||||
uplink_loc = P
|
||||
if(!uplink_loc)
|
||||
uplink_loc = PDA
|
||||
if(!uplink_loc)
|
||||
uplink_loc = R
|
||||
if(UPLINK_IMPLANT)
|
||||
implant = TRUE
|
||||
|
||||
if (!uplink_loc)
|
||||
if(!silent)
|
||||
to_chat(traitor_mob, "Unfortunately, [traitor_class.employer] wasn't able to get you an Uplink.")
|
||||
. = 0
|
||||
else
|
||||
. = uplink_loc
|
||||
var/datum/component/uplink/U = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key,traitor_class)
|
||||
if(!U)
|
||||
CRASH("Uplink creation failed.")
|
||||
U.setup_unlock_code()
|
||||
if(!silent)
|
||||
if(uplink_loc == R)
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(U.unlock_code)] to unlock its hidden features.")
|
||||
else if(uplink_loc == PDA)
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[U.unlock_code]\" into the ringtone select to unlock its hidden features.")
|
||||
else if(uplink_loc == P)
|
||||
to_chat(traitor_mob, "[traitor_class.employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [U.unlock_code] from its starting position to unlock its hidden features.")
|
||||
if(!uplink_loc) // We've looked everywhere, let's just implant you
|
||||
implant = TRUE
|
||||
|
||||
if(uplink_owner)
|
||||
uplink_owner.antag_memory += U.unlock_note + "<br>"
|
||||
else
|
||||
traitor_mob.mind.store_memory(U.unlock_note)
|
||||
if(implant)
|
||||
var/obj/item/implant/uplink/starting/new_implant = new(traitor_mob)
|
||||
new_implant.implant(traitor_mob, null, silent = TRUE)
|
||||
if(!silent)
|
||||
to_chat(traitor_mob, span_boldnotice("Your Syndicate Uplink has been cunningly implanted in you, for a small TC fee. Simply trigger the uplink to access it."))
|
||||
return new_implant
|
||||
|
||||
. = uplink_loc
|
||||
var/unlock_text
|
||||
var/datum/component/uplink/new_uplink = uplink_loc.AddComponent(/datum/component/uplink, traitor_mob.key)
|
||||
if(!new_uplink)
|
||||
CRASH("Uplink creation failed.")
|
||||
new_uplink.setup_unlock_code()
|
||||
if(uplink_loc == R)
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [R.name]. Simply dial the frequency [format_frequency(new_uplink.unlock_code)] to unlock its hidden features."
|
||||
else if(uplink_loc == PDA)
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [PDA.name]. Simply enter the code \"[new_uplink.unlock_code]\" into the ringtone select to unlock its hidden features."
|
||||
else if(uplink_loc == P)
|
||||
unlock_text = "Your Uplink is cunningly disguised as your [P.name]. Simply twist the top of the pen [english_list(new_uplink.unlock_code)] from its starting position to unlock its hidden features."
|
||||
new_uplink.unlock_text = unlock_text
|
||||
if(!silent)
|
||||
to_chat(traitor_mob, span_boldnotice(unlock_text))
|
||||
if(!antag_datum)
|
||||
traitor_mob.mind.store_memory(new_uplink.unlock_note)
|
||||
return
|
||||
antag_datum.antag_memory += new_uplink.unlock_note + "<br>"
|
||||
|
||||
//Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does.
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//A reference to this list is passed into area sound managers, and it's modified in a manner that preserves that reference in ash_storm.dm
|
||||
GLOBAL_LIST_EMPTY(ash_storm_sounds)
|
||||
//Ash storms happen frequently on lavaland. They heavily obscure vision, and cause high fire damage to anyone caught outside.
|
||||
/datum/weather/ash_storm
|
||||
name = "ash storm"
|
||||
@@ -25,55 +27,41 @@
|
||||
probability = 90
|
||||
|
||||
barometer_predictable = TRUE
|
||||
|
||||
var/datum/looping_sound/active_outside_ashstorm/sound_ao = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/active_inside_ashstorm/sound_ai = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/weak_outside_ashstorm/sound_wo = new(list(), FALSE, TRUE)
|
||||
var/datum/looping_sound/weak_inside_ashstorm/sound_wi = new(list(), FALSE, TRUE)
|
||||
var/list/weak_sounds = list()
|
||||
var/list/strong_sounds = list()
|
||||
|
||||
/datum/weather/ash_storm/telegraph()
|
||||
. = ..()
|
||||
var/list/inside_areas = list()
|
||||
var/list/outside_areas = list()
|
||||
var/list/eligible_areas = list()
|
||||
for (var/z in impacted_z_levels)
|
||||
eligible_areas += SSmapping.areas_in_z["[z]"]
|
||||
for(var/i in 1 to eligible_areas.len)
|
||||
var/area/place = eligible_areas[i]
|
||||
if(place.outdoors)
|
||||
outside_areas += place
|
||||
weak_sounds[place] = /datum/looping_sound/weak_outside_ashstorm
|
||||
strong_sounds[place] = /datum/looping_sound/active_outside_ashstorm
|
||||
else
|
||||
inside_areas += place
|
||||
weak_sounds[place] = /datum/looping_sound/weak_inside_ashstorm
|
||||
strong_sounds[place] = /datum/looping_sound/active_inside_ashstorm
|
||||
CHECK_TICK
|
||||
|
||||
sound_ao.output_atoms = outside_areas
|
||||
sound_ai.output_atoms = inside_areas
|
||||
sound_wo.output_atoms = outside_areas
|
||||
sound_wi.output_atoms = inside_areas
|
||||
|
||||
sound_wo.start()
|
||||
sound_wi.start()
|
||||
//We modify this list instead of setting it to weak/stron sounds in order to preserve things that hold a reference to it
|
||||
//It's essentially a playlist for a bunch of components that chose what sound to loop based on the area a player is in
|
||||
GLOB.ash_storm_sounds += weak_sounds
|
||||
return ..()
|
||||
|
||||
/datum/weather/ash_storm/start()
|
||||
. = ..()
|
||||
sound_wo.stop()
|
||||
sound_wi.stop()
|
||||
|
||||
sound_ao.start()
|
||||
sound_ai.start()
|
||||
GLOB.ash_storm_sounds -= weak_sounds
|
||||
GLOB.ash_storm_sounds += strong_sounds
|
||||
return ..()
|
||||
|
||||
/datum/weather/ash_storm/wind_down()
|
||||
. = ..()
|
||||
sound_ao.stop()
|
||||
sound_ai.stop()
|
||||
|
||||
sound_wo.start()
|
||||
sound_wi.start()
|
||||
GLOB.ash_storm_sounds -= strong_sounds
|
||||
GLOB.ash_storm_sounds += weak_sounds
|
||||
return ..()
|
||||
|
||||
/datum/weather/ash_storm/end()
|
||||
. = ..()
|
||||
sound_wo.stop()
|
||||
sound_wi.stop()
|
||||
GLOB.ash_storm_sounds -= weak_sounds
|
||||
return ..()
|
||||
|
||||
/datum/weather/ash_storm/proc/is_ash_immune(atom/L)
|
||||
while (L && !isturf(L))
|
||||
@@ -88,6 +76,11 @@
|
||||
var/mob/living/the_mob = L
|
||||
if("ash" in the_mob.weather_immunities)
|
||||
return TRUE
|
||||
// if(istype(L, /obj/structure/closet))
|
||||
// var/obj/structure/closet/the_locker = L
|
||||
// if(the_locker.weather_protection)
|
||||
// if("ash" in the_locker.weather_protection)
|
||||
// return TRUE
|
||||
L = L.loc //Check parent items immunities (recurses up to the turf)
|
||||
return FALSE //RIP you
|
||||
|
||||
|
||||
@@ -119,12 +119,20 @@
|
||||
victim.bleed(blood_bled, TRUE)
|
||||
if(14 to 19)
|
||||
victim.visible_message("<span class='smalldanger'>[victim] spits out a string of blood from the blow to [victim.p_their()] chest!</span>", "<span class='danger'>You spit out a string of blood from the blow to your chest!</span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
victim.bleed(blood_bled)
|
||||
if(20 to INFINITY)
|
||||
victim.visible_message("<span class='danger'>[victim] chokes up a spray of blood from the blow to [victim.p_their()] chest!</span>", "<span class='danger'><b>You choke up on a spray of blood from the blow to your chest!</b></span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
victim.bleed(blood_bled)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
victim.add_splatter_floor(get_step(victim.loc, victim.dir))
|
||||
|
||||
|
||||
|
||||
@@ -39,12 +39,20 @@
|
||||
victim.bleed(blood_bled, TRUE)
|
||||
if(14 to 19)
|
||||
victim.visible_message("<span class='smalldanger'>A small stream of blood spurts from the hole in [victim]'s [limb.name]!</span>", "<span class='danger'>You spit out a string of blood from the blow to your [limb.name]!</span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
victim.bleed(blood_bled)
|
||||
if(20 to INFINITY)
|
||||
victim.visible_message("<span class='danger'>A spray of blood streams from the gash in [victim]'s [limb.name]!</span>", "<span class='danger'><b>You choke up on a spray of blood from the blow to your [limb.name]!</b></span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
victim.bleed(blood_bled)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
victim.add_splatter_floor(get_step(victim.loc, victim.dir))
|
||||
|
||||
/datum/wound/pierce/handle_process()
|
||||
|
||||
+13
-3
@@ -1291,9 +1291,7 @@
|
||||
|
||||
/obj/item/update_filters()
|
||||
. = ..()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
update_action_buttons()
|
||||
|
||||
/atom/proc/get_filter(name)
|
||||
if(filter_data && filter_data[name])
|
||||
@@ -1404,3 +1402,15 @@
|
||||
*/
|
||||
/atom/proc/setClosed()
|
||||
return
|
||||
|
||||
//Update the screentip to reflect what we're hoverin over
|
||||
/atom/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
// Statusbar
|
||||
// status_bar_set_text(usr, name)
|
||||
// Screentips
|
||||
// if(usr?.hud_used)
|
||||
// if(!usr.client?.prefs.screentip_pref || (flags_1 & NO_SCREENTIPS_1))
|
||||
// usr.hud_used.screentip_text.maptext = ""
|
||||
// else
|
||||
// usr.hud_used.screentip_text.maptext = MAPTEXT("<span style='text-align: center'><span style='font-size: 32px'><span style='color:[usr.client.prefs.screentip_color]: 32px'>[name]</span>")
|
||||
|
||||
@@ -48,8 +48,17 @@
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Crossed(src)
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts)
|
||||
* if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this
|
||||
* most of the time you want forceMove()
|
||||
*/
|
||||
/atom/movable/proc/abstract_move(atom/new_loc)
|
||||
var/atom/old_loc = loc
|
||||
// move_stacks++
|
||||
loc = new_loc
|
||||
Moved(old_loc)
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct, glide_size_override = 0)
|
||||
var/atom/movable/pullee = pulling
|
||||
|
||||
@@ -193,7 +193,9 @@ GLOBAL_LIST_INIT(reverseradiochannels, list(
|
||||
var/frequency = 0
|
||||
var/transmission_method
|
||||
var/list/data
|
||||
var/logging_data
|
||||
|
||||
/datum/signal/New(data, transmission_method = TRANSMISSION_RADIO)
|
||||
/datum/signal/New(data, transmission_method = TRANSMISSION_RADIO, logging_data = null)
|
||||
src.data = data || list()
|
||||
src.transmission_method = transmission_method
|
||||
src.logging_data = logging_data
|
||||
|
||||
@@ -247,61 +247,94 @@ Class Procs:
|
||||
|
||||
/obj/machinery/proc/auto_use_power()
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
return FALSE
|
||||
if(use_power == 1)
|
||||
use_power(idle_power_usage,power_channel)
|
||||
else if(use_power >= 2)
|
||||
use_power(active_power_usage,power_channel)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/is_operational()
|
||||
return !(stat & (NOPOWER|BROKEN|MAINT))
|
||||
|
||||
/obj/machinery/can_interact(mob/user)
|
||||
var/silicon = hasSiliconAccessInArea(user) || IsAdminGhost(user)
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE)) // Check if the machine is broken, and if we can still interact with it if so
|
||||
return FALSE
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
if(!silicon || !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
|
||||
return FALSE
|
||||
|
||||
if(silicon)
|
||||
if(IsAdminGhost(user))
|
||||
return TRUE //if you're an admin, you probably know what you're doing (or at least have permission to do what you're doing)
|
||||
|
||||
if(!isliving(user))
|
||||
return FALSE //no ghosts in the machine allowed, sorry
|
||||
|
||||
// if(SEND_SIGNAL(user, COMSIG_TRY_USE_MACHINE, src) & COMPONENT_CANT_USE_MACHINE_INTERACT)
|
||||
// return FALSE
|
||||
|
||||
var/mob/living/living_user = user
|
||||
|
||||
var/is_dextrous = FALSE
|
||||
if(isanimal(user))
|
||||
var/mob/living/simple_animal/user_as_animal = user
|
||||
if (user_as_animal.dextrous)
|
||||
is_dextrous = TRUE
|
||||
|
||||
if(!issilicon(user) && !is_dextrous && !user.can_hold_items())
|
||||
return FALSE //spiders gtfo
|
||||
|
||||
if(issilicon(user)) // If we are a silicon, make sure the machine allows silicons to interact with it
|
||||
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON))
|
||||
return FALSE
|
||||
else
|
||||
if(interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SILICON)
|
||||
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN) && !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
|
||||
return FALSE
|
||||
if(!Adjacent(user))
|
||||
var/mob/living/carbon/H = user
|
||||
if(!(istype(H) && H.has_dna() && H.dna.check_mutation(TK)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return TRUE //silicons don't care about petty mortal concerns like needing to be next to a machine to use it
|
||||
|
||||
if(living_user.incapacitated()) //idk why silicons aren't supposed to care about incapacitation when interacting with machines, but it was apparently like this before
|
||||
return FALSE
|
||||
|
||||
// TODO: nerf blind people
|
||||
// if((interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SIGHT) && user.is_blind())
|
||||
// to_chat(user, span_warning("This machine requires sight to use."))
|
||||
// return FALSE
|
||||
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
return FALSE
|
||||
|
||||
if(interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SILICON) //if the user was a silicon, we'd have returned out earlier, so the user must not be a silicon
|
||||
return FALSE
|
||||
|
||||
if(!Adjacent(user)) // Next make sure we are next to the machine unless we have telekinesis
|
||||
var/mob/living/carbon/carbon_user = living_user
|
||||
if(!istype(carbon_user) || !carbon_user.has_dna() || !carbon_user.dna.check_mutation(TK))
|
||||
return FALSE
|
||||
|
||||
return TRUE // If we passed all of those checks, woohoo! We can interact with this machine.
|
||||
|
||||
/obj/machinery/proc/check_nap_violations()
|
||||
if(!SSeconomy.full_ancap)
|
||||
return TRUE
|
||||
if(occupant && !state_open)
|
||||
if(ishuman(occupant))
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/obj/item/card/id/I = H.get_idcard()
|
||||
if(I)
|
||||
var/datum/bank_account/insurance = I.registered_account
|
||||
if(!insurance)
|
||||
say("[market_verb] NAP Violation: No bank account found.")
|
||||
nap_violation()
|
||||
return FALSE
|
||||
else
|
||||
if(!insurance.adjust_money(-fair_market_price))
|
||||
say("[market_verb] NAP Violation: Unable to pay.")
|
||||
nap_violation()
|
||||
return FALSE
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
|
||||
if(D)
|
||||
D.adjust_money(fair_market_price)
|
||||
else
|
||||
say("[market_verb] NAP Violation: No ID card found.")
|
||||
nap_violation()
|
||||
var/mob/living/L = occupant
|
||||
var/obj/item/card/id/I = L.get_idcard(TRUE)
|
||||
if(I)
|
||||
var/datum/bank_account/insurance = I.registered_account
|
||||
if(!insurance)
|
||||
say("[market_verb] NAP Violation: No bank account found.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
else
|
||||
if(!insurance.adjust_money(-fair_market_price))
|
||||
say("[market_verb] NAP Violation: Unable to pay.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
|
||||
if(D)
|
||||
D.adjust_money(fair_market_price)
|
||||
else
|
||||
say("[market_verb] NAP Violation: No ID card found.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/nap_violation(mob/violator)
|
||||
@@ -322,11 +355,11 @@ Class Procs:
|
||||
/obj/machinery/Topic(href, href_list)
|
||||
..()
|
||||
if(!can_interact(usr))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
return TRUE
|
||||
add_fingerprint(usr)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A machine to give your apparel a fresh new color! Recommended to use with white items for best results."
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "colormate"
|
||||
// light_mask = "colormate-light-mask"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/colormate
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/obj/machinery/computer/communications/Initialize()
|
||||
. = ..()
|
||||
GLOB.shuttle_caller_list += src
|
||||
AddComponent(/datum/component/gps, "Secured Communications Signal")
|
||||
|
||||
/// Are we NOT a silicon, AND we're logged in as the captain?
|
||||
/obj/machinery/computer/communications/proc/authenticated_as_non_silicon_captain(mob/user)
|
||||
@@ -79,13 +80,11 @@
|
||||
if (obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
SSshuttle.shuttle_purchase_requirements_met |= "emagged"
|
||||
if (authenticated)
|
||||
authorize_access = get_all_accesses()
|
||||
to_chat(user, "<span class='danger'>You scramble the communication routing circuits!</span>")
|
||||
to_chat(user, span_danger("You scramble the communication routing circuits!"))
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 50, FALSE)
|
||||
SSshuttle.shuttle_purchase_requirements_met["emagged"] = TRUE
|
||||
return
|
||||
|
||||
/obj/machinery/computer/communications/ui_act(action, list/params)
|
||||
var/static/list/approved_states = list(STATE_BUYING_SHUTTLE, STATE_CHANGING_STATUS, STATE_MAIN, STATE_MESSAGES)
|
||||
@@ -104,6 +103,7 @@
|
||||
if ("answerMessage")
|
||||
if (!authenticated(usr))
|
||||
return
|
||||
|
||||
var/answer_index = params["answer"]
|
||||
var/message_index = params["message"]
|
||||
|
||||
@@ -136,11 +136,11 @@
|
||||
var/obj/item/held_item = usr.get_active_held_item()
|
||||
var/obj/item/card/id/id_card = held_item?.GetID()
|
||||
if (!istype(id_card))
|
||||
to_chat(usr, "<span class='warning'>You need to swipe your ID!</span>")
|
||||
to_chat(usr, span_warning("You need to swipe your ID!"))
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
||||
return
|
||||
if (!(ACCESS_CAPTAIN in id_card.access))
|
||||
to_chat(usr, "<span class='warning'>You are not authorized to do this!</span>")
|
||||
to_chat(usr, span_warning("You are not authorized to do this!"))
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
||||
return
|
||||
|
||||
@@ -152,26 +152,28 @@
|
||||
|
||||
set_security_level(new_sec_level)
|
||||
|
||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||
to_chat(usr, span_notice("Authorization confirmed. Modifying security level."))
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
|
||||
// Only notify people if an actual change happened
|
||||
log_game("[key_name(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].")
|
||||
deadchat_broadcast(" has changed the security level to [params["newSecurityLevel"]] with [src] at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" has changed the security level to [params["newSecurityLevel"]] with [src] at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
alert_level_tick += 1
|
||||
if ("deleteMessage")
|
||||
if (!authenticated(usr))
|
||||
return
|
||||
var/message_index = params["message"]
|
||||
|
||||
if(!isnum(message_index))
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] provided an invalid index type when deleting a message on [src] [ADMIN_JMP(src)]. This should not happen. Please check with a maintainer and/or consult tgui logs.")
|
||||
CRASH("Non-numeric index provided when deleting comms console message.")
|
||||
var/message_index = text2num(params["message"])
|
||||
if (!message_index)
|
||||
return
|
||||
LAZYREMOVE(messages, LAZYACCESS(messages, message_index))
|
||||
if ("emergency_meeting")
|
||||
if(!(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
|
||||
return
|
||||
if (!authenticated_as_silicon_or_captain(usr))
|
||||
return
|
||||
emergency_meeting(usr)
|
||||
if ("makePriorityAnnouncement")
|
||||
if (!authenticated_as_silicon_or_captain(usr))
|
||||
return
|
||||
@@ -188,32 +190,36 @@
|
||||
var/emagged = obj_flags & EMAGGED
|
||||
if (emagged)
|
||||
message_syndicate(message, usr)
|
||||
to_chat(usr, "<span class='danger'>SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND.</span>")
|
||||
to_chat(usr, span_danger("SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND."))
|
||||
else
|
||||
message_centcom(message, usr)
|
||||
to_chat(usr, "<span class='notice'>Message transmitted to Central Command.</span>")
|
||||
to_chat(usr, span_notice("Message transmitted to Central Command."))
|
||||
|
||||
var/associates = emagged ? "the Syndicate": "CentCom"
|
||||
usr.log_talk(message, LOG_SAY, tag = "message to [associates]")
|
||||
deadchat_broadcast(" has messaged [associates], \"[message]\" at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" has messaged [associates], \"[message]\" at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN)
|
||||
if ("purchaseShuttle")
|
||||
var/can_buy_shuttles_or_fail_reason = can_buy_shuttles(usr)
|
||||
if (can_buy_shuttles_or_fail_reason != TRUE)
|
||||
if (can_buy_shuttles_or_fail_reason != FALSE)
|
||||
to_chat(usr, "<span class='alert'>[can_buy_shuttles_or_fail_reason]</span>")
|
||||
to_chat(usr, span_alert("[can_buy_shuttles_or_fail_reason]"))
|
||||
return
|
||||
var/list/shuttles = flatten_list(SSmapping.shuttle_templates)
|
||||
var/datum/map_template/shuttle/shuttle = locate(params["shuttle"]) in shuttles
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
// if (!can_purchase_this_shuttle(shuttle))
|
||||
// return
|
||||
if (!shuttle.prerequisites_met())
|
||||
to_chat(usr, "<span class='alert'>You have not met the requirements for purchasing this shuttle.</span>")
|
||||
to_chat(usr, span_alert("You have not met the requirements for purchasing this shuttle."))
|
||||
return
|
||||
var/datum/bank_account/bank_account = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if (bank_account.account_balance < shuttle.credit_cost)
|
||||
return
|
||||
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_PURCHASED
|
||||
// for(var/datum/round_event_control/shuttle_insurance/insurance_event in SSevents.control)
|
||||
// insurance_event.weight *= 20
|
||||
SSshuttle.unload_preview()
|
||||
SSshuttle.existing_shuttle = SSshuttle.emergency
|
||||
SSshuttle.action_load(shuttle, replace = TRUE)
|
||||
@@ -235,7 +241,7 @@
|
||||
return
|
||||
var/reason = trim(html_encode(params["reason"]), MAX_MESSAGE_LEN)
|
||||
nuke_request(reason, usr)
|
||||
to_chat(usr, "<span class='notice'>Request sent.</span>")
|
||||
to_chat(usr, span_notice("Request sent."))
|
||||
usr.log_message("has requested the nuclear codes from CentCom with reason \"[reason]\"", LOG_SAY)
|
||||
priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self-Destruct Codes Requested", "commandreport")
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
@@ -245,7 +251,7 @@
|
||||
return
|
||||
if (!(obj_flags & EMAGGED))
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>Backup routing data restored.</span>")
|
||||
to_chat(usr, span_notice("Backup routing data restored."))
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
obj_flags &= ~EMAGGED
|
||||
if ("sendToOtherSector")
|
||||
@@ -256,7 +262,7 @@
|
||||
if (!COOLDOWN_FINISHED(src, important_action_cooldown))
|
||||
return
|
||||
|
||||
var/message = trim(html_encode(params["message"]), MAX_MESSAGE_LEN)
|
||||
var/message = trim(params["message"], MAX_MESSAGE_LEN)
|
||||
if (!message)
|
||||
return
|
||||
|
||||
@@ -268,12 +274,13 @@
|
||||
var/network_name = CONFIG_GET(string/cross_comms_network)
|
||||
if (network_name)
|
||||
payload["network"] = network_name
|
||||
payload["sender_ckey"] = usr.ckey
|
||||
|
||||
send2otherserver(station_name(), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload)
|
||||
send2otherserver(html_decode(station_name()), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload)
|
||||
minor_announce(message, title = "Outgoing message to allied station")
|
||||
usr.log_talk(message, LOG_SAY, tag = "message to the other server")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server\[s].")
|
||||
deadchat_broadcast(" has sent an outgoing message to the other station(s).</span>", "<span class='bold'>[usr.real_name]", usr)
|
||||
deadchat_broadcast(" has sent an outgoing message to the other station(s).</span>", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN)
|
||||
if ("setState")
|
||||
@@ -315,7 +322,7 @@
|
||||
authenticated = TRUE
|
||||
authorize_access = get_all_accesses()
|
||||
authorize_name = "Unknown"
|
||||
to_chat(usr, "<span class='warning'>[src] lets out a quiet alarm as its login is overridden.</span>")
|
||||
to_chat(usr, span_warning("[src] lets out a quiet alarm as its login is overridden."))
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 25, FALSE)
|
||||
else if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
@@ -334,22 +341,36 @@
|
||||
revoke_maint_all_access()
|
||||
log_game("[key_name(usr)] disabled emergency maintenance access.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] disabled emergency maintenance access.")
|
||||
deadchat_broadcast(" disabled emergency maintenance access at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" disabled emergency maintenance access at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
else
|
||||
make_maint_all_access()
|
||||
log_game("[key_name(usr)] enabled emergency maintenance access.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.")
|
||||
deadchat_broadcast(" enabled emergency maintenance access at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" enabled emergency maintenance access at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"authenticated" = FALSE,
|
||||
"emagged" = FALSE,
|
||||
"hasConnection" = has_communication(),
|
||||
)
|
||||
|
||||
var/ui_state = issilicon(user) ? cyborg_state : state
|
||||
|
||||
var/has_connection = has_communication()
|
||||
data["hasConnection"] = has_connection
|
||||
|
||||
// if(!SSjob.assigned_captain && !SSjob.safe_code_requested && SSid_access.spare_id_safe_code && has_connection)
|
||||
// data["canRequestSafeCode"] = TRUE
|
||||
// data["safeCodeDeliveryWait"] = 0
|
||||
// else
|
||||
// data["canRequestSafeCode"] = FALSE
|
||||
// if(SSjob.safe_code_timer_id && has_connection)
|
||||
// data["safeCodeDeliveryWait"] = timeleft(SSjob.safe_code_timer_id)
|
||||
// data["safeCodeDeliveryArea"] = get_area(SSjob.safe_code_request_loc)
|
||||
// else
|
||||
// data["safeCodeDeliveryWait"] = 0
|
||||
// data["safeCodeDeliveryArea"] = null
|
||||
|
||||
if (authenticated || issilicon(user))
|
||||
data["authenticated"] = TRUE
|
||||
data["canLogOut"] = !issilicon(user)
|
||||
@@ -371,16 +392,17 @@
|
||||
data["importantActionReady"] = COOLDOWN_FINISHED(src, important_action_cooldown)
|
||||
data["shuttleCalled"] = FALSE
|
||||
data["shuttleLastCalled"] = FALSE
|
||||
|
||||
data["aprilFools"] = SSevents.holidays && SSevents.holidays[APRIL_FOOLS]
|
||||
data["alertLevel"] = NUM2SECLEVEL(GLOB.security_level)
|
||||
data["authorizeName"] = authorize_name
|
||||
data["canLogOut"] = !issilicon(user)
|
||||
data["shuttleCanEvacOrFailReason"] = SSshuttle.canEvac(user, TRUE)
|
||||
data["shuttleCanEvacOrFailReason"] = SSshuttle.canEvac(user)
|
||||
|
||||
if (authenticated_as_non_silicon_captain(user))
|
||||
data["canRequestNuke"] = TRUE
|
||||
if (authenticated_as_non_silicon_command(user))
|
||||
data["canMessageAssociates"] = TRUE
|
||||
|
||||
if (can_send_messages_to_other_sectors(user))
|
||||
data["canSendToSectors"] = TRUE
|
||||
|
||||
@@ -428,8 +450,13 @@
|
||||
|
||||
for (var/shuttle_id in SSmapping.shuttle_templates)
|
||||
var/datum/map_template/shuttle/shuttle_template = SSmapping.shuttle_templates[shuttle_id]
|
||||
if (!shuttle_template.can_be_bought || shuttle_template.credit_cost == INFINITY)
|
||||
|
||||
if (shuttle_template.credit_cost == INFINITY)
|
||||
continue
|
||||
|
||||
if (!shuttle_template.can_be_bought)
|
||||
continue
|
||||
|
||||
shuttles += list(list(
|
||||
"name" = shuttle_template.name,
|
||||
"description" = shuttle_template.description,
|
||||
@@ -478,6 +505,7 @@
|
||||
return FALSE
|
||||
if (!authenticated_as_non_silicon_captain(user))
|
||||
return FALSE
|
||||
|
||||
if (SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_IDLE)
|
||||
return "The shuttle is already in transit."
|
||||
if (SSshuttle.shuttle_purchased == SHUTTLEPURCHASE_PURCHASED)
|
||||
@@ -492,21 +520,38 @@
|
||||
|
||||
return length(CONFIG_GET(keyed_list/cross_server)) > 0
|
||||
|
||||
/**
|
||||
* Call an emergency meeting
|
||||
*
|
||||
* Comm Console wrapper for the Communications subsystem wrapper for the call_emergency_meeting world proc.
|
||||
* Checks to make sure the proc can be called, and handles relevant feedback, logging and timing.
|
||||
* See the SScommunications proc definition for more detail, in short, teleports the entire crew to
|
||||
* the bridge for a meetup. Should only really happen during april fools.
|
||||
* Arguments:
|
||||
* * user - Mob who called the meeting
|
||||
*/
|
||||
/obj/machinery/computer/communications/proc/emergency_meeting(mob/living/user)
|
||||
if(!SScommunications.can_make_emergency_meeting(user))
|
||||
to_chat(user, span_alert("The emergency meeting button doesn't seem to work right now. Please stand by."))
|
||||
return
|
||||
SScommunications.emergency_meeting(user)
|
||||
deadchat_broadcast(" called an emergency meeting from [span_name("[get_area_name(usr, TRUE)]")].", span_name("[user.real_name]"), user, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/proc/make_announcement(mob/living/user)
|
||||
var/is_ai = issilicon(user)
|
||||
if(!SScommunications.can_announce(user, is_ai))
|
||||
to_chat(user, "<span class='alert'>Intercomms recharging. Please stand by.</span>")
|
||||
to_chat(user, span_alert("Intercomms recharging. Please stand by."))
|
||||
return
|
||||
var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?")
|
||||
if(!input || !user.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(!(user.can_speak())) //No more cheating, mime/random mute guy!
|
||||
input = "..."
|
||||
to_chat(user, "<span class='warning'>You find yourself unable to speak.</span>")
|
||||
to_chat(user, span_warning("You find yourself unable to speak."))
|
||||
else
|
||||
input = user.treat_message(input) //Adds slurs and so on. Someone should make this use languages too.
|
||||
SScommunications.make_announcement(user, is_ai, input)
|
||||
deadchat_broadcast(" made a priority announcement from <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[user.real_name]</span>", user)
|
||||
deadchat_broadcast(" made a priority announcement from [span_name("[get_area_name(usr, TRUE)]")].", user, src.loc, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/proc/post_status(command, data1, data2)
|
||||
|
||||
|
||||
+271
-259
@@ -1,3 +1,5 @@
|
||||
#define AHELP_FIRST_MESSAGE "Please adminhelp before leaving the round, even if there are no administrators online!"
|
||||
|
||||
/*
|
||||
* Cryogenic refrigeration unit. Basically a despawner.
|
||||
* Stealing a lot of concepts/code from sleepers due to massive laziness.
|
||||
@@ -5,6 +7,7 @@
|
||||
* since time_entered, which is world.time when the occupant moves in.
|
||||
* ~ Zuhayr
|
||||
*/
|
||||
GLOBAL_LIST_EMPTY(cryopod_computers)
|
||||
|
||||
//Main cryopod console.
|
||||
|
||||
@@ -13,159 +16,113 @@
|
||||
desc = "An interface between crew and the cryogenic storage oversight systems."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "cellconsole_1"
|
||||
icon_keyboard = null
|
||||
circuit = /obj/item/circuitboard/cryopodcontrol
|
||||
density = FALSE
|
||||
interaction_flags_machine = INTERACT_MACHINE_OFFLINE
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with.
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) // Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with.
|
||||
var/mode = null
|
||||
|
||||
var/menu = 1 //Which menu screen to display
|
||||
|
||||
//Used for logging people entering cryosleep and important items they are carrying.
|
||||
// Used for logging people entering cryosleep and important items they are carrying.
|
||||
var/list/frozen_crew = list()
|
||||
var/list/obj/stored_packages = list()
|
||||
|
||||
var/list/stored_packages = list()
|
||||
/// Does this console store items? if NOT, will dump all items when the user cryo's instead
|
||||
var/allow_items = TRUE
|
||||
|
||||
var/storage_type = "crewmembers"
|
||||
var/storage_name = "Cryogenic Oversight Control"
|
||||
|
||||
/obj/machinery/computer/cryopod/deconstruct()
|
||||
. = ..()
|
||||
for(var/i in stored_packages)
|
||||
var/obj/O = i
|
||||
O.forceMove(drop_location())
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_ai()
|
||||
attack_hand()
|
||||
/obj/machinery/computer/cryopod/Initialize()
|
||||
. = ..()
|
||||
GLOB.cryopod_computers += src
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_interact(mob/user = usr)
|
||||
if(!is_operational())
|
||||
/obj/machinery/computer/cryopod/Destroy()
|
||||
GLOB.cryopod_computers -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cryopod/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "cellconsole"
|
||||
return ..()
|
||||
icon_state = "cellconsole_1"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
var/dat = ""
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "CryopodConsole", name)
|
||||
ui.open()
|
||||
|
||||
dat += "<h2>Welcome, [user.real_name].</h2><hr/>"
|
||||
dat += "<br><br>"
|
||||
/obj/machinery/computer/cryopod/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["frozen_crew"] = frozen_crew
|
||||
var/list/item_meta = list()
|
||||
|
||||
switch(src.menu)
|
||||
if(1)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=2'>View crew storage log</a><br><br>"
|
||||
if(allow_items)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=3'>View objects storage log</a><br><br>"
|
||||
dat += "<a href='byond://?src=[REF(src)];item=1'>Recover object</a><br><br>"
|
||||
dat += "<a href='byond://?src=[REF(src)];allitems=1'>Recover all objects</a><br>"
|
||||
if(2)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=1'><< Back</a><br><br>"
|
||||
dat += "<h3>Recently stored Crew</h3><br/><hr/><br/>"
|
||||
if(!frozen_crew.len)
|
||||
dat += "There has been no storage usage at this terminal.<br/>"
|
||||
else
|
||||
for(var/person in frozen_crew)
|
||||
dat += "[person]<br/>"
|
||||
dat += "<hr/>"
|
||||
if(3)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=1'><< Back</a><br><br>"
|
||||
dat += "<h3>Recently stored objects</h3><br/><hr/><br/>"
|
||||
if(!stored_packages.len)
|
||||
dat += "There has been no storage usage at this terminal.<br/>"
|
||||
else
|
||||
for(var/obj/O in stored_packages)
|
||||
dat += "[O.name]<br/>"
|
||||
dat += "<hr/>"
|
||||
for(var/obj/item/storage/box/blue/cryostorage_items/O as anything in stored_packages)
|
||||
item_meta += list(list("name" = O.real_name, "ref" = REF(O))) // i am truely livid about byond lists
|
||||
data["item_meta"] = item_meta
|
||||
|
||||
var/datum/browser/popup = new(user, "cryopod_console", "Cryogenic System Control")
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
var/obj/item/card/id/id_card
|
||||
var/datum/bank_account/current_user
|
||||
if(isliving(user))
|
||||
var/mob/living/person = user
|
||||
id_card = person.get_idcard()
|
||||
if(id_card?.registered_account)
|
||||
current_user = id_card.registered_account
|
||||
if(current_user)
|
||||
data["account_name"] = current_user.account_holder // i do not know why but this uses budget?
|
||||
|
||||
/obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
return
|
||||
|
||||
var/mob/user = usr
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(href_list["item"])
|
||||
if(!allowed(user) && !(obj_flags & EMAGGED))
|
||||
to_chat(user, "<span class='warning'>Access Denied.</span>")
|
||||
if(action == "item")
|
||||
if(!allowed(usr) && !(obj_flags & EMAGGED))
|
||||
to_chat(usr, "<span class='warning'>Access Denied.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!allow_items)
|
||||
return
|
||||
|
||||
if(stored_packages.len == 0)
|
||||
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
to_chat(usr, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages
|
||||
var/obj/I = locate(params["item"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
|
||||
if(!I)
|
||||
return
|
||||
|
||||
if(!(I in stored_packages))
|
||||
to_chat(user, "<span class='notice'>\The [I] is no longer in storage.</span>")
|
||||
to_chat(usr, "<span class='notice'>\The [I] is no longer in storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>The console beeps happily as it disgorges \the [I].</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
I.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(I)
|
||||
if(usr && Adjacent(usr) && usr.can_hold_items())
|
||||
usr.put_in_hands(I)
|
||||
stored_packages -= I
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["allitems"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
if(!allowed(user) && !(obj_flags & EMAGGED))
|
||||
to_chat(user, "<span class='warning'>Access Denied.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!allow_items)
|
||||
return
|
||||
|
||||
if(stored_packages.len == 0)
|
||||
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>The console beeps happily as it disgorges the desired objects.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
for(var/obj/O in stored_packages)
|
||||
O.forceMove(get_turf(src))
|
||||
stored_packages.Cut()
|
||||
updateUsrDialog()
|
||||
|
||||
else if (href_list["menu"])
|
||||
src.menu = text2num(href_list["menu"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
updateUsrDialog()
|
||||
|
||||
ui_interact(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/circuitboard/cryopodcontrol
|
||||
name = "Circuit board (Cryogenic Oversight Console)"
|
||||
build_path = "/obj/machinery/computer/cryopod"
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion(severity, target, origin)
|
||||
return
|
||||
|
||||
/// The box
|
||||
/obj/item/storage/box/blue/cryostorage_items
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
//Cryopods themselves.
|
||||
// Cryopods themselves.
|
||||
/obj/machinery/cryopod
|
||||
name = "cryogenic freezer"
|
||||
desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest."
|
||||
@@ -178,47 +135,55 @@
|
||||
var/on_store_message = "has entered long-term storage."
|
||||
var/on_store_name = "Cryogenic Oversight"
|
||||
|
||||
// 15 minutes-ish safe period before being despawned.
|
||||
var/time_till_despawn = 15 * 600 // This is reduced by 90% if a player manually enters cryo
|
||||
var/despawn_world_time = null // Used to keep track of the safe period.
|
||||
/// Time until despawn when a mob enters a cryopod. You can cryo other people in pods.
|
||||
var/time_till_despawn = 30 SECONDS
|
||||
/// Cooldown for when it's now safe to try an despawn the player.
|
||||
COOLDOWN_DECLARE(despawn_world_time)
|
||||
|
||||
var/obj/machinery/computer/cryopod/control_computer
|
||||
var/item_storage_type = /obj/item/storage/box/blue/cryostorage_items //with how storage components work this can be anything the player can open or anything with a storage component.
|
||||
var/last_no_computer_message = 0
|
||||
///Weakref to our controller
|
||||
var/datum/weakref/control_computer_weakref
|
||||
COOLDOWN_DECLARE(last_no_computer_message)
|
||||
|
||||
/obj/machinery/cryopod/Initialize(mapload)
|
||||
. = ..()
|
||||
/obj/machinery/cryopod/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD //Gotta populate the cryopod computer GLOB first
|
||||
|
||||
/obj/machinery/cryopod/LateInitialize()
|
||||
update_icon()
|
||||
find_control_computer(mapload)
|
||||
find_control_computer()
|
||||
|
||||
// This is not a good situation
|
||||
/obj/machinery/cryopod/Destroy()
|
||||
control_computer_weakref = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cryopod/proc/find_control_computer(urgent = FALSE)
|
||||
for(var/obj/machinery/computer/cryopod/C in get_area(src))
|
||||
control_computer = C
|
||||
if(C)
|
||||
return C
|
||||
break
|
||||
for(var/cryo_console as anything in GLOB.cryopod_computers)
|
||||
var/obj/machinery/computer/cryopod/console = cryo_console
|
||||
if(get_area(console) == get_area(src))
|
||||
control_computer_weakref = WEAKREF(console)
|
||||
break
|
||||
|
||||
// Don't send messages unless we *need* the computer, and less than five minutes have passed since last time we messaged
|
||||
if(!control_computer && urgent && last_no_computer_message + 5*60*10 < world.time)
|
||||
if(!control_computer_weakref && urgent && COOLDOWN_FINISHED(src, last_no_computer_message))
|
||||
COOLDOWN_START(src, last_no_computer_message, 5 MINUTES)
|
||||
log_admin("Cryopod in [get_area(src)] could not find control computer!")
|
||||
message_admins("Cryopod in [get_area(src)] could not find control computer!")
|
||||
last_no_computer_message = world.time
|
||||
|
||||
return control_computer != null
|
||||
return control_computer_weakref != null
|
||||
|
||||
/obj/machinery/cryopod/close_machine(mob/user)
|
||||
if(!control_computer)
|
||||
/obj/machinery/cryopod/close_machine(atom/movable/target)
|
||||
if(!control_computer_weakref)
|
||||
find_control_computer(TRUE)
|
||||
if((isnull(user) || istype(user)) && state_open && !panel_open)
|
||||
..(user)
|
||||
if((isnull(target) || isliving(target)) && state_open && !panel_open)
|
||||
..(target)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
investigate_log("Cryogenics machine closed with occupant [key_name(occupant)] by user [key_name(user)].", INVESTIGATE_CRYOGENICS)
|
||||
investigate_log("Cryogenics machine closed with occupant [key_name(occupant)] by user [key_name(target)].", INVESTIGATE_CRYOGENICS)
|
||||
if(mob_occupant && mob_occupant.stat != DEAD)
|
||||
to_chat(occupant, "<span class='boldnotice'>You feel cool air surround you. You go numb as your senses turn inward.</span>")
|
||||
if(mob_occupant.client)//if they're logged in
|
||||
despawn_world_time = world.time + (time_till_despawn * 0.1)
|
||||
else
|
||||
despawn_world_time = world.time + time_till_despawn
|
||||
to_chat(occupant, span_notice("<b>You feel cool air surround you. You go numb as your senses turn inward.</b>"))
|
||||
|
||||
COOLDOWN_START(src, despawn_world_time, time_till_despawn)
|
||||
icon_state = "cryopod"
|
||||
|
||||
/obj/machinery/cryopod/open_machine()
|
||||
@@ -231,8 +196,8 @@
|
||||
|
||||
/obj/machinery/cryopod/container_resist(mob/living/user)
|
||||
investigate_log("Cryogenics machine container resisted by [key_name(user)] with occupant [key_name(occupant)].", INVESTIGATE_CRYOGENICS)
|
||||
visible_message("<span class='notice'>[occupant] emerges from [src]!</span>",
|
||||
"<span class='notice'>You climb out of [src]!</span>")
|
||||
visible_message(span_notice("[occupant] emerges from [src]!"),
|
||||
span_notice("You climb out of [src]!"))
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/cryopod/relaymove(mob/user)
|
||||
@@ -243,36 +208,122 @@
|
||||
return
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
if(mob_occupant)
|
||||
// Eject dead people
|
||||
if(mob_occupant.stat == DEAD)
|
||||
open_machine()
|
||||
if(mob_occupant.stat == DEAD)
|
||||
open_machine()
|
||||
|
||||
if(!(world.time > despawn_world_time + 100))//+ 10 seconds
|
||||
return
|
||||
if(!mob_occupant.client && COOLDOWN_FINISHED(src, despawn_world_time))
|
||||
if(!control_computer_weakref)
|
||||
find_control_computer(urgent = TRUE)
|
||||
|
||||
if(!mob_occupant.client && mob_occupant.stat < 2) //Occupant is living and has no client.
|
||||
if(!control_computer)
|
||||
find_control_computer(urgent = TRUE)//better hope you found it this time
|
||||
despawn_occupant()
|
||||
|
||||
despawn_occupant()
|
||||
/obj/machinery/cryopod/proc/handle_objectives()
|
||||
var/mob/living/mob_occupant = occupant
|
||||
// Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/objective in GLOB.objectives)
|
||||
// We don't want revs to get objectives that aren't for heads of staff. Letting
|
||||
// them win or lose based on cryo is silly so we remove the objective.
|
||||
if(istype(objective,/datum/objective/mutiny) && objective.target == mob_occupant.mind)
|
||||
objective.team.objectives -= objective
|
||||
qdel(objective)
|
||||
for(var/datum/mind/mind in objective.team.members)
|
||||
to_chat(mind.current, "<BR>[span_userdanger("Your target is no longer within reach. Objective removed!")]")
|
||||
mind.announce_objectives()
|
||||
else if(istype(objective.target) && objective.target == mob_occupant.mind)
|
||||
if(istype(objective, /datum/objective/contract))
|
||||
var/datum/antagonist/traitor/affected_traitor = objective.owner.has_antag_datum(/datum/antagonist/traitor)
|
||||
var/datum/contractor_hub/affected_contractor_hub = affected_traitor.contractor_hub
|
||||
for(var/datum/syndicate_contract/affected_contract as anything in affected_contractor_hub.assigned_contracts)
|
||||
if(affected_contract.contract == objective)
|
||||
affected_contract.generate(affected_contractor_hub.assigned_targets)
|
||||
affected_contractor_hub.assigned_targets.Add(affected_contract.contract.target)
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("Contract target out of reach. Contract rerolled.")]")
|
||||
break
|
||||
else
|
||||
var/old_target = objective.target
|
||||
objective.target = null
|
||||
if(!objective)
|
||||
return
|
||||
objective.find_target()
|
||||
if(!objective.target && objective.owner)
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("Your target is no longer within reach. Objective removed!")]")
|
||||
for(var/datum/antagonist/antag in objective.owner.antag_datums)
|
||||
antag.objectives -= objective
|
||||
if (!objective.team)
|
||||
objective.update_explanation_text()
|
||||
objective.owner.announce_objectives()
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
else
|
||||
var/list/objectivestoupdate
|
||||
for(var/datum/mind/objective_owner in objective.get_owners())
|
||||
to_chat(objective_owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
for(var/datum/objective/update_target_objective in objective_owner.get_all_objectives())
|
||||
LAZYADD(objectivestoupdate, update_target_objective)
|
||||
objectivestoupdate += objective.team.objectives
|
||||
for(var/datum/objective/update_objective in objectivestoupdate)
|
||||
if(update_objective.target != old_target || !istype(update_objective,objective.type))
|
||||
continue
|
||||
update_objective.target = objective.target
|
||||
update_objective.update_explanation_text()
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
update_objective.owner.announce_objectives()
|
||||
qdel(objective)
|
||||
|
||||
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/item)
|
||||
for(var/datum/objective_item/steal/possible_item in GLOB.possible_items)
|
||||
if(istype(item, possible_item.targetitem))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// This function can not be undone; do not call this unless you are sure
|
||||
/obj/machinery/cryopod/proc/despawn_occupant()
|
||||
if(!control_computer)
|
||||
find_control_computer()
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
var/list/crew_member = list()
|
||||
|
||||
crew_member["name"] = mob_occupant.real_name
|
||||
|
||||
if(mob_occupant.mind)
|
||||
// Handle job slot/tater cleanup.
|
||||
var/job = mob_occupant.mind.assigned_role
|
||||
crew_member["job"] = job
|
||||
SSjob.FreeRole(job)
|
||||
// if(LAZYLEN(mob_occupant.mind.objectives))
|
||||
// mob_occupant.mind.objectives.Cut()
|
||||
mob_occupant.mind.special_role = null
|
||||
else
|
||||
crew_member["job"] = "N/A"
|
||||
|
||||
// Delete them from datacore.
|
||||
var/announce_rank = null
|
||||
for(var/datum/data/record/medical_record as anything in GLOB.data_core.medical)
|
||||
if(medical_record.fields["name"] == mob_occupant.real_name)
|
||||
qdel(medical_record)
|
||||
for(var/datum/data/record/security_record as anything in GLOB.data_core.security)
|
||||
if(security_record.fields["name"] == mob_occupant.real_name)
|
||||
qdel(security_record)
|
||||
for(var/datum/data/record/general_record as anything in GLOB.data_core.general)
|
||||
if(general_record.fields["name"] == mob_occupant.real_name)
|
||||
announce_rank = general_record.fields["rank"]
|
||||
qdel(general_record)
|
||||
|
||||
var/obj/machinery/computer/cryopod/control_computer = control_computer_weakref?.resolve()
|
||||
if(!control_computer)
|
||||
control_computer_weakref = null
|
||||
else
|
||||
control_computer.frozen_crew += list(crew_member)
|
||||
|
||||
// Make an announcement and log the person entering storage.
|
||||
if(GLOB.announcement_systems.len)
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("CRYOSTORAGE", mob_occupant.real_name, announce_rank, list())
|
||||
|
||||
visible_message(span_notice("[src] hums and hisses as it moves [mob_occupant.real_name] into storage."))
|
||||
|
||||
/* ============================= */
|
||||
var/list/obj/item/storing = list()
|
||||
var/list/obj/item/destroying = list()
|
||||
var/list/obj/item/destroy_later = list()
|
||||
|
||||
investigate_log("Despawning [key_name(mob_occupant)].", INVESTIGATE_CRYOGENICS)
|
||||
|
||||
var/atom/target_store = (control_computer?.allow_items && control_computer) || src //the double control computer check makes it return the control computer.
|
||||
var/drop_to_ground = !istype(target_store, /obj/machinery/computer/cryopod)
|
||||
|
||||
var/drop_to_ground = !istype(control_computer, /obj/machinery/computer/cryopod) || !control_computer.allow_items
|
||||
var/mind_identity = mob_occupant.mind?.name
|
||||
var/occupant_identity = mob_occupant.real_name
|
||||
|
||||
@@ -293,7 +344,6 @@
|
||||
AM.forceMove(src)
|
||||
R.module.remove_module(I, TRUE)
|
||||
else
|
||||
|
||||
if(ishuman(mob_occupant))
|
||||
var/mob/living/carbon/human/H = mob_occupant
|
||||
if(H.mind && H.client && H.client.prefs && H == H.mind.original_character)
|
||||
@@ -303,145 +353,89 @@
|
||||
if(iscarbon(mob_occupant)) // sorry simp-le-mobs deserve no mercy
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
gear = C.get_all_gear()
|
||||
for(var/i in gear)
|
||||
var/obj/item/I = i
|
||||
I.forceMove(src)
|
||||
if(!istype(I))
|
||||
destroying += I
|
||||
|
||||
for(var/obj/item/item_content as anything in gear)
|
||||
if(!istype(item_content) || HAS_TRAIT(item_content, TRAIT_NODROP))
|
||||
destroying += item_content
|
||||
continue
|
||||
if(I.item_flags & (DROPDEL | ABSTRACT))
|
||||
destroying += I
|
||||
continue
|
||||
if(HAS_TRAIT(I, TRAIT_NODROP))
|
||||
destroying += I
|
||||
if(item_content.item_flags & (DROPDEL | ABSTRACT))
|
||||
destroying += item_content
|
||||
continue
|
||||
|
||||
// destroying stays in mob for a bit
|
||||
item_content.forceMove(src)
|
||||
|
||||
// WEE WOO SNOWFLAKE TIME
|
||||
if(istype(I, /obj/item/pda))
|
||||
var/obj/item/pda/P = I
|
||||
if(istype(item_content, /obj/item/pda))
|
||||
var/obj/item/pda/P = item_content
|
||||
if((P.owner == mind_identity) || (P.owner == occupant_identity))
|
||||
destroying += P
|
||||
else
|
||||
storing += P
|
||||
else if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = I
|
||||
else if(istype(item_content, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = item_content
|
||||
if((idcard.registered_name == mind_identity) || (idcard.registered_name == occupant_identity))
|
||||
destroying += idcard
|
||||
else
|
||||
storing += idcard
|
||||
else
|
||||
storing += I
|
||||
storing += item_content
|
||||
|
||||
// get rid of mobs
|
||||
for(var/mob/living/L in mob_occupant.GetAllContents() - mob_occupant)
|
||||
L.forceMove(drop_location())
|
||||
|
||||
if(storing.len)
|
||||
var/obj/O = new item_storage_type
|
||||
var/obj/item/storage/box/blue/cryostorage_items/O = new /obj/item/storage/box/blue/cryostorage_items
|
||||
O.name = "cryogenic retrieval package: [mob_occupant.real_name]"
|
||||
O.real_name = mob_occupant.real_name
|
||||
for(var/i in storing)
|
||||
var/obj/item/I = i
|
||||
I.forceMove(O)
|
||||
O.forceMove(drop_to_ground? target_store.drop_location() : target_store)
|
||||
if((target_store == control_computer) && !drop_to_ground)
|
||||
O.forceMove(drop_to_ground ? control_computer.drop_location() : control_computer)
|
||||
if((control_computer == control_computer) && !drop_to_ground)
|
||||
control_computer.stored_packages += O
|
||||
|
||||
QDEL_LIST(destroying)
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/i in GLOB.objectives)
|
||||
var/datum/objective/O = i
|
||||
// We don't want revs to get objectives that aren't for heads of staff. Letting
|
||||
// them win or lose based on cryo is silly so we remove the objective.
|
||||
if(istype(O,/datum/objective/mutiny) && O.target == mob_occupant.mind)
|
||||
qdel(O)
|
||||
else if(O.target && istype(O.target, /datum/mind))
|
||||
if(O.target != mob_occupant.mind)
|
||||
continue
|
||||
if(O.check_midround_completion())
|
||||
continue
|
||||
if(O.owner && O.owner.current)
|
||||
to_chat(O.owner.current, "<BR><span class='userdanger'>You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!</span>")
|
||||
O.target = null
|
||||
spawn(10) //This should ideally fire after the occupant is deleted.
|
||||
if(!O)
|
||||
return
|
||||
O.find_target()
|
||||
O.update_explanation_text()
|
||||
if(!(O.target))
|
||||
qdel(O)
|
||||
|
||||
if(mob_occupant.mind)
|
||||
//Handle job slot/tater cleanup.
|
||||
if(mob_occupant.mind.assigned_role)
|
||||
var/job = mob_occupant.mind.assigned_role
|
||||
SSjob.FreeRole(job)
|
||||
mob_occupant.mind.special_role = null
|
||||
|
||||
// Delete them from datacore.
|
||||
|
||||
var/announce_rank = null
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if((R.fields["name"] == mob_occupant.real_name))
|
||||
qdel(R)
|
||||
for(var/datum/data/record/T in GLOB.data_core.security)
|
||||
if((T.fields["name"] == mob_occupant.real_name))
|
||||
qdel(T)
|
||||
for(var/datum/data/record/G in GLOB.data_core.general)
|
||||
if((G.fields["name"] == mob_occupant.real_name))
|
||||
announce_rank = G.fields["rank"]
|
||||
qdel(G)
|
||||
|
||||
for(var/obj/machinery/computer/cloning/cloner in world)
|
||||
for(var/datum/data/record/R in cloner.records)
|
||||
if(R.fields["name"] == mob_occupant.real_name)
|
||||
cloner.records.Remove(R)
|
||||
|
||||
//Make an announcement and log the person entering storage.
|
||||
if(control_computer)
|
||||
control_computer.frozen_crew += "[mob_occupant.real_name]"
|
||||
|
||||
if(GLOB.announcement_systems.len)
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("CRYOSTORAGE", mob_occupant.real_name, announce_rank, list())
|
||||
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [mob_occupant.real_name] into storage.</span>")
|
||||
/* ============================= */
|
||||
|
||||
// Ghost and delete the mob.
|
||||
// they already did ghost verb
|
||||
var/mob/dead/observer/G = mob_occupant.get_ghost(TRUE)
|
||||
if(G)
|
||||
G.voluntary_ghosted = TRUE
|
||||
// they did not ghost verb
|
||||
else
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE, cryo = TRUE)
|
||||
|
||||
QDEL_LIST(destroying)
|
||||
handle_objectives()
|
||||
QDEL_NULL(occupant)
|
||||
QDEL_LIST(destroy_later)
|
||||
open_machine()
|
||||
name = initial(name)
|
||||
|
||||
/obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user)
|
||||
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
|
||||
if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
|
||||
return
|
||||
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='boldnotice'>The cryo pod is already occupied!</span>")
|
||||
to_chat(user, span_notice("[src] is already occupied!"))
|
||||
return
|
||||
|
||||
if(target.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>Dead people can not be put into cryo.</span>")
|
||||
to_chat(user, span_notice("Dead people can not be put into cryo."))
|
||||
return
|
||||
|
||||
if(target.client && user != target)
|
||||
if(user != target && target.client)
|
||||
if(iscyborg(target))
|
||||
to_chat(user, "<span class='danger'>You can't put [target] into [src]. They're online.</span>")
|
||||
to_chat(user, span_danger("You can't put [target] into [src]. [target.p_theyre(capitalized = TRUE)] online."))
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You can't put [target] into [src]. They're conscious.</span>")
|
||||
to_chat(user, span_danger("You can't put [target] into [src]. [target.p_theyre(capitalized = TRUE)] conscious."))
|
||||
return
|
||||
else if(target.client)
|
||||
if(alert(target,"Would you like to enter cryosleep?",,"Yes","No") == "No")
|
||||
else if(target.client) // mob has client
|
||||
if(tgalert(target, "Would you like to enter cryosleep?", "Enter Cryopod?", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!"
|
||||
|
||||
if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)//if we haven't warned them in the last 5 minutes
|
||||
if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)
|
||||
var/list/caught_string
|
||||
var/addendum = ""
|
||||
if(target.mind.assigned_role in GLOB.command_positions)
|
||||
@@ -459,30 +453,48 @@
|
||||
LAZYADD(caught_string, "Revolutionary")
|
||||
|
||||
if(caught_string)
|
||||
alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
|
||||
tgui_alert(target, "You're a [english_list(caught_string)]! [AHELP_FIRST_MESSAGE][addendum]")
|
||||
target.client.cryo_warned = world.time
|
||||
return
|
||||
|
||||
if(!target || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
|
||||
if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
|
||||
return
|
||||
//rerun the checks in case of shenanigans
|
||||
|
||||
if(target == user)
|
||||
visible_message("[user] starts climbing into the cryo pod.")
|
||||
else
|
||||
visible_message("[user] starts putting [target] into the cryo pod.")
|
||||
// rerun the checks in case of shenanigans
|
||||
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
|
||||
to_chat(user, span_notice("[src] is already occupied!"))
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
to_chat(target, "<span class='boldnotice'>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</span>")
|
||||
name = "[name] ([occupant.name])"
|
||||
log_admin("<span class='notice'>[key_name(target)] entered a stasis pod.</span>")
|
||||
message_admins("[key_name_admin(target)] entered a stasis pod. (<A HREF='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
if(target == user)
|
||||
visible_message("<span class='infoplain'>[user] starts climbing into the cryo pod.</span>")
|
||||
else
|
||||
visible_message("<span class='infoplain'>[user] starts putting [target] into the cryo pod.</span>")
|
||||
|
||||
to_chat(target, span_warning("<b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"))
|
||||
|
||||
log_admin("[key_name(target)] entered a stasis pod.")
|
||||
message_admins("[key_name_admin(target)] entered a stasis pod. [ADMIN_JMP(src)]")
|
||||
add_fingerprint(target)
|
||||
|
||||
//Attacks/effects.
|
||||
close_machine(target)
|
||||
name = "[name] ([target.name])"
|
||||
|
||||
// Attacks/effects.
|
||||
/obj/machinery/cryopod/blob_act()
|
||||
return //Sorta gamey, but we don't really want these to be destroyed.
|
||||
return // Sorta gamey, but we don't really want these to be destroyed.
|
||||
|
||||
#undef AHELP_FIRST_MESSAGE
|
||||
|
||||
/obj/item/circuitboard/cryopodcontrol
|
||||
name = "Circuit board (Cryogenic Oversight Console)"
|
||||
build_path = /obj/machinery/computer/cryopod
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return //don't blow everyone's shit up.
|
||||
|
||||
/// The box
|
||||
/obj/item/storage/box/blue/cryostorage_items
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/real_name = "fire coderbus"
|
||||
|
||||
@@ -194,22 +194,19 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
|
||||
/*****The Point Calculator*****/
|
||||
|
||||
if(orig_light < 10)
|
||||
if(orig_light < 5)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
else
|
||||
point_gain = (100000 * orig_light) / (orig_light + 5000)
|
||||
else if(orig_light < BOMB_TARGET_SIZE) // we want to give fewer points if below the target; this curve does that
|
||||
point_gain = (BOMB_TARGET_POINTS * orig_light ** BOMB_SUB_TARGET_EXPONENT) / (BOMB_TARGET_SIZE**BOMB_SUB_TARGET_EXPONENT)
|
||||
else // once we're at the target, switch to a hyperbolic function so we can't go too far above it, but bigger bombs always get more points
|
||||
point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE)
|
||||
|
||||
/*****The Point Capper*****/
|
||||
if(point_gain > linked_techweb.largest_bomb_value)
|
||||
if(point_gain <= TECHWEB_BOMB_POINTCAP || linked_techweb.largest_bomb_value < TECHWEB_BOMB_POINTCAP)
|
||||
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
|
||||
linked_techweb.largest_bomb_value = point_gain
|
||||
point_gain -= old_tech_largest_bomb_value
|
||||
point_gain = min(point_gain,TECHWEB_BOMB_POINTCAP)
|
||||
else
|
||||
linked_techweb.largest_bomb_value = TECHWEB_BOMB_POINTCAP
|
||||
point_gain = 1000
|
||||
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
|
||||
linked_techweb.largest_bomb_value = point_gain
|
||||
point_gain -= old_tech_largest_bomb_value
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI)
|
||||
if(D)
|
||||
D.adjust_money(point_gain)
|
||||
|
||||
+101
-51
@@ -1,8 +1,8 @@
|
||||
/* Holograms!
|
||||
* Contains:
|
||||
* Holopad
|
||||
* Hologram
|
||||
* Other stuff
|
||||
* Holopad
|
||||
* Hologram
|
||||
* Other stuff
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,7 +24,6 @@ Possible to do for anyone motivated enough:
|
||||
* Holopad
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_EMPTY(network_holopads)
|
||||
#define HOLOPAD_PASSIVE_POWER_USAGE 1
|
||||
#define HOLOGRAM_POWER_USAGE 2
|
||||
|
||||
@@ -32,6 +31,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
name = "holopad"
|
||||
desc = "It's a floor-mounted device for projecting holographic images."
|
||||
icon_state = "holopad0"
|
||||
base_icon_state = "holopad"
|
||||
layer = LOW_OBJ_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
flags_1 = HEAR_1
|
||||
@@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
var/obj/effect/overlay/holo_pad_hologram/replay_holo
|
||||
/// Calls will be automatically answered after a couple rings, here for debugging
|
||||
var/static/force_answer_call = FALSE
|
||||
// var/static/list/holopads = list()
|
||||
var/static/list/holopads = list()
|
||||
var/obj/effect/overlay/holoray/ray
|
||||
var/ringing = FALSE
|
||||
var/offset = FALSE
|
||||
@@ -107,26 +107,47 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
new_disk.forceMove(src)
|
||||
disk = new_disk
|
||||
|
||||
/obj/machinery/holopad/tutorial/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/machinery/holopad/Moved(atom/OldLoc, Dir)
|
||||
. = ..()
|
||||
if(!loc)
|
||||
return
|
||||
// move any relevant holograms, basically non-AI, and rays with the pad
|
||||
if(replay_holo)
|
||||
replay_holo.abstract_move(loc)
|
||||
for(var/i in holorays)
|
||||
var/obj/effect/overlay/holoray/ray = holorays[i]
|
||||
ray.abstract_move(loc)
|
||||
var/list/non_call_masters = masters?.Copy()
|
||||
for(var/datum/holocall/holocall as anything in holo_calls)
|
||||
if(!holocall.user || !LAZYACCESS(masters, holocall.user))
|
||||
continue
|
||||
non_call_masters -= holocall.user
|
||||
// moving the eye moves the holo which updates the ray too
|
||||
holocall.eye.setLoc(locate(clamp(x + (holocall.hologram.x - OldLoc.x), 1, world.maxx), clamp(y + (holocall.hologram.y - OldLoc.y), 1, world.maxy), z))
|
||||
for(var/mob/living/holo_master as anything in non_call_masters)
|
||||
var/obj/effect/holo = masters[holo_master]
|
||||
update_holoray(holo_master, holo.loc)
|
||||
|
||||
/obj/machinery/holopad/tutorial/attack_hand(mob/user, list/modifiers)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.incapacitated() || !is_operational())
|
||||
return
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
else if(disk && disk.record)
|
||||
else if(disk?.record)
|
||||
replay_start()
|
||||
|
||||
/obj/machinery/holopad/tutorial/HasProximity(atom/movable/AM)
|
||||
if (!isliving(AM))
|
||||
return
|
||||
if(!replay_mode && (disk && disk.record))
|
||||
if(!replay_mode && (disk?.record))
|
||||
replay_start()
|
||||
|
||||
/obj/machinery/holopad/Initialize()
|
||||
. = ..()
|
||||
if(on_network)
|
||||
GLOB.network_holopads += src
|
||||
holopads += src
|
||||
|
||||
/obj/machinery/holopad/Destroy()
|
||||
if(outgoing_call)
|
||||
@@ -146,7 +167,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
QDEL_NULL(disk)
|
||||
|
||||
GLOB.network_holopads -= src
|
||||
holopads -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/power_change()
|
||||
@@ -172,8 +193,10 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
/obj/machinery/holopad/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Current projection range: <b>[holo_range]</b> units.</span>"
|
||||
if(isAI(user))
|
||||
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units. Use :h to speak through the projection. Right-click to project or cancel a projection. Alt-click to hangup all active and incomming calls. Ctrl-click to end projection without jumping to your last location.")
|
||||
else if(in_range(user, src) || isobserver(user))
|
||||
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units.")
|
||||
|
||||
/obj/machinery/holopad/attackby(obj/item/P, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
|
||||
@@ -190,11 +213,11 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
if(istype(P,/obj/item/disk/holodisk))
|
||||
if(disk)
|
||||
to_chat(user,"<span class='warning'>There's already a disk inside [src]!</span>")
|
||||
to_chat(user,span_warning("There's already a disk inside [src]!"))
|
||||
return
|
||||
if (!user.transferItemToLoc(P,src))
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You insert [P] into [src].</span>")
|
||||
to_chat(user,span_notice("You insert [P] into [src]."))
|
||||
disk = P
|
||||
return
|
||||
|
||||
@@ -242,24 +265,29 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
switch(action)
|
||||
if("AIrequest")
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/ai_user = usr
|
||||
ai_user.eyeobj.setLoc(get_turf(src))
|
||||
to_chat(usr, span_info("AIs can not request AI presence. Jumping instead."))
|
||||
return
|
||||
if(last_request + 200 < world.time)
|
||||
last_request = world.time
|
||||
to_chat(usr, "<span class='info'>You requested an AI's presence.</span>")
|
||||
to_chat(usr, span_info("You requested an AI's presence."))
|
||||
var/area/area = get_area(src)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.silicon_mobs)
|
||||
if(!AI.client)
|
||||
continue
|
||||
to_chat(AI, "<span class='info'>Your presence is requested at <a href='?src=[REF(AI)];jumptoholopad=[REF(src)]'>\the [area]</a>.</span>")
|
||||
to_chat(AI, span_info("Your presence is requested at <a href='?src=[REF(AI)];jumptoholopad=[REF(src)]'>\the [area]</a>.</span>")) // <a href='?src=[REF(AI)];project_to_holopad=[REF(src)]'>Project Hologram?</a>"))
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='info'>A request for AI presence was already sent recently.</span>")
|
||||
to_chat(usr, span_info("A request for AI presence was already sent recently."))
|
||||
return
|
||||
if("holocall")
|
||||
if(outgoing_call)
|
||||
return
|
||||
if(usr.loc == loc)
|
||||
var/list/callnames = list()
|
||||
for(var/I in GLOB.network_holopads)
|
||||
for(var/I in holopads)
|
||||
var/area/A = get_area(I)
|
||||
if(A)
|
||||
LAZYADD(callnames[A], I)
|
||||
@@ -274,7 +302,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
calling = TRUE
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You must stand on the holopad to make a call!</span>")
|
||||
to_chat(usr, span_warning("You must stand on the holopad to make a call!"))
|
||||
if("connectcall")
|
||||
var/datum/holocall/call_to_connect = locate(params["holopad"]) in holo_calls
|
||||
if(!QDELETED(call_to_connect))
|
||||
@@ -285,6 +313,12 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
if(!QDELETED(call_to_disconnect))
|
||||
call_to_disconnect.Disconnect(src)
|
||||
return TRUE
|
||||
if("rejectall")
|
||||
for(var/datum/holocall/call_to_reject as anything in holo_calls)
|
||||
if(call_to_reject.connected_holopad == src) // do not kill the current connection
|
||||
continue
|
||||
call_to_reject.Disconnect(src)
|
||||
return TRUE
|
||||
if("disk_eject")
|
||||
if(disk && !replay_mode)
|
||||
disk.forceMove(drop_location())
|
||||
@@ -327,14 +361,13 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* hangup_all_calls: Disconnects all current holocalls from the holopad
|
||||
*/
|
||||
* hangup_all_calls: Disconnects all current holocalls from the holopad
|
||||
*/
|
||||
/obj/machinery/holopad/proc/hangup_all_calls()
|
||||
for(var/I in holo_calls)
|
||||
var/datum/holocall/HC = I
|
||||
HC.Disconnect(src)
|
||||
|
||||
//do not allow AIs to answer calls or people will use it to meta the AI sattelite
|
||||
/obj/machinery/holopad/attack_ai(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
return
|
||||
@@ -343,12 +376,25 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
/*There are pretty much only three ways to interact here.
|
||||
I don't need to check for client since they're clicking on an object.
|
||||
This may change in the future but for now will suffice.*/
|
||||
if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already.
|
||||
user.eyeobj.setLoc(get_turf(src))
|
||||
else if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, possibly make one.
|
||||
if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, possibly make one.
|
||||
activate_holo(user)
|
||||
else//If there is a hologram, remove it.
|
||||
else//If there is a hologram, remove it, and jump to your last location.
|
||||
clear_holo(user)
|
||||
// if(user.lastloc)//only jump to your last location if your lastloc is set, which only sets if you projected from a request message.
|
||||
// user.eyeobj.setLoc(user.lastloc)
|
||||
// user.lastloc = null
|
||||
|
||||
/obj/machinery/holopad/AICtrlClick(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
return
|
||||
if (!on_network)
|
||||
return
|
||||
if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, then this button does nothing.
|
||||
return
|
||||
else//If there is a hologram, remove it, but dont jump to your last location.
|
||||
// user.lastloc = null
|
||||
clear_holo(user)
|
||||
return
|
||||
|
||||
/obj/machinery/holopad/process()
|
||||
if(LAZYLEN(masters))
|
||||
@@ -378,25 +424,26 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
if(outgoing_call)
|
||||
HC.Disconnect(src)//can't answer calls while calling
|
||||
else
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
ringing = TRUE
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/holopad/proc/activate_holo(mob/living/user)
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(!istype(AI))
|
||||
AI = null
|
||||
|
||||
if(is_operational() && (!AI || AI.eyeobj.loc == loc))//If the projector has power and client eye is on it
|
||||
if (AI && istype(AI.current, /obj/machinery/holopad))
|
||||
to_chat(user, "<span class='danger'>ERROR:</span> \black Image feed in progress.")
|
||||
if(is_operational())//If the projector has power
|
||||
if(AI && istype(AI.current, /obj/machinery/holopad))
|
||||
to_chat(user, "[span_danger("ERROR:")] \black Image feed in progress.")
|
||||
return
|
||||
|
||||
var/obj/effect/overlay/holo_pad_hologram/Hologram = new(loc)//Spawn a blank effect at the location.
|
||||
if(AI)
|
||||
Hologram.icon = AI.holo_icon
|
||||
else //make it like real life
|
||||
AI.eyeobj.setLoc(get_turf(src)) //ensure the AI camera moves to the holopad
|
||||
else //make it like real life
|
||||
Hologram.icon = user.icon
|
||||
Hologram.icon_state = user.icon_state
|
||||
Hologram.copy_overlays(user, TRUE)
|
||||
@@ -407,17 +454,17 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.set_anchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.name = "[user.name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
move_hologram()
|
||||
|
||||
set_holo(user, Hologram)
|
||||
visible_message("<span class='notice'>A holographic image of [user] flickers to life before your eyes!</span>")
|
||||
visible_message(span_notice("A holographic image of [user] flickers to life before your eyes!"))
|
||||
|
||||
return Hologram
|
||||
else
|
||||
to_chat(user, "<span class='danger'>ERROR:</span> Unable to project hologram.")
|
||||
to_chat(user, "[span_danger("ERROR:")] Unable to project hologram.")
|
||||
|
||||
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
@@ -430,10 +477,13 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
|
||||
for(var/I in holo_calls)
|
||||
var/datum/holocall/HC = I
|
||||
if(HC.connected_holopad == src && speaker != HC.hologram)
|
||||
HC.user.Hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
if(HC.connected_holopad == src)
|
||||
if(speaker == HC.hologram && HC.user.client?.prefs.chat_on_map)
|
||||
HC.user.create_chat_message(speaker, message_language, raw_message, spans)
|
||||
else
|
||||
HC.user.Hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
|
||||
if(outgoing_call && speaker == outgoing_call.user)
|
||||
if(outgoing_call?.hologram && speaker == outgoing_call.user)
|
||||
outgoing_call.hologram.say(raw_message)
|
||||
|
||||
if(record_mode && speaker == record_user)
|
||||
@@ -447,16 +497,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
set_light(2)
|
||||
else
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(ringing)
|
||||
icon_state = "holopad_ringing"
|
||||
else if(total_users || replay_mode)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
icon_state = "holopad0"
|
||||
icon_state = "[base_icon_state]_ringing"
|
||||
return ..()
|
||||
icon_state = "[base_icon_state][(total_users || replay_mode) ? 1 : 0]"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/proc/set_holo(mob/living/user, obj/effect/overlay/holo_pad_hologram/h)
|
||||
LAZYSET(masters, user, h)
|
||||
@@ -488,7 +537,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner]
|
||||
if(!h || h.HC) //Holocalls can't change source.
|
||||
return FALSE
|
||||
for(var/pad in GLOB.network_holopads)
|
||||
for(var/pad in holopads)
|
||||
var/obj/machinery/holopad/another = pad
|
||||
if(another == src)
|
||||
continue
|
||||
@@ -524,7 +573,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
else
|
||||
transfered = TRUE
|
||||
//All is good.
|
||||
holo.forceMove(new_turf)
|
||||
holo.abstract_move(new_turf)
|
||||
if(!transfered)
|
||||
update_holoray(user,new_turf)
|
||||
return TRUE
|
||||
@@ -565,10 +614,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
holder.selected_language = record.language
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.set_anchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message("<span class='notice'>A holographic image of [record.caller_name] flickers to life before your eyes!</span>")
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message(span_notice("A holographic image of [record.caller_name] flickers to life before your eyes!"))
|
||||
return Hologram
|
||||
|
||||
/obj/machinery/holopad/proc/replay_start()
|
||||
@@ -661,7 +710,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
record_user = null
|
||||
|
||||
/obj/machinery/holopad/proc/record_clear()
|
||||
if(disk && disk.record)
|
||||
if(disk?.record)
|
||||
QDEL_NULL(disk.record)
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram
|
||||
@@ -673,6 +722,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
Impersonation = null
|
||||
if(!QDELETED(HC))
|
||||
HC.Disconnect(HC.calling_holopad)
|
||||
HC = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
@@ -130,7 +130,11 @@
|
||||
if(isalien(target))
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target.drop_location(), splatter_dir)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
|
||||
|
||||
//organs go everywhere
|
||||
if(target_part && prob(10 * drill_level))
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
var/gibs_reagent_id = /datum/reagent/liquidgibs
|
||||
var/gibs_bloodtype = "A+"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases, list/blood_data)
|
||||
. = ..()
|
||||
if(random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
if(gibs_reagent_id)
|
||||
reagents.add_reagent(gibs_reagent_id, 5)
|
||||
reagents.add_reagent(gibs_reagent_id, 5, blood_data)
|
||||
if(gibs_bloodtype)
|
||||
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype), diseases)
|
||||
update_icon()
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
|
||||
var/list/dna_to_add //find the dna to pass to the spawned gibs. do note this can be null if the mob doesn't have blood. add_blood_DNA() has built in null handling.
|
||||
var/body_coloring = ""
|
||||
|
||||
var/list/blood_data_to_add
|
||||
if(source_mob)
|
||||
blood_data_to_add = source_mob.get_blood_data()
|
||||
if(!issilicon(source_mob))
|
||||
dna_to_add = blood_dna || source_mob.get_blood_dna_list() //ez pz
|
||||
if(ishuman(source_mob))
|
||||
@@ -65,7 +68,7 @@
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc, diseases)
|
||||
gib = new gibType(loc, diseases, blood_data_to_add)
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = BELOW_MOB_LAYER
|
||||
color = BLOOD_COLOR_HUMAN // set it to red by default because the actual icons are white
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir, new_color)
|
||||
|
||||
+74
-43
@@ -46,11 +46,23 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
max_integrity = 200
|
||||
|
||||
obj_flags = NONE
|
||||
///Item flags for the item
|
||||
var/item_flags = NONE
|
||||
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
var/throwhitsound = null
|
||||
///Sound played when you hit something with the item
|
||||
var/hitsound
|
||||
///Played when the item is used, for example tools
|
||||
var/usesound
|
||||
///Used when yate into a mob
|
||||
var/mob_throw_hit_sound
|
||||
///Sound used when equipping the item into a valid slot
|
||||
var/equip_sound
|
||||
///Sound uses when picking the item up (into your hands)
|
||||
var/pickup_sound
|
||||
///Sound uses when dropping the item, or when its thrown.
|
||||
var/drop_sound
|
||||
///Whether or not we use stealthy audio levels for this item's attack sounds
|
||||
var/stealthy_audio = FALSE
|
||||
|
||||
/// Weight class for how much storage capacity it uses and how big it physically is meaning storages can't hold it if their maximum weight class isn't as high as it.
|
||||
var/w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -129,7 +141,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/datum/dog_fashion/dog_fashion = null
|
||||
|
||||
//Tooltip vars
|
||||
var/force_string //string form of an item's force. Edit this var only to set a custom force string
|
||||
///string form of an item's force. Edit this var only to set a custom force string
|
||||
var/force_string
|
||||
var/last_force_string_check = 0
|
||||
|
||||
var/trigger_guard = TRIGGER_GUARD_NONE
|
||||
@@ -388,7 +401,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(!allow_attack_hand_drop(user) || !user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
|
||||
remove_outline()
|
||||
. = FALSE
|
||||
pickup(user)
|
||||
add_fingerprint(user)
|
||||
if(!user.put_in_active_hand(src, FALSE, FALSE))
|
||||
@@ -461,9 +474,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
item_flags &= ~(IN_INVENTORY)
|
||||
item_flags &= ~(IN_STORAGE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
|
||||
remove_outline()
|
||||
// if(!silent)
|
||||
// playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
if(!silent)
|
||||
playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
user?.update_equipment_speed_mods()
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
@@ -710,8 +722,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if (throwforce > 0)
|
||||
if (throwhitsound)
|
||||
playsound(hit_atom, throwhitsound, volume, TRUE, -1)
|
||||
if (mob_throw_hit_sound)
|
||||
playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1)
|
||||
else if(hitsound)
|
||||
playsound(hit_atom, hitsound, volume, TRUE, -1)
|
||||
else
|
||||
@@ -719,8 +731,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1)
|
||||
|
||||
// else
|
||||
// playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
else if (drop_sound)
|
||||
playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
@@ -894,47 +906,55 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_ENTER, location, control, params)
|
||||
if((item_flags & IN_INVENTORY || item_flags & IN_STORAGE) && usr?.client.prefs.enable_tips && !QDELETED(src))
|
||||
var/timedelay = max(usr.client.prefs.tip_delay * 0.01, 0.01) // I heard multiplying is faster, also runtimes from very low/negative numbers
|
||||
usr.client.tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, usr), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
var/mob/living/L = usr
|
||||
if(istype(L) && (L.incapacitated() || (current_equipped_slot in L.check_obscured_slots()) || !L.canUnEquip(src)))
|
||||
apply_outline(_size = 3)
|
||||
else
|
||||
apply_outline()
|
||||
if(get(src, /mob) == usr && !QDELETED(src))
|
||||
var/mob/living/L = usr
|
||||
if(usr.client.prefs.enable_tips)
|
||||
var/timedelay = usr.client.prefs.tip_delay/100
|
||||
usr.client.tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, usr), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
if(usr.client.prefs.outline_enabled)
|
||||
if(istype(L) && L.incapacitated())
|
||||
apply_outline(COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now
|
||||
else
|
||||
apply_outline(usr.client.prefs.outline_color) //if the player's alive and well we send the command with no color set, so it uses the theme's color
|
||||
|
||||
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
. = ..()
|
||||
remove_outline()
|
||||
remove_filter("hover_outline") //get rid of the hover effect in case the mouse exit isn't called if someone drags and drops an item and somthing goes wrong
|
||||
|
||||
/obj/item/MouseExited(location,control,params)
|
||||
/obj/item/MouseExited(location, control, params)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_EXIT, location, control, params)
|
||||
deltimer(usr.client.tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
|
||||
closeToolTip(usr)
|
||||
remove_outline()
|
||||
remove_filter("hover_outline")
|
||||
|
||||
/obj/item/proc/apply_outline(colour = null, _size=1)
|
||||
if(!(item_flags & IN_INVENTORY || item_flags & IN_STORAGE) || QDELETED(src) || isobserver(usr))
|
||||
/obj/item/proc/apply_outline(outline_color = null)
|
||||
if(get(src, /mob) != usr || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow)
|
||||
return
|
||||
if(usr.client)
|
||||
if(!usr.client.prefs.outline_enabled)
|
||||
return
|
||||
if(!colour)
|
||||
if(usr.client)
|
||||
colour = usr.client.prefs.outline_color
|
||||
if(!colour)
|
||||
colour = COLOR_BLUE_GRAY
|
||||
else
|
||||
colour = COLOR_BLUE_GRAY
|
||||
if(outline_filter)
|
||||
filters -= outline_filter
|
||||
outline_filter = filter(type="outline", size=_size, color=colour)
|
||||
filters += outline_filter
|
||||
var/theme = lowertext(usr.client.prefs.UI_style)
|
||||
if(!outline_color) //if we weren't provided with a color, take the theme's color
|
||||
switch(theme) //yeah it kinda has to be this way
|
||||
if("midnight")
|
||||
outline_color = COLOR_THEME_MIDNIGHT
|
||||
if("plasmafire")
|
||||
outline_color = COLOR_THEME_PLASMAFIRE
|
||||
if("retro")
|
||||
outline_color = COLOR_THEME_RETRO //just as garish as the rest of this theme
|
||||
if("slimecore")
|
||||
outline_color = COLOR_THEME_SLIMECORE
|
||||
if("operative")
|
||||
outline_color = COLOR_THEME_OPERATIVE
|
||||
if("clockwork")
|
||||
outline_color = COLOR_THEME_CLOCKWORK //if you want free gbp go fix the fact that clockwork's tooltip css is glass'
|
||||
if("glass")
|
||||
outline_color = COLOR_THEME_GLASS
|
||||
else //this should never happen, hopefully
|
||||
outline_color = COLOR_WHITE
|
||||
if(color)
|
||||
outline_color = COLOR_WHITE //if the item is recolored then the outline will be too, let's make the outline white so it becomes the same color instead of some ugly mix of the theme and the tint
|
||||
|
||||
/obj/item/proc/remove_outline()
|
||||
if(outline_filter)
|
||||
filters -= outline_filter
|
||||
outline_filter = null
|
||||
add_filter("hover_outline", 1, list("type" = "outline", "size" = 1, "color" = outline_color))
|
||||
|
||||
// Called when a mob tries to use the item as a tool.
|
||||
// Handles most checks.
|
||||
@@ -1216,3 +1236,14 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
pain_stam_pct = (!isnull(embedding["pain_stam_pct"]) ? embedding["pain_stam_pct"] : EMBEDDED_PAIN_STAM_PCT),\
|
||||
embed_chance_turf_mod = (!isnull(embedding["embed_chance_turf_mod"]) ? embedding["embed_chance_turf_mod"] : EMBED_CHANCE_TURF_MOD))
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Updates all action buttons associated with this item
|
||||
*
|
||||
* Arguments:
|
||||
* * status_only - Update only current availability status of the buttons to show if they are ready or not to use
|
||||
* * force - Force buttons update even if the given button icon state has not changed
|
||||
*/
|
||||
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.UpdateButtonIcon(status_only, force)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
rad_flags = RAD_NO_CONTAMINATE
|
||||
item_flags = NOBLUDGEON
|
||||
custom_materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
|
||||
|
||||
var/grace = RAD_GRACE_PERIOD
|
||||
@@ -35,17 +36,15 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop = new(src, FALSE)
|
||||
|
||||
/obj/item/geiger_counter/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(soundloop)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/process()
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/process(delta_time)
|
||||
if(!scanning)
|
||||
current_tick_amount = 0
|
||||
return
|
||||
@@ -64,49 +63,55 @@
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
update_appearance()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
. = ..()
|
||||
if(!scanning)
|
||||
return
|
||||
. += "<span class='info'>Alt-click it to clear stored radiation levels.</span>"
|
||||
. += span_info("Alt-click it to clear stored radiation levels.")
|
||||
if(obj_flags & EMAGGED)
|
||||
. += "<span class='warning'>The display seems to be incomprehensible.</span>"
|
||||
. += span_warning("The display seems to be incomprehensible.")
|
||||
return
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
. += "<span class='notice'>Ambient radiation level count reports that all is well.</span>"
|
||||
. += span_notice("Ambient radiation level count reports that all is well.")
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
. += "<span class='disarm'>Ambient radiation levels slightly above average.</span>"
|
||||
. += span_alert("Ambient radiation levels slightly above average.")
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
. += "<span class='warning'>Ambient radiation levels above average.</span>"
|
||||
. += span_warning("Ambient radiation levels above average.")
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
. += "<span class='danger'>Ambient radiation levels highly above average.</span>"
|
||||
. += span_danger("Ambient radiation levels highly above average.")
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
. += "<span class='suicide'>Ambient radiation levels nearing critical level.</span>"
|
||||
. += span_suicide("Ambient radiation levels nearing critical level.")
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
. += "<span class='boldannounce'>Ambient radiation levels above critical level!</span>"
|
||||
. += span_boldannounce("Ambient radiation levels above critical level!")
|
||||
|
||||
. += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
|
||||
. += span_notice("The last radiation amount detected was [last_tick_amount]")
|
||||
|
||||
/obj/item/geiger_counter/update_icon_state()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
else if(obj_flags & EMAGGED)
|
||||
return ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
icon_state = "geiger_on_emag"
|
||||
else
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/proc/update_sound()
|
||||
var/datum/looping_sound/geiger/loop = soundloop
|
||||
@@ -124,21 +129,21 @@
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
update_appearance()
|
||||
to_chat(user, span_notice("[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src]."))
|
||||
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/user)
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/living/user)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='notice'>You scan [target]'s radiation levels with [src]...</span>")
|
||||
user.visible_message(span_notice("[user] scans [target] with [src]."), span_notice("You scan [target]'s radiation levels with [src]..."))
|
||||
addtimer(CALLBACK(src, .proc/scan, target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [target]!</span>")
|
||||
user.visible_message(span_notice("[user] scans [target] with [src]."), span_danger("You project [src]'s stored radiation into [target]!"))
|
||||
target.rad_act(radiation_count)
|
||||
radiation_count = 0
|
||||
return TRUE
|
||||
@@ -156,57 +161,61 @@
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(!M.radiation)
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
|
||||
to_chat(user, span_notice("[icon2html(src, user)] Radiation levels within normal boundaries."))
|
||||
else
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation] rad.</span>")
|
||||
to_chat(user, span_boldannounce("[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation]."))
|
||||
|
||||
if(rad_strength)
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]</span>")
|
||||
to_chat(user, span_boldannounce("[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]"))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
to_chat(user, span_notice("[icon2html(src, user)] Target is free of radioactive contamination."))
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
to_chat(user, span_warning("Turn off [src] before you perform this action!"))
|
||||
return FALSE
|
||||
user.visible_message(span_notice("[user] unscrews [src]'s maintenance panel and begins fiddling with its innards..."), span_notice("You begin resetting [src]..."))
|
||||
if(!I.use_tool(src, user, 40, volume=50))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
return FALSE
|
||||
user.visible_message(span_notice("[user] refastens [src]'s maintenance panel!"), span_notice("You reset [src] to its factory settings!"))
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
return 1
|
||||
update_appearance()
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
return TRUE
|
||||
to_chat(usr, span_warning("[src] must be on to reset its radiation level!"))
|
||||
return
|
||||
radiation_count = 0
|
||||
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
to_chat(usr, span_notice("You flush [src]'s radiation counts, resetting it to normal."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
to_chat(user, span_warning("Turn off [src] before you perform this action!"))
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
to_chat(user, span_warning("You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan."))
|
||||
obj_flags |= EMAGGED
|
||||
return TRUE
|
||||
|
||||
/obj/item/geiger_counter/cyborg
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/geiger_counter/cyborg/cyborg_unequip(mob/user)
|
||||
if(!scanning)
|
||||
return
|
||||
scanning = FALSE
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo == user)
|
||||
@@ -217,6 +226,7 @@
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
SIGNAL_HANDLER
|
||||
rad_act(amount)
|
||||
|
||||
/obj/item/geiger_counter/cyborg/dropped(mob/user)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
/obj/item/reverse_bear_trap/Initialize()
|
||||
. = ..()
|
||||
soundloop = new(list(src))
|
||||
soundloop2 = new(list(src))
|
||||
soundloop = new(src)
|
||||
soundloop2 = new(src)
|
||||
|
||||
/obj/item/reverse_bear_trap/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
@@ -33,16 +33,16 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reverse_bear_trap/process()
|
||||
/obj/item/reverse_bear_trap/process(delta_time)
|
||||
if(!ticking)
|
||||
return
|
||||
time_left--
|
||||
time_left -= delta_time
|
||||
soundloop2.mid_length = max(0.5, time_left - 5) //beepbeepbeepbeepbeep
|
||||
if(!time_left || !isliving(loc))
|
||||
if(time_left <= 0 || !isliving(loc))
|
||||
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
|
||||
soundloop.stop()
|
||||
soundloop2.stop()
|
||||
to_chat(loc, "<span class='userdanger'>*ding*</span>")
|
||||
to_chat(loc, span_userdanger("*ding*"))
|
||||
addtimer(CALLBACK(src, .proc/snap), 2)
|
||||
|
||||
/obj/item/reverse_bear_trap/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
@@ -116,13 +116,22 @@
|
||||
|
||||
/obj/item/reverse_bear_trap/proc/reset()
|
||||
ticking = FALSE
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
|
||||
soundloop.stop()
|
||||
soundloop2.stop()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/reverse_bear_trap/update_overlays()
|
||||
. = ..()
|
||||
if(ticking != TRUE)
|
||||
return
|
||||
/// note: this timer overlay increments one frame every second (to simulate a clock ticking). If you want to instead have it do a full cycle in a minute, set the 'delay' of each frame of the icon overlay to 75 rather than 10, and the worn overlay to twice that.
|
||||
// . += "rbt_ticking"
|
||||
|
||||
/obj/item/reverse_bear_trap/proc/arm() //hulen
|
||||
ticking = TRUE
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
escape_chance = initial(escape_chance) //we keep these vars until re-arm, for tracking purposes
|
||||
time_left = initial(time_left)
|
||||
ADD_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
|
||||
|
||||
@@ -325,7 +325,7 @@ GENETICS SCANNER
|
||||
var/breathes = TRUE
|
||||
var/blooded = TRUE
|
||||
if(C.dna && C.dna.species)
|
||||
if(HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
if(!HAS_TRAIT_FROM(C, TRAIT_AUXILIARY_LUNGS, SPECIES_TRAIT) && HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in C.dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
@@ -434,12 +434,13 @@ GENETICS SCANNER
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
|
||||
|
||||
if((C.scan_blood_volume() + C.integrating_blood) <= (BLOOD_VOLUME_SAFE * C.blood_ratio) && (C.scan_blood_volume() + C.integrating_blood) > (BLOOD_VOLUME_OKAY*C.blood_ratio))
|
||||
msg += "<span class='danger'>LOW blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
msg += "<span class='danger'>LOW [HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "coolant" : "blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else if((C.scan_blood_volume() + C.integrating_blood) <= (BLOOD_VOLUME_OKAY * C.blood_ratio))
|
||||
msg += "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
msg += "<span class='danger'>CRITICAL [HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "coolant" : "blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else
|
||||
msg += "<span class='info'>Blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""]. type: [blood_type]</span>\n"
|
||||
msg += "<span class='info'>[HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "Coolant" : "Blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""]. type: [blood_type]</span>\n"
|
||||
|
||||
|
||||
var/cyberimp_detect
|
||||
|
||||
@@ -20,4 +20,7 @@
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
starting_tc = TELECRYSTALS_PRELOADED_IMPLANT
|
||||
|
||||
/obj/item/implant/uplink/starting
|
||||
starting_tc = TELECRYSTALS_DEFAULT - UPLINK_IMPLANT_TELECRYSTAL_COST
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber
|
||||
possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
|
||||
unique_reskin = list("Sword" = "sword0", "saber" = "esaber0")
|
||||
unique_reskin = list("Sword" = "sword0", "Saber" = "esaber0")
|
||||
var/hacked = FALSE
|
||||
var/saber = FALSE
|
||||
|
||||
|
||||
@@ -488,6 +488,9 @@
|
||||
icon_state = "nanogel"
|
||||
var/being_applied = FALSE //No doafter stacking.
|
||||
|
||||
/obj/item/stack/medical/nanogel/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/nanogel/try_heal(mob/living/M, mob/user, silent = FALSE)
|
||||
if(being_applied)
|
||||
to_chat(user, "<span class='warning'>You are already applying [src]!</span>")
|
||||
|
||||
@@ -291,8 +291,8 @@
|
||||
message_admins("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react(src)
|
||||
air_contents.react(src)
|
||||
for(var/i in 1 to TANK_POST_FRAGMENT_REACTIONS)
|
||||
air_contents.react(src)
|
||||
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
var/author_ckey
|
||||
var/icon_generated = FALSE
|
||||
var/icon/generated_icon
|
||||
///boolean that blocks persistence from saving it. enabled from printing copies, because we do not want to save copies.
|
||||
var/no_save = FALSE
|
||||
|
||||
// Painting overlay offset when framed
|
||||
var/framed_offset_x = 11
|
||||
@@ -370,7 +372,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !current_canvas)
|
||||
if(!persistence_id || !current_canvas || current_canvas.no_save)
|
||||
return
|
||||
if(sanitize_filename(persistence_id) != persistence_id)
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/machinery/manned_turret/Destroy()
|
||||
target = null
|
||||
target_turf = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//BUCKLE HOOKS
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define MAX_NOTICES 5
|
||||
|
||||
/obj/structure/noticeboard
|
||||
name = "notice board"
|
||||
desc = "A board for pinning important notices upon."
|
||||
@@ -7,8 +9,25 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
max_integrity = 150
|
||||
/// Current number of a pinned notices
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/directional/north
|
||||
dir = SOUTH
|
||||
pixel_y = 32
|
||||
|
||||
/obj/structure/noticeboard/directional/south
|
||||
dir = NORTH
|
||||
pixel_y = -32
|
||||
|
||||
/obj/structure/noticeboard/directional/east
|
||||
dir = WEST
|
||||
pixel_x = 32
|
||||
|
||||
/obj/structure/noticeboard/directional/west
|
||||
dir = EAST
|
||||
pixel_x = -32
|
||||
|
||||
/obj/structure/noticeboard/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -16,7 +35,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(notices > 4)
|
||||
if(notices >= MAX_NOTICES)
|
||||
break
|
||||
if(istype(I, /obj/item/paper))
|
||||
I.forceMove(src)
|
||||
@@ -27,67 +46,84 @@
|
||||
/obj/structure/noticeboard/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo))
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>You are not authorized to add notices</span>")
|
||||
to_chat(user, span_warning("You are not authorized to add notices!"))
|
||||
return
|
||||
if(notices < 5)
|
||||
if(notices < MAX_NOTICES)
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
to_chat(user, "<span class='notice'>You pin the [O] to the noticeboard.</span>")
|
||||
to_chat(user, span_notice("You pin the [O] to the noticeboard."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The notice board is full</span>")
|
||||
to_chat(user, span_warning("The notice board is full!"))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/interact(mob/user)
|
||||
ui_interact(user)
|
||||
/obj/structure/noticeboard/ui_state(mob/user)
|
||||
return GLOB.physical_state
|
||||
|
||||
/obj/structure/noticeboard/ui_interact(mob/user)
|
||||
/obj/structure/noticeboard/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "NoticeBoard", name)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/noticeboard/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["allowed"] = allowed(user)
|
||||
data["items"] = list()
|
||||
for(var/obj/item/content in contents)
|
||||
var/list/content_data = list(
|
||||
name = content.name,
|
||||
ref = REF(content)
|
||||
)
|
||||
data["items"] += list(content_data)
|
||||
return data
|
||||
|
||||
/obj/structure/noticeboard/ui_act(action, params)
|
||||
. = ..()
|
||||
var/auth = allowed(user)
|
||||
var/dat = "<B>[name]</B><BR>"
|
||||
for(var/obj/item/P in src)
|
||||
if(istype(P, /obj/item/paper))
|
||||
dat += "<A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A> [auth ? "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A>" : ""]<BR>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A> [auth ? "<A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A>" : ""]<BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
if(.)
|
||||
return
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
usr.set_machine(src)
|
||||
if(href_list["remove"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/I = locate(href_list["remove"]) in contents
|
||||
if(istype(I) && I.loc == src)
|
||||
I.forceMove(usr.loc)
|
||||
usr.put_in_hands(I)
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
var/obj/item/item = locate(params["ref"]) in contents
|
||||
if(!istype(item) || item.loc != src)
|
||||
return
|
||||
|
||||
if(href_list["write"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"]) in contents
|
||||
if(istype(P) && P.loc == src)
|
||||
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/pen)
|
||||
if(I)
|
||||
add_fingerprint(usr)
|
||||
P.attackby(I, usr)
|
||||
var/mob/user = usr
|
||||
|
||||
switch(action)
|
||||
if("examine")
|
||||
if(istype(item, /obj/item/paper))
|
||||
item.ui_interact(user)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You'll need something to write with!</span>")
|
||||
user.examinate(item)
|
||||
return TRUE
|
||||
if("remove")
|
||||
if(!allowed(user))
|
||||
return
|
||||
remove_item(item, user)
|
||||
return TRUE
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/I = locate(href_list["read"]) in contents
|
||||
if(istype(I) && I.loc == src)
|
||||
usr.examinate(I)
|
||||
/**
|
||||
* Removes an item from the notice board
|
||||
*
|
||||
* Arguments:
|
||||
* * item - The item that is to be removed
|
||||
* * user - The mob that is trying to get the item removed, if there is one
|
||||
*/
|
||||
/obj/structure/noticeboard/proc/remove_item(obj/item/item, mob/user)
|
||||
item.forceMove(drop_location())
|
||||
if(user)
|
||||
user.put_in_hands(item)
|
||||
balloon_alert(user, "removed from board")
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/metal (loc, 1)
|
||||
for(var/obj/item/content in contents)
|
||||
remove_item(content)
|
||||
qdel(src)
|
||||
|
||||
// Notice boards for the heads of staff (plus the qm)
|
||||
@@ -131,3 +167,5 @@
|
||||
name = "Staff Notice Board"
|
||||
desc = "Important notices from the heads of staff."
|
||||
req_access = list(ACCESS_HEADS)
|
||||
|
||||
#undef MAX_NOTICES
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
/obj/machinery/shower/Initialize()
|
||||
. = ..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop = new(src, FALSE)
|
||||
|
||||
/obj/machinery/shower/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
/turf/open/floor/plating/catwalk_floor/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
covered = !covered
|
||||
to_chat(user, span_notice("[!covered ? "You removed the cover!" : "You added the cover!"]"))
|
||||
user.balloon_alert(user, "[!covered ? "cover removed" : "cover added"]")
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/turf/open/floor/plating/catwalk_floor/pry_tile(obj/item/crowbar, mob/user, silent)
|
||||
if(covered)
|
||||
to_chat(user, span_notice("You need to remove the cover first!"))
|
||||
user.balloon_alert(user, "remove cover first!")
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
@@ -111,6 +111,7 @@ GLOBAL_LIST(topic_status_cache)
|
||||
GLOB.picture_log_directory = "data/picture_logs/[override_dir]"
|
||||
|
||||
GLOB.world_game_log = "[GLOB.log_directory]/game.log"
|
||||
GLOB.world_suspicious_login_log = "[GLOB.log_directory]/suspicious_logins.log"
|
||||
GLOB.world_virus_log = "[GLOB.log_directory]/virus.log"
|
||||
GLOB.world_asset_log = "[GLOB.log_directory]/asset.log"
|
||||
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
var/selectors_used = FALSE
|
||||
var/list/combined_refs = list()
|
||||
do
|
||||
CHECK_TICK
|
||||
stoplag(2)
|
||||
finished = TRUE
|
||||
for(var/i in running)
|
||||
var/datum/SDQL2_query/query = i
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Object"
|
||||
|
||||
if((O.obj_flags & DANGEROUS_POSSESSION) && CONFIG_GET(flag/forbid_singulo_possession))
|
||||
to_chat(usr, "[O] is too powerful for you to possess.")
|
||||
to_chat(usr, "[O] is too powerful for you to possess.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
@@ -18,19 +18,22 @@
|
||||
if(!usr.control_object) //If you're not already possessing something...
|
||||
usr.name_archive = usr.real_name
|
||||
|
||||
usr.loc = O
|
||||
usr.forceMove(O)
|
||||
usr.real_name = O.name
|
||||
usr.name = O.name
|
||||
usr.reset_perspective(O)
|
||||
usr.control_object = O
|
||||
O.AddElement(/datum/element/weather_listener, /datum/weather/ash_storm, ZTRAIT_ASHSTORM, GLOB.ash_storm_sounds)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/release()
|
||||
set name = "Release Obj"
|
||||
set category = "Object"
|
||||
//usr.loc = get_turf(usr)
|
||||
|
||||
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
if(!usr.control_object) //lest we are banished to the nullspace realm.
|
||||
return
|
||||
|
||||
if(usr.name_archive) //if you have a name archived
|
||||
usr.real_name = usr.name_archive
|
||||
usr.name_archive = ""
|
||||
usr.name = usr.real_name
|
||||
@@ -38,8 +41,8 @@
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.name = H.get_visible_name()
|
||||
|
||||
|
||||
usr.loc = get_turf(usr.control_object)
|
||||
usr.control_object.RemoveElement(/datum/element/weather_listener, /datum/weather/ash_storm, ZTRAIT_ASHSTORM, GLOB.ash_storm_sounds)
|
||||
usr.forceMove(get_turf(usr.control_object))
|
||||
usr.reset_perspective()
|
||||
usr.control_object = null
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
. = TRUE
|
||||
if("mass_apply")
|
||||
if(!check_rights_for(usr.client, R_FUN))
|
||||
to_chat(usr, "<span class='userdanger>Stay in your lane, jannie.</span>'")
|
||||
to_chat(usr, span_userdanger("Stay in your lane, jannie."))
|
||||
return
|
||||
var/target_path = text2path(params["path"])
|
||||
if(!target_path)
|
||||
|
||||
@@ -1,33 +1,70 @@
|
||||
GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
/datum/antagonist
|
||||
///Public name for this antagonist. Appears for player prompts and round-end reports.
|
||||
var/name = "Antagonist"
|
||||
var/roundend_category = "other antagonists" //Section of roundend report, datums with same category will be displayed together, also default header for the section
|
||||
var/show_in_roundend = TRUE //Set to false to hide the antagonists from roundend report
|
||||
var/datum/mind/owner //Mind that owns this datum
|
||||
var/silent = FALSE //Silent will prevent the gain/lose texts to show
|
||||
var/can_coexist_with_others = TRUE //Whether or not the person will be able to have more than one datum
|
||||
var/list/typecache_datum_blacklist = list() //List of datums this type can't coexist with
|
||||
var/delete_on_mind_deletion = TRUE
|
||||
///Section of roundend report, datums with same category will be displayed together, also default header for the section
|
||||
var/roundend_category = "other antagonists"
|
||||
///Set to false to hide the antagonists from roundend report
|
||||
var/show_in_roundend = TRUE
|
||||
///If false, the roundtype will still convert with this antag active
|
||||
var/prevent_roundtype_conversion = TRUE
|
||||
///Mind that owns this datum
|
||||
var/datum/mind/owner
|
||||
///Silent will prevent the gain/lose texts to show
|
||||
var/silent = FALSE
|
||||
///Whether or not the person will be able to have more than one datum
|
||||
var/can_coexist_with_others = TRUE
|
||||
///List of datums this type can't coexist with
|
||||
var/list/typecache_datum_blacklist = list()
|
||||
///The define string we use to identify the role for bans/player polls to spawn a random new one in.
|
||||
var/job_rank
|
||||
var/replace_banned = TRUE //Should replace jobbaned player with ghosts if granted.
|
||||
///Should replace jobbanned player with ghosts if granted.
|
||||
var/replace_banned = TRUE
|
||||
///List of the objective datums that this role currently has, completing all objectives at round-end will cause this antagonist to greentext.
|
||||
var/list/objectives = list()
|
||||
var/antag_memory = ""//These will be removed with antag datum
|
||||
var/antag_moodlet //typepath of moodlet that the mob will gain with their status
|
||||
///String dialogue that is added to the player's in-round notes and memories regarding specifics of that antagonist, eg. the nuke code for nuke ops, or your unlock code for traitors.
|
||||
var/antag_memory = ""
|
||||
///typepath of moodlet that the mob will gain when granted this antagonist type.
|
||||
var/antag_moodlet
|
||||
|
||||
///What is the configuration of this antagonist's hud icon, such as it's screen position and style, so thatit doesn't break other in-game hud icons.
|
||||
var/antag_hud_type
|
||||
///Name of the antag hud we provide to this mob.
|
||||
var/antag_hud_name
|
||||
/// If above 0, this is the multiplier for the speed at which we hijack the shuttle. Do not directly read, use hijack_speed().
|
||||
var/hijack_speed = 0
|
||||
|
||||
/// If set to true, the antag will not be added to the living antag list.
|
||||
var/soft_antag = FALSE
|
||||
/// The battlecry this antagonist shouts when suiciding with C4/X4.
|
||||
var/suicide_cry = ""
|
||||
//Antag panel properties
|
||||
var/show_in_antagpanel = TRUE //This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
|
||||
var/antagpanel_category = "Uncategorized" //Antagpanel will display these together, REQUIRED
|
||||
var/show_name_in_check_antagonists = FALSE //Will append antagonist name in admin listings - use for categories that share more than one antag type
|
||||
var/list/blacklisted_quirks = list(/datum/quirk/nonviolent,/datum/quirk/mute) // Quirks that will be removed upon gaining this antag. Pacifist and mute are default.
|
||||
var/threat = 0 // Amount of threat this antag poses, for dynamic mode
|
||||
var/show_to_ghosts = FALSE // Should this antagonist be shown as antag to ghosts? Shouldn't be used for stealthy antagonists like traitors
|
||||
///This will hide adding this antag type in antag panel, use only for internal subtypes that shouldn't be added directly but still show if possessed by mind
|
||||
var/show_in_antagpanel = TRUE
|
||||
///Antagpanel will display these together, REQUIRED
|
||||
var/antagpanel_category = "Uncategorized"
|
||||
///Will append antagonist name in admin listings - use for categories that share more than one antag type
|
||||
var/show_name_in_check_antagonists = FALSE
|
||||
/// Should this antagonist be shown as antag to ghosts? Shouldn't be used for stealthy antagonists like traitors
|
||||
var/show_to_ghosts = FALSE
|
||||
|
||||
/* CIT SPECIFIC */
|
||||
/// Quirks that will be removed upon gaining this antag. Pacifist and mute are default.
|
||||
var/list/blacklisted_quirks = list(/datum/quirk/nonviolent,/datum/quirk/mute)
|
||||
/// Amount of threat this antag poses, for dynamic mode
|
||||
var/threat = 0
|
||||
|
||||
var/delete_on_mind_deletion = TRUE
|
||||
|
||||
var/list/skill_modifiers
|
||||
/* CIT SPECIFIC end */
|
||||
|
||||
//ANTAG UI
|
||||
|
||||
///name of the UI that will try to open, right now having nothing means this won't exist but in the future all should.
|
||||
var/ui_name
|
||||
///button to access antag interface
|
||||
var/datum/action/antag_info/info_button
|
||||
|
||||
/datum/antagonist/New()
|
||||
GLOB.antagonists += src
|
||||
@@ -35,7 +72,9 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
/datum/antagonist/Destroy()
|
||||
GLOB.antagonists -= src
|
||||
if(owner)
|
||||
if(!owner)
|
||||
stack_trace("Destroy()ing antagonist datum when it has no owner.")
|
||||
else
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
owner = null
|
||||
return ..()
|
||||
@@ -55,14 +94,14 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/specialization(datum/mind/new_owner)
|
||||
return src
|
||||
|
||||
///Called by the transfer_to() mind proc after the mind (mind.current and new_character.mind) has moved but before the player (key and client) is transfered.
|
||||
///Called by the transfer_to() mind proc after the mind (mind.current and new_character.mind) has moved but before the player (key and client) is transfered.
|
||||
/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
remove_innate_effects(old_body)
|
||||
if(old_body.stat != DEAD && !LAZYLEN(old_body.mind?.antag_datums))
|
||||
if(!soft_antag && old_body.stat != DEAD && !LAZYLEN(old_body.mind?.antag_datums))
|
||||
old_body.remove_from_current_living_antags()
|
||||
apply_innate_effects(new_body)
|
||||
if(new_body.stat != DEAD)
|
||||
if(!soft_antag && new_body.stat != DEAD)
|
||||
new_body.add_to_current_living_antags()
|
||||
|
||||
//This handles the application of antag huds/special abilities
|
||||
@@ -73,46 +112,76 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/proc/remove_innate_effects(mob/living/mob_override)
|
||||
return
|
||||
|
||||
/// This is called when the antagonist is being mindshielded.
|
||||
/datum/antagonist/proc/pre_mindshield(mob/implanter, mob/living/mob_override)
|
||||
SIGNAL_HANDLER
|
||||
// return COMPONENT_MINDSHIELD_PASSED
|
||||
|
||||
/// This is called when the antagonist is successfully mindshielded.
|
||||
/datum/antagonist/proc/on_mindshield(mob/implanter, mob/living/mob_override)
|
||||
SIGNAL_HANDLER
|
||||
return
|
||||
|
||||
// Adds the specified antag hud to the player. Usually called in an antag datum file
|
||||
/datum/antagonist/proc/add_antag_hud(antag_hud_type, antag_hud_name, mob/living/mob_override)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[antag_hud_type]
|
||||
hud.join_hud(mob_override)
|
||||
set_antag_hud(mob_override, antag_hud_name)
|
||||
|
||||
|
||||
// Removes the specified antag hud from the player. Usually called in an antag datum file
|
||||
/datum/antagonist/proc/remove_antag_hud(antag_hud_type, mob/living/mob_override)
|
||||
var/datum/atom_hud/antag/hud = GLOB.huds[antag_hud_type]
|
||||
hud.leave_hud(mob_override)
|
||||
set_antag_hud(mob_override, null)
|
||||
|
||||
// Handles adding and removing the clumsy mutation from clown antags. Gets called in apply/remove_innate_effects
|
||||
|
||||
/// Handles adding and removing the clumsy mutation from clown antags. Gets called in apply/remove_innate_effects
|
||||
/datum/antagonist/proc/handle_clown_mutation(mob/living/mob_override, message, removing = TRUE)
|
||||
var/mob/living/carbon/human/H = mob_override
|
||||
if(H && istype(H) && owner.assigned_role == "Clown")
|
||||
if(removing) // They're a clown becoming an antag, remove clumsy
|
||||
H.dna.remove_mutation(CLOWNMUT)
|
||||
if(!silent && message)
|
||||
to_chat(H, "<span class='boldnotice'>[message]</span>")
|
||||
else
|
||||
H.dna.add_mutation(CLOWNMUT) // We're removing their antag status, add back clumsy
|
||||
if(!ishuman(mob_override) || owner.assigned_role != "Clown")
|
||||
return
|
||||
var/mob/living/carbon/human/human_override = mob_override
|
||||
if(removing) // They're a clown becoming an antag, remove clumsy
|
||||
human_override.dna.remove_mutation(CLOWNMUT)
|
||||
if(!silent && message)
|
||||
to_chat(human_override, span_boldnotice("[message]"))
|
||||
else
|
||||
human_override.dna.add_mutation(CLOWNMUT) // We're removing their antag status, add back clumsy
|
||||
|
||||
|
||||
//Assign default team and creates one for one of a kind team antagonists
|
||||
/datum/antagonist/proc/create_team(datum/team/team)
|
||||
return
|
||||
|
||||
///Called by the add_antag_datum() mind proc after the instanced datum is added to the mind's antag_datums list.
|
||||
///Called by the add_antag_datum() mind proc after the instanced datum is added to the mind's antag_datums list.
|
||||
/datum/antagonist/proc/on_gain()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
set waitfor = FALSE
|
||||
if(!(owner?.current))
|
||||
return
|
||||
if(!owner)
|
||||
CRASH("[src] ran on_gain() without a mind")
|
||||
if(!owner.current)
|
||||
CRASH("[src] ran on_gain() on a mind without a mob")
|
||||
if(ui_name)//in the future, this should entirely replace greet.
|
||||
info_button = new(owner.current, src)
|
||||
info_button.Grant(owner.current)
|
||||
if(!silent)
|
||||
greet()
|
||||
if(ui_name)
|
||||
to_chat(owner.current, span_big("You are \a [src]."))
|
||||
to_chat(owner.current, span_boldnotice("For more info, read the panel. you can always come back to it using the button in the top left."))
|
||||
info_button.Trigger()
|
||||
apply_innate_effects()
|
||||
give_antag_moodies()
|
||||
remove_blacklisted_quirks()
|
||||
// RegisterSignal(owner, COMSIG_PRE_MINDSHIELD_IMPLANT, .proc/pre_mindshield)
|
||||
// RegisterSignal(owner, COMSIG_MINDSHIELD_IMPLANTED, .proc/on_mindshield)
|
||||
if(is_banned(owner.current) && replace_banned)
|
||||
replace_banned_player()
|
||||
// else if(owner.current.client?.holder && (CONFIG_GET(flag/auto_deadmin_antagonists) || owner.current.client.prefs?.toggles & DEADMIN_ANTAGONIST))
|
||||
// owner.current.client.holder.auto_deadmin()
|
||||
if(!soft_antag && owner.current.stat != DEAD)
|
||||
owner.current.add_to_current_living_antags()
|
||||
|
||||
// cit skill
|
||||
if(skill_modifiers)
|
||||
for(var/A in skill_modifiers)
|
||||
ADD_SINGLETON_SKILL_MODIFIER(owner, A, type)
|
||||
@@ -120,61 +189,95 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
if(istype(M))
|
||||
M.name = "[name] Training"
|
||||
owner.current.AddComponent(/datum/component/activity)
|
||||
if(owner.current.stat != DEAD)
|
||||
owner.current.add_to_current_living_antags()
|
||||
SEND_SIGNAL(owner.current, COMSIG_MOB_ANTAG_ON_GAIN, src)
|
||||
|
||||
|
||||
/**
|
||||
* Proc that checks the sent mob aganst the banlistfor this antagonist.
|
||||
* Returns FALSE if no mob is sent, or the mob is not found to be banned.
|
||||
*
|
||||
* * mob/M: The mob that you are looking for on the banlist.
|
||||
*/
|
||||
/datum/antagonist/proc/is_banned(mob/M)
|
||||
if(!M)
|
||||
return FALSE
|
||||
. = (jobban_isbanned(M, ROLE_SYNDICATE) || QDELETED(M) || (job_rank && (jobban_isbanned(M,job_rank) || QDELETED(M))))
|
||||
|
||||
/**
|
||||
* Proc that replaces a player who cannot play a specific antagonist due to being banned via a poll, and alerts the player of their being on the banlist.
|
||||
*/
|
||||
/datum/antagonist/proc/replace_banned_player()
|
||||
set waitfor = FALSE
|
||||
|
||||
var/list/mob/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", null, job_rank, 50, owner.current)
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as a [name]?", "[name]", job_rank, 50, owner.current)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/C = pick(candidates)
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
to_chat(owner, "Your mob has been taken over by a ghost! Appeal your job ban if you want to avoid this in the future!")
|
||||
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner.current)]) to replace a jobbaned player.")
|
||||
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(owner)]) to replace a jobbanned player.")
|
||||
owner.current.ghostize(0)
|
||||
C.transfer_ckey(owner.current, FALSE)
|
||||
|
||||
///Called by the remove_antag_datum() and remove_all_antag_datums() mind procs for the antag datum to handle its own removal and deletion.
|
||||
/**
|
||||
* Called by the remove_antag_datum() and remove_all_antag_datums() mind procs for the antag datum to handle its own removal and deletion.
|
||||
*/
|
||||
/datum/antagonist/proc/on_removal()
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
|
||||
remove_innate_effects()
|
||||
clear_antag_moodies()
|
||||
if(owner)
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
for(var/A in skill_modifiers)
|
||||
owner.remove_skill_modifier(GET_SKILL_MOD_ID(A, type))
|
||||
if(!LAZYLEN(owner.antag_datums))
|
||||
owner.current.remove_from_current_living_antags()
|
||||
if(!silent && owner.current)
|
||||
farewell()
|
||||
LAZYREMOVE(owner.antag_datums, src)
|
||||
// cit skill
|
||||
for(var/A in skill_modifiers)
|
||||
owner.remove_skill_modifier(GET_SKILL_MOD_ID(A, type))
|
||||
// end
|
||||
if(!LAZYLEN(owner.antag_datums) && !soft_antag)
|
||||
owner.current.remove_from_current_living_antags()
|
||||
if(info_button)
|
||||
QDEL_NULL(info_button)
|
||||
if(!silent && owner.current)
|
||||
farewell()
|
||||
// UnregisterSignal(owner, COMSIG_PRE_MINDSHIELD_IMPLANT)
|
||||
// UnregisterSignal(owner, COMSIG_MINDSHIELD_IMPLANTED)
|
||||
var/datum/team/team = get_team()
|
||||
if(team)
|
||||
team.remove_member(owner)
|
||||
// we don't remove the activity component on purpose--no real point to it
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
* Proc that sends fluff or instructional messages to the player when they are given this antag datum.
|
||||
* Use this proc for playing sounds, sending alerts, or helping to setup non-gameplay influencing aspects of the antagonist type.
|
||||
*/
|
||||
/datum/antagonist/proc/greet()
|
||||
return
|
||||
|
||||
/**
|
||||
* Proc that sends fluff or instructional messages to the player when they lose this antag datum.
|
||||
* Use this proc for playing sounds, sending alerts, or otherwise informing the player that they're no longer a specific antagonist type.
|
||||
*/
|
||||
/datum/antagonist/proc/farewell()
|
||||
return
|
||||
|
||||
/**
|
||||
* Proc that assigns this antagonist's ascribed moodlet to the player.
|
||||
*/
|
||||
/datum/antagonist/proc/give_antag_moodies()
|
||||
if(!antag_moodlet)
|
||||
return
|
||||
SEND_SIGNAL(owner.current, COMSIG_ADD_MOOD_EVENT, "antag_moodlet", antag_moodlet)
|
||||
|
||||
/**
|
||||
* Proc that removes this antagonist's ascribed moodlet from the player.
|
||||
*/
|
||||
/datum/antagonist/proc/clear_antag_moodies()
|
||||
if(!antag_moodlet)
|
||||
return
|
||||
SEND_SIGNAL(owner.current, COMSIG_CLEAR_MOOD_EVENT, "antag_moodlet")
|
||||
|
||||
/**
|
||||
* Removes invalid quirks.
|
||||
*/
|
||||
/datum/antagonist/proc/remove_blacklisted_quirks()
|
||||
var/mob/living/L = owner.current
|
||||
if(istype(L))
|
||||
@@ -185,16 +288,22 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
to_chat(L, "<span class='boldannounce'>[initial(Q.antag_removal_text)]</span>")
|
||||
qdel(Q)
|
||||
|
||||
//Returns the team antagonist belongs to if any.
|
||||
/**
|
||||
* Proc that will return the team this antagonist belongs to, when called. Helpful with antagonists that may belong to multiple potential teams in a single round, like families.
|
||||
*/
|
||||
/datum/antagonist/proc/get_team()
|
||||
return
|
||||
|
||||
//Individual roundend report
|
||||
/**
|
||||
* Proc that sends string information for the end-round report window to the server.
|
||||
* This runs on every instance of every antagonist that exists at the end of the round.
|
||||
* This is the body of the message, sandwiched between roundend_report_header and roundend_report_footer.
|
||||
*/
|
||||
/datum/antagonist/proc/roundend_report()
|
||||
var/list/report = list()
|
||||
|
||||
if(!owner)
|
||||
CRASH("antagonist datum without owner")
|
||||
CRASH("Antagonist datum without owner")
|
||||
|
||||
report += printplayer(owner)
|
||||
|
||||
@@ -213,11 +322,19 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
return report.Join("<br>")
|
||||
|
||||
//Displayed at the start of roundend_category section, default to roundend_category header
|
||||
/**
|
||||
* Proc that sends string data for the round-end report.
|
||||
* Displayed before roundend_report and roundend_report_footer.
|
||||
* Appears at start of roundend_catagory section.
|
||||
*/
|
||||
/datum/antagonist/proc/roundend_report_header()
|
||||
return "<span class='header'>The [roundend_category] were:</span><br>"
|
||||
return "<span class='header'>The [roundend_category] were:</span><br>"
|
||||
|
||||
//Displayed at the end of roundend_category section
|
||||
/**
|
||||
* Proc that sends string data for the round-end report.
|
||||
* Displayed after roundend_report and roundend_report_footer.
|
||||
* Appears at the end of the roundend_catagory section.
|
||||
*/
|
||||
/datum/antagonist/proc/roundend_report_footer()
|
||||
return
|
||||
|
||||
@@ -226,22 +343,24 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
//Called when using admin tools to give antag status
|
||||
/datum/antagonist/proc/admin_add(datum/mind/new_owner,mob/admin)
|
||||
message_admins("[key_name_admin(admin)] made [new_owner.current] into [name].")
|
||||
log_admin("[key_name(admin)] made [new_owner.current] into [name].")
|
||||
message_admins("[key_name_admin(admin)] made [key_name_admin(new_owner)] into [name].")
|
||||
log_admin("[key_name(admin)] made [key_name(new_owner)] into [name].")
|
||||
new_owner.add_antag_datum(src)
|
||||
|
||||
//Called when removing antagonist using admin tools
|
||||
/datum/antagonist/proc/admin_remove(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
message_admins("[key_name_admin(user)] has removed [name] antagonist status from [owner.current].")
|
||||
log_admin("[key_name(user)] has removed [name] antagonist status from [owner.current].")
|
||||
message_admins("[key_name_admin(user)] has removed [name] antagonist status from [key_name_admin(owner)].")
|
||||
log_admin("[key_name(user)] has removed [name] antagonist status from [key_name(owner)].")
|
||||
on_removal()
|
||||
|
||||
//gamemode/proc/is_mode_antag(antagonist/A) => TRUE/FALSE
|
||||
|
||||
//Additional data to display in antagonist panel section
|
||||
//nuke disk code, genome count, etc
|
||||
/**
|
||||
* Additional data to display in the antagonist panel section.
|
||||
* For example, nuke disk code, genome count, etc
|
||||
*/
|
||||
/datum/antagonist/proc/antag_panel_data()
|
||||
return ""
|
||||
|
||||
@@ -253,7 +372,7 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// List if ["Command"] = CALLBACK(), user will be appeneded to callback arguments on execution
|
||||
/// List of ["Command"] = CALLBACK(), user will be appeneded to callback arguments on execution
|
||||
/datum/antagonist/proc/get_admin_commands()
|
||||
. = list()
|
||||
|
||||
@@ -283,14 +402,19 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
return
|
||||
antag_memory = new_memo
|
||||
|
||||
/// Gets how fast we can hijack the shuttle, return 0 for can not hijack. Defaults to hijack_speed var, override for custom stuff like buffing hijack speed for hijack objectives or something.
|
||||
/**
|
||||
* Gets how fast we can hijack the shuttle, return 0 for can not hijack.
|
||||
* Defaults to hijack_speed var, override for custom stuff like buffing hijack speed for hijack objectives or something.
|
||||
*/
|
||||
/datum/antagonist/proc/hijack_speed()
|
||||
var/datum/objective/hijack/H = locate() in objectives
|
||||
if(!isnull(H?.hijack_speed_override))
|
||||
return H.hijack_speed_override
|
||||
return hijack_speed
|
||||
|
||||
/// Gets our threat level. Defaults to threat var, override for custom stuff like different traitor goals having different threats.
|
||||
/**
|
||||
* Gets our threat level. Override this proc for custom functionality/dynamic threat level.
|
||||
*/
|
||||
/datum/antagonist/proc/threat()
|
||||
. = CONFIG_GET(keyed_list/antag_threat)[lowertext(name)]
|
||||
if(. == null)
|
||||
@@ -300,6 +424,13 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
/datum/antagonist/custom
|
||||
antagpanel_category = "Custom"
|
||||
show_name_in_check_antagonists = TRUE //They're all different
|
||||
var/datum/team/custom_team
|
||||
|
||||
/datum/antagonist/custom/create_team(datum/team/team)
|
||||
custom_team = team
|
||||
|
||||
/datum/antagonist/custom/get_team()
|
||||
return custom_team
|
||||
|
||||
/datum/antagonist/custom/admin_add(datum/mind/new_owner,mob/admin)
|
||||
var/custom_name = stripped_input(admin, "Custom antagonist name:", "Custom antag", "Antagonist")
|
||||
@@ -308,3 +439,48 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
else
|
||||
return
|
||||
..()
|
||||
|
||||
///ANTAGONIST UI STUFF
|
||||
|
||||
/datum/antagonist/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_name, name)
|
||||
ui.open()
|
||||
|
||||
/datum/antagonist/ui_state(mob/user)
|
||||
return GLOB.always_state
|
||||
|
||||
///generic helper to send objectives as data through tgui. supports smart objectives too!
|
||||
/datum/antagonist/proc/get_objectives()
|
||||
var/objective_count = 1
|
||||
var/list/objective_data = list()
|
||||
//all obj
|
||||
for(var/datum/objective/objective in objectives)
|
||||
objective_data += list(list(
|
||||
"count" = objective_count,
|
||||
"name" = objective.name,
|
||||
"explanation" = objective.explanation_text,
|
||||
"complete" = objective.completed,
|
||||
))
|
||||
objective_count++
|
||||
return objective_data
|
||||
|
||||
//button for antags to review their descriptions/info
|
||||
|
||||
/datum/action/antag_info
|
||||
name = "Open Antag Information:"
|
||||
button_icon_state = "round_end"
|
||||
var/datum/antagonist/antag_datum
|
||||
|
||||
/datum/action/antag_info/New(Target, datum/antagonist/antag_datum)
|
||||
. = ..()
|
||||
src.antag_datum = antag_datum
|
||||
name += " [antag_datum.name]"
|
||||
|
||||
/datum/action/antag_info/Trigger()
|
||||
if(antag_datum)
|
||||
antag_datum.ui_interact(owner)
|
||||
|
||||
/datum/action/antag_info/IsAvailable()
|
||||
return TRUE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/organ/lungs/lungs = owner.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
if((!lungs && !HAS_TRAIT(owner, TRAIT_NOBREATH)) || (lungs && (istype(lungs, /obj/item/organ/lungs/cybernetic))))
|
||||
if((!lungs && (HAS_TRAIT_FROM(owner, TRAIT_AUXILIARY_LUNGS, SPECIES_TRAIT) || !HAS_TRAIT(owner, TRAIT_NOBREATH))) || (lungs && (istype(lungs, /obj/item/organ/lungs/cybernetic))))
|
||||
replace_lungs(lungs)
|
||||
return
|
||||
|
||||
|
||||
@@ -17,11 +17,13 @@
|
||||
B.objectives += objective
|
||||
M.add_antag_datum(B)
|
||||
|
||||
var/begin_message = "<span class='deadsay'><b>[L]</b> has been brainwashed with the following objectives: "
|
||||
var/begin_message = " has been brainwashed with the following objectives: "
|
||||
var/obj_message = english_list(directives)
|
||||
var/end_message = "</b>.</span>"
|
||||
var/end_message = "."
|
||||
var/rendered = begin_message + obj_message + end_message
|
||||
deadchat_broadcast(rendered, follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_REGULAR)
|
||||
deadchat_broadcast(rendered, "<b>[L]</b>", follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
|
||||
L.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.")
|
||||
|
||||
/datum/antagonist/brainwashed
|
||||
name = "Brainwashed Victim"
|
||||
@@ -30,19 +32,21 @@
|
||||
show_in_antagpanel = TRUE
|
||||
antagpanel_category = "Other"
|
||||
show_name_in_check_antagonists = TRUE
|
||||
ui_name = "AntagInfoBrainwashed"
|
||||
suicide_cry = "FOR... SOMEONE!!"
|
||||
|
||||
/datum/antagonist/brainwashed/greet()
|
||||
to_chat(owner, "<span class='warning'>Your mind reels as it begins focusing on a single purpose...</span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>Follow the Directives, at any cost!</b></span></big>")
|
||||
var/i = 1
|
||||
for(var/X in objectives)
|
||||
var/datum/objective/O = X
|
||||
to_chat(owner, "<b>[i].</b> [O.explanation_text]")
|
||||
i++
|
||||
/datum/antagonist/brainwashed/ui_static_data(mob/user)
|
||||
. = ..()
|
||||
var/list/data = list()
|
||||
data["objectives"] = get_objectives()
|
||||
return data
|
||||
|
||||
/datum/antagonist/brainwashed/farewell()
|
||||
to_chat(owner, "<span class='warning'>Your mind suddenly clears...</span>")
|
||||
to_chat(owner, "<big><span class='warning'><b>You feel the weight of the Directives disappear! You no longer have to obey them.</b></span></big>")
|
||||
to_chat(owner, span_warning("Your mind suddenly clears..."))
|
||||
to_chat(owner, "<big>[span_warning("<b>You feel the weight of the Directives disappear! You no longer have to obey them.</b>")]</big>")
|
||||
if(owner.current)
|
||||
var/mob/living/owner_mob = owner.current
|
||||
owner_mob.log_message("is no longer brainwashed with the objectives: [english_list(objectives)].", LOG_ATTACK)
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/brainwashed/admin_add(datum/mind/new_owner,mob/admin)
|
||||
@@ -54,9 +58,9 @@
|
||||
var/objective = stripped_input(admin, "Add an objective, or leave empty to finish.", "Brainwashing", null, MAX_MESSAGE_LEN)
|
||||
if(objective)
|
||||
objectives += objective
|
||||
while(alert(admin,"Add another objective?","More Brainwashing","Yes","No") == "Yes")
|
||||
while(tgui_alert(admin,"Add another objective?","More Brainwashing",list("Yes","No")) == "Yes")
|
||||
|
||||
if(alert(admin,"Confirm Brainwashing?","Are you sure?","Yes","No") == "No")
|
||||
if(tgui_alert(admin,"Confirm Brainwashing?","Are you sure?",list("Yes","No")) == "No")
|
||||
return
|
||||
|
||||
if(!LAZYLEN(objectives))
|
||||
@@ -69,6 +73,7 @@
|
||||
brainwash(C, objectives)
|
||||
var/obj_list = english_list(objectives)
|
||||
message_admins("[key_name_admin(admin)] has brainwashed [key_name_admin(C)] with the following objectives: [obj_list].")
|
||||
C.log_message("has been force-brainwashed with the objective '[obj_list]' by admin [key_name(admin)]", LOG_ATTACK, log_globally = FALSE)
|
||||
log_admin("[key_name(admin)] has brainwashed [key_name(C)] with the following objectives: [obj_list].")
|
||||
|
||||
/datum/objective/brainwashing
|
||||
|
||||
@@ -264,7 +264,9 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/clockwork/slab/ui_data(mob/user) //we display a lot of data via TGUI
|
||||
. = list()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
.["recollection"] = recollecting
|
||||
.["power"] = DisplayPower(get_clockwork_power())
|
||||
.["power_unformatted"] = get_clockwork_power()
|
||||
@@ -275,6 +277,7 @@
|
||||
if(S.tier == SCRIPTURE_PERIPHERAL) // This tier is skiped because this contains basetype stuff
|
||||
continue
|
||||
|
||||
// FUTURE IMPL: cache these perhaps?
|
||||
var/list/data = list()
|
||||
data["name"] = S.name
|
||||
data["descname"] = S.descname
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
job_rank = ROLE_SERVANT_OF_RATVAR
|
||||
antag_moodlet = /datum/mood_event/cult
|
||||
skill_modifiers = list(/datum/skill_modifier/job/level/wiring, /datum/skill_modifier/job/level/dwarfy/blacksmithing)
|
||||
ui_name = "AntagInfoClockwork"
|
||||
var/datum/action/innate/hierophant/hierophant_network = new
|
||||
threat = 3
|
||||
var/datum/team/clockcult/clock_team
|
||||
@@ -14,6 +15,12 @@
|
||||
var/ignore_eligibility_check = FALSE
|
||||
var/ignore_holy_water = FALSE
|
||||
|
||||
/datum/antagonist/clockcult/ui_data(mob/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
.["HONOR_RATVAR"] = GLOB.ratvar_awakens
|
||||
|
||||
/datum/antagonist/clockcult/silent
|
||||
name = "Silent Clock Cultist"
|
||||
silent = TRUE
|
||||
@@ -22,6 +29,8 @@
|
||||
/datum/antagonist/clockcult/neutered
|
||||
name = "Neutered Clock Cultist"
|
||||
neutered = TRUE
|
||||
soft_antag = TRUE
|
||||
ui_name = null // no.
|
||||
|
||||
/datum/antagonist/clockcult/neutered/traitor
|
||||
name = "Traitor Clock Cultist"
|
||||
@@ -57,14 +66,6 @@
|
||||
if(. && !ignore_eligibility_check)
|
||||
. = is_eligible_servant(new_owner.current)
|
||||
|
||||
/datum/antagonist/clockcult/greet()
|
||||
if(!owner.current || silent)
|
||||
return
|
||||
owner.current.visible_message("<span class='heavy_brass'>[owner.current]'s eyes glow a blazing yellow!</span>", null, null, 7, owner.current) //don't show the owner this message
|
||||
to_chat(owner.current, "<span class='heavy_brass'>Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork \
|
||||
Justiciar above all else. Perform his every whim without hesitation.</span>")
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/clockcultalr.ogg', 70, FALSE, pressure_affected = FALSE)
|
||||
|
||||
/datum/antagonist/clockcult/on_gain()
|
||||
var/mob/living/current = owner.current
|
||||
SSticker.mode.servants_of_ratvar += owner
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
show_name_in_check_antagonists = TRUE
|
||||
show_in_antagpanel = FALSE
|
||||
threat = 2
|
||||
ui_name = "AntagInfoMorph"
|
||||
|
||||
//It does nothing! (Besides tracking)
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
show_name_in_check_antagonists = TRUE
|
||||
threat = 5
|
||||
show_to_ghosts = TRUE
|
||||
ui_name = "AntagInfoNightmare"
|
||||
suicide_cry = "FOR THE DARKNESS!!"
|
||||
|
||||
@@ -236,6 +236,8 @@
|
||||
var/obj/machinery/nuclearbomb/tracked_nuke
|
||||
var/core_objective = /datum/objective/nuclear
|
||||
var/memorized_code
|
||||
var/list/team_discounts
|
||||
var/datum/weakref/war_button_ref
|
||||
|
||||
/datum/team/nuclear/New()
|
||||
..()
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
return
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
// Give uplink
|
||||
var/obj/item/uplink_holder = owner.equip_traitor(uplink_owner = src)
|
||||
var/obj/item/uplink_holder = owner.equip_traitor()
|
||||
var/datum/component/uplink/uplink = uplink_holder.GetComponent(/datum/component/uplink)
|
||||
uplink.telecrystals = INITIAL_CRYSTALS
|
||||
// Give AI hacking board
|
||||
|
||||
@@ -7,37 +7,51 @@
|
||||
/datum/antagonist/traitor/internal_affairs
|
||||
name = "Internal Affairs Agent"
|
||||
employer = "Nanotrasen"
|
||||
special_role = "internal affairs agent"
|
||||
suicide_cry = "FOR THE COMPANY!!"
|
||||
antagpanel_category = "IAA"
|
||||
var/special_role = "internal affairs agent"
|
||||
var/syndicate = FALSE
|
||||
var/last_man_standing = FALSE
|
||||
var/list/datum/mind/targets_stolen
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/New()
|
||||
. = ..()
|
||||
LAZYADD(targets_stolen, src)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/proc/give_pinpointer()
|
||||
if(owner && owner.current)
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
|
||||
if(owner.current)
|
||||
owner.current.apply_status_effect(/datum/status_effect/agent_pinpointer)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/apply_innate_effects()
|
||||
.=..() //in case the base is used in future
|
||||
if(owner && owner.current)
|
||||
. = ..()
|
||||
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
|
||||
if(owner.current)
|
||||
give_pinpointer(owner.current)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/remove_innate_effects()
|
||||
.=..()
|
||||
if(owner && owner.current)
|
||||
. = ..()
|
||||
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
|
||||
if(owner.current)
|
||||
owner.current.remove_status_effect(/datum/status_effect/agent_pinpointer)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/on_gain()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
.=..()
|
||||
. = ..()
|
||||
/datum/antagonist/traitor/internal_affairs/on_removal()
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
.=..()
|
||||
. = ..()
|
||||
/datum/antagonist/traitor/internal_affairs/process()
|
||||
iaa_process()
|
||||
|
||||
|
||||
/datum/status_effect/agent_pinpointer
|
||||
id = "agent_pinpointer"
|
||||
duration = -1
|
||||
@@ -46,6 +60,8 @@
|
||||
var/minimum_range = PINPOINTER_MINIMUM_RANGE
|
||||
var/range_fuzz_factor = PINPOINTER_EXTRA_RANDOM_RANGE
|
||||
var/mob/scan_target = null
|
||||
var/range_mid = 8
|
||||
var/range_far = 16
|
||||
|
||||
/atom/movable/screen/alert/status_effect/agent_pinpointer
|
||||
name = "Internal Affairs Integrated Pinpointer"
|
||||
@@ -66,13 +82,13 @@
|
||||
linked_alert.icon_state = "pinondirect"
|
||||
else
|
||||
linked_alert.setDir(get_dir(here, there))
|
||||
switch(get_dist(here, there))
|
||||
if(1 to 8)
|
||||
linked_alert.icon_state = "pinonclose"
|
||||
if(9 to 16)
|
||||
linked_alert.icon_state = "pinonmedium"
|
||||
if(16 to INFINITY)
|
||||
linked_alert.icon_state = "pinonfar"
|
||||
var/dist = (get_dist(here, there))
|
||||
if(dist >= 1 && dist <= range_mid)
|
||||
linked_alert.icon_state = "pinonclose"
|
||||
else if(dist > range_mid && dist <= range_far)
|
||||
linked_alert.icon_state = "pinonmedium"
|
||||
else if(dist > range_far)
|
||||
linked_alert.icon_state = "pinonfar"
|
||||
|
||||
/datum/status_effect/agent_pinpointer/proc/scan_for_target()
|
||||
scan_target = null
|
||||
@@ -99,37 +115,42 @@
|
||||
return (istype(O, /datum/objective/assassinate/internal)||istype(O, /datum/objective/destroy/internal))
|
||||
|
||||
/datum/antagonist/traitor/proc/replace_escape_objective()
|
||||
if(!owner || !objectives.len)
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
if(!objectives.len)
|
||||
return
|
||||
for (var/objective_ in objectives)
|
||||
if(!(istype(objective_, /datum/objective/escape)||istype(objective_, /datum/objective/survive)))
|
||||
for (var/objective in objectives)
|
||||
if(!(istype(objective, /datum/objective/escape) || istype(objective, /datum/objective/survive)))
|
||||
continue
|
||||
remove_objective(objective_)
|
||||
objectives -= objective
|
||||
|
||||
var/datum/objective/martyr/martyr_objective = new
|
||||
martyr_objective.owner = owner
|
||||
add_objective(martyr_objective)
|
||||
|
||||
/datum/antagonist/traitor/proc/reinstate_escape_objective()
|
||||
if(!owner||!objectives.len)
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
if(!objectives.len)
|
||||
return
|
||||
for (var/objective_ in objectives)
|
||||
if(!istype(objective_, /datum/objective/martyr))
|
||||
for (var/objective in objectives)
|
||||
if(!istype(objective, /datum/objective/martyr))
|
||||
continue
|
||||
remove_objective(objective_)
|
||||
remove_objective(objective)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/reinstate_escape_objective()
|
||||
..()
|
||||
var/objtype = !istype(traitor_kind,TRAITOR_AI) ? /datum/objective/escape : /datum/objective/survive
|
||||
var/datum/objective/escape_objective = new objtype
|
||||
for (var/datum/objective/martyr/martyr_objective in objectives)
|
||||
objectives -= martyr_objective
|
||||
|
||||
var/datum/objective/escape_objective = new /datum/objective/escape()
|
||||
escape_objective.owner = owner
|
||||
add_objective(escape_objective)
|
||||
objectives += escape_objective
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/proc/steal_targets(datum/mind/victim)
|
||||
if(!owner.current||owner.current.stat==DEAD)
|
||||
return
|
||||
to_chat(owner.current, "<span class='userdanger'> Target eliminated: [victim.name]</span>")
|
||||
LAZYINITLIST(targets_stolen)
|
||||
to_chat(owner.current, span_userdanger("Target eliminated: [victim.name]"))
|
||||
for(var/objective_ in victim.get_all_objectives())
|
||||
if(istype(objective_, /datum/objective/assassinate/internal))
|
||||
var/datum/objective/assassinate/internal/objective = objective_
|
||||
@@ -143,7 +164,7 @@
|
||||
add_objective(new_objective)
|
||||
targets_stolen += objective.target
|
||||
var/status_text = objective.check_completion() ? "neutralised" : "active"
|
||||
to_chat(owner.current, "<span class='userdanger'> New target added to database: [objective.target.name] ([status_text]) </span>")
|
||||
to_chat(owner.current, span_userdanger("New target added to database: [objective.target.name] ([status_text])"))
|
||||
else if(istype(objective_, /datum/objective/destroy/internal))
|
||||
var/datum/objective/destroy/internal/objective = objective_
|
||||
var/datum/objective/destroy/internal/new_objective = new
|
||||
@@ -156,7 +177,7 @@
|
||||
add_objective(new_objective)
|
||||
targets_stolen += objective.target
|
||||
var/status_text = objective.check_completion() ? "neutralised" : "active"
|
||||
to_chat(owner.current, "<span class='userdanger'> New target added to database: [objective.target.name] ([status_text]) </span>")
|
||||
to_chat(owner.current, span_userdanger("New target added to database: [objective.target.name] ([status_text])"))
|
||||
last_man_standing = TRUE
|
||||
for(var/objective_ in objectives)
|
||||
if(!is_internal_objective(objective_))
|
||||
@@ -167,13 +188,15 @@
|
||||
return
|
||||
if(last_man_standing)
|
||||
if(syndicate)
|
||||
to_chat(owner.current,"<span class='userdanger'>All the suspected agents are dead, and no more is required of you. Die a glorious death, agent.</span>")
|
||||
replace_escape_objective(owner)
|
||||
to_chat(owner.current,span_userdanger("All the suspected agents are dead, and no more is required of you. Die a glorious death, agent."))
|
||||
else
|
||||
to_chat(owner.current,"<span class='userdanger'>All the other agents are dead. You have done us all a great service and shall be honorably exiled upon returning to base.</span>")
|
||||
to_chat(owner.current,span_userdanger("All the other agents are dead. You have done us all a great service and shall be honorably exiled upon returning to base."))
|
||||
replace_escape_objective(owner)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/proc/iaa_process()
|
||||
if(owner&&owner.current&&owner.current.stat!=DEAD)
|
||||
if(!owner)
|
||||
CRASH("Antag datum with no owner.")
|
||||
if(owner.current && owner.current.stat != DEAD)
|
||||
for(var/objective_ in objectives)
|
||||
if(!is_internal_objective(objective_))
|
||||
continue
|
||||
@@ -188,12 +211,12 @@
|
||||
objective.stolen = TRUE
|
||||
else
|
||||
if(objective.stolen)
|
||||
var/fail_msg = "<span class='userdanger'>Your sensors tell you that [objective.target.current.real_name], one of the targets you were meant to have killed, pulled one over on you, and is still alive - do the job properly this time! </span>"
|
||||
var/fail_msg = span_userdanger("Your sensors tell you that [objective.target.current.real_name], one of the targets you were meant to have killed, pulled one over on you, and is still alive - do the job properly this time! ")
|
||||
if(last_man_standing)
|
||||
if(syndicate)
|
||||
fail_msg += "<span class='userdanger'> You no longer have permission to die. </span>"
|
||||
fail_msg += span_userdanger(" You no longer have permission to die. ")
|
||||
else
|
||||
fail_msg += "<span class='userdanger'> The truth could still slip out!</font><B><font size=5 color=red> Cease any terrorist actions as soon as possible, unneeded property damage or loss of employee life will lead to great shame.</span>"
|
||||
fail_msg += span_userdanger(" The truth could still slip out!</font><B><font size=5 color=red> Cease any terrorist actions as soon as possible, unneeded property damage or loss of employee life will lead to your contract being terminated.")
|
||||
reinstate_escape_objective(owner)
|
||||
last_man_standing = FALSE
|
||||
to_chat(owner.current, fail_msg)
|
||||
@@ -220,29 +243,24 @@
|
||||
/datum/antagonist/traitor/internal_affairs/forge_traitor_objectives()
|
||||
forge_iaa_objectives()
|
||||
|
||||
var/objtype = !istype(traitor_kind,TRAITOR_AI) ? /datum/objective/escape : /datum/objective/survive
|
||||
var/datum/objective/escape_objective = new objtype
|
||||
var/datum/objective/escape_objective = new /datum/objective/escape()
|
||||
escape_objective.owner = owner
|
||||
add_objective(escape_objective)
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/proc/greet_iaa()
|
||||
var/crime = pick("distribution of contraband" , "embezzlement", "piloting under the influence", "dereliction of duty", "syndicate collaboration", "mutiny", "multiple homicides", "corporate espionage", "receiving bribes", "malpractice", "worship of prohibited life forms", "possession of profane texts", "murder", "arson", "insulting their manager", "grand theft", "conspiracy", "attempting to unionize", "vandalism", "gross incompetence")
|
||||
var/crime = pick("distribution of contraband", "embezzlement", "piloting under the influence", "dereliction of duty", "syndicate collaboration", "mutiny", "multiple homicides", "corporate espionage", "receiving bribes", "malpractice", "worship of prohibited life forms", "possession of profane texts", "murder", "arson", "insulting their manager", "grand theft", "conspiracy", "attempting to unionize", "vandalism", "gross incompetence")
|
||||
|
||||
to_chat(owner.current, "<span class='userdanger'>You are the [special_role].</span>")
|
||||
to_chat(owner.current, span_userdanger("You are the [special_role]."))
|
||||
if(syndicate)
|
||||
to_chat(owner.current, "<span class='userdanger'>GREAT LEADER IS DEAD. NANOTRASEN MUST FALL.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>Your have infiltrated this vessel to cause chaos and assassinate targets known to have conspired against the Syndicate.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>Any damage you cause will be a further embarrassment to Nanotrasen, so you have no limits on collateral damage.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>You have been provided with a standard uplink to accomplish your task. </span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>By no means reveal that you are a Syndicate agent. By no means reveal that your targets are being hunted.</span>")
|
||||
to_chat(owner.current, span_userdanger("Your target has been framed for [crime], and you have been tasked with eliminating them to prevent them defending themselves in court."))
|
||||
to_chat(owner.current, "<span class='warningplain'><B><font size=5 color=red>Any damage you cause will be a further embarrassment to Nanotrasen, so you have no limits on collateral damage.</font></B></span>")
|
||||
to_chat(owner.current, span_userdanger("You have been provided with a standard uplink to accomplish your task."))
|
||||
else
|
||||
to_chat(owner.current, "<span class='userdanger'>CAUTION: Your legal status as a citizen of NanoTrasen will be permanently revoked upon completion of your first contract.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>Your target has been suspected of [crime], and must be removed from this plane.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>While you have a license to kill, you are to eliminate your targets with no collateral or unrelated deaths.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>For the sake of plausable deniability, you have been equipped with captured Syndicate equipment via uplink.</span>")
|
||||
to_chat(owner.current, "<span class='userdanger'>By no means reveal that you, or any other NT employees, are undercover agents.</span>")
|
||||
to_chat(owner.current, span_userdanger("Your target is suspected of [crime], and you have been tasked with eliminating them by any means necessary to avoid a costly and embarrassing public trial."))
|
||||
to_chat(owner.current, "<span class='warningplain'><B><font size=5 color=red>While you have a license to kill, unneeded property damage or loss of employee life will lead to your contract being terminated.</font></B></span>")
|
||||
to_chat(owner.current, span_userdanger("For the sake of plausible deniability, you have been equipped with an array of captured Syndicate weaponry available via uplink."))
|
||||
|
||||
to_chat(owner.current, "<span class='userdanger'>Finally, watch your back. Your target has friends in high places, and intel suggests someone may have taken out a contract of their own to protect them.</span>")
|
||||
to_chat(owner.current, span_userdanger("Finally, watch your back. Your target has friends in high places, and intel suggests someone may have taken out a contract of their own to protect them."))
|
||||
owner.announce_objectives()
|
||||
|
||||
/datum/antagonist/traitor/internal_affairs/greet()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
chaos = 5
|
||||
threat = 5
|
||||
min_players = 20
|
||||
uplink_filters = list(/datum/uplink_item/stealthy_weapons/romerol_kit,/datum/uplink_item/bundles_TC/contract_kit)
|
||||
uplink_filters = list(/datum/uplink_item/stealthy_weapons/romerol_kit,/datum/uplink_item/bundles_tc/contract_kit)
|
||||
|
||||
/datum/traitor_class/human/martyr/forge_objectives(datum/antagonist/traitor/T)
|
||||
var/datum/objective/martyr/O = new
|
||||
|
||||
@@ -11,6 +11,8 @@ GLOBAL_LIST_EMPTY(traitor_classes)
|
||||
/// Minimum players for this to randomly roll via get_random_traitor_kind().
|
||||
var/min_players = 0
|
||||
var/list/uplink_filters
|
||||
/// Specific tgui theme for the player's antag info panel.
|
||||
var/tgui_theme = "syndicate"
|
||||
|
||||
/datum/traitor_class/New()
|
||||
..()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user