diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 9cd932c6d4..30a2af7457 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -9471,7 +9471,7 @@ }, /obj/machinery/atmospherics/pipe/simple/supply/hidden, /turf/open/floor/plating, -/area/lawoffice) +/area/maintenance/fore) "avj" = ( /obj/machinery/firealarm{ dir = 8; @@ -17917,6 +17917,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 9 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-20" + }, /turf/open/floor/plasteel, /area/hallway/secondary/entry) "aPu" = ( @@ -21195,6 +21198,11 @@ /obj/effect/turf_decal/stripes/corner{ dir = 2 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-21"; + pixel_x = -3; + pixel_y = 3 + }, /turf/open/floor/plasteel, /area/crew_quarters/locker) "aXu" = ( @@ -21295,6 +21303,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-05" + }, /turf/open/floor/plasteel, /area/hallway/secondary/exit) "aXI" = ( @@ -21933,6 +21944,9 @@ dir = 1; pixel_y = -24 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-08" + }, /turf/open/floor/wood, /area/library) "aZe" = ( @@ -24557,6 +24571,9 @@ /obj/effect/turf_decal/tile/purple{ dir = 8 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-13" + }, /turf/open/floor/plasteel, /area/hallway/primary/starboard) "bfX" = ( @@ -24603,6 +24620,9 @@ /obj/effect/turf_decal/tile/purple{ dir = 8 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-10" + }, /turf/open/floor/plasteel, /area/hallway/primary/starboard) "bgc" = ( @@ -27271,11 +27291,6 @@ }, /turf/open/floor/plasteel, /area/quartermaster/sorting) -"bml" = ( -/obj/effect/spawner/structure/window/reinforced, -/obj/effect/decal/cleanable/dirt, -/turf/open/floor/plasteel, -/area/quartermaster/office) "bmm" = ( /obj/structure/cable{ icon_state = "1-2" @@ -28105,6 +28120,7 @@ /obj/effect/turf_decal/tile/blue{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "bof" = ( @@ -28128,6 +28144,7 @@ /obj/effect/turf_decal/tile/blue{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "boi" = ( @@ -30036,6 +30053,7 @@ name = "Genetics"; req_access_txt = "5; 68" }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/genetics) "bsv" = ( @@ -30320,6 +30338,9 @@ /obj/machinery/atmospherics/pipe/simple/supply/hidden{ dir = 4 }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-16" + }, /turf/open/floor/plasteel/white, /area/science/research) "bti" = ( @@ -32538,19 +32559,16 @@ /turf/open/floor/plasteel/cafeteria, /area/crew_quarters/heads/hor) "byc" = ( -/obj/structure/table, -/obj/item/paper_bin{ - pixel_x = -3; - pixel_y = 7 - }, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, -/obj/item/stamp/qm, /obj/effect/turf_decal/tile/brown, /obj/effect/turf_decal/tile/brown{ dir = 8 }, +/obj/machinery/computer/card/minor/qm{ + dir = 1 + }, /turf/open/floor/plasteel, /area/quartermaster/qm) "byd" = ( @@ -32590,6 +32608,11 @@ /obj/effect/turf_decal/tile/brown{ dir = 8 }, +/obj/item/stamp/qm, +/obj/item/paper_bin{ + pixel_x = -3; + pixel_y = 7 + }, /turf/open/floor/plasteel, /area/quartermaster/qm) "byh" = ( @@ -39710,6 +39733,7 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 }, +/obj/item/twohanded/required/kirbyplants, /turf/open/floor/plasteel/white/side{ dir = 1 }, @@ -57100,6 +57124,18 @@ }, /turf/open/floor/plating, /area/maintenance/port) +"hwu" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-24" + }, +/turf/open/floor/plasteel, +/area/security/prison) +"hEm" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-22" + }, +/turf/open/floor/plasteel/white, +/area/medical/medbay/central) "hRa" = ( /obj/structure/table/reinforced, /obj/machinery/light{ @@ -57559,6 +57595,15 @@ }, /turf/open/floor/plasteel, /area/science/circuit) +"qoW" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 10 + }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-18" + }, +/turf/open/floor/plasteel, +/area/hallway/secondary/entry) "quT" = ( /obj/structure/lattice, /obj/structure/grille/broken, @@ -57570,6 +57615,12 @@ }, /turf/open/floor/carpet, /area/crew_quarters/cryopod) +"qQP" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-14" + }, +/turf/open/floor/plasteel, +/area/hallway/primary/port) "rcD" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ dir = 4 @@ -57580,6 +57631,15 @@ /obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden, /turf/open/floor/plasteel, /area/maintenance/disposal/incinerator) +"rjA" = ( +/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{ + dir = 4 + }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-04" + }, +/turf/open/floor/plasteel/white, +/area/medical/medbay/central) "rmX" = ( /obj/structure/table, /obj/item/reagent_containers/food/drinks/beer, @@ -57723,6 +57783,12 @@ icon_state = "wood-broken5" }, /area/maintenance/bar) +"tlO" = ( +/obj/item/twohanded/required/kirbyplants{ + icon_state = "applebush" + }, +/turf/open/floor/plasteel, +/area/hallway/primary/port) "tqg" = ( /obj/machinery/cryopod{ dir = 4 @@ -57879,6 +57945,20 @@ }, /turf/open/floor/plating, /area/maintenance/starboard/aft) +"uZN" = ( +/obj/machinery/light{ + dir = 1 + }, +/obj/effect/turf_decal/tile/blue{ + dir = 4 + }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-03" + }, +/turf/open/floor/plasteel/white/corner{ + dir = 1 + }, +/area/hallway/secondary/entry) "vbD" = ( /obj/machinery/door/firedoor, /obj/machinery/door/airlock/command/glass{ @@ -58053,6 +58133,20 @@ }, /turf/closed/wall/r_wall, /area/maintenance/disposal/incinerator) +"xFY" = ( +/obj/machinery/light{ + dir = 1 + }, +/obj/effect/turf_decal/tile/blue{ + dir = 4 + }, +/obj/item/twohanded/required/kirbyplants{ + icon_state = "plant-06" + }, +/turf/open/floor/plasteel/white/corner{ + dir = 1 + }, +/area/hallway/secondary/entry) "xIa" = ( /obj/structure/table, /obj/effect/spawner/lootdrop/grille_or_trash, @@ -67425,7 +67519,7 @@ apN apN apN apJ -awY +xFY ayk awW aAD @@ -67449,7 +67543,7 @@ aaa aaa aaa arB -awY +uZN ayk awW aAD @@ -70021,7 +70115,7 @@ awW arB awZ aym -azB +qoW awW aaf aaa @@ -79775,7 +79869,7 @@ aKt aLN aMS aOi -aLE +tlO aPK aSl aTH @@ -81083,7 +81177,7 @@ boS bfm bNK bkN -bml +bfm bwe bwe bwd @@ -81831,7 +81925,7 @@ aKA aLN aMS aOz -aLE +qQP aPQ aSa aSr @@ -85383,7 +85477,7 @@ aaG aaK aaP aaX -aat +hwu aat acd acD @@ -94951,7 +95045,7 @@ aYV aYV bet bfH -bhh +hEm bhh bhg bln @@ -97287,7 +97381,7 @@ bCR bqQ bGX bCR -bqQ +rjA bRN bIK bPq diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index e7374c50e6..2b14f91a11 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -27640,7 +27640,6 @@ /turf/open/floor/plasteel, /area/quartermaster/qm) "aZh" = ( -/obj/structure/table/reinforced, /obj/machinery/light{ dir = 4 }, @@ -27651,6 +27650,9 @@ /obj/effect/turf_decal/tile/brown{ dir = 8 }, +/obj/machinery/computer/card/minor/qm{ + dir = 8 + }, /turf/open/floor/plasteel, /area/quartermaster/qm) "aZi" = ( @@ -88703,6 +88705,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 4 + }, /turf/open/floor/plasteel, /area/medical/medbay/central) "cSK" = ( @@ -89877,6 +89882,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 4 + }, /turf/open/floor/plasteel, /area/medical/medbay/central) "cUD" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 13f774d25d..93bd61964c 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -20376,6 +20376,7 @@ /obj/machinery/keycard_auth{ pixel_y = 23 }, +/obj/item/clipboard, /turf/open/floor/plasteel, /area/quartermaster/qm) "aNS" = ( @@ -21064,6 +21065,7 @@ departmentType = 2; pixel_x = 32 }, +/obj/item/stamp/qm, /turf/open/floor/plasteel, /area/quartermaster/qm) "aPl" = ( @@ -21619,12 +21621,12 @@ /turf/open/floor/plasteel, /area/quartermaster/qm) "aQt" = ( -/obj/structure/table, -/obj/item/clipboard, -/obj/item/stamp/qm, /obj/machinery/status_display/supply{ pixel_x = 32 }, +/obj/machinery/computer/card/minor/qm{ + dir = 8 + }, /turf/open/floor/plasteel, /area/quartermaster/qm) "aQu" = ( @@ -57384,6 +57386,7 @@ /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "cha" = ( @@ -57404,6 +57407,7 @@ /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "chb" = ( @@ -66401,6 +66405,9 @@ /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 4 + }, /turf/open/floor/plasteel/white, /area/medical/genetics/cloning) "cxZ" = ( diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index 0c55f05fcb..5202f170d0 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -27287,6 +27287,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 1 + }, /turf/open/floor/plasteel, /area/medical/medbay/zone3) "aWM" = ( @@ -28598,6 +28601,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 8 + }, /turf/open/floor/plasteel, /area/medical/medbay/zone3) "aYU" = ( @@ -29134,6 +29140,9 @@ /obj/effect/turf_decal/stripes/line{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 8 + }, /turf/open/floor/plasteel, /area/medical/medbay/zone3) "aZQ" = ( diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 7e4f54c8b4..d43f5927a0 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -24477,16 +24477,11 @@ /turf/open/floor/plasteel/dark, /area/science/robotics/mechbay) "bfB" = ( -/obj/structure/table, /obj/machinery/requests_console{ department = "Cargo Bay"; departmentType = 2; pixel_x = -30 }, -/obj/item/paper_bin{ - layer = 2.9 - }, -/obj/item/pen, /obj/effect/turf_decal/tile/brown{ dir = 1 }, @@ -24494,6 +24489,9 @@ /obj/effect/turf_decal/tile/brown{ dir = 8 }, +/obj/machinery/computer/card/minor/qm{ + dir = 4 + }, /turf/open/floor/plasteel, /area/quartermaster/qm) "bfC" = ( @@ -27566,6 +27564,7 @@ }, /obj/structure/disposalpipe/segment, /obj/machinery/atmospherics/pipe/simple/supply/hidden, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/freezer, /area/storage/emergency/port) "bnx" = ( @@ -29314,6 +29313,9 @@ /obj/structure/disposalpipe/segment{ dir = 4 }, +/obj/effect/mapping_helpers/airlock/unres{ + dir = 8 + }, /turf/open/floor/plasteel/white, /area/medical/genetics) "brb" = ( @@ -30153,6 +30155,7 @@ /obj/effect/turf_decal/tile/blue{ dir = 8 }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "bsI" = ( @@ -30164,6 +30167,7 @@ name = "Medbay" }, /obj/effect/turf_decal/tile/blue, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/white, /area/medical/medbay/central) "bsJ" = ( @@ -62094,6 +62098,7 @@ name = "Port Emergency Storage"; req_access_txt = "0" }, +/obj/effect/mapping_helpers/airlock/unres, /turf/open/floor/plasteel/freezer, /area/storage/emergency/port) "xSX" = ( diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 4372c4ca24..7be3533d47 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -106,6 +106,7 @@ #define SKINTONE 23 //uses skin tones #define HORNCOLOR 24 +//organ slots #define ORGAN_SLOT_BRAIN "brain" #define ORGAN_SLOT_APPENDIX "appendix" #define ORGAN_SLOT_RIGHT_ARM_AUG "r_arm_device" @@ -129,3 +130,8 @@ #define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun" #define ORGAN_SLOT_TAIL "tail" #define ORGAN_SLOT_PENIS "penis" + +////organ defines +#define STANDARD_ORGAN_THRESHOLD 100 +#define STANDARD_ORGAN_HEALING 0.001 +#define STANDARD_ORGAN_DECAY 0.00222 //designed to fail organs when left to decay for ~15 minutes \ No newline at end of file diff --git a/code/__DEFINES/colors.dm b/code/__DEFINES/colors.dm index 06c3c352ca..cc2cd8834a 100644 --- a/code/__DEFINES/colors.dm +++ b/code/__DEFINES/colors.dm @@ -4,15 +4,15 @@ #define COLOR_INPUT_ENABLED "#D3B5B5" #define COLOR_DARKMODE_INFO_BUTTONS_BG "#40628A" -#define COLOR_DARKMODE_ISSUE_BUTTON_BG "#ce4242" -#define COLOR_DARKMODE_BACKGROUND "#202020" -#define COLOR_DARKMODE_DARKBACKGROUND "#171717" -#define COLOR_DARKMODE_TEXT "#f0f0f0" +#define COLOR_DARKMODE_ISSUE_BUTTON_BG "#A92C2C" +#define COLOR_DARKMODE_BACKGROUND "#272727" +#define COLOR_DARKMODE_DARKBACKGROUND "#242424" +#define COLOR_DARKMODE_TEXT "#E0E0E0" -#define COLOR_WHITEMODE_INFO_BUTTONS_BG "#90b3dd" -#define COLOR_WHITEMODE_ISSUE_BUTTON_BG "#ef7f7f" -#define COLOR_WHITEMODE_BACKGROUND "#ffffff" -#define COLOR_WHITEMODE_DARKBACKGROUND "#eeeeee" +#define COLOR_WHITEMODE_INFO_BUTTONS_BG "#90B3DD" +#define COLOR_WHITEMODE_ISSUE_BUTTON_BG "#EF7F7F" +#define COLOR_WHITEMODE_BACKGROUND "#F0F0F0" +#define COLOR_WHITEMODE_DARKBACKGROUND "#E6E6E6" #define COLOR_WHITEMODE_TEXT "#000000" #define COLOR_FLOORTILE_GRAY "#8D8B8B" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index d64fa30047..d9b30bf0e3 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -10,6 +10,8 @@ #define CHECK_BITFIELD(variable, flag) (variable & (flag)) #define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag)) +#define CHECK_MULTIPLE_BITFIELDS(flagvar, flags) (((flagvar) & (flags)) == (flags)) + GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)) // for /datum/var/datum_flags diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm index 2ba5012301..fe50319295 100644 --- a/code/__DEFINES/logging.dm +++ b/code/__DEFINES/logging.dm @@ -35,6 +35,7 @@ #define LOG_GAME (1 << 12) #define LOG_ADMIN_PRIVATE (1 << 13) #define LOG_ASAY (1 << 14) +#define LOG_VIRUS (1 << 15) //Individual logging panel pages #define INDIVIDUAL_ATTACK_LOG (LOG_ATTACK) diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b6115e93e9..ba5e105041 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -314,7 +314,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S #define MAP_MAXZ 6 // Defib stats -#define DEFIB_TIME_LIMIT 120 +#define DEFIB_TIME_LIMIT 960 #define DEFIB_TIME_LOSS 60 // Diagonal movement diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index e9524a015a..fed2987a89 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -205,8 +205,6 @@ #define MAX_CHICKENS 50 -#define UNHEALING_EAR_DAMAGE 100 - #define INCORPOREAL_MOVE_BASIC 1 #define INCORPOREAL_MOVE_SHADOW 2 // leaves a trail of shadows @@ -258,6 +256,9 @@ #define MAX_QUIRKS 6 //The maximum amount of quirks one character can have at roundstart +#define MAX_REVIVE_FIRE_DAMAGE 180 +#define MAX_REVIVE_BRUTE_DAMAGE 180 + // AI Toggles #define AI_CAMERA_LUMINOSITY 5 #define AI_VOX // Comment out if you don't want VOX to be enabled and have players download the voice sounds. diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 8d6c0644cf..ba8d229f12 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -39,3 +39,12 @@ #define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. #define VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled. #define VOICEBOX_DISABLED (1<<7) // The voicebox is currently turned off. + +// Flags for the organ_flags var on /obj/item/organ + +#define ORGAN_SYNTHETIC (1<<0) //Synthetic organs, or cybernetic organs. Reacts to EMPs and don't deteriorate or heal +#define ORGAN_FROZEN (1<<1) //Frozen organs, don't deteriorate +#define ORGAN_FAILING (1<<2) //Failing organs perform damaging effects until replaced or fixed +#define ORGAN_EXTERNAL (1<<3) //Was this organ implanted/inserted/etc, if true will not be removed during species change. +#define ORGAN_VITAL (1<<4) //Currently only the brain +#define ORGAN_NO_SPOIL (1<<5) //Currently only the brain diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index 174289d3bb..36ea64de2c 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -34,3 +34,17 @@ #define DEL_REAGENT 1 // reagent deleted (fully cleared) #define ADD_REAGENT 2 // reagent added #define REM_REAGENT 3 // reagent removed (may still exist) + +//reagent bitflags, used for altering how they works +#define REAGENT_DEAD_PROCESS (1<<0) //calls on_mob_dead() if present in a dead body +#define REAGENT_DONOTSPLIT (1<<1) //Do not split the chem at all during processing +#define REAGENT_ONLYINVERSE (1<<2) //Only invert chem, no splitting +#define REAGENT_ONMOBMERGE (1<<3) //Call on_mob_life proc when reagents are merging. +#define REAGENT_INVISIBLE (1<<4) //Doesn't appear on handheld health analyzers. +#define REAGENT_FORCEONNEW (1<<5) //Forces a on_new() call without a data overhead +#define REAGENT_SNEAKYNAME (1<<6) //When inverted, the inverted chem uses the name of the original chem +#define REAGENT_SPLITRETAINVOL (1<<7) //Retains initial volume of chem when splitting + +//Chemical reaction flags, for determining reaction specialties +#define REACTION_CLEAR_IMPURE (1<<0) //Convert into impure/pure on reaction completion +#define REACTION_CLEAR_INVERSE (1<<1) //Convert into inverse on reaction completion when purity is low enough diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index 1d3ea1347a..b975aa1f89 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -8,6 +8,9 @@ #define UNCONSCIOUS 2 #define DEAD 3 +//Maximum healthiness an individual can have +#define MAX_SATIETY 600 + // bitflags for machine stat variable #define BROKEN (1<<0) #define NOPOWER (1<<1) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index e198041c6e..79ba18b5d5 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -165,6 +165,7 @@ #define OBESITY "obesity" #define MAGIC_TRAIT "magic" #define TRAUMA_TRAIT "trauma" +#define DISEASE_TRAIT "disease" #define SPECIES_TRAIT "species" #define ORGAN_TRAIT "organ" #define JOB_TRAIT "job" diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index ac17df5773..c19a7a64b0 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -58,6 +58,10 @@ if (CONFIG_GET(flag/log_game)) WRITE_LOG(GLOB.world_game_log, "GAME: [text]") +/proc/log_virus(text) + if (CONFIG_GET(flag/log_virus)) + WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]") + /proc/log_access(text) if (CONFIG_GET(flag/log_access)) WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]") diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index 7f0b5a3c07..5271b407a5 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -3,7 +3,7 @@ for(var/file in args) src << browse_rsc(file) -/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html")) +/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "md")) var/path = root for(var/i=0, i[M.getToxLoss()] OXY:[M.getOxyLoss()] CLONE:[M.getCloneLoss()] - BRAIN:[M.getBrainLoss()] + BRAIN:[M.getOrganLoss(ORGAN_SLOT_BRAIN)] STAMINA:[M.getStaminaLoss()] AROUSAL:[M.getArousalLoss()] - + "} + if(GLOB.Debug2) + atomsnowflake += {" + HEART:[M.getOrganLoss(ORGAN_SLOT_HEART)] + LIVER:[M.getOrganLoss(ORGAN_SLOT_LIVER)] + LUNGS:[M.getOrganLoss(ORGAN_SLOT_LUNGS)] + EYES:[M.getOrganLoss(ORGAN_SLOT_EYES)] + EARS:[M.getOrganLoss(ORGAN_SLOT_EARS)] + STOMACH:[M.getOrganLoss(ORGAN_SLOT_STOMACH)] + TONGUE:[M.getOrganLoss(ORGAN_SLOT_TONGUE)] + APPENDIX:[M.getOrganLoss(ORGAN_SLOT_APPENDIX)] + "} + atomsnowflake += {" + "} else atomsnowflake += "[D]" @@ -1334,8 +1347,8 @@ L.adjustOxyLoss(amount) newamt = L.getOxyLoss() if("brain") - L.adjustBrainLoss(amount) - newamt = L.getBrainLoss() + L.adjustOrganLoss(ORGAN_SLOT_BRAIN, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_BRAIN) if("clone") L.adjustCloneLoss(amount) newamt = L.getCloneLoss() @@ -1345,6 +1358,30 @@ if("arousal") L.adjustArousalLoss(amount) newamt = L.getArousalLoss() + if("heart") + L.adjustOrganLoss(ORGAN_SLOT_HEART, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_HEART) + if("liver") + L.adjustOrganLoss(ORGAN_SLOT_LIVER, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_LIVER) + if("lungs") + L.adjustOrganLoss(ORGAN_SLOT_LUNGS, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_LUNGS) + if("eye_sight") + L.adjustOrganLoss(ORGAN_SLOT_EYES, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_EYES) + if("ears") + L.adjustOrganLoss(ORGAN_SLOT_EARS, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_EARS) + if("stomach") + L.adjustOrganLoss(ORGAN_SLOT_STOMACH, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_STOMACH) + if("tongue") + L.adjustOrganLoss(ORGAN_SLOT_TONGUE, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_TONGUE) + if("appendix") + L.adjustOrganLoss(ORGAN_SLOT_APPENDIX, amount) + newamt = L.getOrganLoss(ORGAN_SLOT_APPENDIX) else to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]") return @@ -1360,4 +1397,4 @@ return var/mob/living/carbon/human/H = locate(href_list["copyoutfit"]) in GLOB.carbon_list if(istype(H)) - H.copy_outfit() \ No newline at end of file + H.copy_outfit() diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index e1432bf9a6..c125a9b7c7 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -144,3 +144,9 @@ if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs))) return FALSE return ..() + +/mob/living/proc/CanSpreadAirborneDisease() + return !is_mouth_covered() + +/mob/living/carbon/CanSpreadAirborneDisease() + return !((head && (head.flags_cover & HEADCOVERSMOUTH) && (head.armor.getRating("bio") >= 25)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && (wear_mask.armor.getRating("bio") >= 25))) \ No newline at end of file diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 0af4eea8ac..8a6966666e 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -55,6 +55,13 @@ D.after_add() infectee.med_hud_set_status() + var/turf/source_turf = get_turf(infectee) + log_virus("[key_name(infectee)] was infected by virus: [src.admin_details()] at [loc_name(source_turf)]") + +//Return a string for admin logging uses, should describe the disease in detail +/datum/disease/proc/admin_details() + return "[src.name] : [src.type]" + /datum/disease/proc/stage_act() var/cure = has_cure() @@ -65,15 +72,17 @@ if(!cure) if(prob(stage_prob)) - stage = min(stage + 1,max_stages) + update_stage(min(stage + 1,max_stages)) else if(prob(cure_chance)) - stage = max(stage - 1, 1) + update_stage(max(stage - 1, 1)) if(disease_flags & CURABLE) if(cure && prob(cure_chance)) cure() +/datum/disease/proc/update_stage(new_stage) + stage = new_stage /datum/disease/proc/has_cure() if(!(disease_flags & CURABLE)) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index a4a4936f0e..8d5e915b31 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -31,9 +31,9 @@ var/id = "" var/processing = FALSE var/mutable = TRUE //set to FALSE to prevent most in-game methods of altering the disease via virology - var/oldres + var/oldres //To prevent setting new cures unless resistance changes. - // The order goes from easy to cure to hard to cure. + // The order goes from easy to cure to hard to cure. Keep in mind that sentient diseases pick two cures from tier 6 and up, ensure they wont react away in bodies. var/static/list/advance_cures = list( list( // level 1 "copper", "silver", "iodine", "iron", "carbon" @@ -110,15 +110,22 @@ return if(symptoms && symptoms.len) - if(!processing) processing = TRUE for(var/datum/symptom/S in symptoms) - S.Start(src) + if(S.Start(src)) //this will return FALSE if the symptom is neutered + S.next_activation = world.time + rand(S.symptom_delay_min * 10, S.symptom_delay_max * 10) + S.on_stage_change(src) for(var/datum/symptom/S in symptoms) S.Activate(src) +// Tell symptoms stage changed +/datum/disease/advance/update_stage(new_stage) + ..() + for(var/datum/symptom/S in symptoms) + S.on_stage_change(src) + // Compares type then ID. /datum/disease/advance/IsSame(datum/disease/advance/D) @@ -138,9 +145,18 @@ A.properties = properties.Copy() A.id = id A.mutable = mutable + A.oldres = oldres //this is a new disease starting over at stage 1, so processing is not copied return A +//Describe this disease to an admin in detail (for logging) +/datum/disease/advance/admin_details() + var/list/name_symptoms = list() + for(var/datum/symptom/S in symptoms) + name_symptoms += S.name + return "[name] sym:[english_list(name_symptoms)] r:[totalResistance()] s:[totalStealth()] ss:[totalStageSpeed()] t:[totalTransmittable()]" + + /* NEW PROCS @@ -191,6 +207,10 @@ /datum/disease/advance/proc/Refresh(new_name = FALSE) GenerateProperties() AssignProperties() + if(processing && symptoms && symptoms.len) + for(var/datum/symptom/S in symptoms) + S.Start(src) + S.on_stage_change(src) id = null var/the_id = GetDiseaseID() @@ -342,28 +362,28 @@ return id -// Add a symptom, if it is over the limit (with a small chance to be able to go over) -// we take a random symptom away and add the new one. +// Add a symptom, if it is over the limit we take a random symptom away and add the new one. /datum/disease/advance/proc/AddSymptom(datum/symptom/S) if(HasSymptom(S)) return - if(symptoms.len < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1)) - symptoms += S - else + if(!(symptoms.len < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1))) RemoveSymptom(pick(symptoms)) - symptoms += S + symptoms += S + S.OnAdd(src) // Simply removes the symptom. /datum/disease/advance/proc/RemoveSymptom(datum/symptom/S) symptoms -= S + S.OnRemove(src) // Neuter a symptom, so it will only affect stats /datum/disease/advance/proc/NeuterSymptom(datum/symptom/S) if(!S.neutered) S.neutered = TRUE S.name += " (neutered)" + S.OnRemove(src) /* @@ -417,7 +437,7 @@ var/i = VIRUS_SYMPTOM_LIMIT - var/datum/disease/advance/D = new(0, null) + var/datum/disease/advance/D = new() D.symptoms = list() var/list/symptoms = list() @@ -445,9 +465,6 @@ D.AssignName(new_name) D.Refresh() - for(var/datum/disease/advance/AD in SSdisease.active_diseases) - AD.Refresh() - for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list)) if(!is_station_level(H.z)) continue @@ -458,8 +475,8 @@ var/list/name_symptoms = list() for(var/datum/symptom/S in D.symptoms) name_symptoms += S.name - message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]") - + message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.admin_details()]") + log_virus("[key_name(user)] has triggered a custom virus outbreak of [D.admin_details()]!") /datum/disease/advance/proc/totalStageSpeed() return properties["stage_rate"] diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm index 81cdad8042..a54b132de1 100644 --- a/code/datums/diseases/advance/symptoms/choking.dm +++ b/code/datums/diseases/advance/symptoms/choking.dm @@ -144,5 +144,5 @@ Bonus /datum/symptom/asphyxiation/proc/Asphyxiate_death(mob/living/M, datum/disease/advance/A) var/get_damage = rand(25,35) * power M.adjustOxyLoss(get_damage) - M.adjustBrainLoss(get_damage/2) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, get_damage/2) return 1 diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index e7315c6bb1..260c6888d7 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -55,7 +55,7 @@ Bonus to_chat(M, "You can't think straight!") M.confused = min(100 * power, M.confused + 8) if(brain_damage) - M.adjustBrainLoss(3 * power, 80) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * power, 80) M.updatehealth() return diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index 83d93c55e0..e4283101f5 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -70,6 +70,6 @@ BONUS addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 6) addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 12) addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 18) - if(infective) + if(infective && M.CanSpreadAirborneDisease()) A.spread(1) diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index cc388f0b59..3718104b48 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -50,9 +50,9 @@ Bonus if(5) if(power > 2) var/obj/item/organ/ears/ears = M.getorganslot(ORGAN_SLOT_EARS) - if(istype(ears) && ears.ear_damage < UNHEALING_EAR_DAMAGE) + if(istype(ears) && ears.damage < ears.maxHealth) to_chat(M, "Your ears pop painfully and start bleeding!") - ears.ear_damage = max(ears.ear_damage, UNHEALING_EAR_DAMAGE) + ears.damage = max(ears.damage, ears.maxHealth) M.emote("scream") else to_chat(M, "Your ears pop and begin ringing loudly!") diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index e666c7acd6..1ab3456c22 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -219,8 +219,10 @@ level = 8 passive_message = "The pain from your wounds makes you feel oddly sleepy..." var/deathgasp = FALSE + var/stabilize = FALSE var/active_coma = FALSE //to prevent multiple coma procs threshold_desc = "Stealth 2: Host appears to die when falling into a coma.
\ + Resistance 4: The virus also stabilizes the host while they are in critical condition.
\ Stage Speed 7: Increases healing speed." /datum/symptom/heal/coma/Start(datum/disease/advance/A) @@ -228,9 +230,25 @@ return if(A.properties["stage_rate"] >= 7) power = 1.5 + if(A.properties["resistance"] >= 4) + stabilize = TRUE if(A.properties["stealth"] >= 2) deathgasp = TRUE +/datum/symptom/heal/coma/on_stage_change(datum/disease/advance/A) //mostly copy+pasted from the code for self-respiration's TRAIT_NOBREATH stuff + if(!..()) + return FALSE + if(A.stage >= 4 && stabilize) + ADD_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT) + else + REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT) + return TRUE + +/datum/symptom/heal/coma/End(datum/disease/advance/A) + if(!..()) + return + REMOVE_TRAIT(A.affected_mob, TRAIT_NOCRITDAMAGE, DISEASE_TRAIT) + /datum/symptom/heal/coma/CanHeal(datum/disease/advance/A) var/mob/living/M = A.affected_mob if(HAS_TRAIT(M, TRAIT_DEATHCOMA)) diff --git a/code/datums/diseases/advance/symptoms/oxygen.dm b/code/datums/diseases/advance/symptoms/oxygen.dm index cb7d1a6d6d..65f8307101 100644 --- a/code/datums/diseases/advance/symptoms/oxygen.dm +++ b/code/datums/diseases/advance/symptoms/oxygen.dm @@ -50,3 +50,19 @@ Bonus if(prob(base_message_chance)) to_chat(M, "[pick("Your lungs feel great.", "You realize you haven't been breathing.", "You don't feel the need to breathe.")]") return + +/datum/symptom/oxygen/on_stage_change(datum/disease/advance/A) + if(!..()) + return FALSE + var/mob/living/carbon/M = A.affected_mob + if(A.stage >= 4) + ADD_TRAIT(M, TRAIT_NOBREATH, DISEASE_TRAIT) + else + REMOVE_TRAIT(M, TRAIT_NOBREATH, DISEASE_TRAIT) + return TRUE + +/datum/symptom/oxygen/End(datum/disease/advance/A) + if(!..()) + return + if(A.stage >= 4) + REMOVE_TRAIT(A.affected_mob, TRAIT_NOBREATH, DISEASE_TRAIT) \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm index 8d7cc5ed70..2705e0b168 100644 --- a/code/datums/diseases/advance/symptoms/sensory.dm +++ b/code/datums/diseases/advance/symptoms/sensory.dm @@ -51,7 +51,7 @@ M.hallucination = max(0, M.hallucination - 10) if(A.stage >= 5) - M.adjustBrainLoss(-3) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -3) if(trauma_heal_mild && iscarbon(M)) var/mob/living/carbon/C = M if(prob(10)) @@ -100,8 +100,8 @@ else if(M.eye_blind || M.eye_blurry) M.set_blindness(0) M.set_blurriness(0) - else if(eyes.eye_damage > 0) - M.adjust_eye_damage(-1) + else if(eyes.damage > 0) + eyes.applyOrganDamage(-1) else if(prob(base_message_chance)) - to_chat(M, "[pick("Your eyes feel great.","You feel like your eyes can focus more clearly.", "You don't feel the need to blink.","Your ears feel great.","Your healing feels more acute.")]") \ No newline at end of file + to_chat(M, "[pick("Your eyes feel great.","You feel like your eyes can focus more clearly.", "You don't feel the need to blink.","Your ears feel great.","Your healing feels more acute.")]") diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index 8fe70c542f..5e21fb3dd9 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -48,4 +48,5 @@ Bonus M.emote("sniff") else M.emote("sneeze") - A.spread(4 + power) \ No newline at end of file + if(M.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth + A.spread(4 + power) \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/species.dm b/code/datums/diseases/advance/symptoms/species.dm index d0c32f3244..a8b18ae735 100644 --- a/code/datums/diseases/advance/symptoms/species.dm +++ b/code/datums/diseases/advance/symptoms/species.dm @@ -8,12 +8,14 @@ level = 5 severity = 0 -/datum/symptom/undead_adaptation/Start(datum/disease/advance/A) - if(!..()) - return +/datum/symptom/undead_adaptation/OnAdd(datum/disease/advance/A) A.process_dead = TRUE A.infectable_biotypes |= MOB_UNDEAD +/datum/symptom/undead_adaptation/OnRemove(datum/disease/advance/A) + A.process_dead = FALSE + A.infectable_biotypes -= MOB_UNDEAD + /datum/symptom/inorganic_adaptation name = "Inorganic Biology" desc = "The virus can survive and replicate even in an inorganic environment, increasing its resistance and infection rate." @@ -24,7 +26,8 @@ level = 5 severity = 0 -/datum/symptom/inorganic_adaptation/Start(datum/disease/advance/A) - if(!..()) - return - A.infectable_biotypes |= MOB_INORGANIC \ No newline at end of file +/datum/symptom/inorganic_adaptation/OnAdd(datum/disease/advance/A) + A.infectable_biotypes |= MOB_INORGANIC + +/datum/symptom/inorganic_adaptation/OnRemove(datum/disease/advance/A) + A.infectable_biotypes -= MOB_INORGANIC \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm index e42b68cc05..99dbd397a2 100644 --- a/code/datums/diseases/advance/symptoms/symptoms.dm +++ b/code/datums/diseases/advance/symptoms/symptoms.dm @@ -38,11 +38,10 @@ return CRASH("We couldn't assign an ID!") -// Called when processing of the advance disease, which holds this symptom, starts. +// Called when processing of the advance disease that holds this symptom infects a host and upon each Refresh() of that advance disease. /datum/symptom/proc/Start(datum/disease/advance/A) if(neutered) return FALSE - next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10) //so it doesn't instantly activate on infection return TRUE // Called when the advance disease is going to be deleted or when the advance disease stops processing. @@ -60,6 +59,11 @@ next_activation = world.time + rand(symptom_delay_min * 10, symptom_delay_max * 10) return TRUE +/datum/symptom/proc/on_stage_change(datum/disease/advance/A) + if(neutered) + return FALSE + return TRUE + /datum/symptom/proc/Copy() var/datum/symptom/new_symp = new type new_symp.name = name @@ -69,3 +73,9 @@ /datum/symptom/proc/generate_threshold_desc() return + +/datum/symptom/proc/OnAdd(datum/disease/advance/A) //Overload when a symptom needs to be active before processing, like changing biotypes. + return + +/datum/symptom/proc/OnRemove(datum/disease/advance/A) //But dont forget to remove them too. + return \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index d1cc6905a6..b4a33cb837 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -45,7 +45,7 @@ Bonus return var/mob/living/carbon/M = A.affected_mob var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) - if(istype(eyes)) + if(eyes) switch(A.stage) if(1, 2) if(prob(base_message_chance) && !suppress_warning) @@ -53,20 +53,20 @@ Bonus if(3, 4) to_chat(M, "Your eyes burn!") M.blur_eyes(10) - M.adjust_eye_damage(1) + eyes.applyOrganDamage(1) else M.blur_eyes(20) - M.adjust_eye_damage(5) - if(eyes.eye_damage >= 10) + eyes.applyOrganDamage(5) + if(eyes.damage >= 10) M.become_nearsighted(EYE_DAMAGE) - if(prob(eyes.eye_damage - 10 + 1)) + if(prob(eyes.damage - 10 + 1)) if(!remove_eyes) if(!HAS_TRAIT(M, TRAIT_BLIND)) to_chat(M, "You go blind!") - M.become_blind(EYE_DAMAGE) + eyes.applyOrganDamage(eyes.maxHealth) else M.visible_message("[M]'s eyes fall off their sockets!", "Your eyes fall off their sockets!") eyes.Remove(M) eyes.forceMove(get_turf(M)) else - to_chat(M, "Your eyes burn horrifically!") \ No newline at end of file + to_chat(M, "Your eyes burn horrifically!") diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index 5708447542..be7e6ceecd 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -27,8 +27,10 @@ A.update_icon() if(prob(3)) to_chat(affected_mob, "You feel a stabbing pain in your abdomen!") + affected_mob.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 5) affected_mob.Stun(rand(40,60)) affected_mob.adjustToxLoss(1) if(3) if(prob(1)) affected_mob.vomit(95) + affected_mob.adjustOrganLoss(ORGAN_SLOT_APPENDIX, 15) diff --git a/code/datums/diseases/brainrot.dm b/code/datums/diseases/brainrot.dm index 0a34501763..98ae74270b 100644 --- a/code/datums/diseases/brainrot.dm +++ b/code/datums/diseases/brainrot.dm @@ -24,7 +24,7 @@ if(prob(2)) to_chat(affected_mob, "You don't feel like yourself.") if(prob(5)) - affected_mob.adjustBrainLoss(1, 170) + affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1, 170) affected_mob.updatehealth() if(3) if(prob(2)) @@ -32,7 +32,7 @@ if(prob(2)) affected_mob.emote("drool") if(prob(10)) - affected_mob.adjustBrainLoss(2, 170) + affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2, 170) affected_mob.updatehealth() if(prob(2)) to_chat(affected_mob, "Your try to remember something important...but can't.") @@ -43,7 +43,7 @@ if(prob(2)) affected_mob.emote("drool") if(prob(15)) - affected_mob.adjustBrainLoss(3, 170) + affected_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 170) affected_mob.updatehealth() if(prob(2)) to_chat(affected_mob, "Strange buzzing fills your head, removing all thoughts.") diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm index 71545476ff..c7644997ee 100644 --- a/code/datums/martial/cqc.dm +++ b/code/datums/martial/cqc.dm @@ -79,7 +79,7 @@ "[A] kicks your head, knocking you out!") playsound(get_turf(A), 'sound/weapons/genhit1.ogg', 50, 1, -1) D.SetSleeping(300) - D.adjustBrainLoss(15, 150) + D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150) return TRUE /datum/martial_art/cqc/proc/Pressure(mob/living/carbon/human/A, mob/living/carbon/human/D) diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm index 8f1a33a8b3..34301516dc 100644 --- a/code/datums/martial/psychotic_brawl.dm +++ b/code/datums/martial/psychotic_brawl.dm @@ -46,7 +46,7 @@ D.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD) A.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD) if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat)) - D.adjustBrainLoss(5) + D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) A.Stun(rand(10,45)) D.Knockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency if(5,6) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index e205d7a435..801e8c8c7a 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -224,7 +224,7 @@ H.visible_message("[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!", \ "[user] knocks you unconscious!") H.SetSleeping(600) - H.adjustBrainLoss(15, 150) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150) else return ..() diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 336945f622..563d06ca57 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -521,7 +521,7 @@ itemUser.adjustToxLoss(-1.5, forced = TRUE) //Because Slime People are people too itemUser.adjustOxyLoss(-1.5) itemUser.adjustStaminaLoss(-1.5) - itemUser.adjustBrainLoss(-1.5) + itemUser.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1.5) itemUser.adjustCloneLoss(-0.5) //Becasue apparently clone damage is the bastion of all health //Heal all those around you, unbiased for(var/mob/living/L in view(7, owner)) @@ -533,7 +533,7 @@ L.adjustToxLoss(-3.5, forced = TRUE) //Because Slime People are people too L.adjustOxyLoss(-3.5) L.adjustStaminaLoss(-3.5) - L.adjustBrainLoss(-3.5) + L.adjustOrganLoss(ORGAN_SLOT_BRAIN, -3.5) L.adjustCloneLoss(-1) //Becasue apparently clone damage is the bastion of all health else if(issilicon(L)) L.adjustBruteLoss(-3.5) diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index f77fe37333..f42fe688c5 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -119,7 +119,7 @@ medical_record_text = "Patient has a tumor in their brain that is slowly driving them to brain death." /datum/quirk/brainproblems/on_process() - quirk_holder.adjustBrainLoss(0.2) + quirk_holder.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2) /datum/quirk/nearsighted //t. errorage name = "Nearsighted" @@ -345,10 +345,12 @@ gain_text = "You find yourself unable to speak!" lose_text = "You feel a growing strength in your vocal chords." medical_record_text = "Functionally mute, patient is unable to use their voice in any capacity." + var/datum/brain_trauma/severe/mute/mute /datum/quirk/mute/add() var/mob/living/carbon/human/H = quirk_holder - H.gain_trauma(TRAIT_MUTE, TRAUMA_RESILIENCE_SURGERY) + mute = new + H.gain_trauma(mute, TRAUMA_RESILIENCE_SURGERY) /datum/quirk/mute/on_process() if(quirk_holder.mind && LAZYLEN(quirk_holder.mind.antag_datums)) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 46d124ee49..513fea4360 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -179,7 +179,7 @@ data["occupant"]["toxLoss"] = mob_occupant.getToxLoss() data["occupant"]["fireLoss"] = mob_occupant.getFireLoss() data["occupant"]["cloneLoss"] = mob_occupant.getCloneLoss() - data["occupant"]["brainLoss"] = mob_occupant.getBrainLoss() + data["occupant"]["brainLoss"] = mob_occupant.getOrganLoss(ORGAN_SLOT_BRAIN) data["occupant"]["reagents"] = list() if(mob_occupant.reagents && mob_occupant.reagents.reagent_list.len) for(var/datum/reagent/R in mob_occupant.reagents.reagent_list) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index a175558f74..8e49c0a126 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -241,13 +241,14 @@ var/obj/item/I = pick_n_take(unattached_flesh) if(isorgan(I)) var/obj/item/organ/O = I + O.organ_flags &= ~ORGAN_FROZEN O.Insert(mob_occupant) else if(isbodypart(I)) var/obj/item/bodypart/BP = I BP.attach_limb(mob_occupant) //Premature clones may have brain damage. - mob_occupant.adjustBrainLoss(-((speed_coeff / 2) * dmg_mult)) + mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, -((speed_coeff / 2) * dmg_mult)) use_power(7500) //This might need tweaking. @@ -261,6 +262,7 @@ for(var/i in unattached_flesh) if(isorgan(i)) var/obj/item/organ/O = i + O.organ_flags &= ~ORGAN_FROZEN O.Insert(mob_occupant) else if(isbodypart(i)) var/obj/item/bodypart/BP = i @@ -346,6 +348,9 @@ if(mess) //Clean that mess and dump those gibs! for(var/obj/fl in unattached_flesh) fl.forceMove(T) + if(istype(fl, /obj/item/organ)) + var/obj/item/organ/O = fl + O.organ_flags &= ~ORGAN_FROZEN unattached_flesh.Cut() mess = FALSE new /obj/effect/gibspawner/generic(get_turf(src)) @@ -442,7 +447,7 @@ unattached_flesh.Cut() H.setCloneLoss(CLONE_INITIAL_DAMAGE) //Yeah, clones start with very low health, not with random, because why would they start with random health - H.setBrainLoss(CLONE_INITIAL_DAMAGE) + //H.setOrganLoss(ORGAN_SLOT_BRAIN, CLONE_INITIAL_DAMAGE) // In addition to being cellularly damaged and having barely any // brain function, they also have no limbs or internal organs. @@ -458,8 +463,9 @@ for(var/o in H.internal_organs) var/obj/item/organ/organ = o - if(!istype(organ) || organ.vital) + if(!istype(organ) || (organ.organ_flags & ORGAN_VITAL)) continue + organ.organ_flags |= ORGAN_FROZEN organ.Remove(H, special=TRUE) organ.forceMove(src) unattached_flesh += organ diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 0cce853c49..886851a6a8 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -374,7 +374,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) else if((ACCESS_HOP in scan.access) && ((target_dept==1) || !target_dept)) region_access |= 1 - region_access |= 6 get_subordinates("Head of Personnel") if((ACCESS_HOS in scan.access) && ((target_dept==2) || !target_dept)) region_access |= 2 @@ -388,6 +387,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) if((ACCESS_CE in scan.access) && ((target_dept==5) || !target_dept)) region_access |= 5 get_subordinates("Chief Engineer") + if((ACCESS_QM in scan.access) && ((target_dept==6) || !target_dept)) + region_access |= 6 + get_subordinates("Quartermaster") if(region_access) authenticated = 1 else if ((!( authenticated ) && issilicon(usr)) && (!modify)) @@ -607,7 +609,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) typed_circuit.target_dept = target_dept else target_dept = typed_circuit.target_dept - var/list/dept_list = list("general","security","medical","science","engineering") + var/list/dept_list = list("civilian","security","medical","science","engineering","cargo") name = "[dept_list[target_dept]] department console" /obj/machinery/computer/card/minor/hos @@ -631,3 +633,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) icon_screen = "idce" light_color = LIGHT_COLOR_YELLOW + +/obj/machinery/computer/card/minor/qm + target_dept = 6 + icon_screen = "idqm" + + light_color = LIGHT_COLOR_ORANGE \ No newline at end of file diff --git a/modular_citadel/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm similarity index 69% rename from modular_citadel/code/game/machinery/cryopod.dm rename to code/game/machinery/cryopod.dm index 15e7d34c65..e358f10346 100644 --- a/modular_citadel/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -20,105 +20,146 @@ 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. var/list/frozen_crew = list() var/list/frozen_items = list() - var/storage_type = "crewmembers" - var/storage_name = "Cryogenic Oversight Control" + // Used for containing rare items traitors need to steal, so it's not + // game-over if they get iced + var/list/objective_items = list() + // A cache of theft datums so you don't have to re-create them for + // each item check + var/list/theft_cache = list() + var/allow_items = TRUE +/obj/machinery/computer/cryopod/attack_ai() + attack_hand() + /obj/machinery/computer/cryopod/ui_interact(mob/user = usr) - . = ..() + if(!is_operational()) + return user.set_machine(src) add_fingerprint(user) - var/dat + var/dat = "" - dat += "

[storage_name]
" - dat += "Welcome, [user.real_name].


" - dat += "View storage log.
" - if(allow_items) - dat += "View objects.
" - dat += "Recover object.
" - dat += "Recover all objects.
" + dat += "

Welcome, [user.real_name].


" + dat += "

" - user << browse(dat, "window=cryopod_console") - onclose(user, "cryopod_console") + switch(src.menu) + if(1) + dat += "View crew storage log

" + if(allow_items) + dat += "View objects storage log

" + dat += "Recover object

" + dat += "Recover all objects
" + if(2) + dat += "<< Back

" + dat += "

Recently stored Crew




" + if(!frozen_crew.len) + dat += "There has been no storage usage at this terminal.
" + else + for(var/person in frozen_crew) + dat += "[person]
" + dat += "
" + if(3) + dat += "<< Back

" + dat += "

Recently stored objects




" + if(!frozen_items.len) + dat += "There has been no storage usage at this terminal.
" + else + for(var/obj/item/I in frozen_items) + dat += "[I.name]
" + dat += "
" + + var/datum/browser/popup = new(user, "cryopod_console", "Cryogenic System Control") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() /obj/machinery/computer/cryopod/Topic(href, href_list) if(..()) - return 1 + return TRUE var/mob/user = usr add_fingerprint(user) - if(href_list["log"]) - - var/dat = "Recently stored [storage_type]


" - for(var/person in frozen_crew) - dat += "[person]
" - dat += "
" - - user << browse(dat, "window=cryolog") - - if(href_list["view"]) - if(!allow_items) return - - var/dat = "Recently stored objects


" - for(var/obj/item/I in frozen_items) - dat += "[I.name]
" - dat += "
" - - user << browse(dat, "window=cryoitems") - - else if(href_list["item"]) + if(href_list["item"]) if(!allowed(user)) to_chat(user, "Access Denied.") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) + updateUsrDialog() return if(!allow_items) return if(frozen_items.len == 0) to_chat(user, "There is nothing to recover from storage.") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) + updateUsrDialog() return var/obj/item/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in frozen_items + playsound(src, "terminal_type", 25, 0) if(!I) return if(!(I in frozen_items)) to_chat(user, "\The [I] is no longer in storage.") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) + updateUsrDialog() return visible_message("The console beeps happily as it disgorges \the [I].") + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) - I.forceMove(get_turf(src)) + I.forceMove(drop_location()) + if(user && Adjacent(user) && !issiliconoradminghost(user)) + user.put_in_hands(I) frozen_items -= I + updateUsrDialog() else if(href_list["allitems"]) + playsound(src, "terminal_type", 25, 0) if(!allowed(user)) to_chat(user, "Access Denied.") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) + updateUsrDialog() return if(!allow_items) return if(frozen_items.len == 0) to_chat(user, "There is nothing to recover from storage.") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) return visible_message("The console beeps happily as it disgorges the desired objects.") + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0) for(var/obj/item/I in frozen_items) - I.forceMove(get_turf(src)) + I.forceMove(drop_location()) frozen_items -= I + 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() + return //Cryopods themselves. /obj/machinery/cryopod @@ -176,16 +217,17 @@ /obj/item/gun/energy/laser/cyborg ) -/obj/machinery/cryopod/Initialize() +/obj/machinery/cryopod/Initialize(mapload) . = ..() update_icon() - find_control_computer(TRUE) + find_control_computer(mapload) /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 // 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) @@ -193,7 +235,7 @@ message_admins("Cryopod in [get_area(src)] could not find control computer!") last_no_computer_message = world.time - return null + return control_computer != null /obj/machinery/cryopod/close_machine(mob/user) if(!control_computer) @@ -242,10 +284,75 @@ despawn_occupant() +#define CRYO_DESTROY 0 +#define CRYO_PRESERVE 1 +#define CRYO_OBJECTIVE 2 + +/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I) + for(var/datum/objective_item/steal/T in control_computer.theft_cache) + if(istype(I, T.targetitem) && T.check_special_completion(I)) + return CRYO_OBJECTIVE + for(var/T in preserve_items) + if(istype(I, T) && !(I.type in do_not_preserve_items)) + return CRYO_PRESERVE + return CRYO_DESTROY + // 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 + //Handle Borg stuff first + if(iscyborg(mob_occupant)) + var/mob/living/silicon/robot/R = mob_occupant + if(!istype(R)) return ..() + + R.contents -= R.mmi + qdel(R.mmi) + for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc + for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags + if(should_preserve_item(O) != CRYO_DESTROY) // Preserve important things inside the item + continue + O.forceMove(src) + R.module.remove_module(I, TRUE) //delete the module itself so it doesn't transfer over. + + //Drop all items into the pod. + for(var/obj/item/I in mob_occupant) + mob_occupant.doUnEquip(I) + I.forceMove(src) + + if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. + if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation + continue + for(var/obj/item/O in I.contents) + if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck! + continue + O.forceMove(src) + + //Delete all items not on the preservation list. + var/list/items = contents + items -= mob_occupant // Don't delete the occupant + + for(var/obj/item/I in items) + if(istype(I, /obj/item/pda)) + var/obj/item/pda/P = I + QDEL_NULL(P.id) + qdel(P) + continue + + var/preserve = should_preserve_item(I) + if(preserve == CRYO_DESTROY) + qdel(I) + else if(control_computer && control_computer.allow_items) + control_computer.frozen_items += I + if(preserve == CRYO_OBJECTIVE) + control_computer.objective_items += I + I.loc = null + else + I.forceMove(loc) + //Update any existing objectives involving this mob. for(var/datum/objective/O in GLOB.objectives) // We don't want revs to get objectives that aren't for heads of staff. Letting @@ -302,30 +409,6 @@ announcer.announce("CRYOSTORAGE", mob_occupant.real_name, announce_rank, list()) visible_message("\The [src] hums and hisses as it moves [mob_occupant.real_name] into storage.") - - for(var/obj/item/W in mob_occupant.GetAllContents()) - if(W.loc.loc && (( W.loc.loc == loc ) || (W.loc.loc == control_computer))) - continue//means we already moved whatever this thing was in - //I'm a professional, okay - for(var/T in preserve_items) - if(istype(W, T)) - if(control_computer && control_computer.allow_items) - control_computer.frozen_items += W - mob_occupant.transferItemToLoc(W, control_computer, TRUE) - else - mob_occupant.transferItemToLoc(W, loc, TRUE) - - for(var/obj/item/W in mob_occupant.GetAllContents()) - qdel(W)//because we moved all items to preserve away - //and yes, this totally deletes their bodyparts one by one, I just couldn't bother - - if(iscyborg(mob_occupant)) - var/mob/living/silicon/robot/R = occupant - if(!istype(R)) return ..() - - R.contents -= R.mmi - qdel(R.mmi) - // Ghost and delete the mob. if(!mob_occupant.get_ghost(1)) mob_occupant.ghostize(0) // Players who cryo out may not re-enter the round @@ -334,6 +417,10 @@ open_machine() name = initial(name) +#undef CRYO_DESTROY +#undef CRYO_PRESERVE +#undef CRYO_OBJECTIVE + /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) return @@ -358,7 +445,7 @@ 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 * 600)//if we haven't warned them in the last 5 minutes + if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)//if we haven't warned them in the last 5 minutes var/caught = FALSE if(target.mind.assigned_role in GLOB.command_positions) alert("You're a Head of Staff![generic_plsnoleave_message] Be sure to put your locker items back into your locker!") @@ -366,13 +453,13 @@ if(iscultist(target) || is_servant_of_ratvar(target)) to_chat(target, "You're a Cultist![generic_plsnoleave_message]") caught = TRUE - if(istype(SSticker.mode, /datum/antagonist/blob)) - if(target.mind in GLOB.overminds) - alert("You're a Blob![generic_plsnoleave_message]") - caught = TRUE if(is_devil(target)) alert("You're a Devil![generic_plsnoleave_message]") caught = TRUE + if(istype(SSticker.mode, /datum/antagonist/gang)) + if(target.mind.has_antag_datum(/datum/antagonist/gang)) + alert("You're a Gangster![generic_plsnoleave_message]") + caught = TRUE if(istype(SSticker.mode, /datum/antagonist/rev)) if(target.mind.has_antag_datum(/datum/antagonist/rev/head)) alert("You're a Head Revolutionary![generic_plsnoleave_message]") @@ -385,8 +472,9 @@ target.client.cryo_warned = world.time return - if(!Adjacent(user)) + if(!target || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || (!ishuman(user) && !iscyborg(user)) || !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.") @@ -396,7 +484,6 @@ if(occupant) to_chat(user, "\The [src] is in use.") return - close_machine(target) to_chat(target, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") @@ -407,4 +494,4 @@ //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. \ No newline at end of file diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index 47136e8c27..6b944f762d 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -136,16 +136,17 @@ The console is located at computer/gulag_teleporter.dm linked_reclaimer.stored_items[occupant] = list() var/mob/living/mob_occupant = occupant for(var/obj/item/W in mob_occupant) - if(!is_type_in_typecache(W, telegulag_required_items) && mob_occupant.temporarilyRemoveItemFromInventory(W)) - if(istype(W, /obj/item/restraints/handcuffs)) - W.forceMove(get_turf(src)) - continue - if(linked_reclaimer) - linked_reclaimer.stored_items[mob_occupant] += W - linked_reclaimer.contents += W - W.forceMove(linked_reclaimer) - else - W.forceMove(src) + if(!is_type_in_typecache(W, telegulag_required_items)) + if(mob_occupant.temporarilyRemoveItemFromInventory(W)) + if(istype(W, /obj/item/restraints/handcuffs)) + W.forceMove(get_turf(src)) + continue + if(linked_reclaimer) + linked_reclaimer.stored_items[mob_occupant] += W + linked_reclaimer.contents += W + W.forceMove(linked_reclaimer) + else + W.forceMove(src) /obj/machinery/gulag_teleporter/proc/handle_prisoner(obj/item/id, datum/data/record/R) if(!ishuman(occupant)) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 21bbdfd14b..ae3fdb15b4 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -166,7 +166,7 @@ Toxin Content: [patient.getToxLoss()]%
Burn Severity: [patient.getFireLoss()]%
[patient.getCloneLoss() ? "Subject appears to have cellular damage." : ""]
- [patient.getBrainLoss() ? "Significant brain damage detected." : ""]
+ [patient.getOrganLoss(ORGAN_SLOT_BRAIN) ? "Significant brain damage detected." : ""]
[length(patient.get_traumas()) ? "Brain Traumas detected." : ""]
"} diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c98cef2b87..b1e5505fa8 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -514,12 +514,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) log_combat(user, M, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])") - M.adjust_blurriness(3) - M.adjust_eye_damage(rand(2,4)) var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return - if(eyes.eye_damage >= 10) + M.adjust_blurriness(3) + eyes.applyOrganDamage(rand(2,4)) + if(eyes.damage >= 10) M.adjust_blurriness(15) if(M.stat != DEAD) to_chat(M, "Your eyes start to bleed profusely!") @@ -533,7 +533,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.adjust_blurriness(10) M.Unconscious(20) M.Knockdown(40) - if (prob(eyes.eye_damage - 10 + 1)) + if (prob(eyes.damage - 10 + 1)) M.become_blind(EYE_DAMAGE) to_chat(M, "You go blind!") diff --git a/code/game/objects/items/body_egg.dm b/code/game/objects/items/body_egg.dm index 80fc0f43fd..ea72197cf0 100644 --- a/code/game/objects/items/body_egg.dm +++ b/code/game/objects/items/body_egg.dm @@ -17,26 +17,27 @@ /obj/item/organ/body_egg/Insert(var/mob/living/carbon/M, special = 0) ..() ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC) - START_PROCESSING(SSobj, src) owner.med_hud_set_status() INVOKE_ASYNC(src, .proc/AddInfectionImages, owner) /obj/item/organ/body_egg/Remove(var/mob/living/carbon/M, special = 0) - STOP_PROCESSING(SSobj, src) if(owner) REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC) owner.med_hud_set_status() INVOKE_ASYNC(src, .proc/RemoveInfectionImages, owner) ..() -/obj/item/organ/body_egg/process() +/obj/item/organ/body_egg/on_death() + . = ..() if(!owner) return - if(!(src in owner.internal_organs)) - Remove(owner) - return egg_process() +/obj/item/organ/body_egg/on_life() + . = ..() + egg_process() + + /obj/item/organ/body_egg/proc/egg_process() return diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index c260a95afd..ac7879f9ec 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -59,7 +59,7 @@ name = "Department Management Console (Computer Board)" build_path = /obj/machinery/computer/card/minor var/target_dept = 1 - var/list/dept_list = list("General","Security","Medical","Science","Engineering") + var/list/dept_list = list("Civilian","Security","Medical","Science","Engineering","Cargo") /obj/item/circuitboard/computer/card/minor/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 2a01a7e18f..639d570462 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -399,6 +399,7 @@ /obj/machinery/smartfridge/food = "food", /obj/machinery/smartfridge/drinks = "drinks", /obj/machinery/smartfridge/extract = "slimes", + /obj/machinery/smartfridge/organ = "organs", /obj/machinery/smartfridge/chemistry = "chems", /obj/machinery/smartfridge/chemistry/virology = "viruses", /obj/machinery/smartfridge/disks = "disks") diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index db26f643b5..f2531d3dfd 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -234,8 +234,13 @@ paint_mode = PAINT_NORMAL if("select_colour") if(can_change_colour) - paint_color = input(usr,"","Choose Color",paint_color) as color|null - . = TRUE + var/chosen_colour = input(usr,"","Choose Color",paint_color) as color|null + + if (!isnull(chosen_colour)) + paint_color = chosen_colour + . = TRUE + else + . = FALSE if("enter_text") var/txt = stripped_input(usr,"Choose what to write.", "Scribbles",default = text_buffer) @@ -703,12 +708,18 @@ if(isobj(target)) if(actually_paints) + if(color_hex2num(paint_color) < 350 && !istype(target, /obj/structure/window) && !istype(target, /obj/effect/decal/cleanable/crayon)) //Colors too dark are rejected + to_chat(usr, "A color that dark on an object like this? Surely not...") + return FALSE + target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY) + if(istype(target, /obj/structure/window)) if(color_hex2num(paint_color) < 255) target.set_opacity(255) else target.set_opacity(initial(target.opacity)) + . = use_charges(user, 2) var/fraction = min(1, . / reagents.maximum_volume) reagents.reaction(target, TOUCH, fraction * volume_multiplier) @@ -819,6 +830,11 @@ if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user)) to_chat(user, "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster.") +/obj/item/toy/crayon/spraycan/infinite + name = "infinite spraycan" + charges = -1 + desc = "Now with 30% more bluespace technology." + #undef RANDOM_GRAFFITI #undef RANDOM_LETTER #undef RANDOM_PUNCTUATION diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 5bef86c6d2..a4f286bf88 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -440,9 +440,20 @@ do_help(H, user) -/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H) +/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H) //Our code here is different than tg, if it breaks in testing; BUG_PROBABLE_CAUSE + var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart) + if(H.suiciding || H.hellbound || HAS_TRAIT(H, TRAIT_HUSK)) + return + if((world.time - H.timeofdeath) > tlimit) + return + if((H.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (H.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE)) + return + if(!heart || (heart.organ_flags & ORGAN_FAILING)) + return var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) - return (!H.suiciding && !(HAS_TRAIT(H, TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) + if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || H.suiciding) + return + return TRUE /obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H) if(req_defib) @@ -557,14 +568,12 @@ if(do_after(user, primetimer, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process user.visible_message("[user] places [src] on [H]'s chest.", "You place [src] on [H]'s chest.") playsound(src, 'sound/machines/defib_charge.ogg', 75, 0) - var/tplus = world.time - H.timeofdeath - // past this much time the patient is unrecoverable - // (in deciseconds) - // brain damage starts setting in on the patient after - // some time left rotting + // patients rot when they are killed, and die when they are dead + var/tplus = world.time - H.timeofdeath //length of time spent dead var/tloss = deathtimer var/total_burn = 0 var/total_brute = 0 + var/obj/item/organ/heart = H.getorgan(/obj/item/organ/heart) if(do_after(user, primetimer2, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total for(var/obj/item/carried_item in H.contents) if(istype(carried_item, /obj/item/clothing/suit/space)) @@ -589,16 +598,26 @@ failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile." else if (tplus > tlimit) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Body has decayed for too long. Further attempts futile." - else if (!H.getorgan(/obj/item/organ/heart)) + else if (!heart) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart is missing." + else if (heart.organ_flags & ORGAN_FAILING) + failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart too damaged." else if(total_burn >= 180 || total_brute >= 180) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile." else if(H.get_ghost()) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful." else var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) - if(!BR || BR.damaged_brain) - failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing or damaged beyond point of no return. Further attempts futile." + if(BR) //BUG_PROBABLE_CAUSE - slight difference between us and tg + if(BR.organ_flags & ORGAN_FAILING) + failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain tissue is damaged making recovery of patient impossible via defibrillator. Further attempts futile." + if(BR.brain_death) + failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain damaged beyond point of no return. Further attempts futile." + if(H.suiciding || BR.brainmob?.suiciding) + failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No intelligence pattern can be detected in patient's brain. Further attempts futile." + else + failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing. Further attempts futile." + if(failed) user.visible_message(failed) @@ -623,7 +642,7 @@ H.Jitter(100) SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK) if(tplus > tloss) - H.adjustBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))), 150) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, max(0, min(99, ((tlimit - tplus) / tlimit * 100))), 150) log_combat(user, H, "revived", defib) if(req_defib) if(defib.healdisk) @@ -641,7 +660,11 @@ playsound(src, 'sound/machines/defib_failed.ogg', 50, 0) else if(H.undergoing_cardiac_arrest()) H.set_heartattack(FALSE) - user.visible_message("[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.") + if(!(heart.organ_flags & ORGAN_FAILING)) + H.set_heartattack(FALSE) + user.visible_message("[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.") + else + user.visible_message("[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed, heart damage detected.") playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1) diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm index 7f3c7f3bfc..ca1648bb07 100644 --- a/code/game/objects/items/devices/dogborg_sleeper.dm +++ b/code/game/objects/items/devices/dogborg_sleeper.dm @@ -211,7 +211,7 @@ data["occupant"]["toxLoss"] = mob_occupant.getToxLoss() data["occupant"]["fireLoss"] = mob_occupant.getFireLoss() data["occupant"]["cloneLoss"] = mob_occupant.getCloneLoss() - data["occupant"]["brainLoss"] = mob_occupant.getBrainLoss() + data["occupant"]["brainLoss"] = mob_occupant.getOrganLoss(ORGAN_SLOT_BRAIN) data["occupant"]["reagents"] = list() if(mob_occupant.reagents.reagent_list.len) for(var/datum/reagent/R in mob_occupant.reagents.reagent_list) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 722510dccb..b937f961c0 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -96,7 +96,7 @@ if(BODY_ZONE_PRECISE_MOUTH) - if((M.head && M.head.flags_cover & HEADCOVERSMOUTH) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH)) + if(M.is_mouth_covered()) to_chat(user, "You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSMOUTH) ? "helmet" : "mask"] first.") return diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index e0d3e7a8a0..7655654f78 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -135,7 +135,7 @@ SLIME SCANNER var/mob/living/carbon/human/H = M if(H.undergoing_cardiac_arrest() && H.stat != DEAD) to_chat(user, "Subject suffering from heart attack: Apply defibrillation or other electric shock immediately!") - if(H.undergoing_liver_failure() && H.stat != DEAD) + if(H.undergoing_liver_failure() && H.stat != DEAD) //might be depreciated BUG_PROBABLE_CAUSE to_chat(user, "Subject is suffering from liver failure: Apply Corazone and begin a liver transplant immediately!") var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]\n" @@ -157,12 +157,8 @@ SLIME SCANNER msg += "\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage.\n" if(advanced) msg += "\tCellular Damage Level: [M.getCloneLoss()].\n" - if (M.getBrainLoss() >= 200 || !M.getorgan(/obj/item/organ/brain)) - msg += "\tSubject's brain function is non-existent.\n" - else if (M.getBrainLoss() >= 120) - msg += "\tSevere brain damage detected. Subject likely to have mental traumas.\n" - else if (M.getBrainLoss() >= 45) - msg += "\tBrain damage detected.\n" + if (!M.getorgan(/obj/item/organ/brain)) + to_chat(user, "\tSubject lacks a brain.") //Unsure how this won't proc for 50% of the cit playerbase (This is a joke everyone on cit a cute.) if(ishuman(M) && advanced) // Should I make this not advanced? var/mob/living/carbon/human/H = M var/obj/item/organ/liver/L = H.getorganslot("liver") @@ -194,6 +190,14 @@ SLIME SCANNER if(Br.cached_size>5) msg += "\tSubject has a sizeable bosom with a [Br.size] cup.\n" + if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 200 || !M.getorgan(/obj/item/organ/brain)) + msg += "\tSubject's brain function is non-existent.\n" + else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 120) + msg += "\tSevere brain damage detected. Subject likely to have mental traumas.\n" + else if (M.getOrganLoss(ORGAN_SLOT_BRAIN) >= 45) + msg += "\tBrain damage detected.\n" + + if(iscarbon(M)) var/mob/living/carbon/C = M if(LAZYLEN(C.get_traumas())) var/list/trauma_text = list() @@ -212,7 +216,7 @@ SLIME SCANNER if(C.roundstart_quirks.len) msg += "\tSubject has the following physiological traits: [C.get_trait_string()].\n" if(advanced) - msg += "\tBrain Activity Level: [(200 - M.getBrainLoss())/2]%.\n" + msg += "\tBrain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%.\n" if(M.radiation) msg += "\tSubject is irradiated.\n" msg += "\tRadiation Level: [M.radiation] rad\n" @@ -246,11 +250,11 @@ SLIME SCANNER healthy = FALSE msg += "\tSubject is deaf.\n" else - if(ears.ear_damage) - msg += "\tSubject has [ears.ear_damage > UNHEALING_EAR_DAMAGE? "permanent ": "temporary "]hearing damage.\n" + if(ears.damage) + to_chat(user, "\tSubject has [ears.damage > ears.maxHealth ? "permanent ": "temporary "]hearing damage.") healthy = FALSE if(ears.deaf) - msg += "\tSubject is [ears.ear_damage > UNHEALING_EAR_DAMAGE ? "permanently ": "temporarily "] deaf.\n" + to_chat(user, "\tSubject is [ears.damage > ears.maxHealth ? "permanently ": "temporarily "] deaf.") healthy = FALSE if(healthy) msg += "\tHealthy.\n" @@ -266,13 +270,13 @@ SLIME SCANNER if(HAS_TRAIT(C, TRAIT_NEARSIGHT)) msg += "\tSubject is nearsighted.\n" healthy = FALSE - if(eyes.eye_damage > 30) + if(eyes.damage > 30) msg += "\tSubject has severe eye damage.\n" healthy = FALSE - else if(eyes.eye_damage > 20) + else if(eyes.damage > 20) msg += "\tSubject has significant eye damage.\n" healthy = FALSE - else if(eyes.eye_damage) + else if(eyes.damage) msg += "\tSubject has minor eye damage.\n" healthy = FALSE if(healthy) @@ -296,6 +300,59 @@ SLIME SCANNER for(var/obj/item/bodypart/org in damaged) msg += "\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]\n" + //Organ damages report + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/minor_damage + var/major_damage + var/max_damage + var/report_organs = FALSE + + //Piece together the lists to be reported + for(var/O in H.internal_organs) + var/obj/item/organ/organ = O + if(organ.organ_flags & ORGAN_FAILING) + report_organs = TRUE //if we report one organ, we report all organs, even if the lists are empty, just for consistency + if(max_damage) + max_damage += ", " //prelude the organ if we've already reported an organ + max_damage += organ.name //this just slaps the organ name into the string of text + else + max_damage = "\tNon-Functional Organs: " //our initial statement + max_damage += organ.name + else if(organ.damage > organ.high_threshold) + report_organs = TRUE + if(major_damage) + major_damage += ", " + major_damage += organ.name + else + major_damage = "\tSeverely Damaged Organs: " + major_damage += organ.name + else if(organ.damage > organ.low_threshold) + report_organs = TRUE + if(minor_damage) + minor_damage += ", " + minor_damage += organ.name + else + minor_damage = "\tMildly Damaged Organs: " + minor_damage += organ.name + + if(report_organs) //we either finish the list, or set it to be empty if no organs were reported in that category + if(!max_damage) + max_damage = "\tNon-Functional Organs: " + else + max_damage += "" + if(!major_damage) + major_damage = "\tSeverely Damaged Organs: " + else + major_damage += "" + if(!minor_damage) + minor_damage = "\tMildly Damaged Organs: " + else + minor_damage += "" + msg += "[minor_damage]" + msg += "[major_damage]" + msg += "[max_damage]" + // Species and body temperature if(ishuman(M)) @@ -384,7 +441,7 @@ SLIME SCANNER if(M.reagents.reagent_list.len) var/list/datum/reagent/reagents = list() for(var/datum/reagent/R in M.reagents.reagent_list) - if(R.invisible) + if(R.chemical_flags & REAGENT_INVISIBLE) continue reagents += R @@ -403,6 +460,21 @@ SLIME SCANNER msg += "[R.name]\n" else msg += "Subject is not addicted to any reagents.\n" + + if(M.reagents.has_reagent("fermiTox")) + var/datum/reagent/fermiTox = M.reagents.has_reagent("fermiTox") + switch(fermiTox.volume) + if(5 to 10) + msg += "Subject contains a low amount of toxic isomers.\n" + if(10 to 25) + msg += "Subject contains toxic isomers.\n" + if(25 to 50) + msg += "Subject contains a substantial amount of toxic isomers.\n" + if(50 to 95) + msg += "Subject contains a high amount of toxic isomers.\n" + if(95 to INFINITY) + msg += "Subject contains a extremely dangerous amount of toxic isomers.\n" + msg += "*---------*" to_chat(user, msg) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index cd2ccff170..95110692c9 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -254,7 +254,7 @@ to_chat(user, "The MMI indicates that their mind is currently inactive; it might change!") return - if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain)) + if(BM.stat == DEAD || (M.brain && M.brain.organ_flags & ORGAN_FAILING)) to_chat(user, "Sticking a dead brain into the frame would sort of defeat the purpose!") return diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 47c881bbdf..fcadbf4270 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -25,6 +25,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \ merge_type = /obj/item/stack/sheet/glass grind_results = list(/datum/reagent/silicon = 20) point_value = 1 + tableVariant = /obj/structure/table/glass /obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user) user.visible_message("[user] begins to slice [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 7df165461b..46c0d47388 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -232,6 +232,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \ grind_results = list("silver" = 20) point_value = 20 merge_type = /obj/item/stack/sheet/mineral/silver + tableVariant = /obj/structure/table/optable GLOBAL_LIST_INIT(silver_recipes, list ( \ new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \ diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 8c808d0e5f..c085306892 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -107,6 +107,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ merge_type = /obj/item/stack/sheet/metal grind_results = list("iron" = 20) point_value = 2 + tableVariant = /obj/structure/table /obj/item/stack/sheet/metal/ratvar_act() new /obj/item/stack/tile/brass(loc, amount) @@ -168,6 +169,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \ merge_type = /obj/item/stack/sheet/plasteel grind_results = list("iron" = 20, "plasma" = 20) point_value = 23 + tableVariant = /obj/structure/table/reinforced /obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE) recipes = GLOB.plasteel_recipes @@ -474,6 +476,7 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \ novariants = FALSE grind_results = list("iron" = 5, "teslium" = 15, "holyoil" = 1) merge_type = /obj/item/stack/tile/brass + tableVariant = /obj/structure/table/reinforced/brass /obj/item/stack/tile/brass/narsie_act() new /obj/item/stack/sheet/runed_metal(loc, amount) @@ -526,6 +529,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \ novariants = FALSE grind_results = list("iron" = 5, "copper" = 3) //we have no "tin" reagent so this is the closest thing merge_type = /obj/item/stack/tile/bronze + tableVariant = /obj/structure/table/bronze /obj/item/stack/tile/bronze/attack_self(mob/living/user) if(is_servant_of_ratvar(user)) //still lets them build with it, just gives a message diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 4217a58f81..155d1f1643 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -22,6 +22,7 @@ var/full_w_class = WEIGHT_CLASS_NORMAL //The weight class the stack should have at amount > 2/3rds max_amount var/novariants = TRUE //Determines whether the item should update it's sprites based on amount. //NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind() + var/obj/structure/table/tableVariant // we tables now (stores table variant to be built from this stack) /obj/item/stack/on_grind() for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 3b28c30402..847e1b521e 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -99,33 +99,117 @@ icon_state = "tile-carpet" turf_type = /turf/open/floor/carpet resistance_flags = FLAMMABLE - -/obj/item/stack/tile/carpet/fifty - amount = 50 + tableVariant = /obj/structure/table/wood/fancy /obj/item/stack/tile/carpet/black name = "black carpet" icon_state = "tile-carpet-black" turf_type = /turf/open/floor/carpet/black + tableVariant = /obj/structure/table/wood/fancy/black + +/obj/item/stack/tile/carpet/blackred + name = "red carpet" + icon_state = "tile-carpet-blackred" + turf_type = /turf/open/floor/carpet/blackred + tableVariant = /obj/structure/table/wood/fancy/blackred + +/obj/item/stack/tile/carpet/monochrome + name = "monochrome carpet" + icon_state = "tile-carpet-monochrome" + turf_type = /turf/open/floor/carpet/monochrome + tableVariant = /obj/structure/table/wood/fancy/monochrome + +/obj/item/stack/tile/carpet/blue + name = "blue carpet" + icon_state = "tile-carpet-blue" + item_state = "tile-carpet-blue" + turf_type = /turf/open/floor/carpet/blue + tableVariant = /obj/structure/table/wood/fancy/blue + +/obj/item/stack/tile/carpet/cyan + name = "cyan carpet" + icon_state = "tile-carpet-cyan" + item_state = "tile-carpet-cyan" + turf_type = /turf/open/floor/carpet/cyan + tableVariant = /obj/structure/table/wood/fancy/cyan + +/obj/item/stack/tile/carpet/green + name = "green carpet" + icon_state = "tile-carpet-green" + item_state = "tile-carpet-green" + turf_type = /turf/open/floor/carpet/green + tableVariant = /obj/structure/table/wood/fancy/green + +/obj/item/stack/tile/carpet/orange + name = "orange carpet" + icon_state = "tile-carpet-orange" + item_state = "tile-carpet-orange" + turf_type = /turf/open/floor/carpet/orange + tableVariant = /obj/structure/table/wood/fancy/orange + +/obj/item/stack/tile/carpet/purple + name = "purple carpet" + icon_state = "tile-carpet-purple" + item_state = "tile-carpet-purple" + turf_type = /turf/open/floor/carpet/purple + tableVariant = /obj/structure/table/wood/fancy/purple + +/obj/item/stack/tile/carpet/red + name = "red carpet" + icon_state = "tile-carpet-red" + item_state = "tile-carpet-red" + turf_type = /turf/open/floor/carpet/red + tableVariant = /obj/structure/table/wood/fancy/red + +/obj/item/stack/tile/carpet/royalblack + name = "royal black carpet" + icon_state = "tile-carpet-royalblack" + item_state = "tile-carpet-royalblack" + turf_type = /turf/open/floor/carpet/royalblack + tableVariant = /obj/structure/table/wood/fancy/royalblack + +/obj/item/stack/tile/carpet/royalblue + name = "royal blue carpet" + icon_state = "tile-carpet-royalblue" + item_state = "tile-carpet-royalblue" + turf_type = /turf/open/floor/carpet/royalblue + tableVariant = /obj/structure/table/wood/fancy/royalblue + +/obj/item/stack/tile/carpet/fifty + amount = 50 /obj/item/stack/tile/carpet/black/fifty amount = 50 -/obj/item/stack/tile/carpet/blackred - name = "red carpet" - icon_state = "tile-carpet-blackred" - turf_type = /turf/open/floor/carpet/blackred - /obj/item/stack/tile/carpet/blackred/fifty - amount = 50 - -/obj/item/stack/tile/carpet/monochrome - name = "monochrome carpet" - icon_state = "tile-carpet-monochrome" - turf_type = /turf/open/floor/carpet/monochrome + amount = 50 /obj/item/stack/tile/carpet/monochrome/fifty - amount = 50 + amount = 50 + +/obj/item/stack/tile/carpet/blue/fifty + amount = 50 + +/obj/item/stack/tile/carpet/cyan/fifty + amount = 50 + +/obj/item/stack/tile/carpet/green/fifty + amount = 50 + +/obj/item/stack/tile/carpet/orange/fifty + amount = 50 + +/obj/item/stack/tile/carpet/purple/fifty + amount = 50 + +/obj/item/stack/tile/carpet/red/fifty + amount = 50 + +/obj/item/stack/tile/carpet/royalblack/fifty + amount = 50 + +/obj/item/stack/tile/carpet/royalblue/fifty + amount = 50 /obj/item/stack/tile/fakespace name = "astral carpet" diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index df7b203f91..85a06f0c1e 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -140,7 +140,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", else if(iscarbon(M)) var/mob/living/carbon/C = M if(!istype(C.head, /obj/item/clothing/head)) - C.adjustBrainLoss(10, 80) + C.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10, 80) to_chat(C, "You feel dumber.") if(smack) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 82bf2c6b5f..a126d16777 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -304,7 +304,7 @@ var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)//stole from chainsaw code var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN) - B.vital = FALSE//this cant possibly be a good idea + B.organ_flags &= ~ORGAN_VITAL //this cant possibly be a good idea var/randdir for(var/i in 1 to 24)//like a headless chicken! if(user.is_holding(src)) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index 6e841bcd93..9dab3679fa 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -2,6 +2,24 @@ icon_state = "freezer" var/jones = FALSE +/obj/structure/closet/secure_closet/freezer/Destroy() + recursive_organ_check(src) + ..() + +/obj/structure/closet/secure_closet/freezer/Initialize() + ..() + recursive_organ_check(src) + +/obj/structure/closet/secure_closet/freezer/open(mob/living/user) + if(opened || !can_open(user)) //dupe check just so we don't let the organs decay when someone fails to open the locker + return FALSE + recursive_organ_check(src) + return ..() + +/obj/structure/closet/secure_closet/freezer/close(mob/living/user) + if(..()) //if we actually closed the locker + recursive_organ_check(src) + /obj/structure/closet/secure_closet/freezer/ex_act() if(!jones) jones = TRUE diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 12827a0aba..4a56272ac1 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -561,7 +561,7 @@ icon = 'icons/obj/machines/sleeper.dmi' icon_state = "sleeper" mob_name = "a space pirate" - mob_species = /datum/species/skeleton/pirate + mob_species = /datum/species/skeleton/space outfit = /datum/outfit/pirate/space roundstart = FALSE death = FALSE diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 09e5510d62..eaf3629718 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -31,6 +31,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/Initialize() . = ..() GLOB.bodycontainers += src + recursive_organ_check(src) /obj/structure/bodycontainer/Destroy() GLOB.bodycontainers -= src @@ -101,6 +102,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an /obj/structure/bodycontainer/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/metal (loc, 5) + recursive_organ_check(src) qdel(src) /obj/structure/bodycontainer/container_resist(mob/living/user) @@ -120,6 +122,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an open() /obj/structure/bodycontainer/proc/open() + recursive_organ_check(src) playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) playsound(src, 'sound/effects/roll.ogg', 5, 1) var/turf/T = get_step(src, dir) @@ -134,6 +137,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an for(var/atom/movable/AM in connected.loc) if(!AM.anchored || AM == connected) AM.forceMove(src) + recursive_organ_check(src) update_icon() /obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user) diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm index 226d279288..f62bed878b 100644 --- a/code/game/objects/structures/table_frames.dm +++ b/code/game/objects/structures/table_frames.dm @@ -22,92 +22,22 @@ var/framestackamount = 2 /obj/structure/table_frame/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/wrench)) + if(I.tool_behaviour == TOOL_WRENCH) to_chat(user, "You start disassembling [src]...") I.play_tool_sound(src) if(I.use_tool(src, user, 30)) - playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE) deconstruct(TRUE) - else if(istype(I, /obj/item/stack/sheet/plasteel)) - var/obj/item/stack/sheet/plasteel/P = I - if(P.get_amount() < 1) - to_chat(user, "You need one plasteel sheet to do this!") + return + + var/obj/item/stack/material = I + if (istype(I, /obj/item/stack) && material?.tableVariant) + if(material.get_amount() < 1) + to_chat(user, "You need one [material.name] sheet to do this!") return - to_chat(user, "You start adding [P] to [src]...") - if(do_after(user, 50, target = src) && P.use(1)) - make_new_table(/obj/structure/table/reinforced) - else if(istype(I, /obj/item/stack/sheet/metal)) - var/obj/item/stack/sheet/metal/M = I - if(M.get_amount() < 1) - to_chat(user, "You need one metal sheet to do this!") - return - to_chat(user, "You start adding [M] to [src]...") - if(do_after(user, 20, target = src) && M.use(1)) - make_new_table(/obj/structure/table) - else if(istype(I, /obj/item/stack/sheet/glass)) - var/obj/item/stack/sheet/glass/G = I - if(G.get_amount() < 1) - to_chat(user, "You need one glass sheet to do this!") - return - to_chat(user, "You start adding [G] to [src]...") - if(do_after(user, 20, target = src) && G.use(1)) - make_new_table(/obj/structure/table/glass) - else if(istype(I, /obj/item/stack/sheet/mineral/silver)) - var/obj/item/stack/sheet/mineral/silver/S = I - if(S.get_amount() < 1) - to_chat(user, "You need one silver sheet to do this!") - return - to_chat(user, "You start adding [S] to [src]...") - if(do_after(user, 20, target = src) && S.use(1)) - make_new_table(/obj/structure/table/optable) - else if(istype(I, /obj/item/stack/tile/carpet/black)) - var/obj/item/stack/tile/carpet/black/C = I - if(C.get_amount() < 1) - to_chat(user, "You need one black carpet sheet to do this!") - return - to_chat(user, "You start adding [C] to [src]...") - if(do_after(user, 20, target = src) && C.use(1)) - make_new_table(/obj/structure/table/wood/fancy/black) - else if(istype(I, /obj/item/stack/tile/carpet/blackred)) - var/obj/item/stack/tile/carpet/blackred/C = I - if(C.get_amount() < 1) - to_chat(user, "You need one red carpet sheet to do this!") - return - to_chat(user, "You start adding [C] to [src]...") - if(do_after(user, 20, target = src) && C.use(1)) - make_new_table(/obj/structure/table/wood/fancy/blackred) - else if(istype(I, /obj/item/stack/tile/carpet/monochrome)) - var/obj/item/stack/tile/carpet/monochrome/C = I - if(C.get_amount() < 1) - to_chat(user, "You need one monochrome carpet sheet to do this!") - return - to_chat(user, "You start adding [C] to [src]...") - if(do_after(user, 20, target = src) && C.use(1)) - make_new_table(/obj/structure/table/wood/fancy/monochrome) - else if(istype(I, /obj/item/stack/tile/carpet)) - var/obj/item/stack/tile/carpet/C = I - if(C.get_amount() < 1) - to_chat(user, "You need one carpet sheet to do this!") - return - to_chat(user, "You start adding [C] to [src]...") - if(do_after(user, 20, target = src) && C.use(1)) - make_new_table(/obj/structure/table/wood/fancy) - else if(istype(I, /obj/item/stack/tile/bronze)) - var/obj/item/stack/tile/bronze/B = I - if(B.get_amount() < 1) - to_chat(user, "You need one bronze sheet to do this!") - return - to_chat(user, "You start adding [B] to [src]...") - if(do_after(user, 20, target = src) && B.use(1)) - make_new_table(/obj/structure/table/bronze) - else if(istype(I, /obj/item/stack/sheet/plasmaglass)) - var/obj/item/stack/sheet/plasmaglass/G = I - if(G.get_amount() < 1) - to_chat(user, "You need one plasmaglass sheet to do this!") - return - to_chat(user, "You start adding [G] to [src]...") - if(do_after(user, 20, target = src) && G.use(1)) - make_new_table(/obj/structure/table/plasmaglass) + to_chat(user, "You start adding [material] to [src]...") + if(do_after(user, 20, target = src) && material.use(1)) + make_new_table(material.tableVariant) else return ..() @@ -143,23 +73,21 @@ resistance_flags = FLAMMABLE /obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/stack/sheet/mineral/wood)) - var/obj/item/stack/sheet/mineral/wood/W = I - if(W.get_amount() < 1) - to_chat(user, "You need one wood sheet to do this!") - return - to_chat(user, "You start adding [W] to [src]...") - if(do_after(user, 20, target = src) && W.use(1)) - make_new_table(/obj/structure/table/wood) - return - else if(istype(I, /obj/item/stack/tile/carpet)) - var/obj/item/stack/tile/carpet/C = I - if(C.get_amount() < 1) - to_chat(user, "You need one carpet sheet to do this!") - return - to_chat(user, "You start adding [C] to [src]...") - if(do_after(user, 20, target = src) && C.use(1)) - make_new_table(/obj/structure/table/wood/poker) + if (istype(I, /obj/item/stack)) + var/obj/item/stack/material = I + var/toConstruct // stores the table variant + if(istype(I, /obj/item/stack/sheet/mineral/wood)) + toConstruct = /obj/structure/table/wood + else if(istype(I, /obj/item/stack/tile/carpet)) + toConstruct = /obj/structure/table/wood/poker + + if (toConstruct) + if(material.get_amount() < 1) + to_chat(user, "You need one [material.name] sheet to do this!") + return + to_chat(user, "You start adding [material] to [src]...") + if(do_after(user, 20, target = src) && material.use(1)) + make_new_table(toConstruct) else return ..() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index b17d585385..b12a26cd00 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -358,44 +358,83 @@ frame = /obj/structure/table_frame framestack = /obj/item/stack/rods buildstack = /obj/item/stack/tile/carpet - canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black, /obj/structure/table/wood/fancy/blackred, /obj/structure/table/wood/fancy/monochrome) + canSmoothWith = list(/obj/structure/table/wood/fancy, + /obj/structure/table/wood/fancy/black, + /obj/structure/table/wood/fancy/blackred, + /obj/structure/table/wood/fancy/monochrome, + /obj/structure/table/wood/fancy/blue, + /obj/structure/table/wood/fancy/cyan, + /obj/structure/table/wood/fancy/green, + /obj/structure/table/wood/fancy/orange, + /obj/structure/table/wood/fancy/purple, + /obj/structure/table/wood/fancy/red, + /obj/structure/table/wood/fancy/royalblack, + /obj/structure/table/wood/fancy/royalblue) + var/smooth_icon = 'icons/obj/smooth_structures/fancy_table.dmi' // see Initialize() -/obj/structure/table/wood/fancy/New() - // New() is used so that the /black subtype can override `icon` easily and - // the correct value will be used by the smoothing subsystem. +/obj/structure/table/wood/fancy/Initialize() . = ..() // Needs to be set dynamically because table smooth sprites are 32x34, // which the editor treats as a two-tile-tall object. The sprites are that // size so that the north/south corners look nice - examine the detail on // the sprites in the editor to see why. - icon = 'icons/obj/smooth_structures/fancy_table.dmi' + icon = smooth_icon /obj/structure/table/wood/fancy/black icon_state = "fancy_table_black" buildstack = /obj/item/stack/tile/carpet/black + smooth_icon = 'icons/obj/smooth_structures/fancy_table_black.dmi' /obj/structure/table/wood/fancy/blackred - icon = 'icons/obj/structures.dmi' - icon_state = "fancy_table_blackred" - buildstack = /obj/item/stack/tile/carpet/blackred - -/obj/structure/table/wood/fancy/blackred/New() - . = ..() - icon = 'icons/obj/smooth_structures/fancy_table_blackred.dmi' + icon_state = "fancy_table_blackred" + buildstack = /obj/item/stack/tile/carpet/blackred + smooth_icon = 'icons/obj/smooth_structures/fancy_table_blackred.dmi' /obj/structure/table/wood/fancy/monochrome - icon = 'icons/obj/structures.dmi' - icon_state = "fancy_table_monochrome" - buildstack = /obj/item/stack/tile/carpet/monochrome + icon_state = "fancy_table_monochrome" + buildstack = /obj/item/stack/tile/carpet/monochrome + smooth_icon = 'icons/obj/smooth_structures/fancy_table_monochrome.dmi' -/obj/structure/table/wood/fancy/monochrome/New() - . = ..() - icon = 'icons/obj/smooth_structures/fancy_table_monochrome.dmi' +/obj/structure/table/wood/fancy/blue + icon_state = "fancy_table_blue" + buildstack = /obj/item/stack/tile/carpet/blue + smooth_icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi' + +/obj/structure/table/wood/fancy/cyan + icon_state = "fancy_table_cyan" + buildstack = /obj/item/stack/tile/carpet/cyan + smooth_icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi' + +/obj/structure/table/wood/fancy/green + icon_state = "fancy_table_green" + buildstack = /obj/item/stack/tile/carpet/green + smooth_icon = 'icons/obj/smooth_structures/fancy_table_green.dmi' + +/obj/structure/table/wood/fancy/orange + icon_state = "fancy_table_orange" + buildstack = /obj/item/stack/tile/carpet/orange + smooth_icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi' + +/obj/structure/table/wood/fancy/purple + icon_state = "fancy_table_purple" + buildstack = /obj/item/stack/tile/carpet/purple + smooth_icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi' + +/obj/structure/table/wood/fancy/red + icon_state = "fancy_table_red" + buildstack = /obj/item/stack/tile/carpet/red + smooth_icon = 'icons/obj/smooth_structures/fancy_table_red.dmi' + +/obj/structure/table/wood/fancy/royalblack + icon_state = "fancy_table_royalblack" + buildstack = /obj/item/stack/tile/carpet/royalblack + smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi' + +/obj/structure/table/wood/fancy/royalblue + icon_state = "fancy_table_royalblue" + buildstack = /obj/item/stack/tile/carpet/royalblue + smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi' -/obj/structure/table/wood/fancy/black/New() - . = ..() - // Ditto above. - icon = 'icons/obj/smooth_structures/fancy_table_black.dmi' /* * Reinforced tables */ diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 7b45aa1fbb..ed6e279088 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -209,6 +209,46 @@ icon_state = "tile-carpet-monochrome" canSmoothWith = list(/turf/open/floor/carpet/black, /turf/open/floor/carpet/blackred, /turf/open/floor/carpet/monochrome) +/turf/open/floor/carpet/blue + icon = 'icons/turf/floors/carpet_blue.dmi' + floor_tile = /obj/item/stack/tile/carpet/blue + canSmoothWith = list(/turf/open/floor/carpet/blue) + +/turf/open/floor/carpet/cyan + icon = 'icons/turf/floors/carpet_cyan.dmi' + floor_tile = /obj/item/stack/tile/carpet/cyan + canSmoothWith = list(/turf/open/floor/carpet/cyan) + +/turf/open/floor/carpet/green + icon = 'icons/turf/floors/carpet_green.dmi' + floor_tile = /obj/item/stack/tile/carpet/green + canSmoothWith = list(/turf/open/floor/carpet/green) + +/turf/open/floor/carpet/orange + icon = 'icons/turf/floors/carpet_orange.dmi' + floor_tile = /obj/item/stack/tile/carpet/orange + canSmoothWith = list(/turf/open/floor/carpet/orange) + +/turf/open/floor/carpet/purple + icon = 'icons/turf/floors/carpet_purple.dmi' + floor_tile = /obj/item/stack/tile/carpet/purple + canSmoothWith = list(/turf/open/floor/carpet/purple) + +/turf/open/floor/carpet/red + icon = 'icons/turf/floors/carpet_red.dmi' + floor_tile = /obj/item/stack/tile/carpet/red + canSmoothWith = list(/turf/open/floor/carpet/red) + +/turf/open/floor/carpet/royalblack + icon = 'icons/turf/floors/carpet_royalblack.dmi' + floor_tile = /obj/item/stack/tile/carpet/royalblack + canSmoothWith = list(/turf/open/floor/carpet/royalblack) + +/turf/open/floor/carpet/royalblue + icon = 'icons/turf/floors/carpet_royalblue.dmi' + floor_tile = /obj/item/stack/tile/carpet/royalblue + canSmoothWith = list(/turf/open/floor/carpet/royalblue) + /turf/open/floor/carpet/narsie_act(force, ignore_mobs, probability = 20) . = (prob(probability) || force) for(var/I in src) diff --git a/code/game/world.dm b/code/game/world.dm index e9c8433006..25b8c4d9f3 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -100,6 +100,7 @@ GLOBAL_VAR(restart_counter) GLOB.picture_log_directory = "data/picture_logs/[override_dir]" GLOB.world_game_log = "[GLOB.log_directory]/game.log" + GLOB.world_virus_log = "[GLOB.log_directory]/virus.log" GLOB.world_attack_log = "[GLOB.log_directory]/attack.log" GLOB.world_pda_log = "[GLOB.log_directory]/pda.log" GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index ac1ae51f69..626fa7f66f 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -169,6 +169,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, world.AVerbsDebug()) /client/proc/cmd_display_overlay_log, /client/proc/reload_configuration, /datum/admins/proc/create_or_modify_area, + /client/proc/generate_wikichem_list //DO NOT PRESS UNLESS YOU WANT SUPERLAG ) GLOBAL_PROTECT(admin_verbs_possess) GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess, /proc/release)) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 7d74387c43..9dc8b73d0e 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -458,7 +458,7 @@ SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Braindamage")) for(var/mob/living/carbon/human/H in GLOB.player_list) to_chat(H, "You suddenly feel stupid.") - H.adjustBrainLoss(60, 80) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 60, 80) message_admins("[key_name_admin(usr)] made everybody retarded") if("eagles")//SCRAW diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 91df9ef85c..b0b9190556 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2042,7 +2042,7 @@ if(DEAD) status = "Dead" health_description = "Status = [status]" - health_description += "
Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()] - Stamina: [L.getStaminaLoss()]" + health_description += "
Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getOrganLoss(ORGAN_SLOT_BRAIN)] - Stamina: [L.getStaminaLoss()]" else health_description = "This mob type has no health to speak of." diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index a725399b0f..c27b355ff1 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1264,7 +1264,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits target.electrocution_animation(40) to_chat(target, "The gods have punished you for your sins!") if(ADMIN_PUNISHMENT_BRAINDAMAGE) - target.adjustBrainLoss(199, 199) + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 199, 199) if(ADMIN_PUNISHMENT_GIB) target.gib(FALSE) if(ADMIN_PUNISHMENT_BSA) diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm index 72edb18020..8e722ec33e 100644 --- a/code/modules/antagonists/abductor/equipment/gland.dm +++ b/code/modules/antagonists/abductor/equipment/gland.dm @@ -151,7 +151,7 @@ if(2) to_chat(H, "You hear an annoying buzz in your head.") H.confused += 15 - H.adjustBrainLoss(10, 160) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10, 160) if(3) H.hallucination += 60 diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 252e2b5cbe..b6e3d66c35 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -83,7 +83,7 @@ if(istype(C)) var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN) if(B && (B.decoy_override != initial(B.decoy_override))) - B.vital = TRUE + B.organ_flags |= ORGAN_VITAL B.decoy_override = FALSE remove_changeling_powers() . = ..() @@ -340,7 +340,7 @@ if(istype(C)) var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN) if(B) - B.vital = FALSE + B.organ_flags &= ~ORGAN_VITAL B.decoy_override = TRUE update_changeling_icons_added() return diff --git a/code/modules/antagonists/changeling/powers/regenerate.dm b/code/modules/antagonists/changeling/powers/regenerate.dm index a1f8e1ef9b..1b27fa9694 100644 --- a/code/modules/antagonists/changeling/powers/regenerate.dm +++ b/code/modules/antagonists/changeling/powers/regenerate.dm @@ -35,7 +35,7 @@ B = new C.dna.species.mutant_brain() else B = new() - B.vital = FALSE + B.organ_flags &= ~ORGAN_VITAL B.decoy_override = TRUE B.Insert(C) if(ishuman(user)) diff --git a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm index 0ac96c47f9..88cf420420 100644 --- a/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm +++ b/code/modules/antagonists/clockcult/clock_items/clockwork_armor.dm @@ -50,7 +50,7 @@ to_chat(user, "The helmet tries to drive a spike through your head as you scramble to remove it!") user.emote("scream") user.apply_damage(30, BRUTE, BODY_ZONE_HEAD) - user.adjustBrainLoss(30) + user.adjustOrganLoss(ORGAN_SLOT_BRAIN, 30) addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround, src, TRUE), 1) //equipped happens before putting stuff on(but not before picking items up), 1). thus, we need to wait for it to be on before forcing it off. /obj/item/clothing/head/helmet/clockwork/mob_can_equip(mob/M, mob/equipper, slot, disable_warning = 0) diff --git a/code/modules/antagonists/disease/disease_abilities.dm b/code/modules/antagonists/disease/disease_abilities.dm index 07cd3030b1..dc2249006c 100644 --- a/code/modules/antagonists/disease/disease_abilities.dm +++ b/code/modules/antagonists/disease/disease_abilities.dm @@ -5,25 +5,48 @@ is currently following. */ GLOBAL_LIST_INIT(disease_ability_singletons, list( - new /datum/disease_ability/action/cough(), - new /datum/disease_ability/action/sneeze(), - new /datum/disease_ability/action/infect(), - new /datum/disease_ability/symptom/cough(), - new /datum/disease_ability/symptom/sneeze(),\ - new /datum/disease_ability/symptom/hallucigen(), - new /datum/disease_ability/symptom/choking(), - new /datum/disease_ability/symptom/confusion(), - new /datum/disease_ability/symptom/youth(), - new /datum/disease_ability/symptom/vomit(), - new /datum/disease_ability/symptom/voice_change(), - new /datum/disease_ability/symptom/visionloss(), - new /datum/disease_ability/symptom/viraladaptation(), - new /datum/disease_ability/symptom/vitiligo(), - new /datum/disease_ability/symptom/sensory_restoration(), - new /datum/disease_ability/symptom/itching(), - new /datum/disease_ability/symptom/weight_loss(), - new /datum/disease_ability/symptom/metabolism_heal(), - new /datum/disease_ability/symptom/coma_heal() + new /datum/disease_ability/action/cough, + new /datum/disease_ability/action/sneeze, + new /datum/disease_ability/action/infect, + new /datum/disease_ability/symptom/mild/cough, + new /datum/disease_ability/symptom/mild/sneeze, + new /datum/disease_ability/symptom/medium/shedding, + new /datum/disease_ability/symptom/medium/beard, + new /datum/disease_ability/symptom/medium/hallucigen, + new /datum/disease_ability/symptom/medium/choking, + new /datum/disease_ability/symptom/medium/confusion, + new /datum/disease_ability/symptom/medium/vomit, + new /datum/disease_ability/symptom/medium/voice_change, + new /datum/disease_ability/symptom/medium/visionloss, + new /datum/disease_ability/symptom/medium/deafness, + new /datum/disease_ability/symptom/powerful/narcolepsy, + new /datum/disease_ability/symptom/medium/fever, + new /datum/disease_ability/symptom/medium/shivering, + new /datum/disease_ability/symptom/medium/headache, + new /datum/disease_ability/symptom/medium/nano_boost, + new /datum/disease_ability/symptom/medium/nano_destroy, + new /datum/disease_ability/symptom/medium/viraladaptation, + new /datum/disease_ability/symptom/medium/viralevolution, + new /datum/disease_ability/symptom/medium/vitiligo, + new /datum/disease_ability/symptom/medium/revitiligo, + new /datum/disease_ability/symptom/medium/itching, + new /datum/disease_ability/symptom/medium/heal/weight_loss, + new /datum/disease_ability/symptom/medium/heal/sensory_restoration, + new /datum/disease_ability/symptom/medium/heal/mind_restoration, + new /datum/disease_ability/symptom/powerful/fire, + new /datum/disease_ability/symptom/powerful/flesh_eating, +// new /datum/disease_ability/symptom/powerful/genetic_mutation, + new /datum/disease_ability/symptom/powerful/inorganic_adaptation, + new /datum/disease_ability/symptom/powerful/heal/starlight, + new /datum/disease_ability/symptom/powerful/heal/oxygen, + new /datum/disease_ability/symptom/powerful/heal/chem, + new /datum/disease_ability/symptom/powerful/heal/metabolism, + new /datum/disease_ability/symptom/powerful/heal/dark, + new /datum/disease_ability/symptom/powerful/heal/water, + new /datum/disease_ability/symptom/powerful/heal/plasma, + new /datum/disease_ability/symptom/powerful/heal/radiation, + new /datum/disease_ability/symptom/powerful/heal/coma, + new /datum/disease_ability/symptom/powerful/youth )) /datum/disease_ability @@ -54,7 +77,13 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( stage_speed += initial(S.stage_speed) transmittable += initial(S.transmittable) threshold_block += "

[initial(S.threshold_desc)]" - stat_block = "Resistance: [resistance]
Stealth: [stealth]
Stage Speed: [stage_speed]
Transmissibility: [transmittable]

" + stat_block = "Resistance: [resistance]
Stealth: [stealth]
Stage Speed: [stage_speed]
Transmissibility: [transmittable]

" + if(symptoms.len == 1) //lazy boy's dream + name = initial(S.name) + if(short_desc == "") + short_desc = initial(S.desc) + if(long_desc == "") + long_desc = initial(S.desc) /datum/disease_ability/proc/CanBuy(mob/camera/disease/D) if(world.time < D.next_adaptation_time) @@ -77,8 +106,10 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( for(var/T in symptoms) var/datum/symptom/S = new T() SD.symptoms += S + S.OnAdd(SD) if(SD.processing) - S.Start(SD) + if(S.Start(SD)) + S.next_activation = world.time + rand(S.symptom_delay_min * 10, S.symptom_delay_max * 10) SD.Refresh() for(var/T in actions) var/datum/action/A = new T() @@ -105,6 +136,7 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( var/datum/symptom/S = locate(T) in SD.symptoms if(S) SD.symptoms -= S + S.OnRemove(SD) if(SD.processing) S.End(SD) qdel(S) @@ -152,8 +184,9 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( return FALSE to_chat(D, "You force [L.real_name] to cough.") L.emote("cough") - var/datum/disease/advance/sentient_disease/SD = D.hosts[L] - SD.spread(2) + if(L.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth + var/datum/disease/advance/sentient_disease/SD = D.hosts[L] + SD.spread(2) StartCooldown() return TRUE @@ -185,11 +218,12 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( return FALSE to_chat(D, "You force [L.real_name] to sneeze.") L.emote("sneeze") - var/datum/disease/advance/sentient_disease/SD = D.hosts[L] + if(L.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth + var/datum/disease/advance/sentient_disease/SD = D.hosts[L] - for(var/mob/living/M in oview(4, SD.affected_mob)) - if(is_A_facing_B(SD.affected_mob, M) && disease_air_spread_walk(get_turf(SD.affected_mob), get_turf(M))) - M.AirborneContractDisease(SD, TRUE) + for(var/mob/living/M in oview(4, SD.affected_mob)) + if(is_A_facing_B(SD.affected_mob, M) && disease_air_spread_walk(get_turf(SD.affected_mob), get_turf(M))) + M.AirborneContractDisease(SD, TRUE) StartCooldown() return TRUE @@ -235,154 +269,192 @@ GLOBAL_LIST_INIT(disease_ability_singletons, list( StartCooldown() return TRUE -//passive symptom abilities +/*******************BASE SYMPTOM TYPES*******************/ +// cost is for convenience and can be changed. If you're changing req_tot_points then don't use the subtype... +//healing costs more so you have to techswitch from naughty disease otherwise we'd have friendly disease for easy greentext (no fun!) -/datum/disease_ability/symptom/cough - name = "Involuntary Coughing" - symptoms = list(/datum/symptom/cough) +/datum/disease_ability/symptom/mild cost = 2 required_total_points = 4 + category = "Symptom (Weak)" + +/datum/disease_ability/symptom/medium + cost = 4 + required_total_points = 8 + category = "Symptom" + +/datum/disease_ability/symptom/medium/heal + cost = 5 + category = "Symptom (+)" + +/datum/disease_ability/symptom/powerful + cost = 4 + required_total_points = 16 + category = "Symptom (Strong)" + +/datum/disease_ability/symptom/powerful/heal + cost = 8 + category = "Symptom (Strong+)" + + +/******MILD******/ + +/datum/disease_ability/symptom/mild/cough + name = "Involuntary Coughing" + symptoms = list(/datum/symptom/cough) short_desc = "Cause victims to cough intermittently." long_desc = "Cause victims to cough intermittently, spreading your infection if your transmissibility is high." -/datum/disease_ability/symptom/sneeze +/datum/disease_ability/symptom/mild/sneeze name = "Involuntary Sneezing" symptoms = list(/datum/symptom/sneeze) - cost = 2 - required_total_points = 4 short_desc = "Cause victims to sneeze intermittently." long_desc = "Cause victims to sneeze intermittently, spreading your infection and also increasing transmissibility and resistance, at the cost of stealth." -/datum/disease_ability/symptom/beard - //I don't think I need to justify the fact that this is the best symptom - name = "Beard Growth" - symptoms = list(/datum/symptom/beard) - cost = 1 - required_total_points = 8 - short_desc = "Cause all victims to grow a luscious beard." - long_desc = "Cause all victims to grow a luscious beard. Decreases stats slightly. Ineffective against Santa Claus." +/******MEDIUM******/ -/datum/disease_ability/symptom/hallucigen - name = "Hallucinations" +/datum/disease_ability/symptom/medium/shedding + symptoms = list(/datum/symptom/shedding) + +/datum/disease_ability/symptom/medium/beard + symptoms = list(/datum/symptom/beard) + short_desc = "Cause all victims to grow a luscious beard." + long_desc = "Cause all victims to grow a luscious beard. Ineffective against Santa Claus." + +/datum/disease_ability/symptom/medium/hallucigen symptoms = list(/datum/symptom/hallucigen) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to hallucinate." long_desc = "Cause victims to hallucinate. Decreases stats, especially resistance." - -/datum/disease_ability/symptom/choking - name = "Choking" +/datum/disease_ability/symptom/medium/choking symptoms = list(/datum/symptom/choking) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to choke." long_desc = "Cause victims to choke, threatening asphyxiation. Decreases stats, especially transmissibility." - -/datum/disease_ability/symptom/confusion - name = "Confusion" +/datum/disease_ability/symptom/medium/confusion symptoms = list(/datum/symptom/confusion) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to become confused." long_desc = "Cause victims to become confused intermittently." - -/datum/disease_ability/symptom/youth - name = "Eternal Youth" - symptoms = list(/datum/symptom/youth) - cost = 4 - required_total_points = 8 - short_desc = "Cause victims to become eternally young." - long_desc = "Cause victims to become eternally young. Provides boosts to all stats except transmissibility." - - -/datum/disease_ability/symptom/vomit - name = "Vomiting" +/datum/disease_ability/symptom/medium/vomit symptoms = list(/datum/symptom/vomit) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to vomit." long_desc = "Cause victims to vomit. Slightly increases transmissibility. Vomiting also also causes the victims to lose nutrition and removes some toxin damage." - -/datum/disease_ability/symptom/voice_change - name = "Voice Changing" +/datum/disease_ability/symptom/medium/voice_change symptoms = list(/datum/symptom/voice_change) - cost = 4 - required_total_points = 8 short_desc = "Change the voice of victims." long_desc = "Change the voice of victims, causing confusion in communications." - -/datum/disease_ability/symptom/visionloss - name = "Vision Loss" +/datum/disease_ability/symptom/medium/visionloss symptoms = list(/datum/symptom/visionloss) - cost = 4 - required_total_points = 8 short_desc = "Damage the eyes of victims, eventually causing blindness." long_desc = "Damage the eyes of victims, eventually causing blindness. Decreases all stats." +/datum/disease_ability/symptom/medium/deafness + symptoms = list(/datum/symptom/deafness) -/datum/disease_ability/symptom/viraladaptation - name = "Self-Adaptation" +/datum/disease_ability/symptom/medium/fever + symptoms = list(/datum/symptom/fever) + +/datum/disease_ability/symptom/medium/shivering + symptoms = list(/datum/symptom/shivering) + +/datum/disease_ability/symptom/medium/headache + symptoms = list(/datum/symptom/headache) + +/datum/disease_ability/symptom/medium/nano_boost + symptoms = list(/datum/symptom/nano_boost) + +/datum/disease_ability/symptom/medium/nano_destroy + symptoms = list(/datum/symptom/nano_destroy) + +/datum/disease_ability/symptom/medium/viraladaptation symptoms = list(/datum/symptom/viraladaptation) - cost = 4 - required_total_points = 8 short_desc = "Cause your infection to become more resistant to detection and eradication." long_desc = "Cause your infection to mimic the function of normal body cells, becoming much harder to spot and to eradicate, but reducing its speed." +/datum/disease_ability/symptom/medium/viralevolution + symptoms = list(/datum/symptom/viralevolution) -/datum/disease_ability/symptom/vitiligo - name = "Skin Paleness" +/datum/disease_ability/symptom/medium/vitiligo symptoms = list(/datum/symptom/vitiligo) - cost = 1 - required_total_points = 8 - short_desc = "Cause victims to become pale." - long_desc = "Cause victims to become pale. Decreases all stats." +/datum/disease_ability/symptom/medium/revitiligo + symptoms = list(/datum/symptom/revitiligo) -/datum/disease_ability/symptom/sensory_restoration - name = "Sensory Restoration" - symptoms = list(/datum/symptom/sensory_restoration) - cost = 4 - required_total_points = 8 - short_desc = "Regenerate eye and ear damage of victims." - long_desc = "Regenerate eye and ear damage of victims." - - -/datum/disease_ability/symptom/itching - name = "Itching" +/datum/disease_ability/symptom/medium/itching symptoms = list(/datum/symptom/itching) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to itch." long_desc = "Cause victims to itch, increasing all stats except stealth." - -/datum/disease_ability/symptom/weight_loss - name = "Weight Loss" +/datum/disease_ability/symptom/medium/heal/weight_loss symptoms = list(/datum/symptom/weight_loss) - cost = 4 - required_total_points = 8 short_desc = "Cause victims to lose weight." long_desc = "Cause victims to lose weight, and make it almost impossible for them to gain nutrition from food. Reduced nutrition allows your infection to spread more easily from hosts, especially by sneezing." +/datum/disease_ability/symptom/medium/heal/sensory_restoration + symptoms = list(/datum/symptom/sensory_restoration) + short_desc = "Regenerate eye and ear damage of victims." + long_desc = "Regenerate eye and ear damage of victims." -/datum/disease_ability/symptom/metabolism_heal - name = "Metabolic Boost" +/datum/disease_ability/symptom/medium/heal/mind_restoration + symptoms = list(/datum/symptom/mind_restoration) + +/******POWERFUL******/ + +/datum/disease_ability/symptom/powerful/fire + symptoms = list(/datum/symptom/fire) + +/datum/disease_ability/symptom/powerful/flesh_eating + symptoms = list(/datum/symptom/flesh_eating) + +/* +/datum/disease_ability/symptom/powerful/genetic_mutation + symptoms = list(/datum/symptom/genetic_mutation) + cost = 8 +*/ + +/datum/disease_ability/symptom/powerful/inorganic_adaptation + symptoms = list(/datum/symptom/inorganic_adaptation) + +/datum/disease_ability/symptom/powerful/narcolepsy + symptoms = list(/datum/symptom/narcolepsy) + +/datum/disease_ability/symptom/powerful/youth + symptoms = list(/datum/symptom/youth) + short_desc = "Cause victims to become eternally young." + long_desc = "Cause victims to become eternally young. Provides boosts to all stats except transmissibility." + +/****HEALING SUBTYPE****/ + +/datum/disease_ability/symptom/powerful/heal/starlight + symptoms = list(/datum/symptom/heal/starlight) + +/datum/disease_ability/symptom/powerful/heal/oxygen + symptoms = list(/datum/symptom/oxygen) + +/datum/disease_ability/symptom/powerful/heal/chem + symptoms = list(/datum/symptom/heal/chem) + +/datum/disease_ability/symptom/powerful/heal/metabolism symptoms = list(/datum/symptom/heal/metabolism) - cost = 4 - required_total_points = 16 short_desc = "Increase the metabolism of victims, causing them to process chemicals and grow hungry faster." long_desc = "Increase the metabolism of victims, causing them to process chemicals twice as fast and grow hungry more quickly." +/datum/disease_ability/symptom/powerful/heal/dark + symptoms = list(/datum/symptom/heal/darkness) -/datum/disease_ability/symptom/coma_heal - name = "Regenerative Coma" +/datum/disease_ability/symptom/powerful/heal/water + symptoms = list(/datum/symptom/heal/water) + +/datum/disease_ability/symptom/powerful/heal/plasma + symptoms = list(/datum/symptom/heal/plasma) + +/datum/disease_ability/symptom/powerful/heal/radiation + symptoms = list(/datum/symptom/heal/radiation) + +/datum/disease_ability/symptom/powerful/heal/coma symptoms = list(/datum/symptom/heal/coma) - cost = 8 - required_total_points = 16 short_desc = "Cause victims to fall into a healing coma when hurt." long_desc = "Cause victims to fall into a healing coma when hurt." diff --git a/code/modules/antagonists/disease/disease_disease.dm b/code/modules/antagonists/disease/disease_disease.dm index b4b8ac0956..c37abefab0 100644 --- a/code/modules/antagonists/disease/disease_disease.dm +++ b/code/modules/antagonists/disease/disease_disease.dm @@ -51,6 +51,7 @@ if(cures.len) return var/list/not_used = advance_cures.Copy() + not_used.Cut(1, 6) // Removes the first five tiers of cures. cures = list(pick(pick_n_take(not_used)), pick(pick_n_take(not_used))) // Get the cure name from the cure_id diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index 4d378af724..49c34131fc 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -18,7 +18,7 @@ the new instance inside the host to be updated to the template's stats. layer = BELOW_MOB_LAYER lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE sight = SEE_SELF|SEE_THRU - initial_language_holder = /datum/language_holder/empty + initial_language_holder = /datum/language_holder/universal var/freemove = TRUE var/freemove_end = 0 @@ -43,7 +43,7 @@ the new instance inside the host to be updated to the template's stats. var/move_delay = 1 var/next_adaptation_time = 0 - var/adaptation_cooldown = 1200 + var/adaptation_cooldown = 600 var/list/purchased_abilities var/list/unpurchased_abilities @@ -118,10 +118,28 @@ the new instance inside the host to be updated to the template's stats. follow_next(Dir & NORTHWEST) last_move_tick = world.time +/mob/camera/disease/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode) + . = ..() + var/atom/movable/to_follow = speaker + if(radio_freq) + var/atom/movable/virtualspeaker/V = speaker + to_follow = V.source + var/link + if(to_follow in hosts) + link = FOLLOW_LINK(src, to_follow) + else + link = "" + // Recompose the message, because it's scrambled by default + message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode) + to_chat(src, "[link] [message]") + + /mob/camera/disease/mind_initialize() . = ..() if(!mind.has_antag_datum(/datum/antagonist/disease)) mind.add_antag_datum(/datum/antagonist/disease) + var/datum/atom_hud/medsensor = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] + medsensor.add_hud_to(src) /mob/camera/disease/proc/pick_name() var/static/list/taken_names @@ -247,9 +265,12 @@ the new instance inside the host to be updated to the template's stats. if(!move_listener) move_listener = L.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/follow_mob))) else - L.TakeComponent(move_listener) - if(QDELING(move_listener)) - move_listener = null + if(L) + L.TakeComponent(move_listener) + if(QDELING(move_listener)) + move_listener = null + else + QDEL_NULL(move_listener) follow_mob() /mob/camera/disease/proc/follow_next(reverse = FALSE) diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 4f31346136..03a176b054 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -80,6 +80,7 @@ desc = "Still it beats furiously, emanating an aura of utter hate." icon = 'icons/obj/surgery.dmi' icon_state = "demon_heart-on" + decay_factor = 0 /obj/item/organ/heart/demon/update_icon() return //always beating visually diff --git a/code/modules/antagonists/wizard/equipment/artefact.dm b/code/modules/antagonists/wizard/equipment/artefact.dm index 8642484895..57488a6722 100644 --- a/code/modules/antagonists/wizard/equipment/artefact.dm +++ b/code/modules/antagonists/wizard/equipment/artefact.dm @@ -198,7 +198,7 @@ to_chat(user, "This artifact can only affect three undead at a time!") return - M.set_species(/datum/species/skeleton, icon_update=0) + M.set_species(/datum/species/skeleton/space, icon_update=0) M.revive(full_heal = 1, admin_revive = 1) spooky_scaries |= M to_chat(M, "You have been revived by [user.real_name]!") diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 1087f1ebb5..fa28da74d0 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1762,15 +1762,31 @@ /obj/item/stack/tile/carpet/black/fifty) crate_name = "premium carpet crate" -/datum/supply_pack/service/carpet2 - name = "Premium Carpet Crate #2" - desc = "Plasteel floor tiles getting on your nerves? These stacks of extra soft carpet will tie any room together. Contains red, and monochrome" - cost = 1000 - contains = list(/obj/item/stack/tile/carpet/blackred/fifty, +/datum/supply_pack/service/carpet_exotic + name = "Exotic Carpet Crate" + desc = "Exotic carpets straight from Space Russia, for all your decorating needs. Contains 100 tiles each of 10 different flooring patterns." + cost = 4000 + contains = list(/obj/item/stack/tile/carpet/blue/fifty, + /obj/item/stack/tile/carpet/blue/fifty, + /obj/item/stack/tile/carpet/cyan/fifty, + /obj/item/stack/tile/carpet/cyan/fifty, + /obj/item/stack/tile/carpet/green/fifty, + /obj/item/stack/tile/carpet/green/fifty, + /obj/item/stack/tile/carpet/orange/fifty, + /obj/item/stack/tile/carpet/orange/fifty, + /obj/item/stack/tile/carpet/purple/fifty, + /obj/item/stack/tile/carpet/purple/fifty, + /obj/item/stack/tile/carpet/red/fifty, + /obj/item/stack/tile/carpet/red/fifty, + /obj/item/stack/tile/carpet/royalblue/fifty, + /obj/item/stack/tile/carpet/royalblue/fifty, + /obj/item/stack/tile/carpet/royalblack/fifty, + /obj/item/stack/tile/carpet/royalblack/fifty, + /obj/item/stack/tile/carpet/blackred/fifty, /obj/item/stack/tile/carpet/blackred/fifty, /obj/item/stack/tile/carpet/monochrome/fifty, /obj/item/stack/tile/carpet/monochrome/fifty) - crate_name = "premium carpet crate #2" + crate_name = "exotic carpet crate" /datum/supply_pack/service/lightbulbs name = "Replacement Lights" diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 5402353fd4..643d072469 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -571,6 +571,8 @@ GLOBAL_LIST_EMPTY(asset_datums) "fontawesome-webfont.woff" = 'tgui/assets/fonts/fontawesome-webfont.woff', "font-awesome.css" = 'code/modules/goonchat/browserassets/css/font-awesome.css', "browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css', + "browserOutput_dark.css" = 'code/modules/goonchat/browserassets/css/browserOutput_dark.css', + "browserOutput_light.css" = 'code/modules/goonchat/browserassets/css/browserOutput_light.css' ) /datum/asset/spritesheet/goonchat diff --git a/code/modules/client/darkmode.dm b/code/modules/client/darkmode.dm index 9e8d136b3b..f806e5c964 100644 --- a/code/modules/client/darkmode.dm +++ b/code/modules/client/darkmode.dm @@ -5,7 +5,7 @@ This lets you switch chat themes by using winset and CSS loading, you must relog Things to note: If you change ANYTHING in interface/skin.dmf you need to change it here: Format: -winset(src, "window as appears in skin.dmf after elem", "var to change = currentvalue;var to change = desired value") +winset(src, "window as appears in skin.dmf after elem", "var to change = desired value") How this works: I've added a function to browseroutput.js which registers a cookie for darkmode and swaps the chat accordingly. You can find the button to do this under the "cog" icon next to the ping button (top right of chat) This then swaps the window theme automatically @@ -14,104 +14,52 @@ Thanks to spacemaniac and mcdonald for help with the JS side of this. /client/proc/force_white_theme() //There's no way round it. We're essentially changing the skin by hand. It's painful but it works, and is the way Lummox suggested. //Main windows - winset(src, "infowindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "infowindow", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "info", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_WHITEMODE_BACKGROUND]") - winset(src, "info", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "browseroutput", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "browseroutput", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "outputwindow", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "outputwindow", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "mainwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "split", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_BACKGROUND]") + winset(src, "infowindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "info", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "browseroutput", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "outputwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "mainwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") + winset(src, "split", "background-color = [COLOR_WHITEMODE_BACKGROUND]") //Buttons - winset(src, "changelog", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG]") - winset(src, "changelog", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "rules", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG]") - winset(src, "rules", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "wiki", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG]") - winset(src, "wiki", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "forum", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG]") - winset(src, "forum", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "github", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG]") - winset(src, "github", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "report-issue", "background-color = [COLOR_DARKMODE_ISSUE_BUTTON_BG];background-color = [COLOR_WHITEMODE_ISSUE_BUTTON_BG]") - winset(src, "report-issue", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "changelog", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "rules", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "wiki", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "forum", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "github", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "report-issue", "background-color = [COLOR_WHITEMODE_ISSUE_BUTTON_BG];text-color = [COLOR_WHITEMODE_TEXT]") //Status and verb tabs - winset(src, "output", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_BACKGROUND]") - winset(src, "output", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "statwindow", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "statwindow", "text-color = #eaeaea;text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "stat", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_BACKGROUND]") - winset(src, "stat", "tab-background-color = [COLOR_DARKMODE_BACKGROUND];tab-background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "stat", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "stat", "tab-text-color = [COLOR_DARKMODE_TEXT];tab-text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "stat", "prefix-color = [COLOR_DARKMODE_TEXT];prefix-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "stat", "suffix-color = [COLOR_DARKMODE_TEXT];suffix-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "output", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "statwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "stat", "background-color = [COLOR_WHITEMODE_BACKGROUND];tab-background-color = [COLOR_WHITEMODE_DARKBACKGROUND];\ + text-color = [COLOR_WHITEMODE_TEXT];tab-text-color = [COLOR_WHITEMODE_TEXT];\ + prefix-color = [COLOR_WHITEMODE_TEXT];suffix-color = [COLOR_WHITEMODE_TEXT]") //Etc. - winset(src, "say", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "say", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "asset_cache_browser", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_WHITEMODE_DARKBACKGROUND]") - winset(src, "asset_cache_browser", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") - winset(src, "tooltip", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = [COLOR_WHITEMODE_BACKGROUND]") - winset(src, "tooltip", "text-color = [COLOR_DARKMODE_TEXT];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "say", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "asset_cache_browser", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") + winset(src, "tooltip", "background-color = [COLOR_WHITEMODE_BACKGROUND];text-color = [COLOR_WHITEMODE_TEXT]") /client/proc/force_dark_theme() //Inversely, if theyre using white theme and want to swap to the superior dark theme, let's get WINSET() ing //Main windows - winset(src, "infowindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_DARKBACKGROUND]") - winset(src, "infowindow", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "info", "background-color = [COLOR_WHITEMODE_BACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "info", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "browseroutput", "background-color = [COLOR_WHITEMODE_BACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "browseroutput", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "outputwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "outputwindow", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "mainwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_DARKBACKGROUND]") - winset(src, "split", "background-color = [COLOR_WHITEMODE_BACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") + winset(src, "infowindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "info", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "browseroutput", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "outputwindow", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "mainwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND]") + winset(src, "split", "background-color = [COLOR_DARKMODE_BACKGROUND]") //Buttons - winset(src, "changelog", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "changelog", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "rules", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "rules", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "wiki", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "wiki", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "forum", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "forum", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "github", "background-color = [COLOR_WHITEMODE_INFO_BUTTONS_BG];background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG]") - winset(src, "github", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "report-issue", "background-color = [COLOR_WHITEMODE_ISSUE_BUTTON_BG];background-color = [COLOR_DARKMODE_ISSUE_BUTTON_BG]") - winset(src, "report-issue", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "changelog", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "rules", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "wiki", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "forum", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "github", "background-color = [COLOR_DARKMODE_INFO_BUTTONS_BG];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "report-issue", "background-color = [COLOR_DARKMODE_ISSUE_BUTTON_BG];text-color = [COLOR_DARKMODE_TEXT]") //Status and verb tabs - winset(src, "output", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "output", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "statwindow", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_DARKBACKGROUND]") - winset(src, "statwindow", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "stat", "background-color = [COLOR_WHITEMODE_BACKGROUND];background-color = [COLOR_DARKMODE_DARKBACKGROUND]") - winset(src, "stat", "tab-background-color = [COLOR_WHITEMODE_DARKBACKGROUND];tab-background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "stat", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "stat", "tab-text-color = [COLOR_WHITEMODE_TEXT];tab-text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "stat", "prefix-color = [COLOR_WHITEMODE_TEXT];prefix-color = [COLOR_DARKMODE_TEXT]") - winset(src, "stat", "suffix-color = [COLOR_WHITEMODE_TEXT];suffix-color = [COLOR_DARKMODE_TEXT]") + winset(src, "output", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "statwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "stat", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];tab-background-color = [COLOR_DARKMODE_BACKGROUND];\ + text-color = [COLOR_DARKMODE_TEXT];tab-text-color = [COLOR_DARKMODE_TEXT];\ + prefix-color = [COLOR_DARKMODE_TEXT];suffix-color = [COLOR_DARKMODE_TEXT]") //Etc. - winset(src, "say", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "say", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "asset_cache_browser", "background-color = [COLOR_WHITEMODE_DARKBACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "asset_cache_browser", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - winset(src, "tooltip", "background-color = [COLOR_WHITEMODE_BACKGROUND];background-color = [COLOR_DARKMODE_BACKGROUND]") - winset(src, "tooltip", "text-color = [COLOR_WHITEMODE_TEXT];text-color = [COLOR_DARKMODE_TEXT]") - - -/datum/asset/simple/goonchat - verify = FALSE - assets = list( - "json2.min.js" = 'code/modules/goonchat/browserassets/js/json2.min.js', - "errorHandler.js" = 'code/modules/goonchat/browserassets/js/errorHandler.js', - "browserOutput.js" = 'code/modules/goonchat/browserassets/js/browserOutput.js', - "fontawesome-webfont.eot" = 'tgui/assets/fonts/fontawesome-webfont.eot', - "fontawesome-webfont.svg" = 'tgui/assets/fonts/fontawesome-webfont.svg', - "fontawesome-webfont.ttf" = 'tgui/assets/fonts/fontawesome-webfont.ttf', - "fontawesome-webfont.woff" = 'tgui/assets/fonts/fontawesome-webfont.woff', - "font-awesome.css" = 'code/modules/goonchat/browserassets/css/font-awesome.css', - "browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css', - "browserOutput_white.css" = 'code/modules/goonchat/browserassets/css/browserOutput_white.css', - ) + winset(src, "say", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "asset_cache_browser", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") + winset(src, "tooltip", "background-color = [COLOR_DARKMODE_BACKGROUND];text-color = [COLOR_DARKMODE_TEXT]") \ No newline at end of file diff --git a/code/modules/client/verbs/looc.dm b/code/modules/client/verbs/looc.dm index 4049034203..b371372dfe 100644 --- a/code/modules/client/verbs/looc.dm +++ b/code/modules/client/verbs/looc.dm @@ -1,3 +1,6 @@ +GLOBAL_VAR_INIT(LOOC_COLOR, null)//If this is null, use the CSS for OOC. Otherwise, use a custom colour. +GLOBAL_VAR_INIT(normal_looc_colour, "#6699CC") + /client/verb/looc(msg as text) set name = "LOOC" set desc = "Local OOC, seen only by those in view." @@ -59,30 +62,17 @@ continue //Also handled later. if(C.prefs.toggles & CHAT_OOC) -// var/display_name = src.key -// if(holder) -// if(holder.fakekey) -// if(C.holder) -// display_name = "[holder.fakekey]/([src.key])" -// else -// display_name = holder.fakekey - to_chat(C,"LOOC: [src.mob.name]: [msg]") + if(GLOB.LOOC_COLOR) + to_chat(C, "LOOC: [src.mob.name]: [msg]") + else + to_chat(C, "LOOC: [src.mob.name]: [msg]") for(var/client/C in GLOB.admins) if(C.prefs.toggles & CHAT_OOC) var/prefix = "(R)LOOC" if (C.mob in heard) prefix = "LOOC" - to_chat(C,"[ADMIN_FLW(usr)][prefix]: [src.key]/[src.mob.name]: [msg]") - - /*for(var/mob/dead/observer/G in world) - if(!G.client) - continue - var/client/C = G.client - if (C in GLOB.admins) - continue //handled earlier. - if(C.prefs.toggles & CHAT_OOC) - var/prefix = "(G)LOOC" - if (C.mob in heard) - prefix = "LOOC" - to_chat(C,"[prefix]: [src.key]/[src.mob.name]: [msg]")*/ + if(GLOB.LOOC_COLOR) + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]") + else + to_chat(C, "[ADMIN_FLW(usr)] [prefix]: [src.key]/[src.mob.name]: [msg]") diff --git a/code/modules/clothing/outfits/plasmaman.dm b/code/modules/clothing/outfits/plasmaman.dm new file mode 100644 index 0000000000..20b67891d8 --- /dev/null +++ b/code/modules/clothing/outfits/plasmaman.dm @@ -0,0 +1,164 @@ +/datum/outfit/plasmaman/bar + name = "Bartender Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/white + uniform = /obj/item/clothing/under/plasmaman/enviroslacks + +/datum/outfit/plasmaman/chef + name = "Chef Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/white + uniform = /obj/item/clothing/under/plasmaman/chef + +/datum/outfit/plasmaman/botany + name = "Botany Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/botany + uniform = /obj/item/clothing/under/plasmaman/botany + +/datum/outfit/plasmaman/curator + name = "Curator Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/curator + uniform = /obj/item/clothing/under/plasmaman/curator + +/datum/outfit/plasmaman/chaplain + name = "Chaplain Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/chaplain + uniform = /obj/item/clothing/under/plasmaman/chaplain + +/datum/outfit/plasmaman/janitor + name = "Janitor Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/janitor + uniform = /obj/item/clothing/under/plasmaman/janitor + +/datum/outfit/plasmaman/hop + name = "Head of Personell Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/hop + uniform = /obj/item/clothing/under/plasmaman/hop + +/datum/outfit/plasmaman/captain + name = "Captain Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/captain + uniform = /obj/item/clothing/under/plasmaman/captain + +/datum/outfit/plasmaman/security + name = "Security Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/security + uniform = /obj/item/clothing/under/plasmaman/security + ears = /obj/item/radio/headset/headset_sec + +/datum/outfit/plasmaman/detective + name = "Detective Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/white + uniform = /obj/item/clothing/under/plasmaman/enviroslacks + +/datum/outfit/plasmaman/warden + name = "Warden Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/security/warden + uniform = /obj/item/clothing/under/plasmaman/security/warden + +/datum/outfit/plasmaman/hos + name = "Head of Security Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/security/hos + uniform = /obj/item/clothing/under/plasmaman/security/hos + +/datum/outfit/plasmaman/cargo + name = "Cargo Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/cargo + uniform = /obj/item/clothing/under/plasmaman/cargo + +/datum/outfit/plasmaman/mining + name = "Mining Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/mining + uniform = /obj/item/clothing/under/plasmaman/mining + +/datum/outfit/plasmaman/medical + name = "Medical Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/medical + uniform = /obj/item/clothing/under/plasmaman/medical + +/datum/outfit/plasmaman/cmo + name = "Chief Medical Officer Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/cmo + uniform = /obj/item/clothing/under/plasmaman/cmo + +/datum/outfit/plasmaman/viro + name = "Virology Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/viro + uniform = /obj/item/clothing/under/plasmaman/viro + +/datum/outfit/plasmaman/chemist + name = "Chemist Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/chemist + uniform = /obj/item/clothing/under/plasmaman/chemist + +/datum/outfit/plasmaman/genetics + name = "Genetics Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/genetics + uniform = /obj/item/clothing/under/plasmaman/genetics + +/datum/outfit/plasmaman/science + name = "Science Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/science + uniform = /obj/item/clothing/under/plasmaman/science + +/datum/outfit/plasmaman/rd + name = "Research Director Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/rd + uniform = /obj/item/clothing/under/plasmaman/rd + +/datum/outfit/plasmaman/robotics + name = "Robotics Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/robotics + uniform = /obj/item/clothing/under/plasmaman/robotics + +/datum/outfit/plasmaman/engineering + name = "Engineering Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/engineering + uniform = /obj/item/clothing/under/plasmaman/engineering + +/datum/outfit/plasmaman/ce + name = "Chief Engineer Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/engineering/ce + uniform = /obj/item/clothing/under/plasmaman/engineering/ce + +/datum/outfit/plasmaman/atmospherics + name = "Atmospherics Plasmaman" + + head = /obj/item/clothing/head/helmet/space/plasmaman/atmospherics + uniform = /obj/item/clothing/under/plasmaman/atmospherics + +/datum/outfit/plasmaman/mime + name = "Plasmamime" + + head = /obj/item/clothing/head/helmet/space/plasmaman/mime + uniform = /obj/item/clothing/under/plasmaman/mime + mask = /obj/item/clothing/mask/gas/mime + +/datum/outfit/plasmaman/clown + name = "Plasmaclown" + + head = /obj/item/clothing/head/helmet/space/plasmaman/clown + uniform = /obj/item/clothing/under/plasmaman/clown + mask = /obj/item/clothing/mask/gas/clown_hat \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index d1ee88d5a8..0b07aafa5d 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -12,7 +12,7 @@ var/next_extinguish = 0 var/extinguish_cooldown = 100 var/extinguishes_left = 10 - + mutantrace_variation = NO_MUTANTRACE_VARIATION /obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user) ..() @@ -45,12 +45,18 @@ resistance_flags = FIRE_PROOF var/brightness_on = 4 //luminosity when the light is on var/on = FALSE + var/light_overlay = "envirohelm-light" actions_types = list(/datum/action/item_action/toggle_helmet_light) + mutantrace_variation = NO_MUTANTRACE_VARIATION /obj/item/clothing/head/helmet/space/plasmaman/attack_self(mob/user) + if(!light_overlay) + return on = !on - icon_state = "[initial(icon_state)][on ? "-light":""]" - item_state = icon_state + if(!on) + cut_overlay(light_overlay) + else + add_overlay(light_overlay) user.update_inv_head() //So the mob overlay updates if(on) @@ -61,3 +67,166 @@ for(var/X in actions) var/datum/action/A=X A.UpdateButtonIcon() + +/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands, icon_file) + . = ..() + if(!isinhands && on) + . += mutable_appearance(icon_file, light_overlay) + +/obj/item/clothing/head/helmet/space/plasmaman/security + name = "security plasma envirosuit helmet" + desc = "A plasmaman containment helmet designed for security officers, protecting them from being flashed and burning alive, along-side other undesirables." + icon_state = "security_envirohelm" + item_state = "security_envirohelm" + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) + +/obj/item/clothing/head/helmet/space/plasmaman/security/warden + name = "warden's plasma envirosuit helmet" + desc = "A plasmaman containment helmet designed for the warden, a pair of white stripes being added to differeciate them from other members of security." + icon_state = "warden_envirohelm" + item_state = "warden_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/security/hos + name = "head of security's plasma envirosuit helmet" + desc = "A plasmaman containment helmet designed for the head of security, manacing black with red stripes, to differenciate them from other members of security." + icon_state = "hos_envirohelm" + item_state = "hos_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/medical + name = "medical's plasma envirosuit helmet" + desc = "An envriohelmet designed for plasmaman medical doctors, having two stripes down it's length to denote as much." + icon_state = "doctor_envirohelm" + item_state = "doctor_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/cmo + name = "chief medical officer's plasma envirosuit helmet" + desc = "A blue and white envriohelmet designed for the chief medical officer." + icon_state = "cmo_envirohelm" + item_state = "cmo_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/genetics + name = "geneticist's plasma envirosuit helmet" + desc = "A plasmaman envirohelmet designed for geneticists." + icon_state = "geneticist_envirohelm" + item_state = "geneticist_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/viro + name = "virology plasma envirosuit helmet" + desc = "The helmet worn by the safest people on the station, those who are completely immune to the monstrosities they create." + icon_state = "virologist_envirohelm" + item_state = "virologist_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/chemist + name = "chemistry plasma envirosuit helmet" + desc = "A plasmaman envirosuit designed for chemists, two orange stripes going down it's face." + icon_state = "chemist_envirohelm" + item_state = "chemist_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/science + name = "science plasma envirosuit helmet" + desc = "A plasmaman envirohelmet designed for scientists." + icon_state = "scientist_envirohelm" + item_state = "scientist_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/rd + name = "research director's plasma envirosuit helmet" + desc = "A sturdier plasmaman envirohelmet designed for research directors." + icon_state = "rd_envirohelm" + item_state = "rd_envirohelm" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 100, "rad" = 0, "fire" = 100, "acid" = 75) + +/obj/item/clothing/head/helmet/space/plasmaman/robotics + name = "robotics plasma envirosuit helmet" + desc = "A plasmaman envirohelmet designed for roboticists." + icon_state = "roboticist_envirohelm" + item_state = "roboticist_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/engineering + name = "engineering plasma envirosuit helmet" + desc = "A space-worthy helmet specially designed for engineer plasmamen, the usual purple stripes being replaced by engineering's orange." + icon_state = "engineer_envirohelm" + item_state = "engineer_envirohelm" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 10, "fire" = 100, "acid" = 75) + +/obj/item/clothing/head/helmet/space/plasmaman/engineering/ce + name = "chief engineer's plasma envirosuit helmet" + desc = "A space-worthy helmet specially designed for the chief engineer, white with gold stripes designed for high visibility." + icon_state = "ce_envirohelm" + item_state = "ce_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/atmospherics + name = "atmospherics plasma envirosuit helmet" + desc = "A space-worthy helmet specially designed for atmos technician plasmamen, the usual purple stripes being replaced by engineering's blue." + icon_state = "atmos_envirohelm" + item_state = "atmos_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/cargo + name = "cargo plasma envirosuit helmet" + desc = "An plasmaman envirohelmet designed for cargo techs and quartermasters." + icon_state = "cargo_envirohelm" + item_state = "cargo_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/mining + name = "mining plasma envirosuit helmet" + desc = "A khaki helmet given to plasmamen miners operating on lavaland." + icon_state = "explorer_envirohelm" + item_state = "explorer_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/chaplain + name = "chaplain's plasma envirosuit helmet" + desc = "An envirohelmet specially designed for only the most pious of plasmamen." + icon_state = "chap_envirohelm" + item_state = "chap_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/white + name = "white plasma envirosuit helmet" + desc = "A generic white envirohelm." + icon_state = "white_envirohelm" + item_state = "white_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/hop + name = "head of personell's plasma envirosuit helmet" + desc = "A finely tailored azure envirohelm designed for head of personell." + icon_state = "hop_envirohelm" + item_state = "hop_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/captain + name = "captain's plasma envirosuit helmet" + desc = "A blue and gold envirohelm designed for the station's captain, nonetheless. Made of superior materials to protect them from the station hazards and more." + icon_state = "captain_envirohelm" + item_state = "captain_envirohelm" + armor = list("melee" = 10, "bullet" = 10, "laser" = 10, "energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 10, "fire" = 100, "acid" = 85) + +/obj/item/clothing/head/helmet/space/plasmaman/curator + name = "curator's plasma envirosuit helmet" + desc = "A slight modification on a tradiational voidsuit helmet, this helmet was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Despite their limitations, these helmets still see use by historian and old-styled plasmamen alike." + icon_state = "prototype_envirohelm" + item_state = "prototype_envirohelm" + light_overlay = null + actions_types = list() + +/obj/item/clothing/head/helmet/space/plasmaman/botany + name = "botany plasma envirosuit helmet" + desc = "A green and blue envirohelmet designating it's wearer as a botanist. While not specially designed for it, it would protect against minor planet-related injuries." + icon_state = "botany_envirohelm" + item_state = "botany_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/janitor + name = "janitor's plasma envirosuit helmet" + desc = "A grey helmet bearing a pair of purple stripes, designating the wearer as a janitor." + icon_state = "janitor_envirohelm" + item_state = "janitor_envirohelm" + +/obj/item/clothing/head/helmet/space/plasmaman/mime + name = "mime envirosuit helmet" + desc = "The make-up is painted on, it's a miracle it doesn't chip. It's not very colourful." + icon_state = "mime_envirohelm" + item_state = "mime_envirohelm" + light_overlay = "mime_envirohelm-light" + +/obj/item/clothing/head/helmet/space/plasmaman/clown + name = "clown envirosuit helmet" + desc = "The make-up is painted on, it's a miracle it doesn't chip. 'HONK!'" + icon_state = "clown_envirohelm" + item_state = "clown_envirohelm" + light_overlay = "clown_envirohelm-light" diff --git a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm new file mode 100644 index 0000000000..74181b05eb --- /dev/null +++ b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm @@ -0,0 +1,100 @@ +/obj/item/clothing/under/plasmaman/cargo + name = "cargo plasma envirosuit" + desc = "A joint envirosuit used by plasmamen quartermasters and cargo techs alike, due to the logistical problems of differenciating the two with the length of their pant legs." + icon_state = "cargo_envirosuit" + item_state = "cargo_envirosuit" + item_color = "cargo_envirosuit" + +/obj/item/clothing/under/plasmaman/mining + name = "mining plasma envirosuit" + desc = "An air-tight khaki suit designed for operations on lavaland by plasmamen." + icon_state = "explorer_envirosuit" + item_state = "explorer_envirosuit" + item_color = "explorer_envirosuit" + + +/obj/item/clothing/under/plasmaman/chef + name = "chef's plasma envirosuit" + desc = "A white plasmaman envirosuit designed for cullinary practices. One might question why a member of a species that doesn't need to eat would become a chef." + icon_state = "chef_envirosuit" + item_state = "chef_envirosuit" + item_color = "chef_envirosuit" + +/obj/item/clothing/under/plasmaman/enviroslacks + name = "enviroslacks" + desc = "The pet project of a particularly posh plasmaman, this custom suit was quickly appropriated by Nano-Trasen for it's detectives, lawyers, and bar-tenders alike." + icon_state = "enviroslacks" + item_state = "enviroslacks" + item_color = "enviroslacks" + +/obj/item/clothing/under/plasmaman/chaplain + name = "chaplain's plasma envirosuit" + desc = "An envirosuit specially designed for only the most pious of plasmamen." + icon_state = "chap_envirosuit" + item_state = "chap_envirosuit" + item_color = "chap_envirosuit" + +/obj/item/clothing/under/plasmaman/curator + name = "curator's plasma envirosuit" + desc = "Made out of a modified voidsuit, this suit was Nano-Trasen's first solution to the *logistical problems* that come with employing plasmamen. Due to the modifications, the suit is no longer space-worthy. Despite their limitations, these suits are still in used by historian and old-styled plasmamen alike." + icon_state = "prototype_envirosuit" + item_state = "prototype_envirosuit" + item_color = "prototype_envirosuit" + +/obj/item/clothing/under/plasmaman/janitor + name = "janitor's plasma envirosuit" + desc = "A grey and purple envirosuit designated for plasmamen janitors." + icon_state = "janitor_envirosuit" + item_state = "janitor_envirosuit" + item_color = "janitor_envirosuit" + +/obj/item/clothing/under/plasmaman/botany + name = "botany envirosuit" + desc = "A green and blue envirosuit designed to protect plasmamen from minor plant-related injuries." + icon_state = "botany_envirosuit" + item_state = "botany_envirosuit" + item_color = "botany_envirosuit" + +/obj/item/clothing/under/plasmaman/hop + name = "head of personell's envirosuit" + desc = "A prestigious azure envirosuit designed for head of personell." + icon_state = "hop_envirosuit" + item_state = "hop_envirosuit" + item_color = "hop_envirosuit" + +/obj/item/clothing/under/plasmaman/captain + name = "captain's envirosuit" + desc = "An expensive piece of plasmaman envirosuit fashion. guaranteed to keep you cool while the station goes down in fierceful fires." + icon_state = "captain_envirosuit" + item_state = "captain_envirosuit" + item_color = "captain_envirosuit" + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) + +/obj/item/clothing/under/plasmaman/mime + name = "mime envirosuit" + desc = "It's not very colourful." + icon_state = "mime_envirosuit" + item_state = "mime_envirosuit" + item_color = "mime_envirosuit" + +/obj/item/clothing/under/plasmaman/clown + name = "clown envirosuit" + desc = "'HONK!'" + icon_state = "clown_envirosuit" + item_state = "clown_envirosuit" + item_color = "clown_envirosuit" + +/obj/item/clothing/under/plasmaman/clown/Extinguish(mob/living/carbon/human/H) + if(!istype(H)) + return + + if(H.on_fire) + if(extinguishes_left) + if(next_extinguish > world.time) + return + next_extinguish = world.time + extinguish_cooldown + extinguishes_left-- + H.visible_message("[H]'s suit spews out a tonne of space lube!","Your suit spews out a tonne of space lube!") + H.ExtinguishMob() + new /obj/effect/particle_effect/foam(loc) //Truely terrifying. + return FALSE \ No newline at end of file diff --git a/code/modules/clothing/under/jobs/Plasmaman/engineering.dm b/code/modules/clothing/under/jobs/Plasmaman/engineering.dm new file mode 100644 index 0000000000..1f381df4cf --- /dev/null +++ b/code/modules/clothing/under/jobs/Plasmaman/engineering.dm @@ -0,0 +1,21 @@ +/obj/item/clothing/under/plasmaman/engineering + name = "engineering plasma envirosuit" + desc = "An air-tight suit designed to be used by plasmamen exployed as engineers, the usual purple stripes being replaced by engineer's orange. It protects the user from fire and acid damage." + icon_state = "engineer_envirosuit" + item_state = "engineer_envirosuit" + item_color = "engineer_envirosuit" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 10, "fire" = 95, "acid" = 95) + +/obj/item/clothing/under/plasmaman/engineering/ce + name = "chief engineer's plasma envirosuit" + desc = "An advanced air-tight suit designed to be used by plasmamen chief engineers, complete with ornamental widgets and gizmo. It protects the user from fire and acid damage." + icon_state = "ce_envirosuit" + item_state = "ce_envirosuit" + item_color = "ce_envirosuit" + +/obj/item/clothing/under/plasmaman/atmospherics + name = "atmospherics plasma envirosuit" + desc = "An air-tight suit designed to be used by plasmamen exployed as atmos technicians, the usual purple stripes being replaced by atmos's blue." + icon_state = "atmos_envirosuit" + item_state = "atmos_envirosuit" + item_color = "atmos_envirosuit" diff --git a/code/modules/clothing/under/jobs/Plasmaman/medsci.dm b/code/modules/clothing/under/jobs/Plasmaman/medsci.dm new file mode 100644 index 0000000000..6106d785a9 --- /dev/null +++ b/code/modules/clothing/under/jobs/Plasmaman/medsci.dm @@ -0,0 +1,56 @@ +/obj/item/clothing/under/plasmaman/medical + name = "medical plasma envirosuit" + desc = "A suit designed for the station's more plasma-based doctors." + icon_state = "doctor_envirosuit" + item_state = "doctor_envirosuit" + item_color = "doctor_envirosuit" + +/obj/item/clothing/under/plasmaman/cmo + name = "chief medical officer's plasma envirosuit" + desc = "A suit designed for the station's most plasma-based chief medical officer, but not for their cat." + icon_state = "cmo_envirosuit" + item_state = "cmo_envirosuit" + item_color = "cmo_envirosuit" + +/obj/item/clothing/under/plasmaman/science + name = "science plasma envirosuit" + desc = "A plasmaman envirosuit designed for scientists." + icon_state = "scientist_envirosuit" + item_state = "scientist_envirosuit" + item_color = "scientist_envirosuit" + +/obj/item/clothing/under/plasmaman/rd + name = "research direactor's plasma envirosuit" + desc = "A plasmaman envirosuit designed for the research director to aid them in their job of directing research into the right direction." + icon_state = "rd_envirosuit" + item_state = "rd_envirosuit" + item_color = "rd_envirosuit" + armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) + +/obj/item/clothing/under/plasmaman/robotics + name = "robotics plasma envirosuit" + desc = "A plasmaman envirosuit designed for roboticists." + icon_state = "roboticist_envirosuit" + item_state = "roboticist_envirosuit" + item_color = "roboticist_envirosuit" + +/obj/item/clothing/under/plasmaman/viro + name = "virology plasma envirosuit" + desc = "The suit worn by the safest people on the station, those who are completely immune to the monstrosities they create." + icon_state = "virologist_envirosuit" + item_state = "virologist_envirosuit" + item_color = "virologist_envirosuit" + +/obj/item/clothing/under/plasmaman/genetics + name = "genetics plasma envirosuit" + desc = "A plasmaman envirosuit designed for geneticists." + icon_state = "geneticist_envirosuit" + item_state = "geneticist_envirosuit" + item_color = "geneticist_envirosuit" + +/obj/item/clothing/under/plasmaman/chemist + name = "chemistry plasma envirosuit" + desc = "A plasmaman envirosuit designed for chemists." + icon_state = "chemist_envirosuit" + item_state = "chemist_envirosuit" + item_color = "chemist_envirosuit" diff --git a/code/modules/clothing/under/jobs/Plasmaman/security.dm b/code/modules/clothing/under/jobs/Plasmaman/security.dm new file mode 100644 index 0000000000..ff756e09fd --- /dev/null +++ b/code/modules/clothing/under/jobs/Plasmaman/security.dm @@ -0,0 +1,21 @@ +/obj/item/clothing/under/plasmaman/security + name = "security plasma envirosuit" + desc = "A plasmaman containment suit designed for security officers, offering a limited amount of extra protection." + icon_state = "security_envirosuit" + item_state = "security_envirosuit" + item_color = "security_envirosuit" + armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) + +/obj/item/clothing/under/plasmaman/security/warden + name = "warden plasma envirosuit" + desc = "A plasmaman containment suit designed for the warden, white stripes being added to differeciate them from other members of security." + icon_state = "warden_envirosuit" + item_state = "warden_envirosuit" + item_color = "warden_envirosuit" + +/obj/item/clothing/under/plasmaman/security/hos + name = "security plasma envirosuit" + desc = "A slick black and red plasmaman containment suit designed for the head of security, also called the LAW." + icon_state = "hos_envirosuit" + item_state = "hos_envirosuit" + item_color = "hos_envirosuit" diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 616c00b6c1..52c046493a 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -589,6 +589,7 @@ item_state = "b_suit" item_color = "sailor" can_adjust = FALSE + /obj/item/clothing/under/plasmaman name = "plasma envirosuit" desc = "A special containment suit that allows plasma-based lifeforms to exist safely in an oxygenated environment, and automatically extinguishes them in a crisis. Despite being airtight, it's not spaceworthy." @@ -596,12 +597,14 @@ item_state = "plasmaman" item_color = "plasmaman" armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 0, "fire" = 95, "acid" = 95) + slowdown = 1 body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS can_adjust = FALSE strip_delay = 80 var/next_extinguish = 0 var/extinguish_cooldown = 100 var/extinguishes_left = 5 + /obj/item/clothing/under/plasmaman/examine(mob/user) ..() to_chat(user, "There are [extinguishes_left] extinguisher charges left in this suit.") @@ -618,6 +621,7 @@ H.ExtinguishMob() new /obj/effect/particle_effect/water(get_turf(H)) return 0 + /obj/item/clothing/under/plasmaman/attackby(obj/item/E, mob/user, params) ..() if (istype(E, /obj/item/extinguisher_refill)) @@ -631,11 +635,13 @@ return return return + /obj/item/extinguisher_refill name = "envirosuit extinguisher cartridge" desc = "A cartridge loaded with a compressed extinguisher mix, used to refill the automatic extinguisher on plasma envirosuits." icon_state = "plasmarefill" icon = 'icons/obj/device.dmi' + /obj/item/clothing/under/rank/security/navyblue/russian name = "\improper Russian officer's uniform" desc = "The latest in fashionable russian outfits." diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 483055cb0d..ceb7a01ede 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -144,6 +144,13 @@ else O.forceMove(src) return TRUE + +///Really simple proc, just moves the object "O" into the hands of mob "M" if able, done so I could modify the proc a little for the organ fridge +/obj/machinery/smartfridge/proc/dispense(obj/item/O, var/mob/M) + if(!M.put_in_hands(O)) + O.forceMove(drop_location()) + adjust_item_drop_location(O) + /obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) @@ -197,9 +204,7 @@ if(desired == 1 && Adjacent(usr) && !issilicon(usr)) for(var/obj/item/O in src) if(O.name == params["name"]) - if(!usr.put_in_hands(O)) - O.forceMove(drop_location()) - adjust_item_drop_location(O) + dispense(O, usr) break if (visible_contents) update_icon() @@ -209,8 +214,7 @@ if(desired <= 0) break if(O.name == params["name"]) - O.forceMove(drop_location()) - adjust_item_drop_location(O) + dispense(O, usr) desired-- if (visible_contents) update_icon() @@ -378,6 +382,44 @@ /obj/machinery/smartfridge/extract/preloaded initial_contents = list(/obj/item/slime_scanner = 2) +// ------------------------- You think you're better than Chem, huh? +// Organ Surgery Smartfridge +// ------------------------- Just wait till Tamiorgans +/obj/machinery/smartfridge/organ + name = "smart organ storage" + desc = "A refrigerated storage unit for organ storage." + max_n_of_items = 20 //vastly lower to prevent processing too long + var/repair_rate = 0 + +/obj/machinery/smartfridge/organ/accept_check(obj/item/O) + if(istype(O, /obj/item/organ)) + return TRUE + return FALSE + +/obj/machinery/smartfridge/organ/load(obj/item/O) + . = ..() + if(!.) //if the item loads, clear can_decompose + return + var/obj/item/organ/organ = O + organ.organ_flags |= ORGAN_FROZEN + +/obj/machinery/smartfridge/organ/RefreshParts() + for(var/obj/item/stock_parts/matter_bin/B in component_parts) + max_n_of_items = 20 * B.rating + repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1)) + +/obj/machinery/smartfridge/organ/process() + for(var/organ in contents) + var/obj/item/organ/O = organ + if(!istype(O)) + return + O.applyOrganDamage(-repair_rate) + +/obj/machinery/smartfridge/organ/Exited(obj/item/organ/AM, atom/newLoc) + . = ..() + if(istype(AM)) + AM.organ_flags &= ~ORGAN_FROZEN + // ----------------------------- // Chemistry Medical Smartfridge // ----------------------------- diff --git a/code/modules/food_and_drinks/recipes/drinks_recipes.dm b/code/modules/food_and_drinks/recipes/drinks_recipes.dm index 5173a1c0cc..9dbddfb519 100644 --- a/code/modules/food_and_drinks/recipes/drinks_recipes.dm +++ b/code/modules/food_and_drinks/recipes/drinks_recipes.dm @@ -397,13 +397,16 @@ FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics FermiExplode = FALSE //If the chemical explodes in a special way PurityMin = 0 //The minimum purity something has to be above, otherwise it explodes. + clear_conversion = REACTION_CLEAR_INVERSE +/* /datum/chemical_reaction/neurotoxin/FermiFinish(datum/reagents/holder, var/atom/my_atom) var/datum/reagent/consumable/ethanol/neurotoxin/Nt = locate(/datum/reagent/consumable/ethanol/neurotoxin) in my_atom.reagents.reagent_list var/cached_volume = Nt.volume if(Nt.purity < 0.5) holder.remove_reagent(src.id, cached_volume) holder.add_reagent("neuroweak", cached_volume) +*/ /datum/chemical_reaction/neurotoxin/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH)//reduced size volume = volume/10 diff --git a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm index 082f20f524..ae49e2cb45 100644 --- a/code/modules/goonchat/browserOutput.dm +++ b/code/modules/goonchat/browserOutput.dm @@ -82,11 +82,13 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico if("setMusicVolume") data = setMusicVolume(arglist(params)) - if("swaptodarkmode") - swaptodarkmode() + if("colorPresetPost") //User just swapped color presets in their goonchat preferences. Do we do anything else? + switch(href_list["preset"]) + if("light") + owner.force_white_theme() + if("dark" || "normal") + owner.force_dark_theme() - if("swaptolightmode") - swaptolightmode() if(data) ehjax_send(data = data) @@ -246,10 +248,3 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico // url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript. C << output(url_encode(url_encode(message)), "browseroutput:output") - - -/datum/chatOutput/proc/swaptolightmode() //Dark mode light mode stuff. Yell at KMC if this breaks! (See darkmode.dm for documentation) - owner.force_white_theme() - -/datum/chatOutput/proc/swaptodarkmode() - owner.force_dark_theme() diff --git a/code/modules/goonchat/browserassets/css/browserOutput.css b/code/modules/goonchat/browserassets/css/browserOutput.css index 7b942494f4..164d0d65c6 100644 --- a/code/modules/goonchat/browserassets/css/browserOutput.css +++ b/code/modules/goonchat/browserassets/css/browserOutput.css @@ -7,20 +7,16 @@ html, body { padding: 0; margin: 0; height: 100%; - color: #f0f0f0; + color: #000000; } body { - background: #171717; + background: #E0E0E0; /*CIT CHANGE - darkens chatbox a lil*/ font-family: Verdana, sans-serif; font-size: 9pt; - font-color: #f0f0f0; line-height: 1.2; overflow-x: hidden; overflow-y: scroll; - word-wrap: break-word; - scrollbar-face-color:#1A1A1A; - scrollbar-track-color:#171717; - scrollbar-highlight-color:#171717; + word-wrap: break-word; } em { @@ -60,9 +56,9 @@ img.icon { border-radius: 10px; } -a {color: #397ea5;} -a.visited {color: #7c00e6;} -a:visited {color: #7c00e6;} +a {color: #0000ff;} +a.visited {color: #ff00ff;} +a:visited {color: #ff00ff;} a.popt {text-decoration: none;} /***************************************** @@ -93,21 +89,21 @@ a.popt {text-decoration: none;} bottom: 0; right: 0; padding: 8px; - background: #202020; + background: #d0d0d0; text-decoration: none; font-variant: small-caps; font-size: 1.1em; font-weight: bold; - color: #a4bad6; + color: #333; } -#newMessages:hover {background: #171717;} +#newMessages:hover {background: #ccc;} #newMessages i {vertical-align: middle; padding-left: 3px;} #ping { position: fixed; top: 0; right: 115px; width: 45px; - background: #202020; + background: #d0d0d0; height: 30px; padding: 8px 0 2px 0; } @@ -124,19 +120,19 @@ a.popt {text-decoration: none;} right: 0; } #userBar .subCell { - background: #202020; + background: #d0d0d0; height: 30px; padding: 5px 0; display: block; - color: #a4bad6; + color: #333; text-decoration: none; line-height: 28px; - border-top: 1px solid #171717; + border-top: 1px solid #b4b4b4; } -#userBar .subCell:hover {background: #202020;} +#userBar .subCell:hover {background: #ccc;} #userBar .toggle { width: 40px; - background: #202020; + background: #ccc; border-top: 0; float: right; text-align: center; @@ -172,7 +168,7 @@ a.popt {text-decoration: none;} position: fixed; top: 50%; left: 50%; - background: #ddd; + background: #d0d0d0; } .popup .close { position: absolute; @@ -189,7 +185,7 @@ a.popt {text-decoration: none;} .popup .close:hover {background: #999;} .popup .head { background: #999; - color: #ddd; + color: #d0d0d0; padding: 0 10px; height: 30px; line-height: 30px; @@ -200,7 +196,7 @@ a.popt {text-decoration: none;} } .popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;} .popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;} -.popup input[type=submit] {padding: 5px 10px; background: #999; color: #ddd; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} +.popup input[type=submit] {padding: 5px 10px; background: #999; color: #d0d0d0; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} .popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;} .changeFont {padding: 10px;} @@ -214,7 +210,7 @@ a.popt {text-decoration: none;} /* ADMIN CONTEXT MENU */ .contextMenu { - background-color: #ddd; + background-color: #d0d0d0; position: fixed; margin: 2px; width: 150px; @@ -246,9 +242,9 @@ a.popt {text-decoration: none;} ******************************************/ /* MOTD */ -.motd {color: #a4bad6; font-family: Verdana, sans-serif;} -.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #a4bad6; text-decoration: underline;} -.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #a4bad6;} +.motd {color: #638500; font-family: Verdana, sans-serif;} +.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #638500; text-decoration: underline;} +.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #638500;} /* ADD HERE FOR BOLD */ .bold, .name, .prefix, .ooc, .looc, .adminooc, .admin, .medal, .yell {font-weight: bold;} @@ -259,90 +255,91 @@ a.popt {text-decoration: none;} /* OUTPUT COLORS */ .highlight {background: yellow;} -h1, h2, h3, h4, h5, h6 {color: #a4bad6;font-family: Georgia, Verdana, sans-serif;} -h1.alert, h2.alert {color: #a4bad6;} +h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;} +h1.alert, h2.alert {color: #000000;} em {font-style: normal; font-weight: bold;} -.ooc {color: #cca300; font-weight: bold;} -.antagooc {color: #ce254f; font-weight: bold;} +.ooc {color: #002eb8; font-weight: bold;} +.looc {color: #6699CC; font-weight: bold;} +.antagooc {color: #b8002e; font-weight: bold;} .adminobserverooc {color: #0099cc; font-weight: bold;} -.adminooc {color: #3d5bc3; font-weight: bold;} +.adminooc {color: #700038; font-weight: bold;} -.adminsay {color: #ff4500; font-weight: bold;} -.admin {color: #5975da; font-weight: bold;} +.adminsay {color: #FF4500} +.admin {color: #386aff; font-weight: bold;} .name { font-weight: bold;} .say {} -.deadsay {color: #e2c1ff;} +.deadsay {color: #5c00e6;} .binarysay {color: #20c20e; background-color: #000000; display: block;} .binarysay a {color: #00ff00;} .binarysay a:active, .binarysay a:visited {color: #88ff88;} -.radio {color: #1ecc43;} -.sciradio {color: #c68cfa;} -.comradio {color: #5177ff;} -.secradio {color: #dd3535;} -.medradio {color: #57b8f0;} -.engradio {color: #f37746;} -.suppradio {color: #b88646;} -.servradio {color: #6ca729;} -.syndradio {color: #8f4a4b;} -.centcomradio {color: #2681a5;} -.aiprivradio {color: #d65d95;} -.redteamradio {color: #ff4444;} -.blueteamradio {color: #3434fd;} +.radio {color: #008000;} +.sciradio {color: #993399;} +.comradio {color: #948f02;} +.secradio {color: #a30000;} +.medradio {color: #337296;} +.engradio {color: #fb5613;} +.suppradio {color: #a8732b;} +.servradio {color: #6eaa2c;} +.syndradio {color: #6d3f40;} +.centcomradio {color: #686868;} +.aiprivradio {color: #ff00ff;} +.redteamradio {color: #ff0000;} +.blueteamradio {color: #0000ff;} .yell { font-weight: bold;} -.alert {color: #d82020;} -h1.alert, h2.alert {color: #99aab5;} +.alert {color: #ff0000;} +h1.alert, h2.alert {color: #000000;} .emote { font-style: italic;} .selecteddna {color: #ffffff; background-color: #001B1B} -.attack {color: #e01c1c;} -.disarm {color: #b42525;} -.passive {color: #a00f0f;} +.attack {color: #ff0000;} +.disarm {color: #990000;} +.passive {color: #660000;} -.userdanger {color: #c51e1e; font-weight: bold; font-size: 24px;} -.danger {color: #c51e1e;} -.warning {color: #c51e1e; font-style: italic;} +.userdanger {color: #ff0000; font-weight: bold; font-size: 24px;} +.danger {color: #ff0000;} +.warning {color: #ff0000; font-style: italic;} .alertwarning {color: #FF0000; font-weight: bold} -.boldwarning {color: #c51e1e; font-style: italic; font-weight: bold} -.announce {color: #c51e1e; font-weight: bold;} -.boldannounce {color: #c51e1e; font-weight: bold;} -.greenannounce {color: #059223; font-weight: bold;} +.boldwarning {color: #ff0000; font-style: italic; font-weight: bold} +.announce {color: #228b22; font-weight: bold;} +.boldannounce {color: #ff0000; font-weight: bold;} +.greenannounce {color: #00ff00; font-weight: bold;} .rose {color: #ff5050;} -.info {color: #6685f5;} -.notice {color: #6685f5;} -.boldnotice {color: #6685f5; font-weight: bold;} -.adminnotice {color: #6685f5;} +.info {color: #0000CC;} +.notice {color: #000099;} +.boldnotice {color: #000099; font-weight: bold;} +.adminnotice {color: #0000ff;} .adminhelp {color: #ff0000; font-weight: bold;} -.unconscious {color: #a4bad6; font-weight: bold;} +.unconscious {color: #0000ff; font-weight: bold;} .suicide {color: #ff5050; font-style: italic;} -.red {color: #FF0000} -.pink {color: #ff70c1;} -.blue {color: #215cff} -.green {color: #059223;} -.nicegreen {color: #059223;} +.green {color: #03ff39;} +.red {color: #FF0000;} +.pink {color: #FF69Bf;} +.blue {color: #0000FF;} +.nicegreen {color: #14a833;} .userlove {color: #FF1493; font-style: italic; font-weight: bold; text-shadow: 0 0 6px #ff6dbc;} .love {color: #ff006a; font-style: italic; text-shadow: 0 0 6px #ff6d6d;} -.shadowling {color: #8e8a99;} -.cult {color: #aa1c1c;} +.shadowling {color: #3b2769;} +.cult {color: #960000;} -.cultitalic {color: #aa1c1c; font-style: italic;} -.cultbold {color: #aa1c1c; font-style: italic; font-weight: bold;} -.cultboldtalic {color: #aa1c1c; font-weight: bold; font-size: 24px;} +.cultitalic {color: #960000; font-style: italic;} +.cultbold {color: #960000; font-style: italic; font-weight: bold;} +.cultboldtalic {color: #960000; font-weight: bold; font-size: 24px;} -.cultlarge {color: #aa1c1c; font-weight: bold; font-size: 24px;} -.narsie {color: #aa1c1c; font-weight: bold; font-size: 120px;} -.narsiesmall {color: #aa1c1c; font-weight: bold; font-size: 48px;} +.cultlarge {color: #960000; font-weight: bold; font-size: 24px;} +.narsie {color: #960000; font-weight: bold; font-size: 120px;} +.narsiesmall {color: #960000; font-weight: bold; font-size: 48px;} .colossus {color: #7F282A; font-size: 40px;} -.hierophant {color: #b441ee; font-weight: bold; font-style: italic;} -.hierophant_warning {color: #c56bf1; font-style: italic;} -.purple {color: #9956d3;} -.holoparasite {color: #88809c;} +.hierophant {color: #660099; font-weight: bold; font-style: italic;} +.hierophant_warning {color: #660099; font-style: italic;} +.purple {color: #5e2d79;} +.holoparasite {color: #35333a;} .revennotice {color: #1d2953;} .revenboldnotice {color: #1d2953; font-weight: bold;} @@ -350,11 +347,11 @@ h1.alert, h2.alert {color: #99aab5;} .revenminor {color: #823abb} .revenwarning {color: #760fbb; font-style: italic;} .revendanger {color: #760fbb; font-weight: bold; font-size: 24px;} -.umbra {color: #7c00e6;} -.umbra_emphasis {color: #7c00e6; font-weight: bold; font-style: italic;} -.umbra_large {color: #7c00e6; font-size: 24px; font-weight: bold; font-style: italic;} +.umbra {color: #5000A0;} +.umbra_emphasis {color: #5000A0; font-weight: bold; font-style: italic;} +.umbra_large {color: #5000A0; font-size: 24px; font-weight: bold; font-style: italic;} -.deconversion_message {color: #a947ff; font-size: 24px; font-style: italic;} +.deconversion_message {color: #5000A0; font-size: 24px; font-style: italic;} .brass {color: #BE8700;} .heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;} @@ -379,17 +376,17 @@ h1.alert, h2.alert {color: #99aab5;} .neovgre {color: #6E001A; font-weight: bold; font-style: italic;} .neovgre_small {color: #6E001A;} -.newscaster {color: #c05d5d;} -.ghostalert {color: #6600ff; font-style: italic; font-weight: bold;} +.newscaster {color: #800000;} +.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;} -.alien {color: #855d85;} -.noticealien {color: #059223;} -.alertalien {color: #059223; font-weight: bold;} -.changeling {color: #059223; font-style: italic;} +.alien {color: #543354;} +.noticealien {color: #00c000;} +.alertalien {color: #00c000; font-weight: bold;} +.changeling {color: #800080; font-style: italic;} -.spider {color: #8800ff;} +.spider {color: #4d004d;} -.interface {color: #750e75;} +.interface {color: #330033;} .sans {font-family: "Comic Sans MS", cursive, sans-serif;} .papyrus {font-family: "Papyrus", cursive, sans-serif;} @@ -400,9 +397,9 @@ h1.alert, h2.alert {color: #99aab5;} .big {font-size: 24px;} .reallybig {font-size: 32px;} .extremelybig {font-size: 40px;} -.greentext {color: #059223; font-size: 24px;} -.redtext {color: #c51e1e; font-size: 24px;} -.clown {color: #ff70c1; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} +.greentext {color: #00FF00; font-size: 24px;} +.redtext {color: #FF0000; font-size: 24px;} +.clown {color: #FF69Bf; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} .his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} .velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;} @keyframes velvet { @@ -434,20 +431,20 @@ h1.alert, h2.alert {color: #99aab5;} .memo {color: #638500; text-align: center;} .memoedit {text-align: center; font-size: 16px;} -.abductor {color: #c204c2; font-style: italic;} -.mind_control {color: #df3da9; font-size: 3; font-weight: bold; font-style: italic;} +.abductor {color: #800080; font-style: italic;} +.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;} .slime {color: #00CED1;} .drone {color: #848482;} .monkey {color: #975032;} .swarmer {color: #2C75FF;} .resonate {color: #298F85;} -.monkeyhive {color: #a56408;} -.monkeylead {color: #af6805; font-size: 2;} +.monkeyhive {color: #774704;} +.monkeylead {color: #774704; font-size: 2;} .connectionClosed, .fatalError {background: red; color: white; padding: 5px;} .connectionClosed.restored {background: green;} -.internal.boldnshit {color: #3d5bc3; font-weight: bold;} +.internal.boldnshit {color: #000099; font-weight: bold;} /* HELPER CLASSES */ .text-normal {font-weight: normal; font-style: normal;} diff --git a/code/modules/goonchat/browserassets/css/browserOutput_dark.css b/code/modules/goonchat/browserassets/css/browserOutput_dark.css new file mode 100644 index 0000000000..2e1fe8cdec --- /dev/null +++ b/code/modules/goonchat/browserassets/css/browserOutput_dark.css @@ -0,0 +1,159 @@ +html, body {color: #E0E0E0;} +body { + background: #171717; + font-color: #E0E0E0; + scrollbar-face-color:#1A1A1A; + scrollbar-track-color:#171717; + scrollbar-highlight-color:#171717; +} + +a {color: #397ea5;} +a.visited {color: #7c00e6;} +a:visited {color: #7c00e6;} + +#newMessages { + background: #242424; + color: #E0E0E0; +} +#newMessages:hover {background: #272727;} + +#ping {background: #272727;} + +#userBar .subCell { + background: #272727; + color: #E0E0E0; + border-top: 1px solid #171717; +} +#userBar .subCell:hover {background: #272727;} +#userBar .toggle {background: #272727;} + +/* MOTD */ +.motd {color: #E0E0E0; font-family: Verdana, sans-serif;} +.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6 {color: #E0E0E0; text-decoration: underline;} +.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover {color: #E0E0E0;} + +h1, h2, h3, h4, h5, h6 {color: #E0E0E0;font-family: Georgia, Verdana, sans-serif;} +h1.alert, h2.alert {color: #E0E0E0;} + +.ooc {color: #cca300; font-weight: bold;} +.looc {color: #d8b555; font-weight: bold;} +.antagooc {color: #ce254f; font-weight: bold;} +.adminobserverooc {color: #0099cc; font-weight: bold;} +.adminooc {color: #3d5bc3; font-weight: bold;} + +.admin {color: #5975da; font-weight: bold;} + +.deadsay {color: #e2c1ff;} +.radio {color: #1ecc43;} +.sciradio {color: #c68cfa;} +.comradio {color: #5177ff;} +.secradio {color: #dd3535;} +.medradio {color: #57b8f0;} +.engradio {color: #f37746;} +.suppradio {color: #b88646;} +.servradio {color: #6ca729;} +.syndradio {color: #8f4a4b;} +.centcomradio {color: #2681a5;} +.aiprivradio {color: #d65d95;} +.redteamradio {color: #ff4444;} +.blueteamradio {color: #3434fd;} + +.alert {color: #d82020;} +h1.alert, h2.alert {color: #99aab5;} + +.attack {color: #e01c1c;} +.disarm {color: #b42525;} +.passive {color: #a00f0f;} + +.userdanger {color: #c51e1e; font-weight: bold; font-size: 24px;} +.danger {color: #c51e1e;} +.warning {color: #c51e1e; font-style: italic;} +.alertwarning {color: #c51e1e; font-weight: bold} +.boldwarning {color: #c51e1e; font-style: italic; font-weight: bold} +.announce {color: #c51e1e; font-weight: bold;} +.boldannounce {color: #c51e1e; font-weight: bold;} +.greenannounce {color: #059223; font-weight: bold;} +.info {color: #6685f5;} +.notice {color: #6685f5;} +.boldnotice {color: #6685f5; font-weight: bold;} +.adminnotice {color: #6685f5;} +.adminhelp {color: #ff0000; font-weight: bold;} +.unconscious {color: #E0E0E0; font-weight: bold;} +.red {color: #FF0000} +.pink {color: #ff70c1;} +.blue {color: #215cff} +.green {color: #059223;} +.nicegreen {color: #059223;} +.userlove {color: #ff42a6; font-style: italic; font-weight: bold; text-shadow: 0 0 6px #82365e;} +.love {color: #ff4591; font-style: italic; text-shadow: 0 0 6px #994449;} +.shadowling {color: #8e8a99;} +.cult {color: #aa1c1c;} + +.cultitalic {color: #aa1c1c; font-style: italic;} +.cultbold {color: #aa1c1c; font-style: italic; font-weight: bold;} +.cultboldtalic {color: #aa1c1c; font-weight: bold; font-size: 24px;} + +.cultlarge {color: #aa1c1c; font-weight: bold; font-size: 24px;} +.narsie {color: #aa1c1c; font-weight: bold; font-size: 120px;} +.narsiesmall {color: #aa1c1c; font-weight: bold; font-size: 48px;} +.hierophant {color: #b441ee; font-weight: bold; font-style: italic;} +.hierophant_warning {color: #c56bf1; font-style: italic;} +.purple {color: #9956d3;} +.holoparasite {color: #88809c;} + +.revennotice {color: #3645aa;} +.revenboldnotice {color: #3645aa; font-weight: bold;} +.revenbignotice {color: #3645aa; font-weight: bold; font-size: 24px;} +.revenminor {color: #823ddd} +.revenwarning {color: #8911d9; font-style: italic;} +.revendanger {color: #8911d9; font-weight: bold; font-size: 24px;} +.umbra {color: #7c00e6;} +.umbra_emphasis {color: #7c00e6; font-weight: bold; font-style: italic;} +.umbra_large {color: #7c00e6; font-size: 24px; font-weight: bold; font-style: italic;} + +.deconversion_message {color: #a947ff; font-size: 24px; font-style: italic;} + +.alloy {color: #545b64;} +.heavy_alloy {color: #545b64; font-weight: bold; font-style: italic;} +.nezbere_large {color: #545b64; font-size: 24px; font-weight: bold; font-style: italic;} +.nezbere {color: #545b64; font-weight: bold; font-style: italic;} +.nezbere_small {color: #545b64;} +.inathneq_large {color: #1d7dc7; font-size: 24px; font-weight: bold; font-style: italic;} +.inathneq {color: #1d7dc7; font-weight: bold; font-style: italic;} +.inathneq_small {color: #1d7dc7;} +.neovgre_large {color: #7c0622; font-size: 24px; font-weight: bold; font-style: italic;} +.neovgre {color: #7c0622; font-weight: bold; font-style: italic;} +.neovgre_small {color: #7c0622;} + +.newscaster {color: #c05d5d;} +.ghostalert {color: #6600ff; font-style: italic; font-weight: bold;} + +.alien {color: #855d85;} +.noticealien {color: #059223;} +.alertalien {color: #059223; font-weight: bold;} +.changeling {color: #059223; font-style: italic;} + +.spider {color: #8800ff;} + +.interface {color: #750e75;} + +.greentext {color: #059223; font-size: 24px;} +.redtext {color: #c51e1e; font-size: 24px;} +.clown {color: #ff70c1; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} +.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;} +@keyframes velvet { + 0% { color: #890020; } + 40% { color: #c51e1e; } + 50% { color: #FF8888; } + 60% { color: #c51e1e; } + 100% { color: #890020; } +} + +.abductor {color: #c204c2; font-style: italic;} +.mind_control {color: #df3da9; font-size: 3; font-weight: bold; font-style: italic;} +.drone {color: #979795;} + +.monkeyhive {color: #a56408;} +.monkeylead {color: #af6805; font-size: 2;} + +.internal.boldnshit {color: #3d5bc3; font-weight: bold;} diff --git a/code/modules/goonchat/browserassets/css/browserOutput_white.css b/code/modules/goonchat/browserassets/css/browserOutput_light.css similarity index 58% rename from code/modules/goonchat/browserassets/css/browserOutput_white.css rename to code/modules/goonchat/browserassets/css/browserOutput_light.css index e21185449b..098bd25367 100644 --- a/code/modules/goonchat/browserassets/css/browserOutput_white.css +++ b/code/modules/goonchat/browserassets/css/browserOutput_light.css @@ -1,236 +1,18 @@ -/***************************************** -* -* GLOBAL STYLES -* -******************************************/ -html, body { - padding: 0; - margin: 0; - height: 100%; - color: #000000; -} -body { - background: #fff; - font-family: Verdana, sans-serif; - font-size: 9pt; - line-height: 1.2; - overflow-x: hidden; - overflow-y: scroll; - word-wrap: break-word; -} +body {background: #F1F1F1;} -em { - font-style: normal; - font-weight: bold; -} +#newMessages {background: #ddd;} +#ping {background: #ddd;} -img { - margin: 0; - padding: 0; - line-height: 1; - -ms-interpolation-mode: nearest-neighbor; - image-rendering: pixelated; -} -img.icon { - height: 1em; - min-height: 16px; - width: auto; - vertical-align: bottom; -} - - -.r:before { /* "repeated" badge class for combined messages */ - content: 'x'; -} -.r { - display: inline-block; - min-width: 0.5em; - font-size: 0.7em; - padding: 0.2em 0.3em; - line-height: 1; - color: white; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: crimson; - border-radius: 10px; -} - -a {color: #0000ff;} -a.visited {color: #ff00ff;} -a:visited {color: #ff00ff;} -a.popt {text-decoration: none;} - -/***************************************** -* -* OUTPUT NOT RELATED TO ACTUAL MESSAGES -* -******************************************/ -#loading { - position: fixed; - width: 300px; - height: 150px; - text-align: center; - left: 50%; - top: 50%; - margin: -75px 0 0 -150px; -} -#loading i {display: block; padding-bottom: 3px;} - -#messages { - font-size: 13px; - padding: 3px; - margin: 0; - word-wrap: break-word; -} -#newMessages { - position: fixed; - display: block; - bottom: 0; - right: 0; - padding: 8px; - background: #ddd; - text-decoration: none; - font-variant: small-caps; - font-size: 1.1em; - font-weight: bold; - color: #333; -} -#newMessages:hover {background: #ccc;} -#newMessages i {vertical-align: middle; padding-left: 3px;} -#ping { - position: fixed; - top: 0; - right: 115px; - width: 45px; - background: #ddd; - height: 30px; - padding: 8px 0 2px 0; -} -#ping i {display: block; text-align: center;} -#ping .ms { - display: block; - text-align: center; - font-size: 8pt; - padding-top: 2px; -} -#userBar { - position: fixed; - top: 0; - right: 0; -} -#userBar .subCell { - background: #ddd; - height: 30px; - padding: 5px 0; - display: block; - color: #333; - text-decoration: none; - line-height: 28px; - border-top: 1px solid #b4b4b4; -} -#userBar .subCell:hover {background: #ccc;} -#userBar .toggle { - width: 40px; - background: #ccc; - border-top: 0; - float: right; - text-align: center; -} -#userBar .sub {clear: both; display: none; width: 160px;} -#userBar .sub.scroll {overflow-y: scroll;} -#userBar .sub.subCell {padding: 3px 0 3px 8px; line-height: 30px; font-size: 0.9em; clear: both;} -#userBar .sub span { - display: block; - line-height: 30px; - float: left; -} -#userBar .sub i { - display: block; - padding: 0 5px; - font-size: 1.1em; - width: 22px; - text-align: center; - line-height: 30px; - float: right; -} -#userBar .sub input { - position: absolute; - padding: 7px 5px; - width: 121px; - line-height: 30px; - float: left; -} -#userBar .topCell {border-top: 0;} +#userBar .subCell {background: #ddd;} /* POPUPS */ -.popup { - position: fixed; - top: 50%; - left: 50%; - background: #ddd; -} -.popup .close { - position: absolute; - background: #aaa; - top: 0; - right: 0; - color: #333; - text-decoration: none; - z-index: 2; - padding: 0 10px; - height: 30px; - line-height: 30px; -} -.popup .close:hover {background: #999;} -.popup .head { - background: #999; - color: #ddd; - padding: 0 10px; - height: 30px; - line-height: 30px; - text-transform: uppercase; - font-size: 0.9em; - font-weight: bold; - border-bottom: 2px solid green; -} -.popup input {border: 1px solid #999; background: #fff; margin: 0; padding: 5px; outline: none; color: #333;} -.popup input[type=text]:hover, .popup input[type=text]:active, .popup input[type=text]:focus {border-color: green;} -.popup input[type=submit] {padding: 5px 10px; background: #999; color: #ddd; text-transform: uppercase; font-size: 0.9em; font-weight: bold;} -.popup input[type=submit]:hover, .popup input[type=submit]:focus, .popup input[type=submit]:active {background: #aaa; cursor: pointer;} - -.changeFont {padding: 10px;} -.changeFont a {display: block; text-decoration: none; padding: 3px; color: #333;} -.changeFont a:hover {background: #ccc;} - -.highlightPopup {padding: 10px; text-align: center;} -.highlightPopup input[type=text] {display: block; width: 215px; text-align: left; margin-top: 5px;} -.highlightPopup input.highlightColor {background-color: #FFFF00;} -.highlightPopup input.highlightTermSubmit {margin-top: 5px;} +.popup {background: #ddd;} +.popup .head {color: #ddd;} +.popup input[type=submit] {color: #ddd;} /* ADMIN CONTEXT MENU */ -.contextMenu { - background-color: #ddd; - position: fixed; - margin: 2px; - width: 150px; -} -.contextMenu a { - display: block; - padding: 2px 5px; - text-decoration: none; - color: #333; -} +.contextMenu {background-color: #ddd;} -.contextMenu a:hover { - background-color: #ccc; -} - -/* ADMIN FILTER MESSAGES MENU */ -.filterMessages {padding: 5px;} -.filterMessages div {padding: 2px 0;} -.filterMessages input {} -.filterMessages label {} .icon-stack {height: 1em; line-height: 1em; width: 1em; vertical-align: middle; margin-top: -2px;} @@ -261,12 +43,13 @@ h1.alert, h2.alert {color: #000000;} em {font-style: normal; font-weight: bold;} .ooc {color: #002eb8; font-weight: bold;} +.looc {color: #6699CC; font-weight: bold;} .antagooc {color: #b8002e; font-weight: bold;} .adminobserverooc {color: #0099cc; font-weight: bold;} .adminooc {color: #700038; font-weight: bold;} -.adminsay {color: #ff4500; font-weight: bold;} -.admin {color: #4473ff; font-weight: bold;} +.adminsay {color: #FF4500} +.admin {color: #386aff; font-weight: bold;} .name { font-weight: bold;} @@ -304,7 +87,7 @@ h1.alert, h2.alert {color: #000000;} .userdanger {color: #ff0000; font-weight: bold; font-size: 24px;} .danger {color: #ff0000;} .warning {color: #ff0000; font-style: italic;} -.alertwarning {color: #FF0000; font-weight: bold} +.alertwarning {color: #FF0000; font-weight: bold} .boldwarning {color: #ff0000; font-style: italic; font-weight: bold} .announce {color: #228b22; font-weight: bold;} .boldannounce {color: #ff0000; font-weight: bold;} @@ -317,10 +100,10 @@ h1.alert, h2.alert {color: #000000;} .adminhelp {color: #ff0000; font-weight: bold;} .unconscious {color: #0000ff; font-weight: bold;} .suicide {color: #ff5050; font-style: italic;} -.green {color: #03ff39;} -.red {color: #FF0000} +.green {color: #03ff39;} +.red {color: #FF0000;} .pink {color: #FF69Bf;} -.blue {color: #0000FF} +.blue {color: #0000FF;} .nicegreen {color: #14a833;} .userlove {color: #FF1493; font-style: italic; font-weight: bold; text-shadow: 0 0 6px #ff6dbc;} .love {color: #ff006a; font-style: italic; text-shadow: 0 0 6px #ff6d6d;} @@ -329,7 +112,7 @@ h1.alert, h2.alert {color: #000000;} .cultitalic {color: #960000; font-style: italic;} .cultbold {color: #960000; font-style: italic; font-weight: bold;} -.cultboldtalic {color: #960000; font-weight: bold; font-size: 24px;} +.cultboldtalic {color: #960000; font-weight: bold; font-size: 24px;} .cultlarge {color: #960000; font-weight: bold; font-size: 24px;} .narsie {color: #960000; font-weight: bold; font-size: 120px;} @@ -400,13 +183,38 @@ h1.alert, h2.alert {color: #000000;} .redtext {color: #FF0000; font-size: 24px;} .clown {color: #FF69Bf; font-size: 24px; font-family: "Comic Sans MS", cursive, sans-serif; font-weight: bold;} .his_grace {color: #15D512; font-family: "Courier New", cursive, sans-serif; font-style: italic;} +.velvet {color: #660015; font-weight: bold; animation: velvet 5000ms infinite;} +@keyframes velvet { + 0% { color: #400020; } + 40% { color: #FF0000; } + 50% { color: #FF8888; } + 60% { color: #FF0000; } + 100% { color: #400020; } +} + +.hypnophrase {color: #202020; font-weight: bold; animation: hypnocolor 1500ms infinite;} +@keyframes hypnocolor { + 0% { color: #202020; } + 25% { color: #4b02ac; } + 50% { color: #9f41f1; } + 75% { color: #541c9c; } + 100% { color: #7adbf3; } +} + +.phobia {color: #dd0000; font-weight: bold; animation: phobia 750ms infinite;} +@keyframes phobia { + 0% { color: #f75a5a; } + 50% { color: #dd0000; } + 100% { color: #f75a5a; } +} + .icon {height: 1em; width: auto;} .memo {color: #638500; text-align: center;} .memoedit {text-align: center; font-size: 16px;} .abductor {color: #800080; font-style: italic;} -.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;} +.mind_control {color: #A00D6F; font-size: 3; font-weight: bold; font-style: italic;} .slime {color: #00CED1;} .drone {color: #848482;} .monkey {color: #975032;} @@ -418,9 +226,8 @@ h1.alert, h2.alert {color: #000000;} .connectionClosed, .fatalError {background: red; color: white; padding: 5px;} .connectionClosed.restored {background: green;} -.internal.boldnshit {color: blue; font-weight: bold;} +.internal.boldnshit {color: #000099; font-weight: bold;} /* HELPER CLASSES */ .text-normal {font-weight: normal; font-style: normal;} .hidden {display: none; visibility: hidden;} - diff --git a/code/modules/goonchat/browserassets/html/browserOutput.html b/code/modules/goonchat/browserassets/html/browserOutput.html index 9c6d462a85..68da251702 100644 --- a/code/modules/goonchat/browserassets/html/browserOutput.html +++ b/code/modules/goonchat/browserassets/html/browserOutput.html @@ -5,8 +5,9 @@ - + + @@ -29,7 +30,7 @@ --ms
- +
diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js index 93a498fd06..abd05d29ed 100644 --- a/code/modules/goonchat/browserassets/js/browserOutput.js +++ b/code/modules/goonchat/browserassets/js/browserOutput.js @@ -35,7 +35,7 @@ var opts = { 'wasd': false, //Is the user in wasd mode? 'priorChatHeight': 0, //Thing for height-resizing detection 'restarting': false, //Is the round restarting? - 'darkmode':false, //Are we using darkmode? If not WHY ARE YOU LIVING IN 2009??? + 'colorPreset': 0, // index in the color presets list. //Options menu 'selectedSubLoop': null, //Contains the interval loop for closing the selected sub menu @@ -73,6 +73,14 @@ var opts = { }; +// Array of names for chat display color presets. +// If not set to normal, a CSS file `browserOutput_${name}.css` will be added to the head. +var colorPresets = [ + 'normal', + 'light', + 'dark' +] + function clamp(val, min, max) { return Math.max(min, Math.min(val, max)) } @@ -96,6 +104,12 @@ if (typeof String.prototype.trim !== 'function') { }; } +function updateColorPreset() { + var el = $("#colorPresetLink")[0]; + el.href = "browserOutput_"+colorPresets[opts.colorPreset]+".css"; + runByond('?_src_=chat&proc=colorPresetPost&preset='+colorPresets[opts.colorPreset]); +} + // Linkify the contents of a node, within its parent. function linkify(parent, insertBefore, text) { var start = 0; @@ -395,19 +409,6 @@ function toHex(n) { return "0123456789ABCDEF".charAt((n-n%16)/16) + "0123456789ABCDEF".charAt(n%16); } -function swap() { //Swap to darkmode - if (opts.darkmode){ - document.getElementById("sheetofstyles").href = "browserOutput_white.css"; - opts.darkmode = false; - runByond('?_src_=chat&proc=swaptolightmode'); - } else { - document.getElementById("sheetofstyles").href = "browserOutput.css"; - opts.darkmode = true; - runByond('?_src_=chat&proc=swaptodarkmode'); - } - setCookie('darkmode', (opts.darkmode ? 'true' : 'false'), 365); -} - function handleClientData(ckey, ip, compid) { //byond sends player info to here var currentData = {'ckey': ckey, 'ip': ip, 'compid': compid}; @@ -615,7 +616,7 @@ $(function() { 'shighlightColor': getCookie('highlightcolor'), 'smusicVolume': getCookie('musicVolume'), 'smessagecombining': getCookie('messagecombining'), - 'sdarkmode': getCookie('darkmode'), + 'scolorPreset': getCookie('colorpreset'), }; if (savedConfig.sfontSize) { @@ -626,9 +627,6 @@ $(function() { $("body").css('line-height', savedConfig.slineHeight); internalOutput('Loaded line height setting of: '+savedConfig.slineHeight+'', 'internal'); } - if(savedConfig.sdarkmode == 'true'){ - swap(); - } if (savedConfig.spingDisabled) { if (savedConfig.spingDisabled == 'true') { opts.pingDisabled = true; @@ -654,6 +652,13 @@ $(function() { opts.highlightColor = savedConfig.shighlightColor; internalOutput('Loaded highlight color of: '+savedConfig.shighlightColor+'', 'internal'); } + + if (savedConfig.scolorPreset) { + opts.colorPreset = Number(savedConfig.scolorPreset); + updateColorPreset(); + internalOutput('Loaded color preset of: '+colorPresets[opts.colorPreset]+'', 'internal'); + } + if (savedConfig.smusicVolume) { var newVolume = clamp(savedConfig.smusicVolume, 0, 100); $('#adminMusic').prop('volume', newVolume / 100); @@ -839,9 +844,6 @@ $(function() { $('#toggleOptions').click(function(e) { handleToggleClick($subOptions, $(this)); }); - $('#darkmodetoggle').click(function(e) { - swap(); - }); $('#toggleAudio').click(function(e) { handleToggleClick($subAudio, $(this)); }); @@ -913,7 +915,7 @@ $(function() { $.ajax({ type: 'GET', - url: 'browserOutput_white.css', + url: 'browserOutput.css', success: function(styleData) { var blob = new Blob(['Chat Log', $messages.html(), '']); @@ -992,6 +994,13 @@ $(function() { opts.messageCount = 0; }); + $('#changeColorPreset').click(function() { + opts.colorPreset = (opts.colorPreset+1) % colorPresets.length; + updateColorPreset(); + setCookie('colorpreset', opts.colorPreset, 365); + internalOutput('Changed color preset to: '+colorPresets[opts.colorPreset]); + }); + $('#musicVolumeSpan').hover(function() { $('#musicVolumeText').addClass('hidden'); $('#musicVolume').removeClass('hidden'); diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm index 7e832d6975..fea8557b40 100644 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -63,4 +63,4 @@ mask = /obj/item/clothing/mask/gas/sechailer suit = /obj/item/clothing/suit/space/hardsuit/captain - suit_store = /obj/item/tank/internals/oxygen + suit_store = /obj/item/tank/internals/oxygen \ No newline at end of file diff --git a/code/modules/jobs/job_types/chaplain.dm b/code/modules/jobs/job_types/chaplain.dm index f6648fdf86..97b1edc8c2 100644 --- a/code/modules/jobs/job_types/chaplain.dm +++ b/code/modules/jobs/job_types/chaplain.dm @@ -72,7 +72,7 @@ B.name = "Fluorescent Incandescence" if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks", "meme", "memes") B.name = pick("Woodys Got Wood: The Aftermath", "War of the Cocks", "Sweet Bro and Hella Jef: Expanded Edition","F.A.T.A.L. Rulebook") - H.adjustBrainLoss(100) // starts off retarded as fuck + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 100) // starts off retarded as fuck if("monkeyism","apism","gorillism","primatism") B.name = pick("Going Bananas", "Bananas Out For Harambe") if("mormonism") @@ -118,4 +118,4 @@ uniform = /obj/item/clothing/under/rank/chaplain backpack_contents = list(/obj/item/camera/spooky = 1) backpack = /obj/item/storage/backpack/cultpack - satchel = /obj/item/storage/backpack/cultpack \ No newline at end of file + satchel = /obj/item/storage/backpack/cultpack diff --git a/code/modules/library/lib_codex_gigas.dm b/code/modules/library/lib_codex_gigas.dm index d3d95db974..57bf37d528 100644 --- a/code/modules/library/lib_codex_gigas.dm +++ b/code/modules/library/lib_codex_gigas.dm @@ -50,8 +50,8 @@ if(U.job in list("Curator")) // the curator is both faster, and more accurate than normal crew members at research speed = 100 correctness = 100 - correctness -= U.getBrainLoss() *0.5 //Brain damage makes researching hard. - speed += U.getBrainLoss() * 3 + correctness -= U.getOrganLoss(ORGAN_SLOT_BRAIN) *0.5 //Brain damage makes researching hard. + speed += U.getOrganLoss(ORGAN_SLOT_BRAIN) * 3 if(do_after(user, speed, 0, user)) var/usedName = devilName if(!prob(correctness)) diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm index 7a875ccf9f..e2459d780a 100644 --- a/code/modules/mapping/mapping_helpers.dm +++ b/code/modules/mapping/mapping_helpers.dm @@ -213,4 +213,4 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava) if(!ispath(disease_type,/datum/disease)) CRASH("Wrong disease type passed in.") var/datum/disease/D = new disease_type() - return list(component_type,D) \ No newline at end of file + return list(component_type,D) diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index c780d57810..ee89167f29 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -30,5 +30,8 @@ loc = destination Moved(oldloc, NONE, TRUE) +/mob/camera/canUseStorage() + return FALSE + /mob/camera/emote(act, m_type=1, message = null, intentional = FALSE) return diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm index 381dc131e7..35dbe0828f 100644 --- a/code/modules/mob/dead/dead.dm +++ b/code/modules/mob/dead/dead.dm @@ -20,6 +20,9 @@ INITIALIZE_IMMEDIATE(/mob/dead) set_focus(src) return INITIALIZE_HINT_NORMAL +/mob/dead/canUseStorage() + return FALSE + /mob/dead/dust(just_ash, drop_items, force) //ghosts can't be vaporised. return diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index bacdc4524b..d84ba0d7a1 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -57,13 +57,14 @@ newbrain.brainmob = null brainmob.forceMove(src) brainmob.container = src - if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death. + if(!(newbrain.organ_flags & ORGAN_FAILING)) // the brain organ hasn't been beaten to death. brainmob.stat = CONSCIOUS //we manually revive the brain mob GLOB.dead_mob_list -= brainmob GLOB.alive_mob_list += brainmob brainmob.reset_perspective() brain = newbrain + brain.organ_flags |= ORGAN_FROZEN name = "Man-Machine Interface: [brainmob.real_name]" update_icon() @@ -100,6 +101,7 @@ user.put_in_hands(brain) //puts brain in the user's hand or otherwise drops it on the user's turf else brain.forceMove(get_turf(src)) + brain.organ_flags &= ~ORGAN_FROZEN brain = null //No more brain in here diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index dafc6cf5e0..17f81981d1 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -7,11 +7,19 @@ layer = ABOVE_MOB_LAYER zone = BODY_ZONE_HEAD slot = ORGAN_SLOT_BRAIN - vital = TRUE + organ_flags = ORGAN_VITAL attack_verb = list("attacked", "slapped", "whacked") + ///The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth + decay_factor = STANDARD_ORGAN_DECAY / 4 //30 minutes of decaying to result in a fully damaged brain, since a fast decay rate would be unfun gameplay-wise + + maxHealth = BRAIN_DAMAGE_DEATH + low_threshold = 45 + high_threshold = 120 var/mob/living/brain/brainmob = null - var/damaged_brain = FALSE //whether the brain organ is damaged. + var/brain_death = FALSE //if the brainmob was intentionally killed by attacking the brain after removal, or by severe braindamage var/decoy_override = FALSE //I apologize to the security players, and myself, who abused this, but this is going to go. + //two variables necessary for calculating whether we get a brain trauma or not + var/damage_delta = 0 var/list/datum/brain_trauma/traumas = list() @@ -90,22 +98,89 @@ if(brainmob) O.attack(brainmob, user) //Oh noooeeeee -/obj/item/organ/brain/examine(mob/user) - ..() + if(istype(O, /obj/item/organ_storage)) //BUG_PROBABLE_CAUSE + return //Borg organ bags shouldn't be killing brains - if(brainmob) - if(brainmob.client) - if(brainmob.health <= HEALTH_THRESHOLD_DEAD) - to_chat(user, "It's lifeless and severely damaged.") + if((organ_flags & ORGAN_FAILING) && O.is_drainable() && O.reagents.has_reagent("neurine")) //Neurine fixes dead brains + . = TRUE //don't do attack animation. + var/cached_Bdamage = brainmob?.health + var/datum/reagent/medicine/neurine/N = reagents.has_reagent("neurine") + var/datum/reagent/medicine/mannitol/M1 = reagents.has_reagent("mannitol") + + if(O.reagents.has_reagent("mannitol"))//Just a quick way to bolster the effects if someone mixes up a batch. + N.volume *= (M1.volume*0.5) + + if(!O.reagents.has_reagent("neurine", 10)) + to_chat(user, "There's not enough neurine in [O] to restore [src]!") + return + + user.visible_message("[user] starts to pour the contents of [O] onto [src].", "You start to slowly pour the contents of [O] onto [src].") + if(!do_after(user, 60, TRUE, src)) + to_chat(user, "You failed to pour [O] onto [src]!") + return + + user.visible_message("[user] pours the contents of [O] onto [src], causing it to reform its original shape and turn a slightly brighter shade of pink.", "You pour the contents of [O] onto [src], causing it to reform its original shape and turn a slightly brighter shade of pink.") + setOrganDamage((damage - (0.10 * maxHealth)*(N.volume/10))) //heals a small amount, and by using "setorgandamage", we clear the failing variable if that was up + O.reagents.clear_reagents() + + if(cached_Bdamage <= HEALTH_THRESHOLD_DEAD) //Fixing dead brains yeilds a trauma + if((cached_Bdamage <= HEALTH_THRESHOLD_DEAD) && (brainmob.health > HEALTH_THRESHOLD_DEAD)) + if(prob(80)) + gain_trauma_type(BRAIN_TRAUMA_MILD) + else if(prob(50)) + gain_trauma_type(BRAIN_TRAUMA_SEVERE) + else + gain_trauma_type(BRAIN_TRAUMA_SPECIAL) + return + + if((organ_flags & ORGAN_FAILING) && O.is_drainable() && O.reagents.has_reagent("mannitol")) //attempt to heal the brain + . = TRUE //don't do attack animation. + var/datum/reagent/medicine/mannitol/M = reagents.has_reagent("mannitol") + if(brain_death || brainmob?.health <= HEALTH_THRESHOLD_DEAD) //if the brain is fucked anyway, do nothing + to_chat(user, "[src] is far too damaged, you'll have to use neurine on it!") + return + + if(!O.reagents.has_reagent("mannitol", 10)) + to_chat(user, "There's not enough mannitol in [O] to restore [src]!") + return + + user.visible_message("[user] starts to pour the contents of [O] onto [src].", "You start to slowly pour the contents of [O] onto [src].") + if(!do_after(user, 60, TRUE, src)) + to_chat(user, "You failed to pour [O] onto [src]!") + return + + user.visible_message("[user] pours the contents of [O] onto [src], causing it to reform its original shape and turn a slightly brighter shade of pink.", "You pour the contents of [O] onto [src], causing it to reform its original shape and turn a slightly brighter shade of pink.") + setOrganDamage((damage - (0.05 * maxHealth)*(M.volume/10))) //heals a small amount, and by using "setorgandamage", we clear the failing variable if that was up + O.reagents.clear_reagents() + return + + + +/obj/item/organ/brain/examine(mob/user)//BUG_PROBABLE_CAUSE to_chats changed to . += + . = ..() + + if(user.suiciding) + . += "It's started turning slightly grey. They must not have been able to handle the stress of it all." + else if(brainmob) + if(brainmob.get_ghost(FALSE, TRUE)) + if(brain_death || brainmob.health <= HEALTH_THRESHOLD_DEAD) + . += "It's lifeless and severely damaged, only the strongest of chems will save it." + else if(organ_flags & ORGAN_FAILING) + . += "It seems to still have a bit of energy within it, but it's rather damaged... You may be able to restore it with some mannitol." else - to_chat(user, "You can feel the small spark of life still left in this one.") + . += "You can feel the small spark of life still left in this one." + else if(organ_flags & ORGAN_FAILING) + . += "It seems particularly lifeless and is rather damaged... You may be able to restore it with some mannitol incase it becomes functional again later." else - to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later.") + . += "This one seems particularly lifeless. Perhaps it will regain some of its luster later." else if(decoy_override) - to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later.") + if(organ_flags & ORGAN_FAILING) + . += "It seems particularly lifeless and is rather damaged... You may be able to restore it with some mannitol incase it becomes functional again later." + else + . += "This one seems particularly lifeless. Perhaps it will regain some of its luster later." else - to_chat(user, "This one is completely devoid of life.") + . += "This one is completely devoid of life." /obj/item/organ/brain/attack(mob/living/carbon/C, mob/user) if(!istype(C)) @@ -141,7 +216,7 @@ Insert(C) else ..() - +/* TO BE REMOVED, KEPT IN CASE OF BUGS /obj/item/organ/brain/proc/get_brain_damage() var/brain_damage_threshold = max_integrity * BRAIN_DAMAGE_INTEGRITY_MULTIPLIER var/offset_integrity = obj_integrity - (max_integrity - brain_damage_threshold) @@ -165,6 +240,54 @@ else if(adjusted_amount <= -DAMAGE_PRECISION) obj_integrity = min(max_integrity, obj_integrity-adjusted_amount) . = adjusted_amount +*/ + +/obj/item/organ/brain/on_life() + if(damage >= BRAIN_DAMAGE_DEATH) //rip + to_chat(owner, "The last spark of life in your brain fizzles out...") + owner.death() + brain_death = TRUE + +/obj/item/organ/brain/on_death() + if(damage <= BRAIN_DAMAGE_DEATH) //rip + brain_death = FALSE + applyOrganDamage(maxHealth * decay_factor) + + +/obj/item/organ/brain/applyOrganDamage(var/d, var/maximum = maxHealth) + ..() + + +/obj/item/organ/brain/check_damage_thresholds(mob/M) + . = ..() + //if we're not more injured than before, return without gambling for a trauma + if(damage <= prev_damage) + return + damage_delta = damage - prev_damage + if(damage > BRAIN_DAMAGE_MILD) + if(prob(damage_delta * (1 + max(0, (damage - BRAIN_DAMAGE_MILD)/100)))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 1% //learn how to do your bloody math properly goddamnit + gain_trauma_type(BRAIN_TRAUMA_MILD) + if(damage > BRAIN_DAMAGE_SEVERE) + if(prob(damage_delta * (1 + max(0, (damage - BRAIN_DAMAGE_SEVERE)/100)))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 1% + if(prob(20)) + gain_trauma_type(BRAIN_TRAUMA_SPECIAL) + else + gain_trauma_type(BRAIN_TRAUMA_SEVERE) + + if (owner) + if(owner.stat < UNCONSCIOUS) //conscious or soft-crit + var/brain_message + if(prev_damage < BRAIN_DAMAGE_MILD && damage >= BRAIN_DAMAGE_MILD) + brain_message = "You feel lightheaded." + else if(prev_damage < BRAIN_DAMAGE_SEVERE && damage >= BRAIN_DAMAGE_SEVERE) + brain_message = "You feel less in control of your thoughts." + else if(prev_damage < (BRAIN_DAMAGE_DEATH - 20) && damage >= (BRAIN_DAMAGE_DEATH - 20)) + brain_message = "You can feel your mind flickering on and off..." + + if(.) + . += "\n[brain_message]" + else + return brain_message /obj/item/organ/brain/Destroy() //copypasted from MMIs. if(brainmob) @@ -200,6 +323,10 @@ return FALSE if(!resilience) resilience = initial(trauma.resilience) + if(!owner) + return FALSE + if(owner.stat == DEAD) + return FALSE var/resilience_tier_count = 0 for(var/X in traumas) diff --git a/code/modules/mob/living/brain/life.dm b/code/modules/mob/living/brain/life.dm index 786bb0b55c..51be1f6971 100644 --- a/code/modules/mob/living/brain/life.dm +++ b/code/modules/mob/living/brain/life.dm @@ -20,7 +20,7 @@ else if(istype(loc, /obj/item/organ/brain)) BR = loc if(BR) - BR.damaged_brain = 1 //beaten to a pulp + BR.brain_death = TRUE /mob/living/brain/proc/handle_emp_damage() if(emp_damage) diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index 1574305a83..9706fde782 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -22,6 +22,7 @@ return S /obj/item/organ/body_egg/alien_embryo/on_life() + . = ..() switch(stage) if(2, 3) if(prob(2)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1d070489e7..263edf42c2 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -819,7 +819,7 @@ reagents.clear_reagents() var/obj/item/organ/brain/B = getorgan(/obj/item/organ/brain) if(B) - B.damaged_brain = FALSE + B.brain_death = FALSE for(var/thing in diseases) var/datum/disease/D = thing if(D.severity != DISEASE_SEVERITY_POSITIVE) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 57483f64e7..bc64c8303b 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -405,16 +405,16 @@ if(istype(ears) && (deafen_pwr || damage_pwr)) var/ear_damage = damage_pwr * effect_amount - var/deaf = max(ears.deaf, deafen_pwr * effect_amount) + var/deaf = deafen_pwr * effect_amount adjustEarDamage(ear_damage,deaf) - if(ears.ear_damage >= 15) + if(ears.damage >= 15) to_chat(src, "Your ears start to ring badly!") - if(prob(ears.ear_damage - 5)) + if(prob(ears.damage - 5)) to_chat(src, "You can't hear anything!") - ears.ear_damage = min(ears.ear_damage, UNHEALING_EAR_DAMAGE) + ears.damage = min(ears.damage, ears.maxHealth) // you need earmuffs, inacusiate, or replacement - else if(ears.ear_damage >= 5) + else if(ears.damage >= 5) to_chat(src, "Your ears start to ring!") SEND_SOUND(src, sound('sound/weapons/flash_ring.ogg',0,1,0,250)) return effect_amount //how soundbanged we are diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm index 749ae3b5b0..cc0c0d7434 100644 --- a/code/modules/mob/living/carbon/damage_procs.dm +++ b/code/modules/mob/living/carbon/damage_procs.dm @@ -40,14 +40,13 @@ update_damage_overlays() else adjustStaminaLoss(damage * hit_percent) - if(BRAIN) - adjustBrainLoss(damage * hit_percent) //citadel code if(AROUSAL) adjustArousalLoss(damage * hit_percent) return TRUE + //These procs fetch a cumulative total damage from all bodyparts /mob/living/carbon/getBruteLoss() var/amount = 0 @@ -113,6 +112,51 @@ return adjustStaminaLoss(diff, updating, forced) +/** adjustOrganLoss + * inputs: slot (organ slot, like ORGAN_SLOT_HEART), amount (damage to be done), and maximum (currently an arbitrarily large number, can be set so as to limit damage) + * outputs: + * description: If an organ exists in the slot requested, and we are capable of taking damage (we don't have GODMODE on), call the damage proc on that organ. + */ +/mob/living/carbon/adjustOrganLoss(slot, amount, maximum) + var/obj/item/organ/O = getorganslot(slot) + if(O && !(status_flags & GODMODE)) + if(!maximum) + maximum = O.maxHealth + O.applyOrganDamage(amount, maximum) + O.onDamage(amount, maximum) + +/** setOrganLoss + * inputs: slot (organ slot, like ORGAN_SLOT_HEART), amount(damage to be set to) + * outputs: + * description: If an organ exists in the slot requested, and we are capable of taking damage (we don't have GODMODE on), call the set damage proc on that organ, which can + * set or clear the failing variable on that organ, making it either cease or start functions again, unlike adjustOrganLoss. + */ +/mob/living/carbon/setOrganLoss(slot, amount) + var/obj/item/organ/O = getorganslot(slot) + if(O && !(status_flags & GODMODE)) + O.setOrganDamage(amount) + O.onSetDamage(amount) + +/** getOrganLoss + * inputs: slot (organ slot, like ORGAN_SLOT_HEART) + * outputs: organ damage + * description: If an organ exists in the slot requested, return the amount of damage that organ has + */ +/mob/living/carbon/getOrganLoss(slot) + var/obj/item/organ/O = getorganslot(slot) + if(O) + return O.damage + +/mob/living/carbon/proc/adjustAllOrganLoss(amount, maximum) + for(var/obj/item/organ/O in internal_organs) + if(O && !(status_flags & GODMODE)) + continue + if(!maximum) + maximum = O.maxHealth + O.applyOrganDamage(amount, maximum) + O.onDamage(amount, maximum) + + //////////////////////////////////////////// //Returns a list of damaged bodyparts @@ -213,24 +257,25 @@ update_damage_overlays() update_stamina() -/mob/living/carbon/getBrainLoss() +/* TO_REMOVE +/mob/living/carbon/getOrganLoss(ORGAN_SLOT_BRAIN) . = 0 var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN) if(B) . = B.get_brain_damage() //Some sources of brain damage shouldn't be deadly -/mob/living/carbon/adjustBrainLoss(amount, maximum = BRAIN_DAMAGE_DEATH) +/mob/living/carbon/adjustOrganLoss(ORGAN_SLOT_BRAIN, amount, maximum = BRAIN_DAMAGE_DEATH) if(status_flags & GODMODE) return FALSE - var/prev_brainloss = getBrainLoss() + var/prev_brainloss = getOrganLoss(ORGAN_SLOT_BRAIN) var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN) if(!B) return B.adjust_brain_damage(amount, maximum) if(amount <= 0) //cut this early return - var/brainloss = getBrainLoss() + var/brainloss = getOrganLoss(ORGAN_SLOT_BRAIN) if(brainloss > BRAIN_DAMAGE_MILD) if(prob(amount * ((2 * (100 + brainloss - BRAIN_DAMAGE_MILD)) / 100))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 2% gain_trauma_type(BRAIN_TRAUMA_MILD) @@ -253,3 +298,4 @@ if(B) var/adjusted_amount = amount - B.get_brain_damage() B.adjust_brain_damage(adjusted_amount, null) +*/ diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 5af295a5dd..a44779e05e 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -751,9 +751,54 @@ if(0 to NUTRITION_LEVEL_STARVING) to_send += "You're starving!\n" + + //TODO: Convert these messages into vague messages, thereby encouraging actual dignosis. + //Compiles then shows the list of damaged organs and broken organs + var/list/broken = list() + var/list/damaged = list() + var/broken_message + var/damaged_message + var/broken_plural + var/damaged_plural + //Sets organs into their proper list + for(var/O in internal_organs) + var/obj/item/organ/organ = O + if(organ.organ_flags & ORGAN_FAILING) + if(broken.len) + broken += ", " + broken += organ.name + else if(organ.damage > organ.low_threshold) + if(damaged.len) + damaged += ", " + damaged += organ.name + //Checks to enforce proper grammar, inserts words as necessary into the list + if(broken.len) + if(broken.len > 1) + broken.Insert(broken.len, "and ") + broken_plural = TRUE + else + var/holder = broken[1] //our one and only element + if(holder[lentext(holder)] == "s") + broken_plural = TRUE + //Put the items in that list into a string of text + for(var/B in broken) + broken_message += B + to_chat(src, " Your [broken_message] [broken_plural ? "are" : "is"] non-functional!") + if(damaged.len) + if(damaged.len > 1) + damaged.Insert(damaged.len, "and ") + damaged_plural = TRUE + else + var/holder = damaged[1] + if(holder[lentext(holder)] == "s") + damaged_plural = TRUE + for(var/D in damaged) + damaged_message += D + to_chat(src, "Your [damaged_message] [damaged_plural ? "are" : "is"] hurt.") + if(roundstart_quirks.len) to_send += "You have these quirks: [get_trait_string()].\n" - + to_chat(src, to_send) else if(wear_suit) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b1c31ffdff..9395283aeb 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -74,7 +74,7 @@ else if(eye_blurry) //blurry eyes heal slowly adjust_blurriness(-1) - if (getBrainLoss() >= 30) //Citadel change to make memes more often. + if (getOrganLoss(ORGAN_SLOT_BRAIN) >= 30) //Citadel change to make memes more often. SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "brain_damage", /datum/mood_event/brain_damage) if(prob(3)) if(prob(25)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 4ef1aef5ff..b6346bead8 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1221,9 +1221,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(mood && mood.sanity > SANITY_DISTURBED) hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75 - if(H.satiety > 0) + // Whether we cap off our satiety or move it towards 0 + if(H.satiety > MAX_SATIETY) + H.satiety = MAX_SATIETY + else if(H.satiety > 0) H.satiety-- - if(H.satiety < 0) + else if(H.satiety < -MAX_SATIETY) + H.satiety = -MAX_SATIETY + else if(H.satiety < 0) H.satiety++ if(prob(round(-H.satiety/40))) H.Jitter(5) @@ -1708,7 +1713,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(BODY_ZONE_HEAD) if(!I.is_sharp() && armor_block < 50) if(prob(I.force)) - H.adjustBrainLoss(20) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20) if(H.stat == CONSCIOUS) H.visible_message("[H] has been knocked senseless!", \ "[H] has been knocked senseless!") @@ -1717,7 +1722,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(prob(10)) H.gain_trauma(/datum/brain_trauma/mild/concussion) else - H.adjustBrainLoss(I.force * 0.2) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, I.force * 0.2) if(H.stat == CONSCIOUS && H != user && prob(I.force + ((100 - H.health) * 0.5))) // rev deconversion through blunt trauma. var/datum/antagonist/rev/rev = H.mind.has_antag_datum(/datum/antagonist/rev) @@ -1936,7 +1941,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) else H.adjustStaminaLoss(damage * hit_percent * H.physiology.stamina_mod) if(BRAIN) - H.adjustBrainLoss(damage * hit_percent * H.physiology.brain_mod) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, damage * hit_percent * H.physiology.brain_mod) if(AROUSAL) //Citadel edit - arousal H.adjustArousalLoss(damage * hit_percent) return 1 diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 4a7580e978..b7d5130cd8 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -64,7 +64,7 @@ /obj/item/organ/brain/dullahan decoy_override = TRUE - vital = FALSE + organ_flags = 0 /obj/item/organ/tongue/dullahan zone = "abstract" @@ -138,4 +138,4 @@ D.myhead = null owner.gib() owner = null - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index d7bb151ddc..06f456e004 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -16,7 +16,6 @@ burnmod = 1.5 heatmod = 1.5 breathid = "tox" - speedmod = 1 damage_overlay_type = ""//let's not show bloody wounds or burns over bones. var/internal_fire = FALSE //If the bones themselves are burning clothes won't help you much disliked_food = FRUIT @@ -55,19 +54,95 @@ ..() /datum/species/plasmaman/before_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE) + var/current_job = J.title var/datum/outfit/plasmaman/O = new /datum/outfit/plasmaman + switch(current_job) + if("Chaplain") + O = new /datum/outfit/plasmaman/chaplain + + if("Curator") + O = new /datum/outfit/plasmaman/curator + + if("Janitor") + O = new /datum/outfit/plasmaman/janitor + + if("Botanist") + O = new /datum/outfit/plasmaman/botany + + if("Bartender", "Lawyer") + O = new /datum/outfit/plasmaman/bar + + if("Cook") + O = new /datum/outfit/plasmaman/chef + + if("Security Officer") + O = new /datum/outfit/plasmaman/security + + if("Detective") + O = new /datum/outfit/plasmaman/detective + + if("Warden") + O = new /datum/outfit/plasmaman/warden + + if("Cargo Technician", "Quartermaster") + O = new /datum/outfit/plasmaman/cargo + + if("Shaft Miner") + O = new /datum/outfit/plasmaman/mining + + if("Medical Doctor") + O = new /datum/outfit/plasmaman/medical + + if("Chemist") + O = new /datum/outfit/plasmaman/chemist + + if("Geneticist") + O = new /datum/outfit/plasmaman/genetics + + if("Roboticist") + O = new /datum/outfit/plasmaman/robotics + + if("Virologist") + O = new /datum/outfit/plasmaman/viro + + if("Scientist") + O = new /datum/outfit/plasmaman/science + + if("Station Engineer") + O = new /datum/outfit/plasmaman/engineering + + if("Atmospheric Technician") + O = new /datum/outfit/plasmaman/atmospherics + + if("Captain") + O = new /datum/outfit/plasmaman/captain + + if("Head of Personnel") + O = new /datum/outfit/plasmaman/hop + + if("Head of Security") + O = new /datum/outfit/plasmaman/hos + + if("Chief Engineer") + O = new /datum/outfit/plasmaman/ce + + if("Chief Medical Officer") + O = new /datum/outfit/plasmaman/cmo + + if("Research Director") + O = new /datum/outfit/plasmaman/rd + + if("Mime") + O = new /datum/outfit/plasmaman/mime + + if("Clown") + O = new /datum/outfit/plasmaman/clown + H.equipOutfit(O, visualsOnly) H.internal = H.get_item_for_held_index(2) H.update_internals_hud_icon(1) return 0 -/datum/species/plasmaman/qualifies_for_rank(rank, list/features) - if(rank in GLOB.security_positions) - return 0 - if(rank == "Clown" || rank == "Mime")//No funny bussiness - return 0 - return ..() - /datum/species/plasmaman/random_name(gender,unique,lastname) if(unique) return random_unique_plasmaman_name() diff --git a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm index 754c48c3bd..09fc26d04f 100644 --- a/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/shadowpeople.dm @@ -102,6 +102,7 @@ color = "#1C1C1C" var/respawn_progress = 0 var/obj/item/light_eater/blade + decay_factor = 0 /obj/item/organ/heart/nightmare/attack(mob/M, mob/living/carbon/user, obj/target) @@ -122,10 +123,8 @@ if(special != HEART_SPECIAL_SHADOWIFY) blade = new/obj/item/light_eater M.put_in_hands(blade) - START_PROCESSING(SSobj, src) /obj/item/organ/heart/nightmare/Remove(mob/living/carbon/M, special = 0) - STOP_PROCESSING(SSobj, src) respawn_progress = 0 if(blade && special != HEART_SPECIAL_SHADOWIFY) QDEL_NULL(blade) @@ -138,9 +137,8 @@ /obj/item/organ/heart/nightmare/update_icon() return //always beating visually -/obj/item/organ/heart/nightmare/process() - if(QDELETED(owner) || owner.stat != DEAD) - respawn_progress = 0 +/obj/item/organ/heart/nightmare/on_death() + if(!owner) return var/turf/T = get_turf(owner) if(istype(T)) diff --git a/code/modules/mob/living/carbon/human/species_types/skeletons.dm b/code/modules/mob/living/carbon/human/species_types/skeletons.dm index 135992f3a6..8fc32ddad7 100644 --- a/code/modules/mob/living/carbon/human/species_types/skeletons.dm +++ b/code/modules/mob/living/carbon/human/species_types/skeletons.dm @@ -3,7 +3,7 @@ name = "Spooky Scary Skeleton" id = "skeleton" say_mod = "rattles" - blacklisted = 1 + blacklisted = 0 sexes = 0 meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL) @@ -12,13 +12,18 @@ mutanttongue = /obj/item/organ/tongue/bone damage_overlay_type = ""//let's not show bloody wounds or burns over bones. disliked_food = NONE - liked_food = GROSS | MEAT | RAW + liked_food = GROSS | MEAT | RAW | DAIRY /datum/species/skeleton/check_roundstart_eligible() if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) return TRUE return ..() -/datum/species/skeleton/pirate - name = "Space Queen's Skeleton" +/datum/species/skeleton/space + name = "Spooky Spacey Skeleton" + id = "spaceskeleton" + blacklisted = 1 inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER) + +/datum/species/skeleton/pirate/check_roundstart_eligible() + return FALSE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 504dbb514b..e0cc3bb147 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -16,7 +16,12 @@ disliked_food = NONE liked_food = GROSS | MEAT | RAW -/datum/species/zombie/check_roundstart_eligible() +/datum/species/zombie/notspaceproof + id = "notspaceproofzombie" + blacklisted = 0 + inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_NOBREATH,TRAIT_NODEATH,TRAIT_FAKEDEATH) + +/datum/species/zombie/notspaceproof/check_roundstart_eligible() if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) return TRUE return ..() @@ -47,7 +52,7 @@ /datum/species/zombie/infectious/spec_life(mob/living/carbon/C) . = ..() C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW - + //Zombies never actually die, they just fall down until they regenerate enough to rise back up. //They must be restrained, beheaded or gibbed to stop being a threat. if(regen_cooldown < world.time) @@ -58,7 +63,7 @@ C.adjustToxLoss(-heal_amt) if(!C.InCritical() && prob(4)) playsound(C, pick(spooks), 50, TRUE, 10) - + //Congrats you somehow died so hard you stopped being a zombie /datum/species/zombie/infectious/spec_death(mob/living/carbon/C) . = ..() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 72ff7e7a60..03c7209152 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -123,15 +123,16 @@ There are several things that need to be remembered: if(U.adjusted == ALT_STYLE) t_color = "[t_color]_d" - if(U.mutantrace_variation) - if(U.suit_style == DIGITIGRADE_SUIT_STYLE) - U.alternate_worn_icon = 'modular_citadel/icons/mob/uniform_digi.dmi' - if(U.adjusted == ALT_STYLE) - t_color = "[t_color]_d_l" - else if(U.adjusted == NORMAL_STYLE) - t_color = "[t_color]_l" - else - U.alternate_worn_icon = null + if(!U.force_alternate_icon) + if(U.mutantrace_variation) + if(U.suit_style == DIGITIGRADE_SUIT_STYLE) + U.alternate_worn_icon = 'modular_citadel/icons/mob/uniform_digi.dmi' + if(U.adjusted == ALT_STYLE) + t_color = "[t_color]_d_l" + else if(U.adjusted == NORMAL_STYLE) + t_color = "[t_color]_l" + else + U.alternate_worn_icon = null var/mutable_appearance/uniform_overlay @@ -388,22 +389,23 @@ There are several things that need to be remembered: client.screen += wear_suit update_observer_view(wear_suit,1) - if(!no_taur_thanks && S.mutantrace_variation) //Just make sure we've got this checked too - if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE) //are we not a taur, but we have Digitigrade legs? Run this check first, then. - S.alternate_worn_icon = 'modular_citadel/icons/mob/suit_digi.dmi' - else - S.alternate_worn_icon = null - - if(S.tauric == TRUE) //Are we a suit with tauric mode possible? - if(S.taurmode == SNEK_TAURIC) - S.alternate_worn_icon = 'modular_citadel/icons/mob/taur_naga.dmi' - if(S.taurmode == PAW_TAURIC) - S.alternate_worn_icon = 'modular_citadel/icons/mob/taur_canine.dmi' - if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE) + if(!S.force_alternate_icon) + if(!no_taur_thanks && S.mutantrace_variation) //Just make sure we've got this checked too + if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE) //are we not a taur, but we have Digitigrade legs? Run this check first, then. S.alternate_worn_icon = 'modular_citadel/icons/mob/suit_digi.dmi' - else if(S.taurmode == NOT_TAURIC && S.adjusted == NORMAL_STYLE) + else S.alternate_worn_icon = null + if(S.tauric == TRUE) //Are we a suit with tauric mode possible? + if(S.taurmode == SNEK_TAURIC) + S.alternate_worn_icon = 'modular_citadel/icons/mob/taur_naga.dmi' + if(S.taurmode == PAW_TAURIC) + S.alternate_worn_icon = 'modular_citadel/icons/mob/taur_canine.dmi' + if(S.taurmode == NOT_TAURIC && S.adjusted == ALT_STYLE) + S.alternate_worn_icon = 'modular_citadel/icons/mob/suit_digi.dmi' + else if(S.taurmode == NOT_TAURIC && S.adjusted == NORMAL_STYLE) + S.alternate_worn_icon = null + overlays_standing[SUIT_LAYER] = S.build_worn_icon(state = wear_suit.icon_state, default_layer = SUIT_LAYER, default_icon_file = ((wear_suit.alternate_worn_icon) ? S.alternate_worn_icon : 'icons/mob/suit.dmi')) var/mutable_appearance/suit_overlay = overlays_standing[SUIT_LAYER] if(OFFSET_SUIT in dna.species.offset_features) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 7a3405cc09..d1839db2cf 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -8,8 +8,8 @@ damageoverlaytemp = 0 update_damage_hud() - if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases. - handle_organs() + //Reagent processing needs to come before breathing, to prevent edge cases. + handle_organs() . = ..() @@ -28,11 +28,14 @@ if(stat != DEAD) handle_brain_damage() + /* BUG_PROBABLE_CAUSE if(stat != DEAD) handle_liver() + */ if(stat == DEAD) stop_sound_channel(CHANNEL_HEARTBEAT) + handle_death() rot() //Updates the number of stored chemicals for powers @@ -41,14 +44,34 @@ if(stat != DEAD) return 1 +//Procs called while dead +/mob/living/carbon/proc/handle_death() + for(var/datum/reagent/R in reagents.reagent_list) + if(R.chemical_flags & REAGENT_DEAD_PROCESS) + R.on_mob_dead(src) + /////////////// // BREATHING // /////////////// //Start of a breath chain, calls breathe() /mob/living/carbon/handle_breathing(times_fired) - if((times_fired % 4) == 2 || failed_last_breath) - breathe() //Breathe per 4 ticks, unless suffocating + var/next_breath = 4 + var/obj/item/organ/lungs/L = getorganslot(ORGAN_SLOT_LUNGS) + var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART) + if(L) + if(L.damage > L.high_threshold) + next_breath-- + if(H) + if(H.damage > H.high_threshold) + next_breath-- + + if((times_fired % next_breath) == 0 || failed_last_breath) + breathe() //Breathe per 4 ticks if healthy, down to 2 if our lungs or heart are damaged, unless suffocating + if(failed_last_breath) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "suffocation", /datum/mood_event/suffocation) + else + SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "suffocation") else if(istype(loc, /obj/)) var/obj/location_as_object = loc @@ -56,6 +79,7 @@ //Second link in a breath chain, calls check_breath() /mob/living/carbon/proc/breathe() + var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS) if(reagents.has_reagent("lexorin")) return if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell)) @@ -74,7 +98,7 @@ var/datum/gas_mixture/breath if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE)) - if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL)) + if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL) || lungs.organ_flags & ORGAN_FAILING) losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath else if(health <= crit_threshold) @@ -126,7 +150,7 @@ if((status_flags & GODMODE)) return - var/lungs = getorganslot(ORGAN_SLOT_LUNGS) + var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS) if(!lungs) adjustOxyLoss(2) @@ -366,9 +390,16 @@ . |= BP.on_life() /mob/living/carbon/proc/handle_organs() - for(var/V in internal_organs) - var/obj/item/organ/O = V - O.on_life() + if(stat != DEAD) + for(var/V in internal_organs) + var/obj/item/organ/O = V + if(O) + O.on_life() + else + for(var/V in internal_organs) + var/obj/item/organ/O = V + if(O) + O.on_death() //Needed so organs decay while inside the body. /mob/living/carbon/handle_diseases() for(var/thing in diseases) @@ -613,7 +644,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put to_chat(src, "Maybe you should lie down for a bit...") if(drunkenness >= 91) - adjustBrainLoss(0.4, 60) + adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.4, 60) if(prob(20) && !stat) if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && is_station_level(z)) //QoL mainly to_chat(src, "You're so tired... but you can't miss that shuttle...") @@ -647,8 +678,8 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if((!dna && !liver) || (NOLIVER in dna.species.species_traits)) return if(liver) - if(liver.damage >= liver.maxHealth) - liver.failing = TRUE + if(liver.damage < liver.maxHealth) + liver.organ_flags |= ORGAN_FAILING liver_failure() else liver_failure() @@ -687,13 +718,6 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put var/datum/brain_trauma/BT = T BT.on_life() - if(getBrainLoss() >= BRAIN_DAMAGE_DEATH) //rip - to_chat(src, "The last spark of life in your brain fizzles out...") - death() - var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN) - if(B) - B.damaged_brain = TRUE - ///////////////////////////////////// //MONKEYS WITH TOO MUCH CHOLOESTROL// ///////////////////////////////////// @@ -702,7 +726,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(!needs_heart()) return FALSE var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART) - if(!heart || heart.synthetic) + if(!heart || (heart.organ_flags & ORGAN_SYNTHETIC)) return FALSE return TRUE diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index b2eed2d19e..563ab7cfb6 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -25,8 +25,6 @@ adjustCloneLoss(damage * hit_percent) if(STAMINA) adjustStaminaLoss(damage * hit_percent) - if(BRAIN) - adjustBrainLoss(damage * hit_percent) return 1 /mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs @@ -43,8 +41,6 @@ return adjustCloneLoss(damage) if(STAMINA) return adjustStaminaLoss(damage) - if(BRAIN) - return adjustBrainLoss(damage) /mob/living/proc/get_damage_amount(damagetype = BRUTE) switch(damagetype) @@ -60,8 +56,6 @@ return getCloneLoss() if(STAMINA) return getStaminaLoss() - if(BRAIN) - return getBrainLoss() /mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = FALSE, stamina = 0, brain = 0) @@ -218,13 +212,13 @@ updatehealth() return amount -/mob/living/proc/getBrainLoss() - . = 0 - -/mob/living/proc/adjustBrainLoss(amount, maximum = BRAIN_DAMAGE_DEATH) +/mob/living/proc/adjustOrganLoss(slot, amount, maximum) return -/mob/living/proc/setBrainLoss(amount) +/mob/living/proc/setOrganLoss(slot, amount, maximum) + return + +/mob/living/proc/getOrganLoss(slot) return /mob/living/proc/getStaminaLoss() diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 25d8c4d44c..df711a6dca 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -255,7 +255,7 @@ H.Knockdown(20) else message_param = "bumps [user.p_their()] head on the ground trying to motion towards %t." - H.adjustBrainLoss(5) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) ..() /datum/emote/living/pout diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cdce80225b..5ff78ec1c9 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -346,6 +346,11 @@ if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here return TRUE +/mob/living/canUseStorage() + if (get_num_arms() <= 0) + return FALSE + return TRUE + /mob/living/proc/InCritical() return (health <= crit_threshold && (stat == SOFT_CRIT || stat == UNCONSCIOUS)) @@ -476,7 +481,6 @@ setToxLoss(0, 0) //zero as second argument not automatically call updatehealth(). setOxyLoss(0, 0) setCloneLoss(0, 0) - setBrainLoss(0) setStaminaLoss(0, 0) SetUnconscious(0, FALSE) set_disgust(0) @@ -503,6 +507,13 @@ QDEL_LIST_ASSOC_VAL(mood.mood_events) mood.sanity = SANITY_GREAT mood.update_mood() + //Heal all organs + if(iscarbon(src)) + var/mob/living/carbon/C = src + if(C.internal_organs) + for(var/organ in C.internal_organs) + var/obj/item/organ/O = organ + O.setOrganDamage(0) //proc called by revive(), to check if we can actually ressuscitate the mob (we don't want to revive him and have him instantly die again) diff --git a/code/modules/mob/living/silicon/damage_procs.dm b/code/modules/mob/living/silicon/damage_procs.dm index 1190a00645..69d150b315 100644 --- a/code/modules/mob/living/silicon/damage_procs.dm +++ b/code/modules/mob/living/silicon/damage_procs.dm @@ -35,8 +35,8 @@ /mob/living/silicon/setStaminaLoss(amount, updating_stamina = 1) return FALSE -/mob/living/silicon/adjustBrainLoss(amount) +/mob/living/silicon/adjustOrganLoss(slot, amount, maximum = 500) return FALSE -/mob/living/silicon/setBrainLoss(amount) +/mob/living/silicon/setOrganLoss(slot, amount) return FALSE diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index f20ccbc730..f36e996b81 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -84,7 +84,7 @@ /mob/living/silicon/pai/adjustStaminaLoss(amount) take_holo_damage(amount & 0.25) -/mob/living/silicon/pai/adjustBrainLoss(amount) +/mob/living/silicon/pai/adjustOrganLoss(slot, amount, maximum = 500) //I kept this in, unlike tg Knockdown(amount * 0.2) /mob/living/silicon/pai/getBruteLoss() @@ -102,18 +102,12 @@ /mob/living/silicon/pai/getCloneLoss() return FALSE -/mob/living/silicon/pai/getBrainLoss() - return FALSE - /mob/living/silicon/pai/getStaminaLoss() return FALSE /mob/living/silicon/pai/setCloneLoss() return FALSE -/mob/living/silicon/pai/setBrainLoss() - return FALSE - /mob/living/silicon/pai/setStaminaLoss() return FALSE diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index 282fe0a716..8b0c54653c 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -43,7 +43,7 @@ .=..() if ((from.pH > 12.5) || (from.pH < 1.5)) to_chat(src, "You taste chemical burns!") - T.adjustTongueLoss(src, 4) + T.applyOrganDamage(5) if(istype(T, /obj/item/organ/tongue/cybernetic)) to_chat(src, "Your tongue moves on it's own in response to the liquid.") say("The pH is appropriately [round(from.pH, 1)].") @@ -52,13 +52,13 @@ switch(from.pH) if(11.5 to INFINITY) to_chat(src, "You taste a strong alkaline flavour!") - T.adjustTongueLoss(src, 1) + T.applyOrganDamage(1) if(8.5 to 11.5) to_chat(src, "You taste a sort of soapy tone in the mixture.") if(2.5 to 5.5) to_chat(src, "You taste a sort of acid tone in the mixture.") if(-INFINITY to 2.5) to_chat(src, "You taste a strong acidic flavour!") - T.adjustTongueLoss(src, 1) + T.applyOrganDamage(1) #undef DEFAULT_TASTE_SENSITIVITY diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 52fdea861f..bd3c813b12 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -810,6 +810,9 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) /mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE) return +/mob/proc/canUseStorage() + return FALSE + /mob/proc/faction_check_mob(mob/target, exact_match) if(exact_match) //if we need an exact match, we need to do some bullfuckery. var/list/faction_src = faction.Copy() diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 5703e2190b..6bbe512776 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -75,7 +75,7 @@ O.setOxyLoss(getOxyLoss(), 0) O.setCloneLoss(getCloneLoss(), 0) O.adjustFireLoss(getFireLoss(), 0) - O.setBrainLoss(getBrainLoss(), 0) + O.setOrganLoss(ORGAN_SLOT_BRAIN, getOrganLoss(ORGAN_SLOT_BRAIN), 0) O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina O.updatehealth() O.radiation = radiation @@ -236,7 +236,7 @@ O.setOxyLoss(getOxyLoss(), 0) O.setCloneLoss(getCloneLoss(), 0) O.adjustFireLoss(getFireLoss(), 0) - O.setBrainLoss(getBrainLoss(), 0) + O.setOrganLoss(ORGAN_SLOT_BRAIN, getOrganLoss(ORGAN_SLOT_BRAIN), 0) O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina O.updatehealth() O.radiation = radiation diff --git a/code/modules/projectiles/projectile/special/mindflayer.dm b/code/modules/projectiles/projectile/special/mindflayer.dm index d717bed39e..ac4488cae0 100644 --- a/code/modules/projectiles/projectile/special/mindflayer.dm +++ b/code/modules/projectiles/projectile/special/mindflayer.dm @@ -5,5 +5,5 @@ . = ..() if(ishuman(target)) var/mob/living/carbon/human/M = target - M.adjustBrainLoss(20) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20) M.hallucination += 30 diff --git a/code/modules/reagents/chem_wiki_render.dm b/code/modules/reagents/chem_wiki_render.dm new file mode 100644 index 0000000000..9c99613fcd --- /dev/null +++ b/code/modules/reagents/chem_wiki_render.dm @@ -0,0 +1,354 @@ +//Generates a markdown txt file for use with the wiki + +/client/proc/generate_wikichem_list() + set name = "Generate Wikichems" + set category = "Debug" + set desc = "Generate a huge loglist of all the chems. Do not click unless you want lag." + + message_admins("Someone pressed the lag button. (Generate Wikichems)") + to_chat(usr, "Generating list") + var/prefix = "|Name | Reagents | Reaction vars | Description | Chem properties |\n|---|---|---|-----------|---|\n" + + ///datum/reagent/medicine, /datum/reagent/toxin, /datum/reagent/consumable, /datum/reagent/plantnutriment, /datum/reagent/uranium, + ///datum/reagent/colorful_reagent, /datum/reagent/mutationtoxin, /datum/reagent/fermi, /datum/reagent/drug, /datum/reagent/impure + + //Probably not the most eligant of solutions. + to_chat(usr, "Attempting reagent scan. Length of list [LAZYLEN(GLOB.chemical_reagents_list)*2]") + var/datum/reagent/R + var/tally = 0 + var/processCR = TRUE //Process reactions first + var/medicine = "" + var/toxin = "" + var/consumable = "" + var/plant = "" + var/uranium = "" + var/colours = "" + var/muta = "" + var/fermi = "" + var/remainder = "" + var/drug = "" + var/basic = "" + var/upgraded = "" + var/drinks = "" + var/alco = "" + var/grinded = "" + var/blob = "" + //var/impure + + //Chem_dispencer + var/list/dispensable_reagents = list( + "hydrogen", + "lithium", + "carbon", + "nitrogen", + "oxygen", + "fluorine", + "sodium", + "aluminium", + "silicon", + "phosphorus", + "sulfur", + "chlorine", + "potassium", + "iron", + "copper", + "mercury", + "radium", + "water", + "ethanol", + "sugar", + "sacid", + "welding_fuel", + "silver", + "iodine", + "bromine", + "stable_plasma" + ) + var/list/components = list( + "oil", + "ammonia", + "ash", + "acetone", + "phenol", + "diethylamine", + "saltpetre", + "sodiumchloride", + "lye" + ) + + var/list/grind = list( + "bluespace", + "gold", + "plasma", + "uranium" + ) + + //Bartender + var/dispence_drinks = list( + "water", + "ice", + "coffee", + "cream", + "tea", + "icetea", + "cola", + "spacemountainwind", + "dr_gibb", + "space_up", + "tonic", + "sodawater", + "lemon_lime", + "pwr_game", + "shamblers", + "sugar", + "orangejuice", + "grenadine", + "limejuice", + "tomatojuice", + "lemonjuice", + "menthol" + ) + var/dispence_alco = list( + "beer", + "kahlua", + "whiskey", + "wine", + "vodka", + "gin", + "rum", + "tequila", + "vermouth", + "cognac", + "ale", + "absinthe", + "hcider", + "creme_de_menthe", + "creme_de_cacao", + "triple_sec", + "sake", + "applejack" + ) + + + for(var/i = 1, i <= 2, i+=1) + for(var/X in GLOB.chemical_reagents_list) + R = GLOB.chemical_reagents_list[X] + + for(var/Y in dispensable_reagents) //Why do you have to do this + if(R.id == Y) + basic += generate_chemwiki_line(R, X, processCR) + continue + + for(var/Y in components) + if(R.id == Y) + upgraded += generate_chemwiki_line(R, X, processCR) + continue + + for(var/Y in dispence_drinks) + if(R.id == Y) + drinks += generate_chemwiki_line(R, X, processCR) + continue + + for(var/Y in dispence_alco) + if(R.id == Y) + alco += generate_chemwiki_line(R, X, processCR) + continue + + for(var/Y in grind) + if(R.id == Y) + grinded += generate_chemwiki_line(R, X, processCR) + continue + + + if(istype(R, /datum/reagent/medicine)) + medicine += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/toxin)) + toxin += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/consumable)) + consumable += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/plantnutriment)) + plant += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/uranium)) + uranium += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/colorful_reagent)) + colours += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/mutationtoxin)) + muta += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/fermi)) + fermi += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/drug)) + drug += generate_chemwiki_line(R, X, processCR) + + else if(istype(R, /datum/reagent/blob)) + blob += generate_chemwiki_line(R, X, processCR) + + /* when merged + else if(istype(R, /datum/reagent/impure)) + impure += generate_chemwiki_line(R, X, processCR) + */ + + else + remainder += generate_chemwiki_line(R, X, processCR) + + tally++ + if((tally%50)==0) + to_chat(usr, "[tally] of [LAZYLEN(GLOB.chemical_reagents_list)*2] done.") + + processCR = FALSE + + to_chat(usr, "finished chems") + + var/wholeString = ("\n# DISPENCEABLE REAGENTS\n\n[prefix][basic]\n\n# COMPONENT REAGENTS\n\n[prefix][upgraded]\n\n# GRINDABLE REAGENTS\n\n[prefix][grinded]\n") + wholeString += ("\n# MEDICINE:\n\n[prefix][medicine]\n\n# TOXIN:\n\n[prefix][toxin]\n\n# DRUGS\n\n[prefix][drug]\n\n# FERMI\n\nThese chems lie on the cutting edge of chemical technology, and as such are not recommended for beginners!\n\n[prefix][fermi]\n\n# GENERAL REAGENTS\n\n[prefix][remainder]\n\n# DISPENCEABLE SOFT DRINKS\n\n[prefix][drinks]\n\n# DISPENCEABLE HARD DRINKS\n\n[prefix][alco]\n\n# CONSUMABLE\n\n[prefix][consumable]\n\n# PLANTS\n\n[prefix][plant]\n\n# URANIUM\n\n[prefix][uranium]\n\n# COLOURS\n\n[prefix][colours]\n\n# RACE MUTATIONS\n\n[prefix][muta]\n\n\n# BLOB REAGENTS\n\n[prefix][blob]\n") + + prefix = "|Name | Reagents | Reaction vars | Description |\n|---|---|---|----------|\n" + var/CRparse = "" + to_chat(usr, "starting reactions") + + //generate the reactions that we missed from before + for(var/reagent in GLOB.chemical_reactions_list) + for(var/datum/chemical_reaction/CR in GLOB.chemical_reactions_list[reagent]) + CRparse += generate_chemreactwiki_line(CR) + + wholeString += ("\n# CHEMICAL REACTIONS\n\n[prefix][CRparse]\n") + text2file(wholeString, "[GLOB.log_directory]/chem_parse.md") + to_chat(usr, "finished reactions") + to_chat(usr, "Saved file to (wherever your root folder is, i.e. where the DME is)/[GLOB.log_directory]/chem_parse.md OR use the Get Current Logs verb under the Admin tab. (if you click Open, and it does nothing, that's because you've not set a .md default program! Try downloading it instead, and use that file to set a default program! Also have a cute day.)") + + + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + + +//Generate the big list of reagent based reactions. +/proc/generate_chemwiki_line(datum/reagent/R, X, processCR) + //name | Reagent pH | reagents | reaction temp | explosion temp | pH range | Kinetics | description | OD level | Addiction level | Metabolism rate | impure chem | inverse chem + + var/datum/chemical_reaction/CR = get_chemical_reaction(R.id) + if((!CR && processCR) || (CR && !processCR)) // Do reactions first. + return "" + + + var/outstring = "|
!\[[R.color]\](https://placehold.it/15/[copytext(R.color, 2, 8)]/000000?text=+)[R.name]
pH: [R.pH] | " + var/datum/reagent/R3 + if(CR) + outstring += "
    " + for(var/R2 in CR.required_reagents) + R3 = GLOB.chemical_reagents_list[R2]//What a convoluted mess + outstring += "
  • [R3.name]: [CR.required_reagents[R3.id]]u
  • " + if(CR.required_catalysts) + for(var/R2 in CR.required_catalysts) + R3 = GLOB.chemical_reagents_list[R2] + outstring += "
  • Catalyst: [R3.name]: [CR.required_catalysts[R3.id]]u
  • " + outstring += "
| " + else + outstring += "N/A | " + + + //Temp, Explosions and pH + if(CR) + outstring += "
    [(CR.FermiChem?"
  • Min react temp: [CR.OptimalTempMin]K
  • ":"[(CR.required_temp?"
  • Min react temp: [CR.required_temp]K
  • ":"")]")] [(CR.FermiChem?"
  • Explosion_temp: [CR.ExplodeTemp]K
  • ":"")] [(CR.FermiChem?"
  • pH range: [max((CR.OptimalpHMin - CR.ReactpHLim), 0)] to [min((CR.OptimalpHMax + CR.ReactpHLim), 14)]
  • ":"")] " + else + outstring += "" + + //Kinetics + if(CR) + if(CR.FermiChem) + switch(CR.ThermicConstant) + if(-INFINITY to -9.9) + outstring += "
  • Extremely endothermic
  • " + if(-9.9 to -4.9) + outstring += "
  • Very endothermic
  • " + if(-4.9 to -0.1) + outstring += "
  • Endothermic
  • " + if(-0.1 to 0.1) + outstring += "
  • Neutral
  • " + if(0.1 to 4.9) + outstring += "
  • Exothermic
  • " + if(4.9 to 9.9) + outstring += "
  • Very exothermic
  • " + if(9.9 to 19.9) + outstring += "
  • Extremely exothermic
  • " + if(19.9 to INFINITY ) + outstring += "
  • **Dangerously exothermic**
  • " + //if("cheesey") + //outstring += "
  • Dangerously Cheesey
  • " + + outstring += "
| " + else + outstring += " | " + + //Description, OD, Addict, Meta + outstring += "[R.description] |
  • Metabolism_rate: [R.metabolization_rate/2]u/s
  • [(R.overdose_threshold?"
  • Overdose: [R.overdose_threshold]u
  • ":"")] [(R.addiction_threshold?"
  • Addiction: [R.addiction_threshold]u
  • ":"")] " + + if(R.impure_chem != "fermiTox" && R.impure_chem) + R3 = GLOB.chemical_reagents_list[R.impure_chem] + outstring += "
  • Impure chem:[R3.name]
  • " + + if(R.inverse_chem != "fermiTox" && R.inverse_chem) + R3 = GLOB.chemical_reagents_list[R.inverse_chem] + outstring += "
  • Inverse chem:[R3.name]
  • " + + + + if(CR) + if(CR.required_container) + /*var/obj/item/I + I = istype(I, CR.required_container) if you can work out how to get this to work, by all means. + outstring += "
  • Required container: [I.name]
  • "*/ + outstring += "
  • Required container: [CR.required_container]
  • " + + if(CR.FermiChem) + outstring += "
  • Minimum purity: [CR.PurityMin]
  • [(CR.FermiExplode?"
  • Special explosion: Yes
  • ":"")]" + + + outstring += "
|\n" + return outstring + + + + +//Generate the big list of reaction based reactions. +//|Name | Reagents | Reaction vars | Description | Chem properties +/proc/generate_chemreactwiki_line(datum/chemical_reaction/CR) + if(CR.results.len) //Handled prior + return + var/outstring = "|[CR.name] |
    " + + //reagents + var/datum/reagent/R3 + for(var/R2 in CR.required_reagents) + R3 = GLOB.chemical_reagents_list[R2] + outstring += "
  • [R3.name]: [CR.required_reagents[R3.id]]u
  • " + if(CR.required_catalysts) + for(var/R2 in CR.required_catalysts) + R3 = GLOB.chemical_reagents_list[R2] + outstring += "
  • Catalyst: [R3.name]: [CR.required_catalysts[R3.id]]u
  • " + outstring += "
|
    " + + //Reaction vars + if(CR.required_temp) + outstring += "
  • Min react temp: [CR.required_temp]K
  • " + if(CR.FermiChem) + outstring += "[(CR.FermiChem?"
  • Min react temp: [CR.OptimalTempMin]K
  • ":"[(CR.required_temp?"
  • Min react temp: [CR.required_temp]K
  • ":"")]")] [(CR.FermiChem?"
  • Explosion temp: [CR.ExplodeTemp]K
  • ":"")] [(CR.FermiChem?"
  • pH range: [max((CR.OptimalpHMin - CR.ReactpHLim), 0)] to [min((CR.OptimalpHMax + CR.ReactpHLim), 14)]
  • ":"")]
  • Minimum purity: [CR.PurityMin] [(CR.FermiExplode?"
  • Special explosion: Yes
  • ":"")]" + if(CR.is_cold_recipe) + outstring += "
  • Cold: Yes
  • " + if(CR.required_container) + outstring += "
  • Required container: [CR.required_container]
  • " + if(CR.mob_react) + outstring += "
  • Can react in mob: Yes
  • " + + //description + outstring += "
| fill in manually " + + outstring += "
    |\n" + return outstring diff --git a/code/modules/reagents/chemistry/fermi/readme.md b/code/modules/reagents/chemistry/fermi/readme.md new file mode 100644 index 0000000000..4b897b6c4b --- /dev/null +++ b/code/modules/reagents/chemistry/fermi/readme.md @@ -0,0 +1,23 @@ +How to code fermichem reactions: +First off, probably read though the readme for standard reagent mechanisms, this builds on top of that. + +#bitflags +for `datum/reagent/` you have the following options with `var/chemical_flags`: + +``` +REAGENT_DEAD_PROCESS calls on_mob_dead() if present in a dead body +REAGENT_DONOTSPLIT Do not split the chem at all during processing +REAGENT_ONLYINVERSE Only invert chem, no splitting +REAGENT_ONMOBMERGE Call on_mob_life proc when reagents are merging. +REAGENT_INVISIBLE Doesn't appear on handheld health analyzers. +REAGENT_FORCEONNEW Forces a on_new() call without a data overhead +REAGENT_SNEAKYNAME When inverted, the inverted chem uses the name of the original chem +REAGENT_SPLITRETAINVOL Retains initial volume of chem when splitting +``` + +for `datum/chemical_reaction/` under `var/clear_conversion` + +``` +REACTION_CLEAR_IMPURE Convert into impure/pure on reaction completion +REACTION_CLEAR_INVERSE Convert into inverse on reaction completion when purity is low enough +``` diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 56cb02293e..1be30301ec 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -466,7 +466,7 @@ if (C.FermiChem == TRUE && !continue_reacting) if (chem_temp > C.ExplodeTemp) //This is first to ensure explosions. - var/datum/chemical_reaction/fermi/Ferm = selected_reaction + var/datum/chemical_reaction/Ferm = selected_reaction fermiIsReacting = FALSE SSblackbox.record_feedback("tally", "fermi_chem", 1, ("[Ferm] explosion")) Ferm.FermiExplode(src, my_atom, volume = total_volume, temp = chem_temp, pH = pH) @@ -544,7 +544,7 @@ return 0 /datum/reagents/process() - var/datum/chemical_reaction/fermi/C = fermiReactID + var/datum/chemical_reaction/C = fermiReactID var/list/cached_required_reagents = C.required_reagents//update reagents list var/list/cached_results = C.results//resultant chemical list @@ -555,6 +555,10 @@ if (multiplier == 0) fermiEnd() return + for(var/P in C.required_catalysts) + if(!has_reagent(P)) + fermiEnd() + return for(var/P in cached_results) targetVol = cached_results[P]*multiplier @@ -576,16 +580,16 @@ return /datum/reagents/proc/fermiEnd() - var/datum/chemical_reaction/fermi/C = fermiReactID + var/datum/chemical_reaction/C = fermiReactID STOP_PROCESSING(SSprocessing, src) fermiIsReacting = FALSE - reactedVol = 0 - targetVol = 0 //pH check, handled at the end to reduce calls. if(istype(my_atom, /obj/item/reagent_containers)) var/obj/item/reagent_containers/RC = my_atom RC.pH_check() - C.FermiFinish(src, my_atom) + C.FermiFinish(src, my_atom, reactedVol) + reactedVol = 0 + targetVol = 0 handle_reactions() update_total() //Reaction sounds and words @@ -596,7 +600,7 @@ to_chat(M, "[iconhtml] [C.mix_message]") /datum/reagents/proc/fermiReact(selected_reaction, cached_temp, cached_pH, reactedVol, targetVol, cached_required_reagents, cached_results, multiplier) - var/datum/chemical_reaction/fermi/C = selected_reaction + var/datum/chemical_reaction/C = selected_reaction var/deltaT = 0 var/deltapH = 0 var/stepChemAmmount = 0 @@ -681,7 +685,7 @@ STOP_PROCESSING(SSprocessing, src) return 0 - C.FermiCreate(src)//proc that calls when step is done + C.FermiCreate(src, addChemAmmount, purity)//proc that calls when step is done //Apply pH changes and thermal output of reaction to beaker chem_temp = round(cached_temp + (C.ThermicConstant * addChemAmmount)) @@ -705,7 +709,7 @@ return (reactedVol) //Currently calculates it irrespective of required reagents at the start -/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/fermi/C, holder) +/datum/reagents/proc/reactant_purity(var/datum/chemical_reaction/C, holder) var/list/cached_reagents = reagent_list var/i = 0 var/cachedPurity @@ -715,6 +719,14 @@ i++ return cachedPurity/i +/datum/reagents/proc/uncache_purity(id) + var/datum/reagent/R = has_reagent("[id]") + if(!R) + return + if(R.cached_purity == 1) + return + R.purity = R.cached_purity + /datum/reagents/proc/isolate_reagent(reagent) var/list/cached_reagents = reagent_list for(var/_reagent in cached_reagents) @@ -889,10 +901,8 @@ if(my_atom) my_atom.on_reagent_change(ADD_REAGENT) if(isliving(my_atom)) - if(R.OnMobMergeCheck == TRUE)//Forces on_mob_add proc when a chem is merged + if(R.chemical_flags & REAGENT_ONMOBMERGE)//Forces on_mob_add proc when a chem is merged R.on_mob_add(my_atom, amount) - //else - // R.on_merge(data, amount, my_atom, other_purity) R.on_merge(data, amount, my_atom, other_purity) if(!no_react) handle_reactions() @@ -910,7 +920,7 @@ if(data) R.data = data R.on_new(data) - if(R.addProc == TRUE)//Allows on new without data overhead. + if(R.chemical_flags & REAGENT_FORCEONNEW)//Allows on new without data overhead. R.on_new(pH) //Add more as desired. diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 85cf5e5011..96aa0901e0 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -405,7 +405,7 @@ if(!targetReagent) CRASH("Tried to find a reagent that doesn't exist in the chem_master!") - analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) else fermianalyze = FALSE analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold)) @@ -432,7 +432,7 @@ if(!targetReagent) CRASH("Tried to find a reagent that doesn't exist in the chem_master!") - analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = targetReagent.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) else fermianalyze = FALSE analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold)) diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 0e482f8cec..246eade62b 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -201,6 +201,8 @@ B.reagents.add_reagent("blood", 20, data) wait = TRUE update_icon() + var/turf/source_turf = get_turf(src) + log_virus("A culture bottle was printed for the virus [A.admin_details()] at [loc_name(source_turf)] by [key_name(usr)]") addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 50) . = TRUE if("create_vaccine_bottle") diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index 520148848c..52d3ba7822 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -32,20 +32,18 @@ var/addiction_stage3_end = 30 var/addiction_stage4_end = 40 var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick. - var/self_consuming = FALSE - var/metabolizing = FALSE - var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers. + var/self_consuming = FALSE //I think this uhhh, makes weird stuff happen when metabolising, but... doesn't seem to do what I think, so I'm gonna leave it. //Fermichem vars: - var/purity = 1 //How pure a chemical is from 0 - 1. - var/addProc = FALSE //If the chemical should force an on_new() call - var/turf/loc = null //Should be the creation location! + var/purity = 1 //How pure a chemical is from 0 - 1. + var/cached_purity = 1 + var/turf/loc = null //Should be the creation location! var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder. - var/SplitChem = FALSE //If the chem splits on metabolism - var/ImpureChem = "fermiTox"// What chemical is metabolised with an inpure reaction - var/InverseChemVal = 0.25 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising - var/InverseChem = "fermiTox"// What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it. - var/DoNotSplit = FALSE // If impurity is handled within the main chem itself - var/OnMobMergeCheck = FALSE //Call on_mob_life proc when reagents are merging. + //var/SplitChem = FALSE //If the chem splits on metabolism + var/impure_chem // What chemical is metabolised with an inpure reaction + var/inverse_chem_val = 0 // If the impurity is below 0.5, replace ALL of the chem with inverse_chemupon metabolising + var/inverse_chem // What chem is metabolised when purity is below inverse_chem_val, this shouldn't be made, but if it does, well, I guess I'll know about it. + var/metabolizing = FALSE + var/chemical_flags // See fermi/readme.dm REAGENT_DEAD_PROCESS, REAGENT_DONOTSPLIT, REAGENT_ONLYINVERSE, REAGENT_ONMOBMERGE, REAGENT_INVISIBLE, REAGENT_FORCEONNEW, REAGENT_SNEAKYNAME /datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references @@ -75,28 +73,47 @@ holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears. return +//called when a mob processes chems when dead. +/datum/reagent/proc/on_mob_dead(mob/living/carbon/M) + if(!(chemical_flags & REAGENT_DEAD_PROCESS)) //justincase + return + current_cycle++ + if(holder) + holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears. + return + // Called when this reagent is first added to a mob /datum/reagent/proc/on_mob_add(mob/living/L, amount) - if(SplitChem) - var/mob/living/carbon/M = L - if(!M) - return - if(purity < 0) - CRASH("Purity below 0 for chem: [id], Please let Fermis Know!") - if (purity == 1 || DoNotSplit == TRUE) - log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]") - return - else if (InverseChemVal > purity)//Turns all of a added reagent into the inverse chem - M.reagents.remove_reagent(id, amount, FALSE) - M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1) - log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [InverseChem]") - return - else - var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem + if(!iscarbon(L)) + return + var/mob/living/carbon/M = L + if (purity == 1) + log_game("CHEM: [L] ckey: [L.key] has ingested [volume]u of [id]") + return + if(cached_purity == 1) + cached_purity = purity + else if(purity < 0) + CRASH("Purity below 0 for chem: [id], Please let Fermis Know!") + if(chemical_flags & REAGENT_DONOTSPLIT) + return + + if ((inverse_chem_val > purity) && (inverse_chem))//Turns all of a added reagent into the inverse chem + M.reagents.remove_reagent(id, amount, FALSE) + M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity) + var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]") + if(R.chemical_flags & REAGENT_SNEAKYNAME) + R.name = name//Negative effects are hidden + if(R.chemical_flags & REAGENT_INVISIBLE) + R.chemical_flags |= (REAGENT_INVISIBLE) + log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [inverse_chem]") + return + else if (impure_chem) + var/impureVol = amount * (1 - purity) //turns impure ratio into impure chem + if(!(chemical_flags & REAGENT_SPLITRETAINVOL)) M.reagents.remove_reagent(id, (impureVol), FALSE) - M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1) - log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [id]") - log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [ImpureChem]") + M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity) + log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume - impureVol]u of [id]") + log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [impure_chem]") return // Called when this reagent is removed while inside a mob @@ -120,31 +137,34 @@ // Called when two reagents of the same are mixing. /datum/reagent/proc/on_merge(data, amount, mob/living/carbon/M, purity) - if(SplitChem) - if(!ishuman(M)) - return - if (purity < 0) - CRASH("Purity below 0 for chem: [id], Please let Fermis Know!") - if (purity == 1 || DoNotSplit == TRUE) - log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [id] in themselves") - return - else if (InverseChemVal > purity) - M.reagents.remove_reagent(id, amount, FALSE) - M.reagents.add_reagent(InverseChem, amount, FALSE, other_purity = 1) - for(var/datum/reagent/fermi/R in M.reagents.reagent_list) - if(R.name == "") - R.name = name//Negative effects are hidden - log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [InverseChem]") - return - else - var/impureVol = amount * (1 - purity) + if(!iscarbon(M)) + return + if (purity == 1) + log_game("FERMICHEM: [M] ckey: [M.key] has ingested [volume]u of [id]") + return + cached_purity = purity //purity SHOULD be precalculated from the add_reagent, update cache. + if (purity < 0) + CRASH("Purity below 0 for chem: [id], Please let Fermis Know!") + if(chemical_flags & REAGENT_DONOTSPLIT) + return + + if ((inverse_chem_val > purity) && (inverse_chem)) //INVERT + M.reagents.remove_reagent(id, amount, FALSE) + M.reagents.add_reagent(inverse_chem, amount, FALSE, other_purity = 1-cached_purity) + var/datum/reagent/R = M.reagents.has_reagent("[inverse_chem]") + if(R.chemical_flags & REAGENT_SNEAKYNAME) + R.name = name//Negative effects are hidden + if(R.chemical_flags & REAGENT_INVISIBLE) + R.chemical_flags |= (REAGENT_INVISIBLE) + log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [inverse_chem]") + return + else if (impure_chem) //SPLIT + var/impureVol = amount * (1 - purity) + if(!(chemical_flags & REAGENT_SPLITRETAINVOL)) M.reagents.remove_reagent(id, impureVol, FALSE) - M.reagents.add_reagent(ImpureChem, impureVol, FALSE, other_purity = 1) - for(var/datum/reagent/fermi/R in M.reagents.reagent_list) - if(R.name == "") - R.name = name//Negative effects are hidden - log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [id]") - log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [ImpureChem]") + M.reagents.add_reagent(impure_chem, impureVol, FALSE, other_purity = 1-cached_purity) + log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume - impureVol]u of [id]") + log_game("FERMICHEM: [M] ckey: [M.key] has merged [volume]u of [impure_chem]") return /datum/reagent/proc/on_update(atom/A) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 88073ca5f3..94aca411be 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -1383,10 +1383,10 @@ All effects don't start immediately, but rather get worse over time; the rate is glass_icon_state = "neurotoxinglass" glass_name = "Neurotoxin" glass_desc = "A drink that is guaranteed to knock you silly." - SplitChem = TRUE - ImpureChem = "neuroweak" - InverseChemVal = 0 //Clear conversion - InverseChem = "neuroweak" + //SplitChem = TRUE + impure_chem = "neuroweak" + inverse_chem_val = 0.5 //Clear conversion + inverse_chem = "neuroweak" /datum/reagent/consumable/ethanol/neurotoxin/proc/pickt() return (pick(TRAIT_PARALYSIS_L_ARM,TRAIT_PARALYSIS_R_ARM,TRAIT_PARALYSIS_R_LEG,TRAIT_PARALYSIS_L_LEG)) @@ -1394,7 +1394,7 @@ All effects don't start immediately, but rather get worse over time; the rate is /datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M) M.set_drugginess(50) M.dizziness +=2 - M.adjustBrainLoss(1*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM, 150) if(prob(20) && !holder.has_reagent("neuroweak")) M.adjustStaminaLoss(10) M.drop_all_held_items() @@ -1405,7 +1405,7 @@ All effects don't start immediately, but rather get worse over time; the rate is ADD_TRAIT(M, t, type) M.adjustStaminaLoss(10) if(current_cycle > 30) - M.adjustBrainLoss(2*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM) if(current_cycle > 50 && prob(15)) if(!M.undergoing_cardiac_arrest() && M.can_heartattack()) M.set_heartattack(TRUE) @@ -1431,13 +1431,13 @@ All effects don't start immediately, but rather get worse over time; the rate is /datum/reagent/consumable/ethanol/neuroweak/on_mob_life(mob/living/carbon/M) if(holder.has_reagent("neurotoxin")) - M.adjustBrainLoss(-1*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1*REM, 150) M.reagents.remove_reagent("neurotoxin", 1.5 * REAGENTS_METABOLISM, FALSE) if(holder.has_reagent("fentanyl")) - M.adjustBrainLoss(-1*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1*REM, 150) M.reagents.remove_reagent("fentanyl", 0.75 * REAGENTS_METABOLISM, FALSE) else - M.adjustBrainLoss(-0.5*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -0.5*REM, 150) M.dizziness +=2 ..() diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 5b06710472..f3df72cd4d 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -80,14 +80,14 @@ . = 1 /datum/reagent/drug/crank/overdose_process(mob/living/M) - M.adjustBrainLoss(2*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM) M.adjustToxLoss(2*REM, 0) M.adjustBruteLoss(2*REM, 0) ..() . = 1 /datum/reagent/drug/crank/addiction_act_stage1(mob/living/M) - M.adjustBrainLoss(5*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5*REM) ..() /datum/reagent/drug/crank/addiction_act_stage2(mob/living/M) @@ -101,7 +101,7 @@ . = 1 /datum/reagent/drug/crank/addiction_act_stage4(mob/living/M) - M.adjustBrainLoss(3*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3*REM) M.adjustToxLoss(5*REM, 0) M.adjustBruteLoss(5*REM, 0) ..() @@ -125,13 +125,13 @@ ..() /datum/reagent/drug/krokodil/overdose_process(mob/living/M) - M.adjustBrainLoss(0.25*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.25*REM) M.adjustToxLoss(0.25*REM, 0) ..() . = 1 /datum/reagent/drug/krokodil/addiction_act_stage1(mob/living/M) - M.adjustBrainLoss(2*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM) M.adjustToxLoss(2*REM, 0) ..() . = 1 @@ -192,7 +192,7 @@ if(jitter) M.Jitter(2) if(brain_damage) - M.adjustBrainLoss(rand(1,4)) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, rand(1,4)) M.heal_overall_damage(2, 2) if(prob(5)) M.emote(pick("twitch", "shiver")) @@ -210,7 +210,7 @@ M.drop_all_held_items() ..() M.adjustToxLoss(1, 0) - M.adjustBrainLoss(pick(0.5, 0.6, 0.7, 0.8, 0.9, 1)) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, pick(0.5, 0.6, 0.7, 0.8, 0.9, 1)) . = 1 /datum/reagent/drug/methamphetamine/addiction_act_stage1(mob/living/M) @@ -289,7 +289,7 @@ if(prob(5)) to_chat(M, "[high_message]") M.adjustStaminaLoss(-5, 0) - M.adjustBrainLoss(4) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4) M.hallucination += 5 if(M.canmove && !ismovableatom(M.loc)) step(M, pick(GLOB.cardinals)) @@ -314,7 +314,7 @@ for(var/i = 0, i < 8, i++) step(M, pick(GLOB.cardinals)) M.Jitter(5) - M.adjustBrainLoss(10) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10) if(prob(20)) M.emote(pick("twitch","drool","moan")) ..() @@ -326,7 +326,7 @@ step(M, pick(GLOB.cardinals)) M.Jitter(10) M.Dizzy(10) - M.adjustBrainLoss(10) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10) if(prob(30)) M.emote(pick("twitch","drool","moan")) ..() @@ -338,7 +338,7 @@ step(M, pick(GLOB.cardinals)) M.Jitter(15) M.Dizzy(15) - M.adjustBrainLoss(10) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10) if(prob(40)) M.emote(pick("twitch","drool","moan")) ..() @@ -351,7 +351,7 @@ M.Jitter(50) M.Dizzy(50) M.adjustToxLoss(5, 0) - M.adjustBrainLoss(10) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 10) if(prob(50)) M.emote(pick("twitch","drool","moan")) ..() @@ -401,7 +401,7 @@ M.jitteriness = 0 M.confused = 0 M.disgust = 0 - M.adjustBrainLoss(0.2) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2) ..() . = 1 @@ -418,7 +418,7 @@ if(3) M.emote("frown") SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_bad_od) - M.adjustBrainLoss(0.5) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5) ..() . = 1 @@ -490,7 +490,7 @@ H.dna.species.punchdamagehigh *= 0.2 /datum/reagent/drug/skooma/on_mob_life(mob/living/carbon/M) - M.adjustBrainLoss(1*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM) M.adjustToxLoss(1*REM) if(prob(10)) M.adjust_blurriness(2) @@ -522,7 +522,7 @@ M.Dizzy(50) M.adjust_blurriness(10) if(prob(50)) //This proc will be called about 200 times and the adjustbrainloss() below only has to be called 40 times to kill. This will make surviving skooma addiction pretty rare without mannitol usage. - M.adjustBrainLoss(5) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) if(prob(40)) M.emote(pick("twitch","drool","moan")) ..() diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 5e68f84792..056c5b1901 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -691,7 +691,7 @@ . = 1 if(prob(20)) M.losebreath += 4 - M.adjustBrainLoss(2*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM, 150) M.adjustToxLoss(3*REM,0) M.adjustStaminaLoss(10*REM,0) M.blur_eyes(5) diff --git a/code/modules/reagents/chemistry/reagents/impure_reagents.dm b/code/modules/reagents/chemistry/reagents/impure_reagents.dm new file mode 100644 index 0000000000..e24b811131 --- /dev/null +++ b/code/modules/reagents/chemistry/reagents/impure_reagents.dm @@ -0,0 +1,26 @@ +//Reagents produced by metabolising/reacting fermichems inoptimally, i.e. inverse_chems or impure_chems +//Inverse = Splitting +//Invert = Whole conversion + +/datum/reagent/impure + chemical_flags = REAGENT_INVISIBLE | REAGENT_SNEAKYNAME //by default, it will stay hidden on splitting, but take the name of the source on inverting + + +/datum/reagent/impure/fermiTox + name = "Chemical Isomers" + id = "fermiTox" + description = "Toxic chemical isomers made from impure reactions. At low volumes will cause light toxin damage, but as the volume increases, it deals larger amounts, damages the liver, then eventually the heart." + data = "merge" + color = "FFFFFF" + can_synth = FALSE + var/potency = 1 //potency multiplies the volume when added. + + +//I'm concerned this is too weak, but I also don't want deathmixes. +//TODO: liver damage, 100+ heart +/datum/reagent/impure/fermiTox/on_mob_life(mob/living/carbon/C, method) + if(C.dna && istype(C.dna.species, /datum/species/jelly)) + C.adjustToxLoss(-2) + else + C.adjustToxLoss(2) + ..() diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 4dc0d145dc..951a77b0e8 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -44,7 +44,7 @@ M.heal_bodypart_damage(5,5) M.adjustToxLoss(-5, 0, TRUE) M.hallucination = 0 - M.setBrainLoss(0) + M.setOrganLoss(ORGAN_SLOT_BRAIN, 0) REMOVE_TRAITS_NOT_IN(M, list(SPECIES_TRAIT, ROUNDSTART_TRAIT, ORGAN_TRAIT)) M.set_blurriness(0) M.set_blindness(0) @@ -64,6 +64,10 @@ if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume = (BLOOD_VOLUME_NORMAL*M.blood_ratio) + for(var/organ in M.internal_organs) + var/obj/item/organ/O = organ + O.setOrganDamage(0) + for(var/thing in M.diseases) var/datum/disease/D = thing if(D.severity == DISEASE_SEVERITY_POSITIVE) @@ -852,10 +856,16 @@ if(M.notify_ghost_cloning(source = M)) spawn (100) //so the ghost has time to re-enter return + else M.adjustOxyLoss(-20, 0) M.adjustToxLoss(-20, 0) + var/mob/living/carbon/H = M + for(var/organ in H.internal_organs) + var/obj/item/organ/O = organ + O.setOrganDamage(0) M.updatehealth() + if(M.revive()) M.emote("gasp") log_combat(M, M, "revived", src) @@ -875,7 +885,7 @@ pH = 10.4 /datum/reagent/medicine/mannitol/on_mob_life(mob/living/carbon/C) - C.adjustBrainLoss(-2*REM) + C.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2*REM) if(prob(10)) C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) ..() @@ -1130,7 +1140,7 @@ M.adjustFireLoss(-5*REM, 0) M.adjustOxyLoss(-15, 0) M.adjustToxLoss(-5*REM, 0) - M.adjustBrainLoss(-15*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -15*REM) M.adjustCloneLoss(-3*REM, 0) M.adjustStaminaLoss(-20*REM,0) ..() @@ -1175,7 +1185,7 @@ M.adjustFireLoss(-3 * REM, 0) M.adjustOxyLoss(-15 * REM, 0) M.adjustToxLoss(-3 * REM, 0, TRUE) //Heals TOXINLOVERS - M.adjustBrainLoss(2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that! + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2 * REM, 150) //This does, after all, come from ambrosia, and the most powerful ambrosia in existence, at that! M.adjustCloneLoss(-1 * REM, 0) M.adjustStaminaLoss(-13 * REM, 0) M.jitteriness = min(max(0, M.jitteriness + 3), 30) @@ -1207,7 +1217,7 @@ if (M.hallucination >= 5) M.hallucination -= 5 if(prob(20)) - M.adjustBrainLoss(1*REM, 50) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM, 50) M.adjustStaminaLoss(2.5*REM, 0) ..() return TRUE diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index a6bec66cfc..6b5e6d94bd 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -296,7 +296,7 @@ if(ishuman(M) && M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 3 else // Will deal about 90 damage when 50 units are thrown - M.adjustBrainLoss(3, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150) M.adjustToxLoss(2, 0) M.adjustFireLoss(2, 0) M.adjustOxyLoss(2, 0) @@ -315,7 +315,7 @@ M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire M.adjustToxLoss(1, 0) M.adjustFireLoss(1, 0) //Hence the other damages... ain't I a bastard? - M.adjustBrainLoss(5, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5, 150) holder.remove_reagent(id, 1) pH = 0.1 @@ -805,7 +805,7 @@ step(M, pick(GLOB.cardinals)) if(prob(5)) M.emote(pick("twitch","drool","moan")) - M.adjustBrainLoss(1) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) ..() /datum/reagent/sulfur @@ -1172,7 +1172,7 @@ /datum/reagent/impedrezene/on_mob_life(mob/living/carbon/M) M.jitteriness = max(M.jitteriness-5,0) if(prob(80)) - M.adjustBrainLoss(2*REM) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2*REM) if(prob(50)) M.drowsyness = max(M.drowsyness, 3) if(prob(10)) @@ -1222,7 +1222,7 @@ description = "A perfluoronated sulfonic acid that forms a foam when mixed with water." color = "#9E6B38" // rgb: 158, 107, 56 taste_description = "metal" - pH = 13 + pH = 11 /datum/reagent/foaming_agent// Metal foaming agent. This is lithium hydride. Add other recipes (e.g. LiH + H2O -> LiOH + H2) eventually. name = "Foaming agent" @@ -1231,7 +1231,7 @@ reagent_state = SOLID color = "#664B63" // rgb: 102, 75, 99 taste_description = "metal" - pH = 12.5 + pH = 11.5 /datum/reagent/smart_foaming_agent //Smart foaming agent. Functions similarly to metal foam, but conforms to walls. name = "Smart foaming agent" @@ -1519,20 +1519,6 @@ taste_description = "metal" pH = 4.5 -/datum/reagent/carpet - name = "Carpet" - id = "carpet" - description = "For those that need a more creative way to roll out a red carpet." - reagent_state = LIQUID - color = "#b51d05" - taste_description = "carpet" // Your tounge feels furry. - -/datum/reagent/carpet/reaction_turf(turf/T, reac_volume) - if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) - var/turf/open/floor/F = T - F.PlaceOnTop(/turf/open/floor/carpet) - ..() - /datum/reagent/bromine name = "Bromine" id = "bromine" @@ -1686,6 +1672,143 @@ qdel(O) new /obj/item/clothing/shoes/galoshes/dry(t_loc) +// Liquid Carpets +/datum/reagent/carpet + name = "Liquid Carpet" + id = "carpet" + description = "For those that need a more creative way to roll out a carpet." + reagent_state = LIQUID + color = "#b51d05" + taste_description = "carpet" // Your tounge feels furry. + +/datum/reagent/carpet/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet) + ..() + +/datum/reagent/carpet/black + name = "Liquid Black Carpet" + id = "blackcarpet" + color = "#363636" + +/datum/reagent/carpet/black/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/black) + ..() + +/datum/reagent/carpet/blackred + name = "Liquid Red Black Carpet" + id = "blackredcarpet" + color = "#342125" + +/datum/reagent/carpet/blackred/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/blackred) + ..() + +/datum/reagent/carpet/monochrome + name = "Liquid Monochrome Carpet" + id = "monochromecarpet" + color = "#b4b4b4" + +/datum/reagent/carpet/monochrome/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/monochrome) + ..() + +/datum/reagent/carpet/blue + name = "Liquid Blue Carpet" + id = "bluecarpet" + color = "#1256ff" + +/datum/reagent/carpet/blue/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/blue) + ..() + +/datum/reagent/carpet/cyan + name = "Liquid Cyan Carpet" + id = "cyancarpet" + color = "#3acfb9" + +/datum/reagent/carpet/cyan/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/cyan) + ..() + +/datum/reagent/carpet/green + name = "Liquid Green Carpet" + id = "greencarpet" + color = "#619b62" + +/datum/reagent/carpet/green/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/green) + ..() + +/datum/reagent/carpet/orange + name = "Liquid Orange Carpet" + id = "orangecarpet" + color = "#cc7900" + +/datum/reagent/carpet/orange/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/orange) + ..() + +/datum/reagent/carpet/purple + name = "Liquid Purple Carpet" + id = "purplecarpet" + color = "#6d3392" + +/datum/reagent/carpet/purple/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/purple) + ..() + +/datum/reagent/carpet/red + name = "Liquid Red Carpet" + id = "redcarpet" + color = "#871515" + +/datum/reagent/carpet/red/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/red) + ..() + +/datum/reagent/carpet/royalblack + name = "Liquid Royal Black Carpet" + id = "royalblackcarpet" + color = "#483d05" + +/datum/reagent/carpet/royalblack/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/royalblack) + ..() + +/datum/reagent/carpet/royalblue + name = "Liquid Royal Blue Carpet" + id = "royalbluecarpet" + color = "#24227e" + +/datum/reagent/carpet/royalblue/reaction_turf(turf/T, reac_volume) + if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel)) + var/turf/open/floor/F = T + F.PlaceOnTop(/turf/open/floor/carpet/royalblue) + ..() + + // Virology virus food chems. /datum/reagent/toxin/mutagen/mutagenvirusfood @@ -1992,7 +2115,7 @@ can_synth = FALSE var/datum/dna/original_dna var/reagent_ticks = 0 - invisible = TRUE + chemical_flags = REAGENT_INVISIBLE /datum/reagent/changeling_string/on_mob_metabolize(mob/living/carbon/C) if(C && C.dna && data["desired_dna"]) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 77600dec0f..2b50ecc0f1 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -471,7 +471,7 @@ toxpwr = 0 /datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/M) - M.adjustBrainLoss(3*REM, 150) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3*REM, 150) if(M.toxloss <= 60) M.adjustToxLoss(1*REM, 0) if(current_cycle >= 18) @@ -950,3 +950,20 @@ to_chat(M, "Your missing arm aches from wherever you left it.") M.emote("sigh") return ..() + +/datum/reagent/toxin/brainhurtingjuice //oof ouch + name = "Brain Hurting Juice" + id = "brainhurtingjuice" + color = "#AAAAAA77" //RGBA: 170, 170, 170, 77 + toxpwr = 0 + taste_description = "brain hurting" + metabolization_rate = 5 + +/datum/reagent/toxin/brainhurtingjuice/on_mob_life(mob/living/carbon/M) + if(prob(50)) + M.gain_trauma_type(BRAIN_TRAUMA_MILD) + else if(prob(50)) + M.gain_trauma_type(BRAIN_TRAUMA_SEVERE) + else + M.gain_trauma_type(BRAIN_TRAUMA_SPECIAL) + ..() diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 32155c9b89..a915087428 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -32,6 +32,7 @@ var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics var/FermiExplode = FALSE // If the chemical explodes in a special way + var/clear_conversion //bitflags for clear conversions; REACTION_CLEAR_IMPURE or REACTION_CLEAR_INVERSE var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this. diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 59865dd1da..11dd8b7475 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -68,6 +68,42 @@ results = list("synthflesh" = 3) required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1) +/datum/chemical_reaction/synthtissue + name = "Synthtissue" + id = "synthtissue" + results = list("synthtissue" = 0.05) + required_reagents = list("synthflesh" = 0.01) + required_catalysts = list("nutriment" = 0.1) + //FermiChem vars: + OptimalTempMin = 305 // Lower area of bell curve for determining heat based rate reactions + OptimalTempMax = 315 // Upper end for above + ExplodeTemp = 1050 // Temperature at which reaction explodes + OptimalpHMin = 8.5 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase) + OptimalpHMax = 9.5 // Higest value for above + ReactpHLim = 2 // How far out pH wil react, giving impurity place (Exponential phase) + CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst) + CurveSharpT = 1 // How sharp the temperature exponential curve is (to the power of value) + CurveSharppH = 2.5 // How sharp the pH exponential curve is (to the power of value) + ThermicConstant = 0.01 // Temperature change per 1u produced + HIonRelease = 0.015 // pH change per 1u reaction (inverse for some reason) + RateUpLim = 0.05 // Optimal/max rate possible if all conditions are perfect + FermiChem = TRUE // If the chemical uses the Fermichem reaction mechanics + PurityMin = 0 + +/datum/chemical_reaction/synthtissue/FermiCreate(datum/reagents/holder, added_volume, added_purity) + var/datum/reagent/synthtissue/St = holder.has_reagent("synthtissue") + var/datum/reagent/N = holder.has_reagent("nutriment") + if(!St) + return + if(holder.chem_temp > 320) + var/temp_ratio = 1-(330 - holder.chem_temp)/10 + holder.remove_reagent(src.id, added_volume*temp_ratio) + if(St.purity < 1) + St.volume *= St.purity + St.purity = 1 + N.volume -= 0.002 + St.data["grown_volume"] = St.data["grown_volume"] + added_volume + /datum/chemical_reaction/styptic_powder name = "Styptic Powder" id = "styptic_powder" diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index b4e42aa973..eaae548d68 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -494,12 +494,6 @@ results = list("acetone" = 3) required_reagents = list("oil" = 1, "welding_fuel" = 1, "oxygen" = 1) -/datum/chemical_reaction/carpet - name = "carpet" - id = "carpet" - results = list("carpet" = 2) - required_reagents = list("space_drugs" = 1, "blood" = 1) - /datum/chemical_reaction/oil name = "Oil" id = "oil" @@ -641,3 +635,77 @@ results = list("shadowmutationtoxin" = 1) required_reagents = list("liquid_dark_matter" = 5, "synaptizine" = 10, "oculine" = 10, "stablemutationtoxin" = 1) required_temp = 600 + +// Liquid Carpets + +/datum/chemical_reaction/carpet + name = "carpet" + id = "carpet" + results = list("carpet" = 2) + required_reagents = list("space_drugs" = 1, "blood" = 1) + +/datum/chemical_reaction/carpet/black + name = "liquid black carpet" + id = "blackcarpet" + results = list("blackcarpet" = 2) + required_reagents = list("carpet" = 1, "carbon" = 1) + +/datum/chemical_reaction/carpet/blackred + name = "liquid red black carpet" + id = "blackredcarpet" + results = list("blackredcarpet" = 2) + required_reagents = list("carpet" = 1, "charcoal" = 1) + +/datum/chemical_reaction/carpet/monochrome + name = "liquid monochrome carpet" + id = "monochromecarpet" + results = list("monochromecarpet" = 2) + required_reagents = list("carpet" = 1, "oil" = 1) + +/datum/chemical_reaction/carpet/blue + name = "liquid blue carpet" + id = "bluecarpet" + results = list("bluecarpet" = 2) + required_reagents = list("carpet" = 1, "tonic" = 1) + +/datum/chemical_reaction/carpet/cyan + name = "liquid cyan carpet" + id = "cyancarpet" + results = list("cyancarpet" = 2) + required_reagents = list("carpet" = 1, "ice" = 1) + +/datum/chemical_reaction/carpet/green + name = "liquid green carpet" + id = "greencarpet" + results = list("greencarpet" = 2) + required_reagents = list("carpet" = 1, "sacid" = 1) + +/datum/chemical_reaction/carpet/orange + name = "liquid orange carpet" + id = "orangecarpet" + results = list("orangecarpet" = 2) + required_reagents = list("carpet" = 1, "orangejuice" = 1) + +/datum/chemical_reaction/carpet/purple + name = "liquid purple carpet" + id = "purplecarpet" + results = list("purplecarpet" = 2) + required_reagents = list("carpet" = 1, "stable_plasma" = 1) + +/datum/chemical_reaction/carpet/red + name = "liquid red carpet" + id = "redcarpet" + results = list("redcarpet" = 2) + required_reagents = list("carpet" = 1, "welding_fuel" = 1) + +/datum/chemical_reaction/carpet/royalblack + name = "liquid royal black carpet" + id = "royalblackcarpet" + results = list("royalblackcarpet" = 2) + required_reagents = list("carpet" = 1, "blackpepper" = 1) + +/datum/chemical_reaction/carpet/royalblue + name = "liquid royal blue carpet" + id = "royalbluecarpet" + results = list("royalbluecarpet" = 2) + required_reagents = list("carpet" = 1, "clonexadone" = 1) diff --git a/code/modules/reagents/reagent_containers/medspray.dm b/code/modules/reagents/reagent_containers/medspray.dm index 54a38eef86..df7c7af225 100644 --- a/code/modules/reagents/reagent_containers/medspray.dm +++ b/code/modules/reagents/reagent_containers/medspray.dm @@ -19,8 +19,8 @@ var/can_fill_from_container = TRUE var/apply_type = PATCH var/apply_method = "spray" - var/self_delay = 30 - var/squirt_mode = 0 + var/self_delay = 3 SECONDS + var/squirt_mode = FALSE var/squirt_amount = 5 /obj/item/reagent_containers/medspray/attack_self(mob/user) @@ -31,40 +31,51 @@ amount_per_transfer_from_this = initial(amount_per_transfer_from_this) to_chat(user, "You will now apply the medspray's contents in [squirt_mode ? "short bursts":"extended sprays"]. You'll now use [amount_per_transfer_from_this] units per use.") -/obj/item/reagent_containers/medspray/attack(mob/M, mob/user, def_zone) +/obj/item/reagent_containers/medspray/attack(mob/living/L, mob/user, def_zone) if(!reagents || !reagents.total_volume) to_chat(user, "[src] is empty!") return - if(M == user) - M.visible_message("[user] attempts to [apply_method] [src] on [user.p_them()]self.") + if(ishuman(L)) + var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected)) + if(!affecting) + to_chat(user, "The limb is missing!") + return + if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, like patches + return + if(affecting.status != BODYPART_ORGANIC) + to_chat(user, "Medicine won't work on a robotic limb!") + return + + if(L == user) + L.visible_message("[user] attempts to [apply_method] [src] on [user.p_them()]self.") if(self_delay) - if(!do_mob(user, M, self_delay)) + if(!do_mob(user, L, self_delay)) return if(!reagents || !reagents.total_volume) return - to_chat(M, "You [apply_method] yourself with [src].") + to_chat(L, "You [apply_method] yourself with [src].") else - log_combat(user, M, "attempted to apply", src, reagents.log_list()) - M.visible_message("[user] attempts to [apply_method] [src] on [M].", \ - "[user] attempts to [apply_method] [src] on [M].") - if(!do_mob(user, M)) + log_combat(user, L, "attempted to apply", src, reagents.log_list()) + L.visible_message("[user] attempts to [apply_method] [src] on [L].", \ + "[user] attempts to [apply_method] [src] on [L].") + if(!do_mob(user, L)) return if(!reagents || !reagents.total_volume) return - M.visible_message("[user] [apply_method]s [M] down with [src].", \ - "[user] [apply_method]s [M] down with [src].") + L.visible_message("[user] [apply_method]s [L] down with [src].", \ + "[user] [apply_method]s [L] down with [src].") if(!reagents || !reagents.total_volume) return else - log_combat(user, M, "applied", src, reagents.log_list()) + log_combat(user, L, "applied", src, reagents.log_list()) playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6) var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1) - reagents.reaction(M, apply_type, fraction) - reagents.trans_to(M, amount_per_transfer_from_this) + reagents.reaction(L, apply_type, fraction) + reagents.trans_to(L, amount_per_transfer_from_this) return /obj/item/reagent_containers/medspray/styptic diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 19afab2e6e..216ecd9654 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -39,6 +39,10 @@ else qdel(src) +/////////////// +//Water Tanks// +/////////////// + /obj/structure/reagent_dispensers/watertank name = "water tank" desc = "A water tank." @@ -57,12 +61,52 @@ reagent_id = "firefighting_foam" tank_volume = 500 +/obj/structure/reagent_dispensers/water_cooler + name = "liquid cooler" + desc = "A machine that dispenses liquid to drink." + icon = 'icons/obj/vending.dmi' + icon_state = "water_cooler" + anchored = TRUE + tank_volume = 500 + var/paper_cups = 25 //Paper cups left from the cooler + +/obj/structure/reagent_dispensers/water_cooler/examine(mob/user) + ..() + if (paper_cups > 1) + to_chat(user, "There are [paper_cups] paper cups left.") + else if (paper_cups == 1) + to_chat(user, "There is one paper cup left.") + else + to_chat(user, "There are no paper cups left.") + +/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user) + . = ..() + if(.) + return + if(!paper_cups) + to_chat(user, "There aren't any cups left!") + return + user.visible_message("[user] takes a cup from [src].", "You take a paper cup from [src].") + var/obj/item/reagent_containers/food/drinks/sillycup/S = new(get_turf(src)) + user.put_in_hands(S) + paper_cups-- + +////////////// +//Fuel Tanks// +////////////// + /obj/structure/reagent_dispensers/fueltank name = "fuel tank" desc = "A tank full of industrial welding fuel. Do not consume." icon_state = "fuel" reagent_id = "welding_fuel" +/obj/structure/reagent_dispensers/fueltank/high //Unused - Good for ghost roles + name = "high-capacity fuel tank" + desc = "A now illegal tank, full of highly pressurized industrial welding fuel. Do not consume or have a open flame close to this tank." + icon_state = "fuel_high" + tank_volume = 3000 + /obj/structure/reagent_dispensers/fueltank/boom() explosion(get_turf(src), 0, 1, 5, flame_range = 5) qdel(src) @@ -117,6 +161,9 @@ return return ..() +/////////////////// +//Misc Dispenders// +/////////////////// /obj/structure/reagent_dispensers/peppertank name = "pepper spray refiller" @@ -131,36 +178,24 @@ if(prob(1)) desc = "IT'S PEPPER TIME, BITCH!" - -/obj/structure/reagent_dispensers/water_cooler - name = "liquid cooler" - desc = "A machine that dispenses liquid to drink." - icon = 'icons/obj/vending.dmi' - icon_state = "water_cooler" +/obj/structure/reagent_dispensers/virusfood + name = "virus food dispenser" + desc = "A dispenser of low-potency virus mutagenic." + icon_state = "virus_food" anchored = TRUE - tank_volume = 500 - var/paper_cups = 25 //Paper cups left from the cooler + density = FALSE + reagent_id = "virusfood" -/obj/structure/reagent_dispensers/water_cooler/examine(mob/user) - ..() - if (paper_cups > 1) - to_chat(user, "There are [paper_cups] paper cups left.") - else if (paper_cups == 1) - to_chat(user, "There is one paper cup left.") - else - to_chat(user, "There are no paper cups left.") +/obj/structure/reagent_dispensers/cooking_oil + name = "vat of cooking oil" + desc = "A huge metal vat with a tap on the front. Filled with cooking oil for use in frying food." + icon_state = "vat" + anchored = TRUE + reagent_id = "cooking_oil" -/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user) - . = ..() - if(.) - return - if(!paper_cups) - to_chat(user, "There aren't any cups left!") - return - user.visible_message("[user] takes a cup from [src].", "You take a paper cup from [src].") - var/obj/item/reagent_containers/food/drinks/sillycup/S = new(get_turf(src)) - user.put_in_hands(S) - paper_cups-- +//////// +//Kegs// +//////// /obj/structure/reagent_dispensers/beerkeg name = "beer keg" @@ -173,19 +208,44 @@ if(!QDELETED(src)) qdel(src) +/obj/structure/reagent_dispensers/keg + name = "keg" + desc = "A keg." + icon = 'modular_citadel/icons/obj/objects.dmi' + icon_state = "keg" + reagent_id = "water" -/obj/structure/reagent_dispensers/virusfood - name = "virus food dispenser" - desc = "A dispenser of low-potency virus mutagenic." - icon_state = "virus_food" - anchored = TRUE - density = FALSE - reagent_id = "virusfood" +/obj/structure/reagent_dispensers/keg/mead + name = "keg of mead" + desc = "A keg of mead." + icon_state = "orangekeg" + reagent_id = "mead" +/obj/structure/reagent_dispensers/keg/aphro + name = "keg of aphrodisiac" + desc = "A keg of aphrodisiac." + icon_state = "pinkkeg" + reagent_id = "aphro" -/obj/structure/reagent_dispensers/cooking_oil - name = "vat of cooking oil" - desc = "A huge metal vat with a tap on the front. Filled with cooking oil for use in frying food." - icon_state = "vat" - anchored = TRUE - reagent_id = "cooking_oil" +/obj/structure/reagent_dispensers/keg/aphro/strong + name = "keg of strong aphrodisiac" + desc = "A keg of strong and addictive aphrodisiac." + reagent_id = "aphro+" + +/obj/structure/reagent_dispensers/keg/milk + name = "keg of milk" + desc = "It's not quite what you were hoping for." + icon_state = "whitekeg" + reagent_id = "milk" + +/obj/structure/reagent_dispensers/keg/semen + name = "keg of semen" + desc = "Dear lord, where did this even come from?" + icon_state = "whitekeg" + reagent_id = "semen" + +/obj/structure/reagent_dispensers/keg/gargle + name = "keg of pan galactic gargleblaster" + desc = "A keg of... wow that's a long name." + icon_state = "bluekeg" + reagent_id = "gargleblaster" \ No newline at end of file diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 301d2de279..d4f13f6a2e 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -534,6 +534,17 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/cybernetic_heart_u + name = "Upgraded Cybernetic Heart" + desc = "An upgraded cybernetic heart" + id = "cybernetic_heart_u" + build_type = PROTOLATHE | MECHFAB + construction_time = 50 + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500) + build_path = /obj/item/organ/heart/cybernetic/upgraded + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + /datum/design/cybernetic_liver_u name = "Upgraded Cybernetic Liver" desc = "An upgraded cybernetic liver" @@ -712,6 +723,28 @@ category = list("Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/cybernetic_ears + name = "Cybernetic Ears" + desc = "A pair of cybernetic ears." + id = "cybernetic_ears" + build_type = PROTOLATHE | MECHFAB + construction_time = 30 + materials = list(MAT_METAL = 250, MAT_GLASS = 400) + build_path = /obj/item/organ/ears/cybernetic + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + +/datum/design/cybernetic_ears_u + name = "Upgraded Cybernetic Ears" + desc = "A pair of upgraded cybernetic ears." + id = "cybernetic_ears_u" + build_type = PROTOLATHE | MECHFAB + construction_time = 40 + materials = list(MAT_METAL = 500, MAT_GLASS = 500, MAT_SILVER = 500) + build_path = /obj/item/organ/ears/cybernetic/upgraded + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL + ///////////////////// ///Surgery Designs/// ///////////////////// diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 214ef36afe..11bc31bedc 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -47,6 +47,22 @@ build_path = /obj/item/ammo_box/magazine/wt550m9/wtic departmental_flags = DEPARTMENTAL_FLAG_SECURITY +/datum/design/mag_oldsmg/tx_mag + name = "WT-550 Semi-Auto SMG Uranium Magazine (4.6x30mm TX)" + desc = "A 20 round uranium tipped magazine for the out of date security WT-550 Semi-Auto SMG." + id = "mag_oldsmg_tx" + materials = list(MAT_METAL = 6000, MAT_SILVER = 600, MAT_URANIUM = 2000) + build_path = /obj/item/ammo_box/magazine/wt550m9/wttx + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/mag_oldsmg/rubber_mag + name = "WT-550 Semi-Auto SMG rubberbullets Magazine (4.6x30mm rubber)" + desc = "A 20 round rubber shots magazine for the out of date security WT-550 Semi-Auto SMG" + id = "mag_oldsmg_rubber" + materials = list(MAT_METAL = 6000) + build_path = /obj/item/ammo_box/magazine/wt550m9/wtrubber + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + ////////////// //Ammo Shells/ ////////////// diff --git a/code/modules/research/nanites/nanite_programs/healing.dm b/code/modules/research/nanites/nanite_programs/healing.dm index 8aab7f1e2b..66a5344d6c 100644 --- a/code/modules/research/nanites/nanite_programs/healing.dm +++ b/code/modules/research/nanites/nanite_programs/healing.dm @@ -74,12 +74,12 @@ var/mob/living/carbon/C = host_mob if(length(C.get_traumas())) return ..() - if(host_mob.getBrainLoss()) + if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN)) return ..() return FALSE /datum/nanite_program/brain_heal/active_effect() - host_mob.adjustBrainLoss(-1, TRUE) + host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1, TRUE) if(iscarbon(host_mob) && prob(10)) var/mob/living/carbon/C = host_mob C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_BASIC) @@ -195,12 +195,12 @@ var/mob/living/carbon/C = host_mob if(length(C.get_traumas())) return ..() - if(host_mob.getBrainLoss()) + if(host_mob.getOrganLoss(ORGAN_SLOT_BRAIN)) return ..() return FALSE - + /datum/nanite_program/brain_heal_advanced/active_effect() - host_mob.adjustBrainLoss(-2, TRUE) + host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -2, TRUE) if(iscarbon(host_mob) && prob(10)) var/mob/living/carbon/C = host_mob C.cure_trauma_type(resilience = TRAUMA_RESILIENCE_LOBOTOMY) @@ -232,7 +232,7 @@ if(!C.getorgan(/obj/item/organ/heart)) //what are we even shocking return FALSE var/obj/item/organ/brain/BR = C.getorgan(/obj/item/organ/brain) - if(QDELETED(BR) || BR.damaged_brain) + if(QDELETED(BR) || BR.brain_death || (BR.organ_flags & ORGAN_FAILING) || C.suiciding) return FALSE if(C.get_ghost()) return FALSE @@ -252,7 +252,7 @@ SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK) var/tplus = world.time - C.timeofdeath if(tplus > 600) - C.adjustBrainLoss( max(0, ((1800 - tplus) / 1800 * 150)), 150) + C.adjustOrganLoss(ORGAN_SLOT_BRAIN, max(0, ((1800 - tplus) / 1800 * 150)), 150) log_game("[C] has been successfully defibrillated by nanites.") else playsound(C, 'sound/machines/defib_failed.ogg', 50, 0) diff --git a/code/modules/research/nanites/nanite_programs/rogue.dm b/code/modules/research/nanites/nanite_programs/rogue.dm index f64c7e8781..287aed36fe 100644 --- a/code/modules/research/nanites/nanite_programs/rogue.dm +++ b/code/modules/research/nanites/nanite_programs/rogue.dm @@ -59,7 +59,7 @@ /datum/nanite_program/brain_decay/active_effect() if(prob(4)) host_mob.hallucination = min(15, host_mob.hallucination) - host_mob.adjustBrainLoss(1) + host_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) //Generic brain-affecting programs can also decay into this /datum/nanite_program/brain_misfire diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 038a41b3cd..590a1d787b 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -517,8 +517,17 @@ display_name = "Cybernetic Organs" description = "We have the technology to rebuild him." prereq_ids = list("adv_biotech") - design_ids = list("cybernetic_heart", "cybernetic_liver", "cybernetic_liver_u", "cybernetic_lungs", "cybernetic_lungs_u", "cybernetic_tongue") - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) + design_ids = list("cybernetic_ears", "cybernetic_heart", "cybernetic_liver", "cybernetic_lungs", "cybernetic_tongue") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000) + export_price = 5000 + +/datum/techweb_node/cyber_organs_upgraded + id = "cyber_organs_upgraded" + display_name = "Upgraded Cybernetic Organs" + description = "We have the technology to upgrade him." + prereq_ids = list("cyber_organs") + design_ids = list("cybernetic_ears_u", "cybernetic_heart_u", "cybernetic_liver_u", "cybernetic_lungs_u") + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500) export_price = 5000 /datum/techweb_node/cyber_implants @@ -1045,7 +1054,7 @@ boost_item_paths = list() for(var/path in GLOB.uplink_items) var/datum/uplink_item/UI = new path - if(!UI.item) + if(!UI.item || !UI.illegal_tech) continue boost_item_paths |= UI.item //allows deconning to unlock. diff --git a/code/modules/research/xenobiology/crossbreeding/_weapons.dm b/code/modules/research/xenobiology/crossbreeding/_weapons.dm index 4753abff97..1b2f43c518 100644 --- a/code/modules/research/xenobiology/crossbreeding/_weapons.dm +++ b/code/modules/research/xenobiology/crossbreeding/_weapons.dm @@ -27,9 +27,9 @@ return 0 charge_tick = 0 var/mob/living/M = loc - if(istype(M) && M.blood_volume >= 20) + if(istype(M) && M.blood_volume >= 5) charges++ - M.blood_volume -= 20 + M.blood_volume -= 5 if(charges == 1) recharge_newshot() return 1 diff --git a/code/modules/research/xenobiology/crossbreeding/consuming.dm b/code/modules/research/xenobiology/crossbreeding/consuming.dm index 0b2d60da8c..d6536f4fdd 100644 --- a/code/modules/research/xenobiology/crossbreeding/consuming.dm +++ b/code/modules/research/xenobiology/crossbreeding/consuming.dm @@ -119,7 +119,7 @@ Consuming extracts: M.adjustToxLoss(-5, forced=1) //To heal slimepeople. M.adjustOxyLoss(-5) M.adjustCloneLoss(-5) - M.adjustBrainLoss(-5) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5) /obj/item/slimecross/consuming/blue colour = "blue" diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 7acbaaac1c..5e872ac299 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -523,7 +523,8 @@ /obj/item/slime_extract/pyrite/activate(mob/living/carbon/human/user, datum/species/jelly/luminescent/species, activation_type) switch(activation_type) if(SLIME_ACTIVATE_MINOR) - var/chosen = pick(difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan))) + var/blacklisted_cans = list(/obj/item/toy/crayon/spraycan/borg, /obj/item/toy/crayon/spraycan/infinite) + var/chosen = pick(subtypesof(/obj/item/toy/crayon/spraycan) - blacklisted_cans) var/obj/item/O = new chosen(null) if(!user.put_in_active_hand(O)) O.forceMove(user.drop_location()) diff --git a/code/modules/spells/spell_types/lichdom.dm b/code/modules/spells/spell_types/lichdom.dm index efc80101f6..0cbb3a8272 100644 --- a/code/modules/spells/spell_types/lichdom.dm +++ b/code/modules/spells/spell_types/lichdom.dm @@ -57,7 +57,7 @@ new /obj/item/phylactery(marked_item, M.mind) to_chat(M, "With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!") - M.set_species(/datum/species/skeleton) + M.set_species(/datum/species/skeleton/space) if(ishuman(M)) var/mob/living/carbon/human/H = M H.dropItemToGround(H.w_uniform) @@ -132,7 +132,7 @@ lich.real_name = mind.name mind.transfer_to(lich) mind.grab_ghost(force=TRUE) - lich.hardset_dna(null,null,lich.real_name,null, new /datum/species/skeleton) + lich.hardset_dna(null,null,lich.real_name,null, new /datum/species/skeleton/space) to_chat(lich, "Your bones clatter and shudder as you are pulled back into this world!") var/turf/body_turf = get_turf(old_body) lich.Knockdown(200 + 200*resurrections) diff --git a/code/modules/surgery/advanced/brainwashing.dm b/code/modules/surgery/advanced/brainwashing.dm index 730a912189..68deca4729 100644 --- a/code/modules/surgery/advanced/brainwashing.dm +++ b/code/modules/surgery/advanced/brainwashing.dm @@ -56,7 +56,7 @@ display_results(user, target, "You screw up, bruising the brain tissue!", "[user] screws up, causing brain damage!", "[user] completes the surgery on [target]'s brain.") - target.adjustBrainLoss(40) + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 40) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") return FALSE diff --git a/code/modules/surgery/advanced/lobotomy.dm b/code/modules/surgery/advanced/lobotomy.dm index 1c09f5f7da..12c5e4dab2 100644 --- a/code/modules/surgery/advanced/lobotomy.dm +++ b/code/modules/surgery/advanced/lobotomy.dm @@ -51,11 +51,12 @@ return TRUE /datum/surgery_step/lobotomize/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - if(target.getorganslot(ORGAN_SLOT_BRAIN)) + var/obj/item/organ/brain/B = target.getorganslot(ORGAN_SLOT_BRAIN) + if(B) display_results(user, target, "You remove the wrong part, causing more damage!", "[user] successfully lobotomizes [target]!", "[user] completes the surgery on [target]'s brain.") - target.adjustBrainLoss(80) + B.applyOrganDamage(80) switch(rand(1,3)) if(1) target.gain_trauma_type(BRAIN_TRAUMA_MILD, TRAUMA_RESILIENCE_MAGIC) diff --git a/code/modules/surgery/advanced/revival.dm b/code/modules/surgery/advanced/revival.dm index 01c30f174a..b31a7518bd 100644 --- a/code/modules/surgery/advanced/revival.dm +++ b/code/modules/surgery/advanced/revival.dm @@ -63,7 +63,7 @@ user.visible_message("...[target] wakes up, alive and aware!", "IT'S ALIVE!") target.visible_message("...[target] wakes up, alive and aware!") target.emote("gasp") - target.adjustBrainLoss(50, 199) //MAD SCIENCE + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE return TRUE else user.visible_message("...[target.p_they()] convulses, then lies still.") @@ -75,5 +75,5 @@ "[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.", "[user] send a powerful shock to [target]'s brain with [tool], but [target.p_they()] doesn't react.") playsound(get_turf(target), 'sound/magic/lightningbolt.ogg', 50, 1) - target.adjustBrainLoss(15, 199) + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 199) return FALSE diff --git a/code/modules/surgery/brain_surgery.dm b/code/modules/surgery/brain_surgery.dm index e65271576d..c553d05448 100644 --- a/code/modules/surgery/brain_surgery.dm +++ b/code/modules/surgery/brain_surgery.dm @@ -31,7 +31,7 @@ "[user] completes the surgery on [target]'s brain.") if(target.mind && target.mind.has_antag_datum(/datum/antagonist/brainwashed)) target.mind.remove_antag_datum(/datum/antagonist/brainwashed) - target.adjustBrainLoss(-60) + target.setOrganLoss(ORGAN_SLOT_BRAIN, target.getOrganLoss(ORGAN_SLOT_BRAIN) - 60) //we set damage in this case in order to clear the "failing" flag target.cure_all_traumas(TRAUMA_RESILIENCE_SURGERY) return TRUE @@ -40,7 +40,7 @@ display_results(user, target, "You screw up, causing more damage!", "[user] screws up, causing brain damage!", "[user] completes the surgery on [target]'s brain.") - target.adjustBrainLoss(60) + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 60) target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") diff --git a/code/modules/surgery/coronary_bypass.dm b/code/modules/surgery/coronary_bypass.dm new file mode 100644 index 0000000000..3e36e9aa9b --- /dev/null +++ b/code/modules/surgery/coronary_bypass.dm @@ -0,0 +1,77 @@ +/datum/surgery/coronary_bypass + name = "Coronary Bypass" + steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise_heart, /datum/surgery_step/coronary_bypass, /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + +/datum/surgery/coronary_bypass/can_start(mob/user, mob/living/carbon/target) + var/obj/item/organ/heart/H = target.getorganslot(ORGAN_SLOT_HEART) + if(H) + if(H.damage > 60 && !H.operated) + return TRUE + return FALSE + + +//an incision but with greater bleed, and a 90% base success chance +/datum/surgery_step/incise_heart + name = "incise heart" + implements = list(/obj/item/scalpel = 90, /obj/item/melee/transforming/energy/sword = 45, /obj/item/kitchen/knife = 45, + /obj/item/shard = 25) + time = 16 + +/datum/surgery_step/incise_heart/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You begin to make an incision in [target]'s heart...", + "[user] begins to make an incision in [target]'s heart.", + "[user] begins to make an incision in [target]'s heart.") + +/datum/surgery_step/incise_heart/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if (!(NOBLOOD in H.dna.species.species_traits)) + display_results(user, target, "Blood pools around the incision in [H]'s heart.", + "Blood pools around the incision in [H]'s heart.", + "") + H.bleed_rate += 10 + H.adjustBruteLoss(10) + return TRUE + +/datum/surgery_step/incise_heart/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + display_results(user, target, "You screw up, cutting too deeply into the heart!", + "[user] screws up, causing blood to spurt out of [H]'s chest!", + "[user] screws up, causing blood to spurt out of [H]'s chest!") + H.bleed_rate += 20 + H.adjustOrganLoss(ORGAN_SLOT_HEART, 10) + H.adjustBruteLoss(10) + +//grafts a coronary bypass onto the individual's heart, success chance is 90% base again +/datum/surgery_step/coronary_bypass + name = "graft coronary bypass" + implements = list(/obj/item/hemostat = 90, TOOL_WIRECUTTER = 35, /obj/item/stack/packageWrap = 15, /obj/item/stack/cable_coil = 5) + time = 90 + +/datum/surgery_step/coronary_bypass/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You begin to graft a bypass onto [target]'s heart...", + "[user] begins to graft something onto [target]'s heart!", + "[user] begins to graft something onto [target]'s heart!") + +/datum/surgery_step/coronary_bypass/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + target.setOrganLoss(ORGAN_SLOT_HEART, 60) + var/obj/item/organ/heart/heart = target.getorganslot(ORGAN_SLOT_HEART) + if(heart) //slightly worrying if we lost our heart mid-operation, but that's life + heart.operated = TRUE + display_results(user, target, "You successfully graft a bypass onto [target]'s heart.", + "[user] finishes grafting something onto [target]'s heart.", + "[user] finishes grafting something onto [target]'s heart.") + return TRUE + +/datum/surgery_step/coronary_bypass/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + display_results(user, target, "You screw up in attaching the graft, and it tears off, tearing part of the heart!", + "[user] screws up, causing blood to spurt out of [H]'s chest profusely!", + "[user] screws up, causing blood to spurt out of [H]'s chest profusely!") + H.adjustOrganLoss(ORGAN_SLOT_HEART, 20) + H.bleed_rate += 30 + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 85142e7bb1..29385ef20b 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -37,7 +37,7 @@ display_results(user, target, "You accidentally stab [target] right in the brain!", "[user] accidentally stabs [target] right in the brain!", "[user] accidentally stabs [target] right in the brain!") - target.adjustBrainLoss(70) + target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 70) else display_results(user, target, "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.", "[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", diff --git a/code/modules/surgery/graft_synthtissue.dm b/code/modules/surgery/graft_synthtissue.dm new file mode 100644 index 0000000000..8826de7171 --- /dev/null +++ b/code/modules/surgery/graft_synthtissue.dm @@ -0,0 +1,70 @@ +//Organ reconstruction, limited to the chest region as most organs in the head have their own repair method (eyes/brain). We require synthflesh for these +//steps since fixing internal organs aren't as simple as mending exterior flesh, though in the future it would be neat to add more chems to the viable list. +//TBD: Add heart damage, have heart reconstruction seperate from organ reconstruction, and find a better name for this. I can imagine people getting it confused with manipulation. + +/datum/surgery/graft_synthtissue + name = "Graft synthtissue" + species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) + possible_locs = list(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES) + steps = list( + /datum/surgery_step/incise, + /datum/surgery_step/retract_skin, + /datum/surgery_step/saw, + /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/incise, + /datum/surgery_step/graft_synthtissue, + /datum/surgery_step/close + ) + +//repair organs +/datum/surgery_step/graft_synthtissue + name = "graft synthtissue" + implements = list(/obj/item/hemostat = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) + repeatable = TRUE + time = 75 + chems_needed = list("synthtissue") + var/obj/item/organ/chosen_organ + var/health_restored = 10 + +/datum/surgery_step/graft_synthtissue/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(implement_type in implements) + var/list/organs = target.getorganszone(target_zone) + if(!organs.len) + to_chat(user, "There are no targetable organs in [target]'s [parse_zone(target_zone)]!") + return -1 + else + for(var/obj/item/organ/O in organs) + O.on_find(user) + organs -= O + organs[O.name] = O + chosen_organ = input("Target which organ?", "Surgery", null, null) as null|anything in organs + chosen_organ = organs[chosen_organ] + if(!chosen_organ) + return -1 + if(!target.reagents.has_reagent("synthtissue")) + to_chat(user, "There's no synthtissue available for use on [chosen_organ]") + return -1 + var/datum/reagent/synthtissue/Sf = locate(/datum/reagent/synthtissue) in target.reagents.reagent_list + if(Sf.volume < 10) + to_chat(user, "There's not enough synthtissue to perform the operation! There needs to be at least 10u.") + return -1 + + if((chosen_organ.organ_flags & ORGAN_FAILING) && !(Sf.data["grown_volume"] >= 115)) + to_chat(user, "[chosen_organ] is too damaged to graft onto!") + return -1 + + if(health_restored != 10) + health_restored = 10 + health_restored += (Sf.data["grown_volume"]/10) + + user.visible_message("[user] begins to graft synthtissue onto [chosen_organ].") + target.reagents.remove_reagent("synthtissue", 10) + +/datum/surgery_step/graft_synthtissue/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] successfully repairs part of [chosen_organ].", "You succeed in repairing parts of [chosen_organ].") + chosen_organ.applyOrganDamage(health_restored) + +/datum/surgery_step/graft_synthtissue/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] accidentally damages part of [chosen_organ]!", "You damage [chosen_organ]! Apply more synthtissue if it's run out.") + chosen_organ.applyOrganDamage(10) + return FALSE diff --git a/code/modules/surgery/lobectomy.dm b/code/modules/surgery/lobectomy.dm new file mode 100644 index 0000000000..7d8b8a53e8 --- /dev/null +++ b/code/modules/surgery/lobectomy.dm @@ -0,0 +1,46 @@ +/datum/surgery/lobectomy + name = "Lobectomy" //not to be confused with lobotomy + steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/saw, /datum/surgery_step/clamp_bleeders, + /datum/surgery_step/lobectomy, /datum/surgery_step/close) + possible_locs = list(BODY_ZONE_CHEST) + +/datum/surgery/lobectomy/can_start(mob/user, mob/living/carbon/target) + var/obj/item/organ/lungs/L = target.getorganslot(ORGAN_SLOT_LUNGS) + if(L) + if(L.damage > 60 && !L.operated) + return TRUE + return FALSE + + +//lobectomy, removes the most damaged lung lobe with a 95% base success chance +/datum/surgery_step/lobectomy + name = "excise damaged lung node" + implements = list(/obj/item/scalpel = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45, + /obj/item/shard = 35) + time = 42 + +/datum/surgery_step/lobectomy/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + display_results(user, target, "You begin to make an incision in [target]'s lungs...", + "[user] begins to make an incision in [target].", + "[user] begins to make an incision in [target].") + +/datum/surgery_step/lobectomy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + var/obj/item/organ/lungs/L = H.getorganslot(ORGAN_SLOT_LUNGS) + L.operated = TRUE + H.setOrganLoss(ORGAN_SLOT_LUNGS, 60) + display_results(user, target, "You successfully excise [H]'s most damaged lobe.", + "Successfully removes a piece of [H]'s lungs.", + "") + return TRUE + +/datum/surgery_step/lobectomy/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + display_results(user, target, "You screw up, failing to excise [H]'s damaged lobe!", + "[user] screws up!", + "[user] screws up!") + H.losebreath += 4 + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, 10) + return FALSE \ No newline at end of file diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index 34a7e16ebf..1f3f2fff5b 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -3,7 +3,21 @@ icon_state = "appendix" zone = BODY_ZONE_PRECISE_GROIN slot = ORGAN_SLOT_APPENDIX - var/inflamed = 0 + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY + + now_failing = "An explosion of pain erupts in your lower right abdomen!" + now_fixed = "The pain in your abdomen has subsided." + + var/inflamed + +/obj/item/organ/appendix/on_life() + ..() + if(!(organ_flags & ORGAN_FAILING)) + return + var/mob/living/carbon/M = owner + if(M) + M.adjustToxLoss(4, TRUE, TRUE) //forced to ensure people don't use it to gain tox as slime person /obj/item/organ/appendix/update_icon() if(inflamed) @@ -16,7 +30,7 @@ /obj/item/organ/appendix/Remove(mob/living/carbon/M, special = 0) for(var/datum/disease/appendicitis/A in M.diseases) A.cure() - inflamed = 1 + inflamed = TRUE update_icon() ..() diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 2489aa0705..e42fc91d47 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -121,7 +121,7 @@ playsound(get_turf(owner), 'sound/mecha/mechmove03.ogg', 50, 1) /obj/item/organ/cyberimp/arm/ui_action_click() - if(crit_fail || (!holder && !contents.len)) + if(crit_fail || (organ_flags & ORGAN_FAILING) || (!holder && !contents.len)) to_chat(owner, "The implant doesn't respond. It seems to be broken...") return @@ -145,7 +145,7 @@ . = ..() if(. & EMP_PROTECT_SELF) return - if(prob(30/severity) && owner && !crit_fail) + if(prob(30/severity) && owner && !(organ_flags & ORGAN_FAILING)) Retract() owner.visible_message("A loud bang comes from [owner]\'s [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm!") playsound(get_turf(owner), 'sound/weapons/flashbang.ogg', 100, 1) @@ -154,6 +154,7 @@ owner.IgniteMob() owner.adjustFireLoss(25) crit_fail = 1 + organ_flags |= ORGAN_FAILING /obj/item/organ/cyberimp/arm/gun/laser diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index ea336bea19..7156b8180b 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -144,7 +144,7 @@ /obj/item/organ/cyberimp/chest/thrusters/proc/toggle(silent = FALSE) if(!on) - if(crit_fail) + if(crit_fail || (organ_flags & ORGAN_FAILING)) if(!silent) to_chat(owner, "Your thrusters set seems to be broken!") return 0 diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 06d523721d..114b92f10d 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -4,6 +4,7 @@ name = "cybernetic implant" desc = "A state-of-the-art implant that improves a baseline's functionality." status = ORGAN_ROBOTIC + organ_flags = ORGAN_SYNTHETIC var/implant_color = "#FFFFFF" var/implant_overlay var/syndicate_implant = FALSE //Makes the implant invisible to health analyzers and medical HUDs. @@ -102,7 +103,7 @@ /obj/item/organ/cyberimp/brain/anti_stun/on_life() ..() - if(crit_fail) + if(crit_fail || !(organ_flags & ORGAN_FAILING)) return owner.adjustStaminaLoss(-3.5) //Citadel edit, makes it more useful in Stamina based combat if(owner.AmountStun() > STUN_SET_AMOUNT) @@ -112,13 +113,15 @@ /obj/item/organ/cyberimp/brain/anti_stun/emp_act(severity) . = ..() - if(crit_fail || . & EMP_PROTECT_SELF) + if(crit_fail || (organ_flags & ORGAN_FAILING) || . & EMP_PROTECT_SELF) return crit_fail = TRUE + organ_flags |= ORGAN_FAILING addtimer(CALLBACK(src, .proc/reboot), 90 / severity) /obj/item/organ/cyberimp/brain/anti_stun/proc/reboot() crit_fail = FALSE + organ_flags &= ~ORGAN_FAILING //[[[[MOUTH]]]] diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index 8e191a41a9..0d3002915e 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -6,6 +6,14 @@ slot = ORGAN_SLOT_EARS gender = PLURAL + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY + + low_threshold_passed = "Your ears begin to resonate with an internal ring sometimes." + now_failing = "You are unable to hear at all!" + now_fixed = "Noise slowly begins filling your ears once more." + low_threshold_cleared = "The ringing in your ears has died down." + // `deaf` measures "ticks" of deafness. While > 0, the person is unable // to hear anything. var/deaf = 0 @@ -23,17 +31,26 @@ /obj/item/organ/ears/on_life() if(!iscarbon(owner)) return + ..() var/mob/living/carbon/C = owner + if((damage < maxHealth) && (organ_flags & ORGAN_FAILING)) //ear damage can be repaired from the failing condition + organ_flags &= ~ORGAN_FAILING // genetic deafness prevents the body from using the ears, even if healthy if(HAS_TRAIT(C, TRAIT_DEAF)) deaf = max(deaf, 1) - else if(ear_damage < UNHEALING_EAR_DAMAGE) // if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs. - ear_damage = max(ear_damage - 0.05, 0) + else if(!(organ_flags & ORGAN_FAILING)) // if this organ is failing, do not clear deaf stacks. deaf = max(deaf - 1, 0) + if(prob(damage / 20) && (damage > low_threshold)) + adjustEarDamage(0, 4) + SEND_SOUND(C, sound('sound/weapons/flash_ring.ogg')) + to_chat(C, "The ringing in your ears grows louder, blocking out any external noises for a moment.") + else if((organ_flags & ORGAN_FAILING) && (deaf == 0)) + deaf = 1 //stop being not deaf you deaf idiot /obj/item/organ/ears/proc/restoreEars() deaf = 0 ear_damage = 0 + organ_flags &= ~ORGAN_FAILING var/mob/living/carbon/C = owner @@ -99,4 +116,23 @@ name = "tin ears" desc = "The robust ears of a bronze golem. " damage_multiplier = 0.1 //STRONK - bang_protect = 1 //Fear me weaklings. + bang_protect = 1 //Fear me weaklings. + +/obj/item/organ/ears/cybernetic + name = "cybernetic ears" + icon_state = "ears-c" + desc = "a basic cybernetic designed to mimic the operation of ears." + damage_multiplier = 0.9 + organ_flags = ORGAN_SYNTHETIC + +/obj/item/organ/ears/cybernetic/upgraded + name = "upgraded cybernetic ears" + icon_state = "ears-c-u" + desc = "an advanced cybernetic ear, surpassing the performance of organic ears" + damage_multiplier = 0.5 + +/obj/item/organ/ears/cybernetic/emp_act(severity) + . = ..() + if(. & EMP_PROTECT_SELF) + return + damage += 40/severity diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 40d11ca2a4..cb890082cd 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -6,6 +6,19 @@ slot = ORGAN_SLOT_EYES gender = PLURAL + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY + maxHealth = 0.5 * STANDARD_ORGAN_THRESHOLD //half the normal health max since we go blind at 30, a permanent blindness at 50 therefore makes sense unless medicine is administered + high_threshold = 0.3 * STANDARD_ORGAN_THRESHOLD //threshold at 30 + low_threshold = 0.15 * STANDARD_ORGAN_THRESHOLD //threshold at 15 + + low_threshold_passed = "Distant objects become somewhat less tangible." + high_threshold_passed = "Everything starts to look a lot less clear." + now_failing = "Darkness envelopes you, as your eyes go blind!" + now_fixed = "Color and shapes are once again perceivable." + high_threshold_cleared = "Your vision functions passably once more." + low_threshold_cleared = "Your vision is cleared of any ailment." + var/sight_flags = 0 var/see_in_dark = 2 var/eye_damage = 0 @@ -15,9 +28,12 @@ var/flash_protect = 0 var/see_invisible = SEE_INVISIBLE_LIVING var/lighting_alpha + var/damaged = FALSE //damaged indicates that our eyes are undergoing some level of negative effect /obj/item/organ/eyes/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = FALSE) ..() + if(damage == initial(damage)) + clear_eye_trauma() if(ishuman(owner)) var/mob/living/carbon/human/HMN = owner old_eye_color = HMN.eye_color @@ -32,7 +48,9 @@ M.update_tint() owner.update_sight() + /obj/item/organ/eyes/Remove(mob/living/carbon/M, special = 0) + clear_eye_trauma() ..() if(ishuman(M) && eye_color) var/mob/living/carbon/human/HMN = M @@ -41,6 +59,34 @@ M.update_tint() M.update_sight() +/obj/item/organ/eyes/on_life() + ..() + var/mob/living/carbon/C = owner + //since we can repair fully damaged eyes, check if healing has occurred + if((organ_flags & ORGAN_FAILING) && (damage < maxHealth)) + organ_flags &= ~ORGAN_FAILING + C.cure_blind(EYE_DAMAGE) + //various degrees of "oh fuck my eyes", from "point a laser at your eye" to "staring at the Sun" intensities + if(damage > 20) + damaged = TRUE + if(organ_flags & ORGAN_FAILING) + C.become_blind(EYE_DAMAGE) + else if(damage > 30) + C.overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2) + else + C.overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1) + //called once since we don't want to keep clearing the screen of eye damage for people who are below 20 damage + else if(damaged) + damaged = FALSE + C.clear_fullscreen("eye_damage") + return + +/obj/item/organ/eyes/proc/clear_eye_trauma() + var/mob/living/carbon/C = owner + C.clear_fullscreen("eye_damage") + C.cure_blind(EYE_DAMAGE) + damaged = FALSE + /obj/item/organ/eyes/night_vision name = "shadow eyes" desc = "A spooky set of eyes that can see in the dark." @@ -88,15 +134,17 @@ icon_state = "cybernetic_eyeballs" desc = "Your vision is augmented." status = ORGAN_ROBOTIC + organ_flags = ORGAN_SYNTHETIC /obj/item/organ/eyes/robotic/emp_act(severity) . = ..() if(!owner || . & EMP_PROTECT_SELF) return - if(prob(10 * severity)) - return to_chat(owner, "Static obfuscates your vision!") owner.flash_act(visual = 1) + if(severity == EMP_HEAVY) + owner.adjustOrganLoss(ORGAN_SLOT_EYES, 20) + /obj/item/organ/eyes/robotic/xray name = "\improper X-ray eyes" @@ -137,7 +185,7 @@ M.become_blind("flashlight_eyes") -/obj/item/organ/eyes/robotic/flashlight/Remove(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/eyes/robotic/flashlight/Remove(var/mob/living/carbon/M, special = FALSE) eye.on = FALSE eye.update_brightness(M) eye.forceMove(src) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 5852cba0c9..5fea801ba0 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -4,12 +4,24 @@ icon_state = "heart-on" zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_HEART + + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = 4 * STANDARD_ORGAN_DECAY //designed to fail about 5 minutes after death + + low_threshold_passed = "Prickles of pain appear then die out from within your chest..." + high_threshold_passed = "Something inside your chest hurts, and the pain isn't subsiding. You notice yourself breathing far faster than before." + now_fixed = "Your heart begins to beat again." + high_threshold_cleared = "The pain in your chest has died down, and your breathing becomes more relaxed." + // Heart attack code is in code/modules/mob/living/carbon/human/life.dm var/beating = 1 var/icon_base = "heart" attack_verb = list("beat", "thumped") var/beat = BEAT_NONE//is this mob having a heatbeat sound played? if so, which? + var/failed = FALSE //to prevent constantly running failing code + var/operated = FALSE //whether the heart's been operated on to fix some of its damages + /obj/item/organ/heart/update_icon() if(beating) icon_state = "[icon_base]-on" @@ -50,6 +62,7 @@ /obj/item/organ/heart/on_life() if(owner.client && beating) + failed = FALSE var/sound/slowbeat = sound('sound/health/slowbeat.ogg', repeat = TRUE) var/sound/fastbeat = sound('sound/health/fastbeat.ogg', repeat = TRUE) var/mob/living/carbon/H = owner @@ -70,11 +83,18 @@ H.stop_sound_channel(CHANNEL_HEARTBEAT) beat = BEAT_NONE + if(organ_flags & ORGAN_FAILING) //heart broke, stopped beating, death imminent + if(owner.stat == CONSCIOUS) + owner.visible_message("[owner] clutches at [owner.p_their()] chest as if [owner.p_their()] heart is stopping!") + owner.set_heartattack(TRUE) + failed = TRUE + /obj/item/organ/heart/cursed name = "cursed heart" desc = "A heart that, when inserted, will force you to pump it manually." icon_state = "cursedheart-off" icon_base = "cursedheart" + decay_factor = 0 actions_types = list(/datum/action/item_action/organ_action/cursed_heart) var/last_pump = 0 var/add_colour = TRUE //So we're not constantly recreating colour datums @@ -153,18 +173,48 @@ name = "cybernetic heart" desc = "An electronic device designed to mimic the functions of an organic human heart. Offers no benefit over an organic heart other than being easy to make." icon_state = "heart-c" - synthetic = TRUE + organ_flags = ORGAN_SYNTHETIC -/obj/item/organ/heart/cybernetic/emp_act() +/obj/item/organ/heart/cybernetic/emp_act(severity) . = ..() if(. & EMP_PROTECT_SELF) return Stop() + addtimer(CALLBACK(src, .proc/Restart), 20/severity SECONDS) + damage += 100/severity + +/obj/item/organ/heart/cybernetic/upgraded + name = "upgraded cybernetic heart" + desc = "An electronic device designed to mimic the functions of an organic human heart. Also holds an emergency dose of epinephrine, used automatically after facing severe trauma. This upgraded model can regenerate its dose after use." + icon_state = "heart-c-u" + maxHealth = 2 * STANDARD_ORGAN_THRESHOLD + + //I put it on upgraded for now. + var/dose_available = TRUE + var/rid = /datum/reagent/medicine/epinephrine + var/ramount = 10 + +obj/item/organ/heart/cybernetic/upgraded/on_life() + . = ..() + if(dose_available && owner.health <= owner.crit_threshold && !owner.reagents.has_reagent(rid)) + owner.reagents.add_reagent(rid, ramount) + used_dose() + if(ramount < 10) //eats your nutrition to regen epinephrine + var/regen_amount = owner.nutrition/2000 + owner.nutrition -= regen_amount + ramount += regen_amount + +/obj/item/organ/heart/cybernetic/upgraded/proc/used_dose() + . = ..() + addtimer(VARSET_CALLBACK(src, dose_available, TRUE), 5 MINUTES) + ramount = 0 + + /obj/item/organ/heart/freedom name = "heart of freedom" desc = "This heart pumps with the passion to give... something freedom." - synthetic = TRUE //the power of freedom prevents heart attacks + organ_flags = ORGAN_SYNTHETIC //the power of freedom prevents heart attacks var/min_next_adrenaline = 0 /obj/item/organ/heart/freedom/on_life() diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index 94973a8e10..01559c83c3 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -10,10 +10,13 @@ zone = BODY_ZONE_CHEST slot = ORGAN_SLOT_LIVER desc = "Pairing suggestion: chianti and fava beans." - var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure + + maxHealth = STANDARD_ORGAN_THRESHOLD + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY + var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol var/failing //is this liver failing? - var/maxHealth = LIVER_DEFAULT_HEALTH var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver var/filterToxins = TRUE //whether to filter toxins @@ -24,7 +27,7 @@ var/mob/living/carbon/C = owner if(istype(C)) - if(!failing)//can't process reagents with a failing liver + if(!(organ_flags & ORGAN_FAILING))//can't process reagents with a failing liver //slowly heal liver damage damage = max(0, damage - 0.1) @@ -69,7 +72,7 @@ if(moveCalc == cachedmoveCalc)//reduce calculations return if(prob(5)) - to_chat(owner, "You feel a stange ache in your side, almost like a sitch. This pain is affecting your movements and making you feel lightheaded.") + to_chat(owner, "You feel a stange ache in your side, almost like a stitch. This pain is affecting your movements and making you feel lightheaded.") var/mob/living/carbon/human/H = owner H.add_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY, TRUE, 100, NONE, override = TRUE, multiplicative_slowdown = moveCalc) H.AdjustBloodVol(moveCalc/3) @@ -97,14 +100,15 @@ name = "cybernetic liver" icon_state = "liver-c" desc = "An electronic device designed to mimic the functions of a human liver. It has no benefits over an organic liver, but is easy to produce." - synthetic = TRUE + organ_flags = ORGAN_SYNTHETIC + maxHealth = 1.1 * STANDARD_ORGAN_THRESHOLD /obj/item/organ/liver/cybernetic/upgraded name = "upgraded cybernetic liver" icon_state = "liver-c-u" desc = "An upgraded version of the cybernetic liver, designed to improve upon organic livers. It is resistant to alcohol poisoning and is very robust at filtering toxins." alcohol_tolerance = 0.001 - maxHealth = 200 //double the health of a normal liver + maxHealth = 2 * STANDARD_ORGAN_THRESHOLD toxTolerance = 15 //can shrug off up to 15u of toxins toxLethality = 0.008 //20% less damage than a normal liver diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index cfbb530e69..f3eaba1a1b 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -8,6 +8,19 @@ gender = PLURAL w_class = WEIGHT_CLASS_NORMAL + var/failed = FALSE + var/operated = FALSE //whether we can still have our damages fixed through surgery + + //health + maxHealth = LUNGS_MAX_HEALTH + + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY + + high_threshold_passed = "You feel some sort of constriction around your chest as your breathing becomes shallow and rapid." + now_fixed = "Your lungs seem to once again be able to hold air." + high_threshold_cleared = "The constriction around your chest loosens as your breathing calms down." + //Breath damage var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa @@ -56,36 +69,35 @@ var/crit_stabilizing_reagent = "epinephrine" - //health - var/maxHealth = LUNGS_MAX_HEALTH - var/damage = 0 + //TODO: lung health affects lung function -/obj/item/organ/lungs/proc/adjustLungLoss(damage_mod, mob/living/carbon/M) //damage might be too low atm. +/obj/item/organ/lungs/onDamage(damage_mod) //damage might be too low atm. + var/cached_damage = damage if (maxHealth == INFINITY) return - if(damage+damage_mod < 0) - damage = 0 + if(cached_damage+damage_mod < 0) + cached_damage = 0 return - damage += damage_mod - if ((damage / maxHealth) > 1) - to_chat(M, "You feel your lungs collapse within your chest as you gasp for air, unable to inflate them anymore!") - M.emote("gasp") + cached_damage += damage_mod + if ((cached_damage/ maxHealth) > 1) + to_chat(owner, "You feel your lungs collapse within your chest as you gasp for air, unable to inflate them anymore!") + owner.emote("gasp") SSblackbox.record_feedback("tally", "fermi_chem", 1, "Lungs lost") - qdel(src) - else if ((damage / maxHealth) > 0.75) - to_chat(M, "It's getting really hard to breathe!!") - M.emote("gasp") - M.Dizzy(3) - else if ((damage / maxHealth) > 0.5) - M.Dizzy(2) - to_chat(M, "Your chest is really starting to hurt.") - M.emote("cough") - else if ((damage / maxHealth) > 0.2) - to_chat(M, "You feel an ache within your chest.") - M.emote("cough") - M.Dizzy(1) + //qdel(src) - Handled elsewhere for now. + else if ((cached_damage / maxHealth) > 0.75) + to_chat(owner, "It's getting really hard to breathe!!") + owner.emote("gasp") + owner.Dizzy(3) + else if ((cached_damage / maxHealth) > 0.5) + owner.Dizzy(2) + to_chat(owner, "Your chest is really starting to hurt.") + owner.emote("cough") + else if ((cached_damage / maxHealth) > 0.2) + to_chat(owner, "You feel an ache within your chest.") + owner.emote("cough") + owner.Dizzy(1) /obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) //TODO: add lung damage = less oxygen gains @@ -289,7 +301,7 @@ H.hallucination += 10 H.reagents.add_reagent("bz_metabolites",5) if(prob(33)) - H.adjustBrainLoss(3, 150) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3, 150) else if(bz_pp > 0.01) H.hallucination += 5 @@ -405,13 +417,13 @@ var/cold_modifier = H.dna.species.coldmod if(breath_temperature < cold_level_3_threshold) H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type) - adjustLungLoss((cold_level_3_damage*cold_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_3_damage*cold_modifier*2)) if(breath_temperature > cold_level_3_threshold && breath_temperature < cold_level_2_threshold) H.apply_damage_type(cold_level_2_damage*cold_modifier, cold_damage_type) - adjustLungLoss((cold_level_2_damage*cold_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_2_damage*cold_modifier*2)) if(breath_temperature > cold_level_2_threshold && breath_temperature < cold_level_1_threshold) H.apply_damage_type(cold_level_1_damage*cold_modifier, cold_damage_type) - adjustLungLoss((cold_level_1_damage*cold_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (cold_level_1_damage*cold_modifier*2)) if(breath_temperature < cold_level_1_threshold) if(prob(20)) to_chat(H, "You feel [cold_message] in your [name]!") @@ -420,17 +432,29 @@ var/heat_modifier = H.dna.species.heatmod if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold) H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type) - adjustLungLoss((heat_level_1_damage*heat_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_1_damage*heat_modifier*2)) if(breath_temperature > heat_level_2_threshold && breath_temperature < heat_level_3_threshold) H.apply_damage_type(heat_level_2_damage*heat_modifier, heat_damage_type) - adjustLungLoss((heat_level_2_damage*heat_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_2_damage*heat_modifier*2)) if(breath_temperature > heat_level_3_threshold) H.apply_damage_type(heat_level_3_damage*heat_modifier, heat_damage_type) - adjustLungLoss((heat_level_3_damage*heat_modifier*2), H) + H.adjustOrganLoss(ORGAN_SLOT_LUNGS, (heat_level_3_damage*heat_modifier*2)) if(breath_temperature > heat_level_1_threshold) if(prob(20)) to_chat(H, "You feel [hot_message] in your [name]!") + +/obj/item/organ/lungs/on_life() + ..() + if((!failed) && ((organ_flags & ORGAN_FAILING))) + if(owner.stat == CONSCIOUS) + owner.visible_message("[owner] grabs [owner.p_their()] throat, struggling for breath!", \ + "You suddenly feel like you can't breathe!") + failed = TRUE + else if(!(organ_flags & ORGAN_FAILING)) + failed = FALSE + return + /obj/item/organ/lungs/prepare_eat() var/obj/S = ..() S.reagents.add_reagent("salbutamol", 5) @@ -451,14 +475,16 @@ name = "cybernetic lungs" desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement." icon_state = "lungs-c" - synthetic = TRUE + organ_flags = ORGAN_SYNTHETIC maxHealth = 400 + safe_oxygen_min = 13 /obj/item/organ/lungs/cybernetic/emp_act() . = ..() if(. & EMP_PROTECT_SELF) return owner.losebreath = 20 + owner.adjustOrganLoss(ORGAN_SLOT_LUNGS, 25) /obj/item/organ/lungs/cybernetic/upgraded @@ -495,8 +521,24 @@ safe_toxins_max = 0 //We breathe this to gain POWER. + cold_level_1_threshold = 285 // Remember when slimes used to be succeptable to cold? Well.... + cold_level_2_threshold = 260 + cold_level_3_threshold = 230 + + maxHealth = 250 + /obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) . = ..() if (breath && breath.gases[/datum/gas/plasma]) var/plasma_pp = breath.get_breath_partial_pressure(breath.gases[/datum/gas/plasma]) owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you. + +/obj/item/organ/lungs/yamerol + name = "Yamerol lungs" + desc = "A temporary pair of lungs made from self assembling yamerol molecules." + maxHealth = 200 + color = "#68e83a" + +/obj/item/organ/lungs/yamerol/on_life() + ..() + damage += 2 //Yamerol lungs are temporary diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 9f910de9a9..a17d4906bf 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -1,3 +1,6 @@ +#define STANDARD_ORGAN_THRESHOLD 100 +#define STANDARD_ORGAN_HEALING 0.001 + /obj/item/organ name = "organ" icon = 'icons/obj/surgery.dmi' @@ -8,11 +11,23 @@ var/zone = BODY_ZONE_CHEST var/slot // DO NOT add slots with matching names to different zones - it will break internal_organs_slot list! - var/vital = 0 - //Was this organ implanted/inserted/etc, if true will not be removed during species change. - var/external = FALSE - var/synthetic = FALSE // To distinguish between organic and synthetic organs + var/organ_flags = 0 + var/maxHealth = STANDARD_ORGAN_THRESHOLD + var/damage = 0 //total damage this organ has sustained + ///Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick + var/healing_factor = 0 //fraction of maxhealth healed per on_life(), set to 0 for generic organs + var/decay_factor = 0 //same as above but when without a living owner, set to 0 for generic organs + var/high_threshold = STANDARD_ORGAN_THRESHOLD * 0.45 //when severe organ damage occurs + var/low_threshold = STANDARD_ORGAN_THRESHOLD * 0.1 //when minor organ damage occurs + ///Organ variables for determining what we alert the owner with when they pass/clear the damage thresholds + var/prev_damage = 0 + var/low_threshold_passed + var/high_threshold_passed + var/now_failing + var/now_fixed + var/high_threshold_cleared + var/low_threshold_cleared /obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE) if(!iscarbon(M) || owner == M) @@ -33,31 +48,53 @@ for(var/X in actions) var/datum/action/A = X A.Grant(M) + STOP_PROCESSING(SSobj, src) //Special is for instant replacement like autosurgeons -/obj/item/organ/proc/Remove(mob/living/carbon/M, special = 0) +/obj/item/organ/proc/Remove(mob/living/carbon/M, special = FALSE) owner = null if(M) M.internal_organs -= src if(M.internal_organs_slot[slot] == src) M.internal_organs_slot.Remove(slot) - if(vital && !special && !(M.status_flags & GODMODE)) + if((organ_flags & ORGAN_VITAL) && !special && !(M.status_flags & GODMODE)) M.death() for(var/X in actions) var/datum/action/A = X A.Remove(M) + START_PROCESSING(SSobj, src) /obj/item/organ/proc/on_find(mob/living/finder) return -/obj/item/organ/proc/on_life() - return +/obj/item/organ/process() + on_death() //Kinda hate doing it like this, but I really don't want to call process directly. + +/obj/item/organ/proc/on_death() //runs decay when outside of a person + if(organ_flags & (ORGAN_SYNTHETIC | ORGAN_FROZEN | ORGAN_NO_SPOIL)) + return + applyOrganDamage(maxHealth * decay_factor) + +/obj/item/organ/proc/on_life() //repair organ damage if the organ is not failing + if(!(organ_flags & ORGAN_FAILING)) + ///Damage decrements by a percent of its maxhealth + var/healing_amount = -(maxHealth * healing_factor) + ///Damage decrements again by a percent of its maxhealth, up to a total of 4 extra times depending on the owner's health + healing_amount -= owner.satiety > 0 ? 4 * healing_factor * owner.satiety / MAX_SATIETY : 0 + applyOrganDamage(healing_amount) //to FERMI_TWEAK + //Make it so each threshold is stuck. /obj/item/organ/examine(mob/user) - ..() - if(status == ORGAN_ROBOTIC && crit_fail) - to_chat(user, "[src] seems to be broken!") + . = ..() + if(!organ_flags & ORGAN_FAILING) + if(status == ORGAN_ROBOTIC) + . += "[src] seems to be broken!" + return + . += "[src] has decayed for too long, and has turned a sickly color! It doesn't look like it will work anymore!" + return + if(damage > high_threshold) + . += "[src] is starting to look discolored." /obj/item/organ/proc/prepare_eat() @@ -78,6 +115,10 @@ foodtype = RAW | MEAT | GROSS +/obj/item/organ/Initialize() + . = ..() + START_PROCESSING(SSobj, src) + /obj/item/organ/Destroy() if(owner) // The special flag is important, because otherwise mobs can die @@ -100,13 +141,64 @@ /obj/item/organ/item_action_slot_check(slot,mob/user) return //so we don't grant the organ's action to mobs who pick up the organ. +///Adjusts an organ's damage by the amount "d", up to a maximum amount, which is by default max damage +/obj/item/organ/proc/applyOrganDamage(var/d, var/maximum = maxHealth) //use for damaging effects + if(!d) //Micro-optimization. + return + if(maximum < damage) + return + damage = CLAMP(damage + d, 0, maximum) + var/mess = check_damage_thresholds(owner) + prev_damage = damage + if(mess && owner) + to_chat(owner, mess) + +///SETS an organ's damage to the amount "d", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken +/obj/item/organ/proc/setOrganDamage(var/d) //use mostly for admin heals + applyOrganDamage(d - damage) + +/** check_damage_thresholds + * input: M (a mob, the owner of the organ we call the proc on) + * output: returns a message should get displayed. + * description: By checking our current damage against our previous damage, we can decide whether we've passed an organ threshold. + * If we have, send the corresponding threshold message to the owner, if such a message exists. + */ +/obj/item/organ/proc/check_damage_thresholds(var/M) + if(damage == prev_damage) + return + var/delta = damage - prev_damage + if(delta > 0) + if(damage >= maxHealth) + organ_flags |= ORGAN_FAILING + return now_failing + if(damage > high_threshold && prev_damage <= high_threshold) + return high_threshold_passed + if(damage > low_threshold && prev_damage <= low_threshold) + return low_threshold_passed + else + organ_flags &= ~ORGAN_FAILING + if(prev_damage > low_threshold && damage <= low_threshold) + return low_threshold_cleared + if(prev_damage > high_threshold && damage <= high_threshold) + return high_threshold_cleared + if(prev_damage == maxHealth) + return now_fixed + +//Runs some code on the organ when damage is taken/healed +/obj/item/organ/proc/onDamage(var/d, var/maximum = maxHealth) + return + +//Runs some code on the organ when damage is taken/healed +/obj/item/organ/proc/onSetDamage(var/d, var/maximum = maxHealth) + return + //Looking for brains? //Try code/modules/mob/living/carbon/brain/brain_item.dm /mob/living/proc/regenerate_organs() return 0 -/mob/living/carbon/regenerate_organs() +/mob/living/carbon/regenerate_organs(only_one = FALSE) var/breathes = TRUE var/blooded = TRUE if(dna && dna.species) @@ -125,6 +217,8 @@ else LI = new() LI.Insert(src) + if(only_one) + return TRUE if(has_stomach && !getorganslot(ORGAN_SLOT_STOMACH)) var/obj/item/organ/stomach/S @@ -134,14 +228,20 @@ else S = new() S.Insert(src) + if(only_one) + return TRUE if(breathes && !getorganslot(ORGAN_SLOT_LUNGS)) var/obj/item/organ/lungs/L = new() L.Insert(src) + if(only_one) + return TRUE if(blooded && !getorganslot(ORGAN_SLOT_HEART)) var/obj/item/organ/heart/H = new() H.Insert(src) + if(only_one) + return TRUE if(!getorganslot(ORGAN_SLOT_TONGUE)) var/obj/item/organ/tongue/T @@ -153,7 +253,10 @@ // if they have no mutant tongues, give them a regular one T.Insert(src) - else + if(only_one) + return TRUE + + else if (!only_one) var/obj/item/organ/tongue/oT = getorganslot(ORGAN_SLOT_TONGUE) if(oT.name == "fluffy tongue") var/obj/item/organ/tongue/T @@ -174,6 +277,8 @@ else E = new() E.Insert(src) + if(only_one) + return TRUE if(!getorganslot(ORGAN_SLOT_EARS)) var/obj/item/organ/ears/ears @@ -183,9 +288,13 @@ ears = new ears.Insert(src) + if(only_one) + return TRUE if(!getorganslot(ORGAN_SLOT_TAIL)) var/obj/item/organ/tail/tail if(dna && dna.species && dna.species.mutanttail) tail = new dna.species.mutanttail tail.Insert(src) + if(only_one) + return TRUE diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm index 24132bcf04..8ddaa951d8 100755 --- a/code/modules/surgery/organs/stomach.dm +++ b/code/modules/surgery/organs/stomach.dm @@ -8,12 +8,41 @@ desc = "Onaka ga suite imasu." var/disgust_metabolism = 1 -/obj/item/organ/stomach/on_life() - var/mob/living/carbon/human/H = owner + healing_factor = STANDARD_ORGAN_HEALING + decay_factor = STANDARD_ORGAN_DECAY - if(istype(H)) - H.dna.species.handle_digestion(H) + low_threshold_passed = "Your stomach flashes with pain before subsiding. Food doesn't seem like a good idea right now." + high_threshold_passed = "Your stomach flares up with constant pain- you can hardly stomach the idea of food right now!" + high_threshold_cleared = "The pain in your stomach dies down for now, but food still seems unappealing." + low_threshold_cleared = "The last bouts of pain in your stomach have died out." + +/obj/item/organ/stomach/on_life() + var/datum/reagent/consumable/nutriment/Nutri + if(ishuman(owner)) + var/mob/living/carbon/human/H = owner + if(!(organ_flags & ORGAN_FAILING)) + H.dna.species.handle_digestion(H) handle_disgust(H) + Nutri = locate(/datum/reagent/consumable/nutriment) in H.reagents.reagent_list + + if(Nutri) + if(prob((damage/40) * Nutri.volume * Nutri.volume)) + H.vomit(damage) + to_chat(H, "Your stomach reels in pain as you're incapable of holding down all that food!") + + else if(Nutri && damage > high_threshold) + if(prob((damage/10) * Nutri.volume * Nutri.volume)) + H.vomit(damage) + to_chat(H, "Your stomach reels in pain as you're incapable of holding down all that food!") + + + else if(iscarbon(owner)) + var/mob/living/carbon/C = owner + Nutri = locate(/datum/reagent/consumable/nutriment) in C.reagents.reagent_list + + if(damage < low_threshold) + return + /obj/item/organ/stomach/proc/handle_disgust(mob/living/carbon/human/H) if(H.disgust) diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 3eaaa8de92..3dd5c7b2b7 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -10,8 +10,7 @@ var/list/languages_possible var/say_mod = null var/taste_sensitivity = 15 // lower is more sensitive. - var/maxHealth = TONGUE_MAX_HEALTH - var/damage = 0 + maxHealth = TONGUE_MAX_HEALTH var/modifies_speech = FALSE var/static/list/languages_possible_base = typecacheof(list( /datum/language/common, @@ -31,27 +30,34 @@ /obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args) -/obj/item/organ/tongue/proc/adjustTongueLoss(mob/living/carbon/M, damage_mod) - if (maxHealth == "alien") - return - if (maxHealth == "bone") - var/target = M.get_bodypart(BODY_ZONE_HEAD) - M.apply_damage(damage_mod, BURN, target) - to_chat(M, "The drink burns your skull! Oof, your bones!") - return - if(damage+damage_mod < 0) - damage = 0 +/obj/item/organ/tongue/emp_act(severity) + . = ..() + if(. & EMP_PROTECT_SELF) return + if(organ_flags & ORGAN_SYNTHETIC) + var/errormessage = list("Runtime in tongue.dm, line 39: Undefined operation \"zapzap ow my tongue\"", "afhsjifksahgjkaslfhashfjsak", "-1.#IND", "Graham's number", "inside you all along", "awaiting at least 1 approving review before merging this taste request") + owner.say("The pH is appropriately [pick(errormessage)].") + +/obj/item/organ/tongue/applyOrganDamage(var/d, var/maximum = maxHealth) + + if(!d) //Micro-optimization. + return + if(maximum < damage) + return + damage = CLAMP(damage + d, 0, maximum) + var/mess = check_damage_thresholds(owner) + prev_damage = damage + if(mess && owner) + to_chat(owner, mess) - damage += damage_mod if ((damage / maxHealth) > 1) - to_chat(M, "Your tongue is singed beyond recognition, and disintegrates!") + to_chat(owner, "Your tongue is singed beyond recognition, and disintegrates!") SSblackbox.record_feedback("tally", "fermi_chem", 1, "Tongues lost to Fermi") qdel(src) else if ((damage / maxHealth) > 0.85) - to_chat(M, "Your tongue feels like it's about to fall out!.") + to_chat(owner, "Your tongue feels like it's about to fall out!.") else if ((damage / maxHealth) > 0.5) - to_chat(M, "Your tongue is really starting to hurt.") + to_chat(owner, "Your tongue is really starting to hurt.") /obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0) @@ -168,7 +174,7 @@ icon_state = "tonguexeno" say_mod = "hisses" taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED - maxHealth = "alien" //Their blood is acid, so, no, though a tongueless xeno might be funny + maxHealth = 500 //They've a little mouth for a tongue, so it's pretty rhobust modifies_speech = TRUE // not really, they just hiss var/static/list/languages_possible_alien = typecacheof(list( /datum/language/xenocommon, @@ -189,9 +195,10 @@ desc = "Apparently skeletons alter the sounds they produce through oscillation of their teeth, hence their characteristic rattling." icon_state = "tonguebone" say_mod = "rattles" + organ_flags = ORGAN_NO_SPOIL attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned") taste_sensitivity = 101 // skeletons cannot taste anything - maxHealth = "bone" //Take brute damage instead + maxHealth = 75 //Take brute damage instead modifies_speech = TRUE var/chattering = FALSE var/phomeme_type = "sans" @@ -201,6 +208,14 @@ . = ..() phomeme_type = pick(phomeme_types) +/obj/item/organ/tongue/bone/applyOrganDamage(var/d, var/maximum = maxHealth) + if(!owner) + return + var/target = owner.get_bodypart(BODY_ZONE_HEAD) + owner.apply_damage(d, BURN, target) + to_chat(owner, "You feel your skull burning! Oof, your bones!") + return + /obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args) if (chattering) chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source) @@ -262,6 +277,7 @@ icon_state = "tonguecybernetic" taste_sensitivity = 10 maxHealth = 60 //It's robotic! + organ_flags = ORGAN_SYNTHETIC /obj/item/organ/tongue/cybernetic/handle_speech(datum/source, list/speech_args) speech_args[SPEECH_SPANS] |= SPAN_ROBOT @@ -271,3 +287,4 @@ say_mod = "beeps" desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms." electronics_magic = FALSE + organ_flags = ORGAN_SYNTHETIC diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 0a4631b70a..9d7695be5c 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -26,12 +26,14 @@ zone = BODY_ZONE_HEAD slot = ORGAN_SLOT_ADAMANTINE_RESONATOR icon_state = "adamantine_resonator" + decay_factor = 0 /obj/item/organ/vocal_cords/adamantine name = "adamantine vocal cords" desc = "When adamantine resonates, it causes all nearby pieces of adamantine to resonate as well. Adamantine golems use this to broadcast messages to nearby golems." actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords) icon_state = "adamantine_cords" + decay_factor = 0 /datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger() if(!IsAvailable()) @@ -62,6 +64,7 @@ var/cooldown_mod = 1 var/base_multiplier = 1 spans = list("colossus","yell") + decay_factor = 0 /datum/action/item_action/organ_action/colossus name = "Voice of God" @@ -623,10 +626,6 @@ /datum/action/item_action/organ_action/velvet name = "Velvet chords" var/obj/item/organ/vocal_cords/velvet/cords = null - //icon_icon = 'icons/mob/screen_alert.dmi' - //button_icon_state = "velvet_chords" - //icon = 'icons/mob/screen_alert.dmi' - //icon_state = "in_love" /datum/action/item_action/organ_action/velvet/New() ..() @@ -991,7 +990,7 @@ if (HAS_TRAIT(H, TRAIT_DEAF))//How the heck you managed to get here I have no idea, but just in case! speaktrigger += "I can barely hear you! " //And the brain damage. And the brain damage. And the brain damage. And the brain damage. And the brain damage. - switch(H.getBrainLoss()) + switch(H.getOrganLoss(ORGAN_SLOT_BRAIN)) if(20 to 40) speaktrigger += "I have a mild head ache, " if(40 to 80) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 09e955d2f9..23b4581600 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -75,6 +75,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) var/player_minimum //The minimum crew size needed for this item to be added to uplinks. var/purchase_log_vis = TRUE // Visible in the purchase log? var/restricted = FALSE // Adds restrictions for VR/Events + var/illegal_tech = TRUE // Can this item be deconstructed to unlock certain techweb research nodes? /datum/uplink_item/New() . = ..() @@ -769,6 +770,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes item = /obj/item/ammo_box/a357 cost = 4 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) + illegal_tech = FALSE /datum/uplink_item/ammo/a40mm name = "40mm Grenade" @@ -898,6 +900,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes item = /obj/item/ammo_box/foambox/riot cost = 2 surplus = 0 + illegal_tech = FALSE /datum/uplink_item/ammo/bioterror name = "Box of Bioterror Syringes" @@ -1926,6 +1929,7 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes item = /obj/item/toy/syndicateballoon cost = 20 cant_discount = TRUE + illegal_tech = FALSE /datum/uplink_item/badass/syndiecash name = "Syndicate Briefcase Full of Cash" @@ -1949,9 +1953,11 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes item = /obj/item/toy/cards/deck/syndicate cost = 1 surplus = 40 + illegal_tech = FALSE /datum/uplink_item/badass/syndiecigs name = "Syndicate Smokes" desc = "Strong flavor, dense smoke, infused with omnizine." item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate cost = 2 + illegal_tech = FALSE diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm index 9af5b13a7d..8c21b050aa 100644 --- a/code/modules/vehicles/scooter.dm +++ b/code/modules/vehicles/scooter.dm @@ -75,7 +75,7 @@ H.adjustStaminaLoss(40) var/head_slot = H.get_item_by_slot(SLOT_HEAD) if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat))) - H.adjustBrainLoss(3) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3) H.updatehealth() visible_message("[src] crashes into [A], sending [H] flying!") playsound(src, 'sound/effects/bang.ogg', 50, 1) @@ -201,7 +201,7 @@ H.adjustStaminaLoss(10) var/head_slot = H.get_item_by_slot(SLOT_HEAD) if(!head_slot || !(istype(head_slot,/obj/item/clothing/head/helmet) || istype(head_slot,/obj/item/clothing/head/hardhat))) - H.adjustBrainLoss(1) + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) H.updatehealth() visible_message("[src] crashes into [A], sending [H] flying!") playsound(src, 'sound/effects/bang.ogg', 50, 1) diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index ae53f29a55..0f6ef14cd1 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -73,5 +73,5 @@ user.adjustFireLoss(-hp_gained, 0) user.adjustCloneLoss(-hp_gained, 0) user.updatehealth() - user.adjustBrainLoss(-hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!" + user.adjustOrganLoss(ORGAN_SLOT_BRAIN, -hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!" user.nutrition = min(user.nutrition + hp_gained, NUTRITION_LEVEL_FULL) diff --git a/config/config.txt b/config/config.txt index a01f5424da..c75cd6dc1b 100644 --- a/config/config.txt +++ b/config/config.txt @@ -146,6 +146,9 @@ LOG_MANIFEST ## Enable logging pictures # LOG_PICTURES +## log virus and actions +LOG_VIRUS + ##Log camera pictures - Must have picture logging enabled PICTURE_LOGGING_CAMERA diff --git a/html/changelogs/AutoChangeLog-pr-8937.yml b/html/changelogs/AutoChangeLog-pr-8937.yml new file mode 100644 index 0000000000..20302e4c49 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-8937.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - rscadd: "sort of overhauled darkmode/lightmode to /vg/station's, also reincluding the pre-existing black'n'white theme." + - bugfix: "Fixed LOOC color, fixed .userlove and .love span classes being a bit too blurry on dark mode." diff --git a/html/changelogs/AutoChangeLog-pr-9032.yml b/html/changelogs/AutoChangeLog-pr-9032.yml new file mode 100644 index 0000000000..53adfa0920 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9032.yml @@ -0,0 +1,7 @@ +author: "Ghommie (original PRs by subject217, AarontheIdiot, pireamaineach, Gousaid67 and SouDescolado)" +delete-after: True +changes: + - balance: "Removed plasmamen species speedmod in favor of a slowdown for envirosuits." + - rscadd: "Nanotrasen has began deploying departementalized enviro plasmasuits to the station! plasmamens can now benefit from some of the bonuses aswell as the color pattern of their job, while allowing others to easily determine their profession!" + - bugfix: "Benevolent Nanotrasen makes gulag available for everyone! (Plasmamen retain their equipment and don't die.)" + - rscdel: "Removes code that theoretically limits plasmamen from being clowns and mimes, but actually doesn't." diff --git a/html/changelogs/AutoChangeLog-pr-9226.yml b/html/changelogs/AutoChangeLog-pr-9226.yml new file mode 100644 index 0000000000..17bafbf36b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9226.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - code_imp: "removes some cit-modular things" diff --git a/html/changelogs/AutoChangeLog-pr-9287.yml b/html/changelogs/AutoChangeLog-pr-9287.yml new file mode 100644 index 0000000000..3bf2844b41 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9287.yml @@ -0,0 +1,4 @@ +author: "Fermis" +delete-after: True +changes: + - rscadd: "Debug option: Generate Wikichems" diff --git a/html/changelogs/AutoChangeLog-pr-9309.yml b/html/changelogs/AutoChangeLog-pr-9309.yml new file mode 100644 index 0000000000..b3aef0372b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9309.yml @@ -0,0 +1,6 @@ +author: "Fermis" +delete-after: True +changes: + - rscadd: "graft synthtissue surgery, new reagent synthtissue" + - tweak: "neurine fixes brain objs +merge: combines fermichem's lung damage with tg's" diff --git a/html/changelogs/AutoChangeLog-pr-9314.yml b/html/changelogs/AutoChangeLog-pr-9314.yml new file mode 100644 index 0000000000..317fb48592 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9314.yml @@ -0,0 +1,4 @@ +author: "Trilbyspaceclone" +delete-after: True +changes: + - tweak: "blood costs" diff --git a/html/changelogs/AutoChangeLog-pr-9316.yml b/html/changelogs/AutoChangeLog-pr-9316.yml new file mode 100644 index 0000000000..f4074bcee8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9316.yml @@ -0,0 +1,5 @@ +author: "Fermis" +delete-after: True +changes: + - rscadd: "on_mob_dead(), bitflags and CHECK_MULTIPLE_BITFIELDS" + - refactor: "refactored fermichem vars, moved impure chems into their own reagents subtype" diff --git a/html/changelogs/AutoChangeLog-pr-9377.yml b/html/changelogs/AutoChangeLog-pr-9377.yml new file mode 100644 index 0000000000..26587eb6c6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9377.yml @@ -0,0 +1,4 @@ +author: "Fermis" +delete-after: True +changes: + - bugfix: "fixes Janitor grenades." diff --git a/html/changelogs/AutoChangeLog-pr-9379.yml b/html/changelogs/AutoChangeLog-pr-9379.yml new file mode 100644 index 0000000000..05301d3f72 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9379.yml @@ -0,0 +1,4 @@ +author: "Chayse" +delete-after: True +changes: + - tweak: "Medbay doors can now be opened by anyone from the inside without having to press the exit button." diff --git a/html/changelogs/AutoChangeLog-pr-9384.yml b/html/changelogs/AutoChangeLog-pr-9384.yml new file mode 100644 index 0000000000..a941371f1c --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9384.yml @@ -0,0 +1,4 @@ +author: "Chayse" +delete-after: True +changes: + - bugfix: "Fixes the Trek Uniform/Suit worn icons" diff --git a/html/changelogs/AutoChangeLog-pr-9389.yml b/html/changelogs/AutoChangeLog-pr-9389.yml new file mode 100644 index 0000000000..4ed6439d5b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9389.yml @@ -0,0 +1,4 @@ +author: "Weblure" +delete-after: True +changes: + - rscadd: "Added the relevant Beepsky animations from TG's aibots.dmi file to Cit's aibots.dmi file." diff --git a/html/changelogs/AutoChangeLog-pr-9391.yml b/html/changelogs/AutoChangeLog-pr-9391.yml new file mode 100644 index 0000000000..1b4525f717 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9391.yml @@ -0,0 +1,4 @@ +author: "GrayRachnid" +delete-after: True +changes: + - balance: "rebalanced k9dogborgs" diff --git a/html/changelogs/AutoChangeLog-pr-9404.yml b/html/changelogs/AutoChangeLog-pr-9404.yml new file mode 100644 index 0000000000..635b2f8aaf --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9404.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - bugfix: "QM is able to hire/fire people to their department now." diff --git a/html/changelogs/AutoChangeLog-pr-9406.yml b/html/changelogs/AutoChangeLog-pr-9406.yml new file mode 100644 index 0000000000..bf4048528d --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9406.yml @@ -0,0 +1,6 @@ +author: "Twaticus & Poojawa" +delete-after: True +changes: + - rscadd: "Added new carpets from TauCetiStation!" + - rscadd: "More Liquid carpet chemicals, mix carpet with certain reagents to get different colors!" + - refactor: "Tablets have a better means of being assembled codewise. nothing's different on player end." diff --git a/html/changelogs/AutoChangeLog-pr-9410.yml b/html/changelogs/AutoChangeLog-pr-9410.yml new file mode 100644 index 0000000000..910b9f6f2e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9410.yml @@ -0,0 +1,5 @@ +author: "Poojawa" +delete-after: True +changes: + - bugfix: "cryopod UI isn't complete shit anymore" + - bugfix: "Cryopods purge silicon gear more efficiently now. Same with ghosts." diff --git a/html/changelogs/AutoChangeLog-pr-9413.yml b/html/changelogs/AutoChangeLog-pr-9413.yml new file mode 100644 index 0000000000..b352549d0b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9413.yml @@ -0,0 +1,4 @@ +author: "Poojawa" +delete-after: True +changes: + - balance: "Med Sprays are now more aligned with patch mechanics" diff --git a/html/changelogs/AutoChangeLog-pr-9418.yml b/html/changelogs/AutoChangeLog-pr-9418.yml new file mode 100644 index 0000000000..9950590005 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9418.yml @@ -0,0 +1,19 @@ +author: "Ghommie (original PRs by zeroisthebiggay, AnturK, MrDoomBringer, Cobby, ATHATH, optimumtact, GranpaWalton, Skoglol)" +delete-after: True +changes: + - bugfix: "Blob overminds, sentient diseases, etc. can no longer dump out boxes. Sorry gamers." + - rscadd: "Sentient Disease now has almost all symptoms at its disposal." + - code_imp: "Adding single-symptom disease abilities is super easy now." + - bugfix: "Sentient Disease can now hear (not sure if this was a bug or intentional)." + - rscadd: "Sentient Disease is a linguist and knows all languages. Still cannot speak." + - tweak: "Gives Sentient Diseases a medical hud to observe their victims further with." + - bugfix: "Fixes and moves around some on_stage_change() and Start()-related things for virus symptoms and (sentient) diseases." + - bugfix: "The inorganic biology symptom should work properly now when bought by a sentient disease." + - bugfix: "Oxyloss icon no-longer shows up when someone has the self respiration symptom" + - tweak: "The self respiration now makes you not contract diseases through the air and not breathe in smoke" + - bugfix: "Sentient diseases can no longer pick two cures that react and disappear when eaten." + - balance: "Sentient disease cures are now consistently harder, will only pick cures from tier 6 and up." + - bugfix: "Disease cures should now stay the same for all infected mobs." + - rscadd: "The regenerative coma symptom has a new resistance 4 threshold effect! Said threshold effect will give hosts of the symptom's virus the TRAIT_STABLECRIT trait if its threshold is met." + - bugfix: "An obscure, probably never reported before bug that may or may not exist involving sentient diseases and the self-respiration symptom should be fixed now (if it even existed in the first place)." + - balance: "The cooldown time between each removal or addition of a symptom for sentient diseases has been brought down from an agonizingly long 2 minutes to a more reasonable 1 minute." diff --git a/html/changelogs/AutoChangeLog-pr-9421.yml b/html/changelogs/AutoChangeLog-pr-9421.yml new file mode 100644 index 0000000000..8b2e8a3982 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9421.yml @@ -0,0 +1,6 @@ +author: "Ghommie (original PRs by Akrilla, Arkatos and Denton)" +delete-after: True +changes: + - tweak: "Sprays cans have a cap on how dark you can make objects. Art is uneffected." + - bugfix: "Fixed a bug where you could get cyborg spraycans via pyrite extracts." + - rscadd: "Added an infinite spraycan for admins to spawn." diff --git a/html/changelogs/AutoChangeLog-pr-9427.yml b/html/changelogs/AutoChangeLog-pr-9427.yml new file mode 100644 index 0000000000..bb1665fba5 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9427.yml @@ -0,0 +1,7 @@ +author: "Ghommie && Kevinz000" +delete-after: True +changes: + - balance: "Lichdom and necromantic stone skeletons are now of the spaceproof kind too." + - tweak: "skeletons now also like dairy products." + - rscdel: "Halloween roundstart skeletons and zombies are no more spaceproof." + - rscadd: "You can choose to set your species to zombie or skeleton through the pride mirror yet again, Alas they are not of the spaceproof kind either." diff --git a/html/changelogs/AutoChangeLog-pr-9431.yml b/html/changelogs/AutoChangeLog-pr-9431.yml new file mode 100644 index 0000000000..65f825b278 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9431.yml @@ -0,0 +1,4 @@ +author: "Ghommie (original PR by Denton)" +delete-after: True +changes: + - balance: "You can no longer reveal the 'illegal tech' research node by deconstructing .357 speedloaders, riot dart boxes, syndicate cigarettes, syndicate playing cards or syndicate balloons." diff --git a/html/changelogs/AutoChangeLog-pr-9434.yml b/html/changelogs/AutoChangeLog-pr-9434.yml new file mode 100644 index 0000000000..d6ad25361a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9434.yml @@ -0,0 +1,5 @@ +author: "EmeraldSundisk" +delete-after: True +changes: + - rscadd: "Adds some potted plants around Box Station" + - bugfix: "The tile mentioned in #9409 should now be radiation-free." diff --git a/html/changelogs/AutoChangeLog-pr-9443.yml b/html/changelogs/AutoChangeLog-pr-9443.yml new file mode 100644 index 0000000000..6bc7507ea9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9443.yml @@ -0,0 +1,4 @@ +author: "Thalpy" +delete-after: True +changes: + - bugfix: "fixes broken compiler because a var changed name" diff --git a/icons/mob/aibots.dmi b/icons/mob/aibots.dmi index f4049abc41..5f5987f2d3 100644 Binary files a/icons/mob/aibots.dmi and b/icons/mob/aibots.dmi differ diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 25183c5cea..0197507b9d 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/inhands/misc/tiles_lefthand.dmi b/icons/mob/inhands/misc/tiles_lefthand.dmi new file mode 100644 index 0000000000..d7903fcd48 Binary files /dev/null and b/icons/mob/inhands/misc/tiles_lefthand.dmi differ diff --git a/icons/mob/inhands/misc/tiles_righthand.dmi b/icons/mob/inhands/misc/tiles_righthand.dmi new file mode 100644 index 0000000000..9295ac7344 Binary files /dev/null and b/icons/mob/inhands/misc/tiles_righthand.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 2506d9e629..072511b444 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 77029e36b6..06b2eee2eb 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index b456f31a95..50f9e0a207 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi index c3374e9c1c..1307f063a8 100644 Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi index 647722b1de..87db0caa67 100644 Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_blue.dmi b/icons/obj/smooth_structures/fancy_table_blue.dmi new file mode 100644 index 0000000000..07e13e99e6 Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_blue.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_cyan.dmi b/icons/obj/smooth_structures/fancy_table_cyan.dmi new file mode 100644 index 0000000000..4f1a90e33b Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_cyan.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_green.dmi b/icons/obj/smooth_structures/fancy_table_green.dmi new file mode 100644 index 0000000000..ea7f8daa99 Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_green.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_orange.dmi b/icons/obj/smooth_structures/fancy_table_orange.dmi new file mode 100644 index 0000000000..fe0375ddbb Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_orange.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_purple.dmi b/icons/obj/smooth_structures/fancy_table_purple.dmi new file mode 100644 index 0000000000..c404a9eb5f Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_purple.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_red.dmi b/icons/obj/smooth_structures/fancy_table_red.dmi new file mode 100644 index 0000000000..8bca0ca8c9 Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_red.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_royalblack.dmi b/icons/obj/smooth_structures/fancy_table_royalblack.dmi new file mode 100644 index 0000000000..064b7c1945 Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_royalblack.dmi differ diff --git a/icons/obj/smooth_structures/fancy_table_royalblue.dmi b/icons/obj/smooth_structures/fancy_table_royalblue.dmi new file mode 100644 index 0000000000..9d0eba7265 Binary files /dev/null and b/icons/obj/smooth_structures/fancy_table_royalblue.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index 2e1fdfa7a8..7bbfdfd11d 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ diff --git a/icons/obj/tiles.dmi b/icons/obj/tiles.dmi index 9305e4b7bc..3aa6912da7 100644 Binary files a/icons/obj/tiles.dmi and b/icons/obj/tiles.dmi differ diff --git a/icons/turf/floors/carpet_blue.dmi b/icons/turf/floors/carpet_blue.dmi new file mode 100644 index 0000000000..f797be9745 Binary files /dev/null and b/icons/turf/floors/carpet_blue.dmi differ diff --git a/icons/turf/floors/carpet_cyan.dmi b/icons/turf/floors/carpet_cyan.dmi new file mode 100644 index 0000000000..feca351ca9 Binary files /dev/null and b/icons/turf/floors/carpet_cyan.dmi differ diff --git a/icons/turf/floors/carpet_green.dmi b/icons/turf/floors/carpet_green.dmi new file mode 100644 index 0000000000..fdd1f071f7 Binary files /dev/null and b/icons/turf/floors/carpet_green.dmi differ diff --git a/icons/turf/floors/carpet_orange.dmi b/icons/turf/floors/carpet_orange.dmi new file mode 100644 index 0000000000..ddf239b63b Binary files /dev/null and b/icons/turf/floors/carpet_orange.dmi differ diff --git a/icons/turf/floors/carpet_purple.dmi b/icons/turf/floors/carpet_purple.dmi new file mode 100644 index 0000000000..c1f40ec7fa Binary files /dev/null and b/icons/turf/floors/carpet_purple.dmi differ diff --git a/icons/turf/floors/carpet_red.dmi b/icons/turf/floors/carpet_red.dmi new file mode 100644 index 0000000000..926655688e Binary files /dev/null and b/icons/turf/floors/carpet_red.dmi differ diff --git a/icons/turf/floors/carpet_royalblack.dmi b/icons/turf/floors/carpet_royalblack.dmi new file mode 100644 index 0000000000..bc5cef1cf0 Binary files /dev/null and b/icons/turf/floors/carpet_royalblack.dmi differ diff --git a/icons/turf/floors/carpet_royalblue.dmi b/icons/turf/floors/carpet_royalblue.dmi new file mode 100644 index 0000000000..841e49e957 Binary files /dev/null and b/icons/turf/floors/carpet_royalblue.dmi differ diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm index 42f9752019..70886881fa 100644 --- a/modular_citadel/code/datums/status_effects/chems.dm +++ b/modular_citadel/code/datums/status_effects/chems.dm @@ -262,8 +262,7 @@ // owner.remove_status_effect(src)//At the moment, a user can enthrall themselves, toggle this back in if that should be removed. redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) //Do resistance calc if resist is pressed# RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear) - var/obj/item/organ/brain/B = M.getorganslot(ORGAN_SLOT_BRAIN) //It's their brain! - mental_capacity = 500 - B.get_brain_damage() + mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain! var/mob/living/carbon/human/H = owner if(H)//Prefs if(!H.canbearoused) @@ -366,7 +365,7 @@ if(owner.client?.prefs.lewdchem && !customEcho) to_chat(owner, "[pick("I belong to [enthrallGender].", "[enthrallGender] knows whats best for me.", "Obedence is pleasure.", "I exist to serve [enthrallGender].", "[enthrallGender] is so dominant, it feels right to obey them.")].") if (4) //mindbroken - if (mental_capacity >= 499 && (owner.getBrainLoss() <=0 || HAS_TRAIT(M, TRAIT_MINDSHIELD)) && !owner.reagents.has_reagent("MKUltra")) + if (mental_capacity >= 499 && (owner.getOrganLoss(ORGAN_SLOT_BRAIN) <=0 || HAS_TRAIT(M, TRAIT_MINDSHIELD)) && !owner.reagents.has_reagent("MKUltra")) phase = 2 mental_capacity = 500 customTriggers = list() @@ -405,8 +404,8 @@ M.hallucination = max(0, M.hallucination - 5) M.stuttering = max(0, M.stuttering - 5) M.jitteriness = max(0, M.jitteriness - 5) - if(owner.getBrainLoss() >=20) - owner.adjustBrainLoss(-0.2) + if(owner.getOrganLoss(ORGAN_SLOT_BRAIN) >=20) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -0.2) if(withdrawal == TRUE) REMOVE_TRAIT(owner, TRAIT_PACIFISM, "MKUltra") SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing1") @@ -427,7 +426,7 @@ if(prob(5)) to_chat(owner, "You're starting to miss [(owner.client?.prefs.lewdchem?"your [enthrallGender]":"[master]")].") if(prob(5)) - owner.adjustBrainLoss(0.1) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.1) to_chat(owner, "[(owner.client?.prefs.lewdchem?"[enthrallGender]":"[master]")] will surely be back soon") //denial if(36) var/message = "[(owner.client?.prefs.lewdchem?"I feel empty when [enthrallGender]'s not around..":"I miss [master]'s presence")]" @@ -435,11 +434,11 @@ if(37 to 65)//barganing if(prob(10)) to_chat(owner, "They are coming back, right...?") - owner.adjustBrainLoss(0.5) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5) if(prob(10)) if(owner.client?.prefs.lewdchem) to_chat(owner, "I just need to be a good pet for [enthrallGender], they'll surely return if I'm a good pet.") - owner.adjustBrainLoss(-1.5) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1.5) if(66) SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing1") var/message = "[(owner.client?.prefs.lewdchem?"I feel so lost in this complicated world without [enthrallGender]..":"I have to return to [master]!")]" @@ -484,7 +483,7 @@ to_chat(owner, "You're unable to hold back your tears, suddenly sobbing as the desire to see your [enthrallGender] oncemore overwhelms you.") else to_chat(owner, "You are overwheled with withdrawl from [master].") - owner.adjustBrainLoss(1) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) owner.stuttering += 35 owner.jitteriness += 35 if(prob(10))//2% chance @@ -500,14 +499,14 @@ if(140 to INFINITY) //acceptance if(prob(15)) deltaResist += 5 - owner.adjustBrainLoss(-1) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, -1) if(prob(20)) if(owner.client?.prefs.lewdchem) to_chat(owner, "Maybe you'll be okay without your [enthrallGender].") else to_chat(owner, "You feel your mental functions slowly begin to return.") if(prob(5)) - owner.adjustBrainLoss(1) + owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) M.hallucination += 30 withdrawalTick += 0.5//Enough to leave you with a major brain trauma, but not kill you. diff --git a/modular_citadel/code/modules/clothing/clothing.dm b/modular_citadel/code/modules/clothing/clothing.dm index fc71d5bdde..7f366ecf35 100644 --- a/modular_citadel/code/modules/clothing/clothing.dm +++ b/modular_citadel/code/modules/clothing/clothing.dm @@ -38,6 +38,8 @@ var/secondary_color = "#FFFFFF" var/tertiary_color = "#808080" + var/force_alternate_icon = FALSE + /obj/item/clothing/update_icon() // picks the colored overlays from the ICON file ..() if(hasprimary) //Checks if the overlay is enabled diff --git a/modular_citadel/code/modules/clothing/under/trek_under.dm b/modular_citadel/code/modules/clothing/under/trek_under.dm index a60f7653c5..5cd0620a9d 100644 --- a/modular_citadel/code/modules/clothing/under/trek_under.dm +++ b/modular_citadel/code/modules/clothing/under/trek_under.dm @@ -14,6 +14,7 @@ desc = "Oooh... right." icon = 'modular_citadel/icons/obj/clothing/trek_item_icon.dmi' alternate_worn_icon = 'modular_citadel/icons/mob/clothing/trek_mob_icon.dmi' + force_alternate_icon = TRUE item_state = "" can_adjust = FALSE //to prevent you from "wearing it casually" @@ -23,7 +24,7 @@ desc = "The uniform worn by command officers in the mid 2260s." icon_state = "trek_command" item_state = "trek_command" - armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) + armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) /obj/item/clothing/under/rank/trek/engsec name = "Operations Uniform" @@ -94,6 +95,7 @@ icon = 'modular_citadel/icons/obj/clothing/trek_item_icon.dmi' icon_state = "trek_ds9_coat" alternate_worn_icon = 'modular_citadel/icons/mob/clothing/trek_mob_icon.dmi' + force_alternate_icon = TRUE item_state = "trek_ds9_coat" body_parts_covered = CHEST|GROIN|ARMS mutantrace_variation = NO_MUTANTRACE_VARIATION @@ -138,6 +140,7 @@ desc = "A uniform jacket from the United Federation. Set phasers to awesome." icon = 'modular_citadel/icons/obj/clothing/trek_item_icon.dmi' alternate_worn_icon = 'modular_citadel/icons/mob/clothing/trek_mob_icon.dmi' + force_alternate_icon = TRUE icon_state = "fedcoat" item_state = "fedcoat" mutantrace_variation = NO_MUTANTRACE_VARIATION @@ -204,6 +207,7 @@ desc = "A modern uniform jacket from the United Federation." icon = 'modular_citadel/icons/obj/clothing/trek_item_icon.dmi' alternate_worn_icon = 'modular_citadel/icons/mob/clothing/trek_mob_icon.dmi' + force_alternate_icon = TRUE icon_state = "fedmodern" item_state = "fedmodern" body_parts_covered = CHEST|GROIN|ARMS @@ -236,6 +240,7 @@ icon = 'modular_citadel/icons/obj/clothing/trek_item_icon.dmi' icon_state = "fedcapofficer" alternate_worn_icon = 'modular_citadel/icons/mob/clothing/trek_mob_icon.dmi' + force_alternate_icon = TRUE item_state = "fedcapofficer" //Variants diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm index 5e10e71433..de3f43f8ee 100644 --- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm +++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm @@ -18,9 +18,10 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! name = "combat jaws" desc = "The jaws of the law. Very sharp." icon_state = "jaws" - force = 12 + force = 10 //Lowered to match secborg. No reason it should be more than a secborg's baton. attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") + /obj/item/dogborg/jaws/small name = "puppy jaws" desc = "Rubberized teeth designed to protect accidental harm. Sharp enough for specialized tasks however." @@ -32,7 +33,6 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! /obj/item/dogborg/jaws/attack(atom/A, mob/living/silicon/robot/user) ..() user.do_attack_animation(A, ATTACK_EFFECT_BITE) - log_combat(user, A, "bit") /obj/item/dogborg/jaws/small/attack_self(mob/user) var/mob/living/silicon/robot.R = user @@ -307,8 +307,8 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! /mob/living/silicon/robot var/leaping = 0 var/pounce_cooldown = 0 - var/pounce_cooldown_time = 50 //Nearly doubled, u happy? - var/pounce_spoolup = 3 + var/pounce_cooldown_time = 20 //Buffed to counter balance changes + var/pounce_spoolup = 1 var/leap_at var/disabler var/laser @@ -338,7 +338,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! //It's also extremely buggy visually, so it's balance+bugfix return - if(cell.charge <= 500) + if(cell.charge <= 750) to_chat(src,"Insufficent reserves for jump actuators!") return @@ -348,7 +348,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! pixel_y = 10 update_icons() throw_at(A, MAX_K9_LEAP_DIST, 1, spin=0, diagonals_first = 1) - cell.use(500) //Doubled the energy consumption + cell.use(750) //Less than a stunbaton since stunbatons hit everytime. weather_immunities -= "lava" /mob/living/silicon/robot/throw_impact(atom/A) @@ -366,13 +366,13 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! blocked = 1 if(!blocked) L.visible_message("[src] pounces on [L]!", "[src] pounces on you!") - L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice. + L.Knockdown(iscarbon(L) ? 225 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice. playsound(src, 'sound/weapons/Egloves.ogg', 50, 1) sleep(2)//Runtime prevention (infinite bump() calls on hulks) step_towards(src,L) log_combat(src, L, "borg pounced") else - Knockdown(45, 1, 1) + Knockdown(15, 1, 1) pounce_cooldown = !pounce_cooldown spawn(pounce_cooldown_time) //3s by default @@ -380,7 +380,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm ! else if(A.density && !A.CanPass(src)) visible_message("[src] smashes into [A]!", "You smash into [A]!") playsound(src, 'sound/items/trayhit1.ogg', 50, 1) - Knockdown(45, 1, 1) + Knockdown(15, 1, 1) if(leaping) leaping = 0 diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm index 8db223bbfe..35474f4c69 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/MKUltra.dm @@ -136,7 +136,6 @@ Creating a chem with a low purity will make you permanently fall in love with so color = "#660015" // rgb: , 0, 255 taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses" overdose_threshold = 100 //If this is too easy to get 100u of this, then double it please. - DoNotSplit = TRUE metabolization_rate = 0.1//It has to be slow, so there's time for the effect. data = list("creatorID" = null, "creatorGender" = null, "creatorName" = null) var/creatorID //ckey @@ -144,20 +143,19 @@ Creating a chem with a low purity will make you permanently fall in love with so var/creatorName var/mob/living/creator pH = 10 - OnMobMergeCheck = TRUE //Procs on_mob_add when merging into a human + chemical_flags = REAGENT_ONMOBMERGE | REAGENT_DONOTSPLIT //Procs on_mob_add when merging into a human can_synth = FALSE /datum/reagent/fermi/enthrall/test name = "MKUltraTest" id = "enthrallTest" - description = "A forbidden deep red mixture that overwhelms a foreign body with waves of joy, intoxicating them into servitude. When taken by the creator, it will enhance the draw of their voice to those affected by it." + description = "A forbidden deep red mixture that makes you like Fermis a little too much. Unobtainable and due to be removed from the wiki." data = list("creatorID" = "honkatonkbramblesnatch", "creatorGender" = "Mistress", "creatorName" = "Fermis Yakumo") creatorID = "honkatonkbramblesnatch"//ckey creatorGender = "Mistress" creatorName = "Fermis Yakumo" purity = 1 - DoNotSplit = TRUE /datum/reagent/fermi/enthrall/test/on_new() id = "enthrall" @@ -279,18 +277,18 @@ Creating a chem with a low purity will make you permanently fall in love with so SSblackbox.record_feedback("tally", "fermi_chem", 1, "Thralls mindbroken") /datum/reagent/fermi/enthrall/overdose_process(mob/living/carbon/M) - M.adjustBrainLoss(0.2)//should be ~30 in total + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.2)//should be ~30 in total ..() //Creates a gas cloud when the reaction blows up, causing everyone in it to fall in love with someone/something while it's in their system. /datum/reagent/fermi/enthrallExplo//Created in a gas cloud when it explodes - name = "MKUltra" + name = "Gaseous MKUltra" id = "enthrallExplo" - description = "A forbidden deep red mixture that overwhelms a foreign body with waves of desire, inducing a chemial love for another. Also, how the HECC did you get this?" + description = "A forbidden deep red gas that overwhelms a foreign body, causing the person they next lay their eyes on to become more interesting. Studies have shown that people are 66% more likely to make friends with this in the air. Produced when MKUltra explodes." color = "#2C051A" // rgb: , 0, 255 metabolization_rate = 0.1 taste_description = "synthetic chocolate, a base tone of alcohol, and high notes of roses." - DoNotSplit = TRUE + chemical_flags = REAGENT_DONOTSPLIT can_synth = FALSE var/mob/living/carbon/love @@ -326,7 +324,7 @@ Creating a chem with a low purity will make you permanently fall in love with so M.Stun(10) M.emote("whimper")//does this exist? to_chat(M, "[(M.client?.prefs.lewdchem?"":"")] You're overcome with a desire to see [love].") - M.adjustBrainLoss(0.5)//I found out why everyone was so damaged! + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 0.5)//I found out why everyone was so damaged! ..() /datum/reagent/fermi/enthrallExplo/on_mob_delete(mob/living/carbon/M) diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm index 8f5260b607..34152f5dd6 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/SDGF.dm @@ -49,9 +49,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING var/list/candies = list() var/pollStarted = FALSE var/startHunger - ImpureChem = "SDGFtox" - InverseChemVal = 0.5 - InverseChem = "SDZF" + impure_chem = "SDGFtox" + inverse_chem_val = 0.5 + inverse_chem = "SDZF" can_synth = TRUE @@ -117,7 +117,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING //Damage the clone SM.blood_volume = (BLOOD_VOLUME_NORMAL*SM.blood_ratio)/2 SM.adjustCloneLoss(60, 0) - SM.setBrainLoss(40) + SM.setOrganLoss(ORGAN_SLOT_BRAIN, 40) SM.nutrition = startHunger/2 //Transfer remaining reagent to clone. I think around 30u will make a healthy clone, otherwise they'll have clone damage, blood loss, brain damage and hunger. @@ -243,7 +243,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING SM.adjustToxLoss(-(bodydamage/10), 0) SM.blood_volume = (BLOOD_VOLUME_NORMAL*SM.blood_ratio)/1.5 SM.adjustCloneLoss((bodydamage/10), 0) - SM.setBrainLoss((bodydamage/10)) + SM.setOrganLoss(ORGAN_SLOT_BRAIN, (bodydamage/10)) SM.nutrition = 400 if(bodydamage>200) SM.gain_trauma_type(BRAIN_TRAUMA_MILD) @@ -274,8 +274,9 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING //Unobtainable, used in clone spawn. /datum/reagent/fermi/SDGFheal - name = "synthetic-derived growth factor" + name = "synthetic-derived healing factor" id = "SDGFheal" + description = "Leftover SDGF is transferred into the resulting clone, which quickly heals up the stresses from suddenly splitting. Restores blood, nutrition, and repaires brain and clone damage quickly. Only obtainable from using excess SDGF, and only enters the cloned body." metabolization_rate = 0.8 can_synth = FALSE @@ -283,35 +284,36 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING if(M.blood_volume < (BLOOD_VOLUME_NORMAL*M.blood_ratio)) M.blood_volume += 10 M.adjustCloneLoss(-2, 0) - M.setBrainLoss(-1) + M.setOrganLoss(ORGAN_SLOT_BRAIN, -1) M.nutrition += 10 ..() //Unobtainable, used if SDGF is impure but not too impure -/datum/reagent/fermi/SDGFtox - name = "synthetic-derived growth factor" +/datum/reagent/impure/SDGFtox + name = "Synthetic-derived apoptosis factor" id = "SDGFtox" - description = "A chem that makes a certain chemcat angry at you if you're reading this, how did you get this???"//i.e. tell me please, figure it's a good way to get pinged for bugfixes. + description = "Impure synthetic-derived growth factor causes certain cells to undergo cell death, causing clone damage, and damaging blood cells."//i.e. tell me please, figure it's a good way to get pinged for bugfixes. metabolization_rate = 1 can_synth = FALSE -/datum/reagent/fermi/SDGFtox/on_mob_life(mob/living/carbon/M)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good) +/datum/reagent/impure/SDGFtox/on_mob_life(mob/living/carbon/M)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good) M.blood_volume -= 10 M.adjustCloneLoss(2, 0) ..() //Fail state of SDGF -/datum/reagent/fermi/SDZF - name = "synthetic-derived growth factor" +/datum/reagent/impure/SDZF + name = "synthetic-derived zombie factor" id = "SDZF" - description = "A horribly peverse mass of Embryonic stem cells made real by the hands of a failed chemist. This message should never appear, how did you manage to get a hold of this?" + description = "A horribly peverse mass of Embryonic stem cells made real by the hands of a failed chemist. Emulates normal synthetic-derived growth factor, but produces a hostile zombie at the end of it." color = "#a502e0" // rgb: 96, 0, 255 metabolization_rate = 0.2 * REAGENTS_METABOLISM var/startHunger can_synth = TRUE taste_description = "a weird chemical fleshy flavour" + chemical_flags = REAGENT_SNEAKYNAME -/datum/reagent/fermi/SDZF/on_mob_life(mob/living/carbon/M) //If you're bad at fermichem, turns your clone into a zombie instead. +/datum/reagent/impure/SDZF/on_mob_life(mob/living/carbon/M) //If you're bad at fermichem, turns your clone into a zombie instead. switch(current_cycle)//Pretends to be normal if(20) to_chat(M, "You feel the synethic cells rest uncomfortably within your body as they start to pulse and grow rapidly.") diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/astrogen.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/astrogen.dm index 276d82a018..b9ce8cede2 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/astrogen.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/astrogen.dm @@ -28,7 +28,7 @@ I'd like to point out from my calculations it'll take about 60-80 minutes to die var/datum/mind/originalmind var/antiGenetics = 255 var/sleepytime = 0 - InverseChemVal = 0.25 + inverse_chem_val = 0.25 can_synth = FALSE var/datum/action/chem/astral/AS = new/datum/action/chem/astral() diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm index d603f3ba10..69f76e380b 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/enlargement.dm @@ -26,9 +26,9 @@ taste_description = "a milky ice cream like flavour." overdose_threshold = 17 metabolization_rate = 0.25 - ImpureChem = "BEsmaller" //If you make an inpure chem, it stalls growth - InverseChemVal = 0.35 - InverseChem = "BEsmaller" //At really impure vols, it just becomes 100% inverse + impure_chem = "BEsmaller" //If you make an inpure chem, it stalls growth + inverse_chem_val = 0.35 + inverse_chem = "BEsmaller" //At really impure vols, it just becomes 100% inverse can_synth = FALSE /datum/reagent/fermi/breast_enlarger/on_mob_add(mob/living/carbon/M) @@ -140,7 +140,7 @@ /datum/reagent/fermi/BEsmaller name = "Modesty milk" id = "BEsmaller" - description = "A volatile collodial mixture derived from milk that encourages mammary reduction via a potent estrogen mix." + description = "A volatile collodial mixture derived from milk that encourages mammary reduction via a potent estrogen mix. Produced by reacting impure Succubus milk." color = "#E60584" // rgb: 96, 0, 255 taste_description = "a milky ice cream like flavour." metabolization_rate = 0.25 @@ -211,9 +211,9 @@ taste_description = "chinese dragon powder" overdose_threshold = 17 //ODing makes you male and removes female genitals metabolization_rate = 0.5 - ImpureChem = "PEsmaller" //If you make an inpure chem, it stalls growth - InverseChemVal = 0.35 - InverseChem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead. + impure_chem = "PEsmaller" //If you make an inpure chem, it stalls growth + inverse_chem_val = 0.35 + inverse_chem = "PEsmaller" //At really impure vols, it just becomes 100% inverse and shrinks instead. can_synth = FALSE /datum/reagent/fermi/penis_enlarger/on_mob_add(mob/living/carbon/M) @@ -311,7 +311,7 @@ /datum/reagent/fermi/PEsmaller // Due to cozmo's request...! name = "Chastity draft" id = "PEsmaller" - description = "A volatile collodial mixture derived from various masculine solutions that encourages a smaller gentleman's package via a potent testosterone mix, formula derived from a collaboration from Fermichem and Doctor Ronald Hyatt, who is well known for his phallus palace." + description = "A volatile collodial mixture derived from various masculine solutions that encourages a smaller gentleman's package via a potent testosterone mix. Produced by reacting impure Incubus draft." color = "#888888" // This is greyish..? taste_description = "chinese dragon powder" metabolization_rate = 0.5 diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm index bfd8dbb137..7654785ab0 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -6,8 +6,10 @@ id = "fermi" taste_description = "affection and love!" can_synth = FALSE - var/cached_purity = 1 - SplitChem = TRUE + impure_chem = "fermiTox"// What chemical is metabolised with an inpure reaction + inverse_chem_val = 0.25 // If the impurity is below 0.5, replace ALL of the chem with inverse_chemupon metabolising + inverse_chem = "fermiTox" + //This should process fermichems to find out how pure they are and what effect to do. /datum/reagent/fermi/on_mob_add(mob/living/carbon/M, amount) @@ -35,7 +37,7 @@ taste_description = "like jerky, whiskey and an off aftertaste of a crypt." metabolization_rate = 0.2 overdose_threshold = 25 - DoNotSplit = TRUE + chemical_flags = REAGENT_DONOTSPLIT pH = 4 can_synth = TRUE @@ -82,9 +84,9 @@ color = "#f9b9bc" // rgb: , 0, 255 taste_description = "dewicious degenyewacy" metabolization_rate = 0.5 * REAGENTS_METABOLISM - InverseChemVal = 0 + inverse_chem_val = 0 var/obj/item/organ/tongue/nT - DoNotSplit = TRUE + chemical_flags = REAGENT_DONOTSPLIT pH = 5 var/obj/item/organ/tongue/T can_synth = TRUE @@ -171,9 +173,9 @@ description = "A stablised EMP that is highly volatile, shocking small nano machines that will kill them off at a rapid rate in a patient's system." color = "#708f8f" overdose_threshold = 15 - ImpureChem = "nanite_b_goneTox" //If you make an inpure chem, it stalls growth - InverseChemVal = 0.25 - InverseChem = "nanite_b_goneTox" //At really impure vols, it just becomes 100% inverse + impure_chem = "nanite_b_goneTox" //If you make an inpure chem, it stalls growth + inverse_chem_val = 0.25 + inverse_chem = "nanite_b_goneTox" //At really impure vols, it just becomes 100% inverse taste_description = "what can only be described as licking a battery." pH = 9 can_synth = FALSE @@ -194,7 +196,7 @@ if(prob(10)) var/atom/T = C T.emp_act(EMP_HEAVY) - to_chat(C, "The nanites short circuit within your system!") + to_chat(C, "You feel a strange tingling sensation come from your core.") if(isnull(N)) return ..() N.nanite_volume += -10*cached_purity @@ -208,10 +210,11 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume) O.emp_act(EMP_HEAVY) /datum/reagent/fermi/nanite_b_goneTox - name = "Naninte bain" + name = "Electromagnetic crystals" id = "nanite_b_goneTox" - description = "Poorly made, and shocks you!" - metabolization_rate = 1 + description = "Causes items upon the patient to sometimes short out, as well as causing a shock in the patient, if the residual charge between the crystals builds up to sufficient quantities" + metabolization_rate = 0.5 + chemical_flags = REAGENT_INVISIBLE //Increases shock events. /datum/reagent/fermi/nanite_b_goneTox/on_mob_life(mob/living/carbon/C)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good) @@ -249,8 +252,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume) if((method==VAPOR) && (!C.wear_mask)) if(prob(20)) to_chat(C, "You can feel your lungs burning!") - var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS) - L.adjustLungLoss(acidstr*2, C) + C.adjustOrganLoss(ORGAN_SLOT_LUNGS, acidstr*2) C.apply_damage(acidstr/5, BURN, target) C.acid_act(acidstr, volume) ..() @@ -277,7 +279,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume) name = "Fermis Test Reagent" id = "fermiTest" description = "You should be really careful with this...! Also, how did you get this?" - addProc = TRUE + chemical_flags = REAGENT_FORCEONNEW can_synth = FALSE /datum/reagent/fermi/fermiTest/on_new(datum/reagents/holder) @@ -308,22 +310,6 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume) playsound(get_turf(M), 'modular_citadel/sound/voice/merowr.ogg', 50, 1) holder.clear_reagents() -/datum/reagent/fermi/fermiTox - name = "FermiTox" - id = "fermiTox" - description = "You should be really careful with this...! Also, how did you get this? You shouldn't have this!" - data = "merge" - color = "FFFFFF" - can_synth = FALSE - -//I'm concerned this is too weak, but I also don't want deathmixes. -/datum/reagent/fermi/fermiTox/on_mob_life(mob/living/carbon/C, method) - if(C.dna && istype(C.dna.species, /datum/species/jelly)) - C.adjustToxLoss(-2) - else - C.adjustToxLoss(2) - ..() - /datum/reagent/fermi/acidic_buffer name = "Acidic buffer" id = "acidic_buffer" diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm index 8ea946d1fb..e4a1f02415 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/healing.dm @@ -6,9 +6,9 @@ color = "#68e83a" pH = 8.6 overdose_threshold = 35 - ImpureChem = "yamerol_tox" - InverseChemVal = 0.4 - InverseChem = "yamerol_tox" + impure_chem = "yamerol_tox" + inverse_chem_val = 0.4 + inverse_chem = "yamerol_tox" can_synth = TRUE /datum/reagent/fermi/yamerol/on_mob_life(mob/living/carbon/C) @@ -16,9 +16,9 @@ var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS) if(T) - T.adjustTongueLoss(C, -2)//Fix the inputs me! + T.applyOrganDamage(-2) if(L) - L.adjustLungLoss(-5, C) + C.adjustOrganLoss(ORGAN_SLOT_LUNGS, -5) C.adjustOxyLoss(-2) else C.adjustOxyLoss(-10) @@ -65,30 +65,83 @@ holder.remove_reagent(src.id, "10") if(!C.getorganslot(ORGAN_SLOT_LUNGS)) - var/obj/item/organ/lungs/L = new() + var/obj/item/organ/lungs/yamerol/L = new() L.Insert(C) - to_chat(C, "You feel your lungs reform in your chest.") + to_chat(C, "You feel the yamerol merge in your chest.") holder.remove_reagent(src.id, "10") C.adjustOxyLoss(-3) ..() -/datum/reagent/fermi/yamerol_tox - name = "Yamerol" +/datum/reagent/impure/yamerol_tox + name = "Yamer oh no" id = "yamerol_tox" - description = "For when you've trouble speaking or breathing, just yell YAMEROL! A chem that helps soothe any congestion problems and at high concentrations restores damaged lungs and tongues!" + description = "A dangerous, cloying toxin that stucks to a patient’s respiratory system, damaging their tongue, lungs and causing suffocation." taste_description = "a weird, syrupy flavour, yamero" color = "#68e83a" pH = 8.6 -/datum/reagent/fermi/yamerol_tox/on_mob_life(mob/living/carbon/C) +/datum/reagent/impure/yamerol_tox/on_mob_life(mob/living/carbon/C) var/obj/item/organ/tongue/T = C.getorganslot(ORGAN_SLOT_TONGUE) var/obj/item/organ/lungs/L = C.getorganslot(ORGAN_SLOT_LUNGS) if(T) - T.adjustTongueLoss(C, 1) + T.applyOrganDamage(1) if(L) - L.adjustLungLoss(4, C) + C.adjustOrganLoss(ORGAN_SLOT_LUNGS, 4) C.adjustOxyLoss(3) else C.adjustOxyLoss(10) ..() + + +/datum/reagent/synthtissue + name = "Synthtissue" + id = "synthtissue" + description = "Synthetic tissue used for grafting onto damaged organs during surgery, or for treating limb damage. Has a very tight growth window between 305-320, any higher and the temperature will cause the cells to die. Additionally, growth time is considerably long, so chemists are encouraged to leave beakers with said reaction ongoing, while they tend to their other duties." + pH = 7.6 + metabolization_rate = 0.1 + data = list("grown_volume" = 0, "injected_vol" = 0) + +/datum/reagent/synthtissue/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) + if(iscarbon(M)) + var/target = M.zone_selected + if (M.stat == DEAD) + show_message = 0 + if(method in list(PATCH, TOUCH)) + M.apply_damage(reac_volume*-1.5, BRUTE, target) + M.apply_damage(reac_volume*-1.5, BURN, target) + if(show_message) + to_chat(M, "You feel your [target] heal! It stings like hell!") + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) + if(method==INJECT) + data["injected_vol"] = data["injected_vol"] + reac_volume + ..() + +/datum/reagent/synthtissue/on_mob_life(mob/living/carbon/C) + if(!iscarbon(C)) + return ..() + if(data["injected_vol"] > 14) + if(data["grown_volume"] > 175) //I don't think this is even possible, but damn to I want to see if someone can (bare in mind it takes 2s to grow 0.05u) + if(volume >= 14) + if(C.regenerate_organs(only_one = TRUE)) + C.reagents.remove_reagent(id, 15) + to_chat(C, "You feel something reform inside of you!") + + data["injected_vol"] -= metabolization_rate + ..() + +/datum/reagent/synthtissue/on_merge(passed_data) + if(!passed_data) + return ..() + if(passed_data["grown_volume"] > data["grown_volume"]) + data["grown_volume"] = passed_data["grown_volume"] + ..() + +/datum/reagent/synthtissue/on_new(passed_data) + if(!passed_data) + return ..() + if(passed_data["grown_volume"] > data["grown_volume"]) + data["grown_volume"] = passed_data["grown_volume"] + ..() + +//NEEDS ON_MOB_DEAD() diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index 0f148e8614..45bd48112f 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -2,11 +2,29 @@ mix_sound = 'sound/effects/bubbles.ogg' //Called for every reaction step -/datum/chemical_reaction/proc/FermiCreate(holder) +/datum/chemical_reaction/proc/FermiCreate(datum/reagents/holder, added_volume, added_purity) return //Called when reaction STOP_PROCESSING -/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder) +/datum/chemical_reaction/proc/FermiFinish(datum/reagents/holder, var/atom/my_atom, reactVol) + if(clear_conversion == REACTION_CLEAR_IMPURE | REACTION_CLEAR_INVERSE) + for(var/id in results) + var/datum/reagent/R = my_atom.reagents.has_reagent("[id]") + if(R.purity == 1) + continue + + var/cached_volume = R.volume + if(clear_conversion == REACTION_CLEAR_INVERSE && R.inverse_chem) + if(R.inverse_chem_val > R.purity) + my_atom.reagents.remove_reagent(R.id, cached_volume, FALSE) + my_atom.reagents.add_reagent(R.inverse_chem, cached_volume, FALSE, other_purity = 1) + + else if (clear_conversion == REACTION_CLEAR_IMPURE && R.impure_chem) + var/impureVol = cached_volume * (1 - R.purity) + my_atom.reagents.remove_reagent(R.id, (impureVol), FALSE) + my_atom.reagents.add_reagent(R.impure_chem, impureVol, FALSE, other_purity = 1) + R.cached_purity = R.purity + R.purity = 1 return //Called when temperature is above a certain threshold, or if purity is too low. diff --git a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm index c4c1cff1e7..0e823a658f 100644 --- a/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm +++ b/modular_citadel/code/modules/reagents/reagents/cit_reagents.dm @@ -138,16 +138,16 @@ /datum/reagent/drug/aphrodisiacplus/addiction_act_stage2(mob/living/M) if(prob(30)) - M.adjustBrainLoss(2) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 2) ..() /datum/reagent/drug/aphrodisiacplus/addiction_act_stage3(mob/living/M) if(prob(30)) - M.adjustBrainLoss(3) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3) ..() /datum/reagent/drug/aphrodisiacplus/addiction_act_stage4(mob/living/M) if(prob(30)) - M.adjustBrainLoss(4) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4) ..() /datum/reagent/drug/aphrodisiacplus/overdose_process(mob/living/M) diff --git a/modular_citadel/code/modules/vore/resizing/sizechemicals.dm b/modular_citadel/code/modules/vore/resizing/sizechemicals.dm index 1164bf65d6..f83ba2ce76 100644 --- a/modular_citadel/code/modules/vore/resizing/sizechemicals.dm +++ b/modular_citadel/code/modules/vore/resizing/sizechemicals.dm @@ -84,7 +84,7 @@ return /datum/reagent/medicine/sizeoxadone/overdose_process(mob/living/M) - M.adjustBrainLoss(1) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1) M.adjustToxLoss(1) ..() . = 1 diff --git a/modular_citadel/icons/firstaid.dmi b/modular_citadel/icons/firstaid.dmi index 8c603c8762..d061adf9f2 100644 Binary files a/modular_citadel/icons/firstaid.dmi and b/modular_citadel/icons/firstaid.dmi differ diff --git a/modular_citadel/icons/mob/clothing/fed hats n modern.dmi b/modular_citadel/icons/mob/clothing/fed hats n modern.dmi deleted file mode 100644 index ab8682b785..0000000000 Binary files a/modular_citadel/icons/mob/clothing/fed hats n modern.dmi and /dev/null differ diff --git a/modular_citadel/icons/mob/clothing/fedcoats.dmi b/modular_citadel/icons/mob/clothing/fedcoats.dmi deleted file mode 100644 index 6554b3a45d..0000000000 Binary files a/modular_citadel/icons/mob/clothing/fedcoats.dmi and /dev/null differ diff --git a/modular_citadel/icons/obj/clothing/trek_item_icon.dmi b/modular_citadel/icons/obj/clothing/trek_item_icon.dmi index ed3286615b..570acbf4cf 100644 Binary files a/modular_citadel/icons/obj/clothing/trek_item_icon.dmi and b/modular_citadel/icons/obj/clothing/trek_item_icon.dmi differ diff --git a/modular_citadel/interface/skin.dmf b/modular_citadel/interface/skin.dmf index c5b5138609..025a53bdca 100644 --- a/modular_citadel/interface/skin.dmf +++ b/modular_citadel/interface/skin.dmf @@ -54,7 +54,7 @@ window "mainwindow" size = 640x440 anchor1 = none anchor2 = none - background-color = #eeeeee + background-color = #242424 is-default = true saved-params = "pos;size;is-minimized;is-maximized" icon = 'icons\\ss13_64.png' @@ -66,7 +66,7 @@ window "mainwindow" size = 637x440 anchor1 = 0,0 anchor2 = 100,100 - background-color = #eeeeee + background-color = #272727 saved-params = "splitter" left = "mapwindow" right = "infowindow" @@ -78,7 +78,7 @@ window "mainwindow" size = 200x200 anchor1 = none anchor2 = none - background-color = #ffffff + background-color = #272727 is-visible = false saved-params = "" elem "tooltip" @@ -87,7 +87,7 @@ window "mainwindow" size = 999x999 anchor1 = none anchor2 = none - background-color = #ffffff + background-color = #272727 is-visible = false saved-params = "" @@ -119,7 +119,7 @@ window "infowindow" size = 640x480 anchor1 = none anchor2 = none - background-color = #eeeeee + background-color = #242424 saved-params = "pos;size;is-minimized;is-maximized" is-pane = true elem "info" @@ -128,6 +128,7 @@ window "infowindow" size = 640x445 anchor1 = 0,0 anchor2 = 100,100 + background-color = #272727 saved-params = "splitter" left = "statwindow" right = "outputwindow" @@ -138,7 +139,8 @@ window "infowindow" size = 104x20 anchor1 = 3,0 anchor2 = 19,0 - background-color = #90b3dd + text-color = #e0e0e0 + background-color = #40628a saved-params = "is-checked" text = "Changelog" command = "changelog" @@ -148,7 +150,8 @@ window "infowindow" size = 100x20 anchor1 = 19,0 anchor2 = 34,0 - background-color = #90b3dd + text-color = #e0e0e0 + background-color = #40628a saved-params = "is-checked" text = "Rules" command = "rules" @@ -158,7 +161,8 @@ window "infowindow" size = 100x20 anchor1 = 34,0 anchor2 = 50,0 - background-color = #90b3dd + text-color = #e0e0e0 + background-color = #40628a saved-params = "is-checked" text = "Wiki" command = "wiki" @@ -168,7 +172,8 @@ window "infowindow" size = 100x20 anchor1 = 50,0 anchor2 = 66,0 - background-color = #90b3dd + text-color = #e0e0e0 + background-color = #40628a saved-params = "is-checked" text = "Forum" command = "forum" @@ -178,7 +183,8 @@ window "infowindow" size = 100x20 anchor1 = 66,0 anchor2 = 81,0 - background-color = #90b3dd + text-color = #e0e0e0 + background-color = #40628a saved-params = "is-checked" text = "GitHub" command = "github" @@ -189,7 +195,8 @@ window "infowindow" anchor1 = 81,0 anchor2 = 97,0 font-size = 8 - background-color = #ef7f7f + text-color = #e0e0e0 + background-color = #A92c2c saved-params = "is-checked" text = "Report Issue" command = "report-issue" @@ -201,7 +208,7 @@ window "outputwindow" size = 640x480 anchor1 = none anchor2 = none - background-color = #eeeeee + background-color = #272727 saved-params = "pos;size;is-minimized;is-maximized" titlebar = false statusbar = false @@ -225,7 +232,8 @@ window "outputwindow" size = 37x20 anchor1 = 100,100 anchor2 = none - background-color = #eeeeee + text-color = #e0e0e0 + background-color = #272727 saved-params = "is-checked" text = "Chat" command = ".winset \"say.is-checked=true ? input.command=\"!say \\\"\" : input.command=\"" @@ -237,7 +245,7 @@ window "outputwindow" size = 640x456 anchor1 = 0,0 anchor2 = 100,100 - background-color = #ffffff + background-color = #272727 is-visible = false is-disabled = true saved-params = "" @@ -248,6 +256,8 @@ window "outputwindow" size = 640x456 anchor1 = 0,0 anchor2 = 100,100 + text-color = #e0e0e0 + background-color = #272727 is-default = true saved-params = "" @@ -258,7 +268,7 @@ window "statwindow" size = 640x480 anchor1 = none anchor2 = none - background-color = #eeeeee + background-color = #242424 saved-params = "pos;size;is-minimized;is-maximized" is-pane = true elem "stat" @@ -267,9 +277,14 @@ window "statwindow" size = 640x480 anchor1 = 0,0 anchor2 = 100,100 + text-color = #e0e0e0 + background-color = #272727 is-default = true saved-params = "" - tab-background-color = #eeeeee + tab-text-color = #e0e0e0 + tab-background-color = #242424 + prefix-color = #e0e0e0 + suffix-color = #e0e0e0 window "preferences_window" elem "preferences_window" diff --git a/tgstation.dme b/tgstation.dme index cceeb1f915..1f8b1a964d 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -581,6 +581,7 @@ #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" #include "code\game\machinery\constructable_frame.dm" +#include "code\game\machinery\cryopod.dm" #include "code\game\machinery\dance_machine.dm" #include "code\game\machinery\defibrillator_mount.dm" #include "code\game\machinery\deployable.dm" @@ -1519,6 +1520,7 @@ #include "code\modules\clothing\neck\_neck.dm" #include "code\modules\clothing\outfits\ert.dm" #include "code\modules\clothing\outfits\event.dm" +#include "code\modules\clothing\outfits\plasmaman.dm" #include "code\modules\clothing\outfits\standard.dm" #include "code\modules\clothing\outfits\vr.dm" #include "code\modules\clothing\outfits\vv_outfit.dm" @@ -1561,6 +1563,10 @@ #include "code\modules\clothing\under\jobs\engineering.dm" #include "code\modules\clothing\under\jobs\medsci.dm" #include "code\modules\clothing\under\jobs\security.dm" +#include "code\modules\clothing\under\jobs\Plasmaman\civilian_service.dm" +#include "code\modules\clothing\under\jobs\Plasmaman\engineering.dm" +#include "code\modules\clothing\under\jobs\Plasmaman\medsci.dm" +#include "code\modules\clothing\under\jobs\Plasmaman\security.dm" #include "code\modules\crafting\craft.dm" #include "code\modules\crafting\guncrafting.dm" #include "code\modules\crafting\recipes.dm" @@ -2514,6 +2520,7 @@ #include "code\modules\projectiles\projectile\special\temperature.dm" #include "code\modules\projectiles\projectile\special\wormhole.dm" #include "code\modules\reagents\chem_splash.dm" +#include "code\modules\reagents\chem_wiki_render.dm" #include "code\modules\reagents\reagent_containers.dm" #include "code\modules\reagents\reagent_dispenser.dm" #include "code\modules\reagents\chemistry\colors.dm" @@ -2532,6 +2539,7 @@ #include "code\modules\reagents\chemistry\reagents\drink_reagents.dm" #include "code\modules\reagents\chemistry\reagents\drug_reagents.dm" #include "code\modules\reagents\chemistry\reagents\food_reagents.dm" +#include "code\modules\reagents\chemistry\reagents\impure_reagents.dm" #include "code\modules\reagents\chemistry\reagents\medicine_reagents.dm" #include "code\modules\reagents\chemistry\reagents\other_reagents.dm" #include "code\modules\reagents\chemistry\reagents\pyrotechnic_reagents.dm" @@ -2748,13 +2756,16 @@ #include "code\modules\surgery\brain_surgery.dm" #include "code\modules\surgery\cavity_implant.dm" #include "code\modules\surgery\core_removal.dm" +#include "code\modules\surgery\coronary_bypass.dm" #include "code\modules\surgery\dental_implant.dm" #include "code\modules\surgery\embalming.dm" #include "code\modules\surgery\eye_surgery.dm" +#include "code\modules\surgery\graft_synthtissue.dm" #include "code\modules\surgery\helpers.dm" #include "code\modules\surgery\implant_removal.dm" #include "code\modules\surgery\limb_augmentation.dm" #include "code\modules\surgery\lipoplasty.dm" +#include "code\modules\surgery\lobectomy.dm" #include "code\modules\surgery\mechanic_steps.dm" #include "code\modules\surgery\nutcracker.dm" #include "code\modules\surgery\organ_manipulation.dm" @@ -2922,7 +2933,6 @@ #include "modular_citadel\code\game\gamemodes\gangs\implant_gang.dm" #include "modular_citadel\code\game\gamemodes\miniantags\bot_swarm\swarmer_event.dm" #include "modular_citadel\code\game\gamemodes\revolution\revolution.dm" -#include "modular_citadel\code\game\machinery\cryopod.dm" #include "modular_citadel\code\game\machinery\displaycases.dm" #include "modular_citadel\code\game\machinery\firealarm.dm" #include "modular_citadel\code\game\machinery\Sleeper.dm" @@ -3086,16 +3096,13 @@ #include "modular_citadel\code\modules\reagents\chemistry\recipes\fermi.dm" #include "modular_citadel\code\modules\reagents\objects\clothes.dm" #include "modular_citadel\code\modules\reagents\objects\items.dm" -#include "modular_citadel\code\modules\reagents\reagent container\cit_kegs.dm" #include "modular_citadel\code\modules\reagents\reagent container\hypospraymkii.dm" #include "modular_citadel\code\modules\reagents\reagent container\hypovial.dm" #include "modular_citadel\code\modules\reagents\reagents\cit_reagents.dm" #include "modular_citadel\code\modules\recycling\disposal\bin.dm" #include "modular_citadel\code\modules\research\designs\autoylathe_designs.dm" #include "modular_citadel\code\modules\research\designs\machine_designs.dm" -#include "modular_citadel\code\modules\research\designs\weapon_designs.dm" #include "modular_citadel\code\modules\research\designs\xenobio_designs.dm" -#include "modular_citadel\code\modules\research\designs\weapon_designs\weapon_designs.dm" #include "modular_citadel\code\modules\research\techweb\_techweb.dm" #include "modular_citadel\code\modules\research\xenobiology\xenobio_camera.dm" #include "modular_citadel\code\modules\vehicles\secway.dm"