From 780bc0a2830290bb76719bd577f1a6d006b7e7c1 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 20 Sep 2024 02:26:05 -0400 Subject: [PATCH 01/40] Makes a lot more areas radstorm-safe (#3435) * Protect abandoned maints areas from radstorms * Add quite a few radstorm safe areas --- .../weather/weather_types/radiation_storm.dm | 15 +++++++++++++++ tgstation.dme | 1 + 2 files changed, 16 insertions(+) create mode 100644 monkestation/code/datums/weather/weather_types/radiation_storm.dm diff --git a/monkestation/code/datums/weather/weather_types/radiation_storm.dm b/monkestation/code/datums/weather/weather_types/radiation_storm.dm new file mode 100644 index 000000000000..4d6d2466c9bb --- /dev/null +++ b/monkestation/code/datums/weather/weather_types/radiation_storm.dm @@ -0,0 +1,15 @@ +/datum/weather/rad_storm + protected_areas = list(/area/station/maintenance, + /area/station/ai_monitored/turret_protected/ai_upload, /area/station/ai_monitored/turret_protected/ai_upload_foyer, + /area/station/ai_monitored/turret_protected/aisat/maint, /area/station/ai_monitored/command/storage/satellite, + /area/station/ai_monitored/turret_protected/ai, /area/station/commons/storage/emergency/starboard, + /area/station/commons/storage/emergency/port, /area/shuttle, /area/station/common/cryopods, /area/station/security/prison/safe, + /area/station/security/prison/toilet, /area/icemoon/underground, /area/station/service/hydroponics/garden/abandoned, + /area/station/security/detectives_office/private_investigators_office, /area/station/security/bitden, + /area/station/service/library/abandoned, /area/station/service/theater/abandoned, /area/station/service/abandoned_gambling_den, + /area/station/service/electronic_marketing_den, /area/station/service/kitchen/abandoned, /area/station/medical/abandoned, + /area/station/science/research/abandoned, /area/station/asteroid, /area/misc/asteroid, /area/station/command/secure_bunker, + /area/station/cargo/power_station, /area/station/engineering/power_station, /area/station/science/power_station, + /area/station/science/power_station, /area/station/security/power_station, /area/station/service/power_station, + /area/station/medical/aslyum, /area/station/medical/virology/isolation, + ) diff --git a/tgstation.dme b/tgstation.dme index ae2845defcfa..57986e06964a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5866,6 +5866,7 @@ #include "monkestation\code\datums\status_effects\food_buffs.dm" #include "monkestation\code\datums\status_effects\debuffs\drunk.dm" #include "monkestation\code\datums\storage\storage.dm" +#include "monkestation\code\datums\weather\weather_types\radiation_storm.dm" #include "monkestation\code\datums\wires\particle_accelerator.dm" #include "monkestation\code\game\atom.dm" #include "monkestation\code\game\sound.dm" From e1909f98cd6c9b92a7b6390878deeb7ed65d387b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 06:26:24 +0000 Subject: [PATCH 02/40] Automatic changelog for PR #3435 [ci skip] --- html/changelogs/AutoChangeLog-pr-3435.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3435.yml diff --git a/html/changelogs/AutoChangeLog-pr-3435.yml b/html/changelogs/AutoChangeLog-pr-3435.yml new file mode 100644 index 000000000000..7d41290ff1c8 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3435.yml @@ -0,0 +1,5 @@ +author: "Absolucy" +delete-after: True +changes: + - bugfix: "Abandoned areas in maint (i.e gambling den, garden, etc) are now properly protected from radstorms." + - rscadd: "Radstorm-proofed some more areas." \ No newline at end of file From 374b02dc9991bc33210f9f3f33effc55d66e67ea Mon Sep 17 00:00:00 2001 From: ThePooba <81843097+ThePooba@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:23:50 -0600 Subject: [PATCH 03/40] Warden time, secbot, and a heretic nerf (#3439) * bla * no id die * blllplplplpllp * Update warden.dm --- .../heretic/status_effects/mark_effects.dm | 12 +++++++----- code/modules/mob/living/simple_animal/bot/secbot.dm | 13 +++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/code/modules/antagonists/heretic/status_effects/mark_effects.dm b/code/modules/antagonists/heretic/status_effects/mark_effects.dm index 1771d7079e8d..b810dc8e7dd5 100644 --- a/code/modules/antagonists/heretic/status_effects/mark_effects.dm +++ b/code/modules/antagonists/heretic/status_effects/mark_effects.dm @@ -107,15 +107,16 @@ ORGAN_SLOT_HEART, ) - // Roughly 75% of their organs will take a bit of damage + // Roughly 25% of their organs will take a bit of damage for(var/organ_slot in organs_to_damage) - if(prob(75)) + if(prob(25)) //monkestation edit begin : Changes rust to not be busted as shit carbon_owner.adjustOrganLoss(organ_slot, 20) - // And roughly 75% of their items will take a smack, too + // And roughly 50% of their items will take a smack, too for(var/obj/item/thing in carbon_owner.get_all_gear()) - if(!QDELETED(thing) && prob(75)) - thing.take_damage(100) + if(!QDELETED(thing) && prob(50)) + if(!istype(thing, /obj/item/card/id)) + thing.take_damage(50) //monkestation edit end return ..() @@ -235,6 +236,7 @@ return ..() /datum/status_effect/eldritch/cosmic/on_effect() + owner.adjust_confusion(7 SECONDS) //monkestation edit new teleport_effect(get_turf(owner)) new /obj/effect/forcefield/cosmic_field(get_turf(owner)) do_teleport( diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 0990edfcc8f9..6b51db93bdf6 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -98,6 +98,19 @@ bot_mode_flags = BOT_MODE_ON bot_cover_flags = BOT_COVER_LOCKED | BOT_COVER_EMAGGED +//monkestation edit begin +/mob/living/simple_animal/bot/secbot/beepsky/big + name = "Officer Bigsky" + desc = "It's Commander Beep O'sky's massive, just-as aggressive cousin, Bigsky." + health = 150 + bot_mode_flags = BOT_MODE_ON | BOT_MODE_AUTOPATROL | BOT_MODE_REMOTE_ENABLED + commissioned = FALSE + +/mob/living/simple_animal/bot/secbot/beepsky/jr/Initialize(mapload) + . = ..() + update_transform(1.2) +//monkestation edit end + /mob/living/simple_animal/bot/secbot/beepsky/explode() var/atom/Tsec = drop_location() new /obj/item/stock_parts/cell/potato(Tsec) From 02409f9b24ad76ac67e6235ac541ee03a8a4d9e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:24:13 +0000 Subject: [PATCH 04/40] Automatic changelog for PR #3439 [ci skip] --- html/changelogs/AutoChangeLog-pr-3439.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3439.yml diff --git a/html/changelogs/AutoChangeLog-pr-3439.yml b/html/changelogs/AutoChangeLog-pr-3439.yml new file mode 100644 index 000000000000..589c3183d002 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3439.yml @@ -0,0 +1,7 @@ +author: "ThePooba" +delete-after: True +changes: + - rscadd: "Warden requires 10 sec hours now" + - rscadd: "added security bot \"Bigsky\" (he big!)" + - balance: "Rust heretics mark doesnt delete 75% of your items now and instead does 50 damage to your items" + - balance: "cosmic mark makes you confused for 7 seconds" \ No newline at end of file From a2f26d311da2b69d3ba0c93d16b0ab84f6853f85 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 20 Sep 2024 13:03:06 -0400 Subject: [PATCH 05/40] hopefully fix bloodsuckers getting stuck in their coffin after torpor (#3484) --- .../code/modules/bloodsuckers/bloodsucker/bloodsucker_sol.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_sol.dm b/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_sol.dm index 29994949bbf7..7c9534a64110 100644 --- a/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_sol.dm +++ b/monkestation/code/modules/bloodsuckers/bloodsucker/bloodsucker_sol.dm @@ -141,6 +141,7 @@ if(!HAS_TRAIT(owner.current, TRAIT_MASQUERADE)) ADD_TRAIT(owner.current, TRAIT_SLEEPIMMUNE, BLOODSUCKER_TRAIT) heal_vampire_organs() + owner.current.update_stat() SEND_SIGNAL(src, BLOODSUCKER_EXIT_TORPOR) /datum/status_effect/bloodsucker_sol From 7f24d34d7c6fe0b2f51a6c7226f94178789ec4f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:03:26 +0000 Subject: [PATCH 06/40] Automatic changelog for PR #3484 [ci skip] --- html/changelogs/AutoChangeLog-pr-3484.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3484.yml diff --git a/html/changelogs/AutoChangeLog-pr-3484.yml b/html/changelogs/AutoChangeLog-pr-3484.yml new file mode 100644 index 000000000000..709c3205dbca --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3484.yml @@ -0,0 +1,4 @@ +author: "Absolucy" +delete-after: True +changes: + - bugfix: "Hopefully fix bloodsuckers getting stuck in their coffin after torpor." \ No newline at end of file From 45cea4c2170be6411415d2f61311ed9ff8754e39 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 20 Sep 2024 14:01:03 -0400 Subject: [PATCH 07/40] Properly add the `metric_data`, `subsystem_metrics`, `subsystem_extra_metrics`, `overwatch_whitelist`, and `overwatch_asn_ban` tables to the database schema. (#3486) --- SQL/database_changelog.md | 70 +++++++++++++++++++++++++++-- SQL/tgstation_schema.sql | 86 ++++++++++++++++++++++++++++++++++++ code/__DEFINES/subsystems.dm | 2 +- 3 files changed, 154 insertions(+), 4 deletions(-) diff --git a/SQL/database_changelog.md b/SQL/database_changelog.md index 3339b0504352..e229efae7ef0 100644 --- a/SQL/database_changelog.md +++ b/SQL/database_changelog.md @@ -2,19 +2,83 @@ Any time you make a change to the schema files, remember to increment the databa Make sure to also update `DB_MAJOR_VERSION` and `DB_MINOR_VERSION`, which can be found in `code/__DEFINES/subsystem.dm`. -The latest database version is 5.24; The query to update the schema revision table is: +The latest database version is 5.26; The query to update the schema revision table is: ```sql -INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 25); +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 26); ``` or ```sql -INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 25); +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 26); ``` In any query remember to add a prefix to the table names if you use one. +----------------------------------------------------- +Version 5.26, 20 September 2024, by Absolucy +Properly added the previously undocumented `metric_data`, `subsystem_metrics`, `subsystem_extra_metrics`, `overwatch_whitelist`, and `overwatch_asn_ban` tables. +```sql +CREATE TABLE `metric_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `cpu` decimal(20,10) unsigned DEFAULT NULL, + `maptick` decimal(20,10) unsigned DEFAULT NULL, + `elapsed_processed` int(15) unsigned DEFAULT NULL, + `elapsed_real` int(15) unsigned DEFAULT NULL, + `client_count` int(15) unsigned DEFAULT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `relational_id` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +CREATE TABLE `overwatch_asn_ban` ( + `ip` varchar(21) NOT NULL, + `asn` varchar(100) NOT NULL, + `a_ckey` varchar(30) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`asn`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +CREATE TABLE `overwatch_ip_cache` ( + `ip` varchar(50) NOT NULL DEFAULT '', + `response` longtext NOT NULL, + PRIMARY KEY (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +CREATE TABLE `overwatch_whitelist` ( + `ckey` varchar(30) NOT NULL, + `a_ckey` varchar(30) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`ckey`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +CREATE TABLE `subsystem_extra_metrics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `ss_id` varchar(255) DEFAULT NULL, + `relation_id_SS` varchar(255) DEFAULT NULL, + `ss_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + CONSTRAINT `ss_value` CHECK (json_valid(`ss_value`)) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +CREATE TABLE `subsystem_metrics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `avg_iter_count` decimal(20,6) NOT NULL DEFAULT 0.000000, + `avg_drift` decimal(20,6) NOT NULL DEFAULT 0.000000, + `datetime` datetime NOT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `ss_id` varchar(255) DEFAULT NULL, + `relational_id` varchar(255) DEFAULT NULL, + `relation_id_SS` varchar(255) DEFAULT NULL, + `cost` decimal(20,6) unsigned DEFAULT NULL, + `tick_usage` decimal(20,6) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +``` + ----------------------------------------------------- Version 5.25, 8 September 2024, by Absolucy Added `log_directory` field to the `round` table. diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index aa5bc84b9fa8..9696082994db 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -708,6 +708,9 @@ CREATE TABLE `telemetry_connections` ( UNIQUE INDEX `unique_constraints` (`ckey` , `telemetry_ckey` , `address` , `computer_id`) ); +-- +-- Table structure for table `tutorial_completions` +-- DROP TABLE IF EXISTS `tutorial_completions`; CREATE TABLE `tutorial_completions` ( `id` INT NOT NULL AUTO_INCREMENT, @@ -716,6 +719,89 @@ CREATE TABLE `tutorial_completions` ( PRIMARY KEY (`id`), UNIQUE INDEX `ckey_tutorial_unique` (`ckey`, `tutorial_key`)); +-- +-- Table structure for table `metric_data` +-- +DROP TABLE IF EXISTS `metric_data`; +CREATE TABLE `metric_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `cpu` decimal(20,10) unsigned DEFAULT NULL, + `maptick` decimal(20,10) unsigned DEFAULT NULL, + `elapsed_processed` int(15) unsigned DEFAULT NULL, + `elapsed_real` int(15) unsigned DEFAULT NULL, + `client_count` int(15) unsigned DEFAULT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `relational_id` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Table structure for table `overwatch_asn_ban` +-- +DROP TABLE IF EXISTS `overwatch_asn_ban`; +CREATE TABLE `overwatch_asn_ban` ( + `ip` varchar(21) NOT NULL, + `asn` varchar(100) NOT NULL, + `a_ckey` varchar(30) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`asn`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- +-- Table structure for table `overwatch_ip_cache` +-- +DROP TABLE IF EXISTS `overwatch_ip_cache`; +CREATE TABLE `overwatch_ip_cache` ( + `ip` varchar(50) NOT NULL DEFAULT '', + `response` longtext NOT NULL, + PRIMARY KEY (`ip`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- +-- Table structure for table `overwatch_whitelist` +-- +DROP TABLE IF EXISTS `overwatch_whitelist`; +CREATE TABLE `overwatch_whitelist` ( + `ckey` varchar(30) NOT NULL, + `a_ckey` varchar(30) NOT NULL, + `timestamp` datetime NOT NULL, + PRIMARY KEY (`ckey`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; + +-- +-- Table structure for table `subsystem_extra_metrics` +-- +DROP TABLE IF EXISTS `subsystem_extra_metrics`; +CREATE TABLE `subsystem_extra_metrics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `ss_id` varchar(255) DEFAULT NULL, + `relation_id_SS` varchar(255) DEFAULT NULL, + `ss_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + CONSTRAINT `ss_value` CHECK (json_valid(`ss_value`)) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Table structure for table `metric_data` +-- +DROP TABLE IF EXISTS `subsystem_metrics`; +CREATE TABLE `subsystem_metrics` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `avg_iter_count` decimal(20,6) NOT NULL DEFAULT 0.000000, + `avg_drift` decimal(20,6) NOT NULL DEFAULT 0.000000, + `datetime` datetime NOT NULL, + `round_id` int(15) unsigned DEFAULT NULL, + `ss_id` varchar(255) DEFAULT NULL, + `relational_id` varchar(255) DEFAULT NULL, + `relation_id_SS` varchar(255) DEFAULT NULL, + `cost` decimal(20,6) unsigned DEFAULT NULL, + `tick_usage` decimal(20,6) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 050327895b4a..d04e40311ce2 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -20,7 +20,7 @@ * * make sure you add an update to the schema_version stable in the db changelog */ -#define DB_MINOR_VERSION 25 +#define DB_MINOR_VERSION 26 // monkestation edit: we've added plenty of our own tables to the db //! ## Timing subsystem From c16d146f3681c8a5e0a428908783673262713342 Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:16:08 -0300 Subject: [PATCH 08/40] New plant trait and dank vescicles bug fix (#2342) * adds new trait and bug fixes * add gene to uplink * remove noreact from strange seeds opsie * bug fix for real now * Update code/modules/hydroponics/unique_plant_genes.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/plant_genes.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> * resolve comments * resolve comments * ... * fix potency limiter bug * i'm making a piss mess --------- Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/gene_modder.dm | 4 +++ code/modules/hydroponics/grown.dm | 14 +++++++++- code/modules/hydroponics/grown/mushrooms.dm | 2 +- code/modules/hydroponics/plant_genes.dm | 8 +----- code/modules/hydroponics/seeds.dm | 5 ---- .../modules/hydroponics/unique_plant_genes.dm | 1 - .../code/modules/hydroponics/plant_genes.dm | 28 +++++++++++++------ .../code/modules/uplink/uplink_items/job.dm | 8 ++++++ 8 files changed, 47 insertions(+), 23 deletions(-) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 70fae57a0bb8..fad5063ec7e7 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -426,6 +426,10 @@ var/read_only = 0 //Well, it's still a floppy disk obj_flags = UNIQUE_RENAME +/obj/item/disk/plantgene/syndicate // Monkestation item + gene = new /datum/plant_gene/trait/noreact + read_only = 1 + /obj/item/disk/plantgene/Initialize(mapload) . = ..() add_overlay("datadisk_gene") diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 274a88418671..b014ecf116e8 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -42,6 +42,8 @@ var/alt_icon /// Should we pixel offset ourselves at init? for mapping var/offset_at_init = TRUE + //This volume can be altered by densified chemicals trait + var/volume_rate = 1 //Monkestation Edit /obj/item/food/grown/Initialize(mapload, obj/item/seeds/new_seed) if(!tastes) @@ -65,16 +67,26 @@ make_dryable() // Go through all traits in their genes and call on_new_plant from them. + //TODO: We need a priority queue for traits,some of them need to be called first for(var/datum/plant_gene/trait/trait in seed.genes) trait.on_new_plant(src, loc) + //Needs to be run after traits are called because some of them alter max_volume and volume_rate + //Since traits do not know in which order they were run we need to do it here + max_volume *= volume_rate //Monkestation Edit + // Set our default bitesize: bite size = 1 + (potency * 0.05) * (max_volume * 0.01) * modifier // A 100 potency, non-densified plant = 1 + (5 * 1 * modifier) = 6u bite size // For reference, your average 100 potency tomato has 14u of reagents - So, with no modifier it is eaten in 3 bites bite_consumption = 1 + round(max((seed.potency * BITE_SIZE_POTENCY_MULTIPLIER), 1) * (max_volume * BITE_SIZE_VOLUME_MULTIPLIER) * bite_consumption_mod) . = ..() //Only call it here because we want all the genes and shit to be applied before we add edibility. God this code is a mess. - + //Monkestation Edit Begin + //We want this trait to run after reagents component is added to the plant + var/datum/plant_gene/trait/trait_noreact = seed.get_gene(/datum/plant_gene/trait/noreact) + if(trait_noreact) + trait_noreact.on_new_plant(src, loc) + //Monkestation Edit End seed.prepare_result(src) transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency! diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 8d88dba452f6..f00b980b793e 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -232,7 +232,7 @@ potency = 30 //-> brightness growthstages = 4 rarity = 20 - genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/potencylimit) + genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism) growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi' possible_mutations = list(/datum/hydroponics/plant_mutation/glow_cap, /datum/hydroponics/plant_mutation/shadow_shroom) reagents_add = list(/datum/reagent/uranium/radium = 0.1, /datum/reagent/phosphorus = 0.1, /datum/reagent/consumable/nutriment = 0.04) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 4f92ba56807e..337e5b448bf4 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -587,8 +587,7 @@ var/obj/item/food/grown/grown_plant = our_plant if(istype(grown_plant, /obj/item/food/grown)) - //Grown foods use the edible component so we need to change their max_volume var - grown_plant.max_volume *= rate + grown_plant.volume_rate = rate //Monkestation Edit else //Grown inedibles however just use a reagents holder, so. our_plant.reagents?.maximum_volume *= rate @@ -1025,8 +1024,3 @@ /datum/plant_gene/trait/plant_type/alien_properties name ="?????" icon = "reddit-alien" - -/datum/plant_gene/trait/seedless - name = "Seedless" - description = "The plant is unable to produce seeds" - mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index e5f2a15b6f81..0da6d6a811a4 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -429,11 +429,6 @@ return var/max_potency = MAX_PLANT_YIELD - for(var/datum/plant_gene/trait/trait in genes) - if(trait.trait_flags & TRAIT_LIMIT_POTENCY) - max_potency = 100 - break - potency = clamp(potency + adjustamt, 0, max_potency) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency) if(C) diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index 61bde105bc9f..938ecadb78d8 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -499,7 +499,6 @@ . = ..() if(!.) return - var/obj/item/food/grown/grown_plant = our_plant if(istype(grown_plant)) grown_plant.max_volume = new_capcity diff --git a/monkestation/code/modules/hydroponics/plant_genes.dm b/monkestation/code/modules/hydroponics/plant_genes.dm index 293eb65d1d40..60d8e6519f38 100644 --- a/monkestation/code/modules/hydroponics/plant_genes.dm +++ b/monkestation/code/modules/hydroponics/plant_genes.dm @@ -2,14 +2,26 @@ * this limits potency, it is used for plants that have strange behavior above 100 potency. * */ -/datum/plant_gene/trait/potencylimit - name = "potency limiter" - icon = "lightbulb" - description = "limits potency to 100, used for some plants to avoid lag and similar issues." - trait_flags = TRAIT_LIMIT_POTENCY - mutability_flags = PLANT_GENE_GRAFTABLE - -/datum/plant_gene/trait/potencylimit/on_new_plant(obj/item/our_plant, newloc) + +/datum/plant_gene/trait/seedless + name = "Seedless" + description = "The plant is unable to produce seeds" + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE + +/datum/plant_gene/trait/noreact + name = "Catalytic Inhibitor Serum" + description = "This genetic trait enables the plant to produce a serum that effectively halts chemical reactions within its tissues." + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_GRAFTABLE + +/datum/plant_gene/trait/noreact/on_new_plant(obj/item/our_plant, newloc) . = ..() if(!.) return + ENABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + RegisterSignal(our_plant, COMSIG_PLANT_ON_SQUASH, PROC_REF(noreact_on_squash)) + +/datum/plant_gene/trait/noreact/proc/noreact_on_squash(obj/item/our_plant, atom/target) + SIGNAL_HANDLER + + DISABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + our_plant.reagents.handle_reactions() diff --git a/monkestation/code/modules/uplink/uplink_items/job.dm b/monkestation/code/modules/uplink/uplink_items/job.dm index 2395ddbf650a..b69c2d2de964 100644 --- a/monkestation/code/modules/uplink/uplink_items/job.dm +++ b/monkestation/code/modules/uplink/uplink_items/job.dm @@ -63,3 +63,11 @@ pod.custom_objective = objective pod.RefreshParts() pod.locked = TRUE // The pod shouldn't be eligible for cloner event. + +/datum/uplink_item/role_restricted/syndicate_plant_gene + name = "Catalytic Inhibitor Serum Plant Data Disk" + desc = "This plant data disk contains the genetic blueprint for the Catalytic Inhibitor Serum gene.\ + enabling plants to produce a serum that halts all internal chemical reactions" + item = /obj/item/disk/plantgene/syndicate + cost = 20 + restricted_roles = list(JOB_BOTANIST) From c4df5b9cd4b08dfa50696574614075d9fd596645 Mon Sep 17 00:00:00 2001 From: Lucy Date: Fri, 20 Sep 2024 14:25:12 -0400 Subject: [PATCH 09/40] Manually add changelog for https://github.com/Monkestation/Monkestation2.0/pull/2342 [ci skip] --- html/changelogs/AutoChangeLog-pr-2342.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-2342.yml diff --git a/html/changelogs/AutoChangeLog-pr-2342.yml b/html/changelogs/AutoChangeLog-pr-2342.yml new file mode 100644 index 000000000000..9ac73f34b4f9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-2342.yml @@ -0,0 +1,7 @@ +author: "RafRoq" +delete-after: True +changes: + - rscadd: "New plant trait: Catalytic Inhibitor Serum." + - rscadd: "New restricted traitor uplink item: plant data disk with Catalytic Inhibitor Serum gene for 20 TC." + - bugfix: "Fixed Dank Vesicles and Densified Chemicals interaction." + - rscdel: "Removed the Potency Limiter gene." From 746c3ca865a03479a6289578b8d3f059971ac035 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Fri, 20 Sep 2024 18:30:08 +0000 Subject: [PATCH 10/40] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-2342.yml | 7 ------ html/changelogs/AutoChangeLog-pr-3152.yml | 5 ----- html/changelogs/AutoChangeLog-pr-3407.yml | 4 ---- html/changelogs/AutoChangeLog-pr-3435.yml | 5 ----- html/changelogs/AutoChangeLog-pr-3439.yml | 7 ------ html/changelogs/AutoChangeLog-pr-3450.yml | 4 ---- html/changelogs/AutoChangeLog-pr-3473.yml | 4 ---- html/changelogs/AutoChangeLog-pr-3482.yml | 4 ---- html/changelogs/AutoChangeLog-pr-3484.yml | 4 ---- html/changelogs/archive/2024-09.yml | 26 +++++++++++++++++++++++ 10 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-2342.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3152.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3407.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3435.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3439.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3450.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3473.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3482.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-3484.yml diff --git a/html/changelogs/AutoChangeLog-pr-2342.yml b/html/changelogs/AutoChangeLog-pr-2342.yml deleted file mode 100644 index 9ac73f34b4f9..000000000000 --- a/html/changelogs/AutoChangeLog-pr-2342.yml +++ /dev/null @@ -1,7 +0,0 @@ -author: "RafRoq" -delete-after: True -changes: - - rscadd: "New plant trait: Catalytic Inhibitor Serum." - - rscadd: "New restricted traitor uplink item: plant data disk with Catalytic Inhibitor Serum gene for 20 TC." - - bugfix: "Fixed Dank Vesicles and Densified Chemicals interaction." - - rscdel: "Removed the Potency Limiter gene." diff --git a/html/changelogs/AutoChangeLog-pr-3152.yml b/html/changelogs/AutoChangeLog-pr-3152.yml deleted file mode 100644 index 8784c664a109..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3152.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "PotatoTomahto" -delete-after: True -changes: - - rscadd: "Cooking removes diseases from all reagents." - - bugfix: "Mice properly transfer their disease to their dead carcass." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3407.yml b/html/changelogs/AutoChangeLog-pr-3407.yml deleted file mode 100644 index e29dbc38e4d7..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3407.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Wisemonster" -delete-after: True -changes: - - balance: "Heavily slowed the progression of heart worms" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3435.yml b/html/changelogs/AutoChangeLog-pr-3435.yml deleted file mode 100644 index 7d41290ff1c8..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3435.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Absolucy" -delete-after: True -changes: - - bugfix: "Abandoned areas in maint (i.e gambling den, garden, etc) are now properly protected from radstorms." - - rscadd: "Radstorm-proofed some more areas." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3439.yml b/html/changelogs/AutoChangeLog-pr-3439.yml deleted file mode 100644 index 589c3183d002..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3439.yml +++ /dev/null @@ -1,7 +0,0 @@ -author: "ThePooba" -delete-after: True -changes: - - rscadd: "Warden requires 10 sec hours now" - - rscadd: "added security bot \"Bigsky\" (he big!)" - - balance: "Rust heretics mark doesnt delete 75% of your items now and instead does 50 damage to your items" - - balance: "cosmic mark makes you confused for 7 seconds" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3450.yml b/html/changelogs/AutoChangeLog-pr-3450.yml deleted file mode 100644 index 18cbc9e07aa4..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3450.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Absolucy" -delete-after: True -changes: - - bugfix: "MOD chameleon modules actually work properly - they disguise when the suit is deactivated, undisguise when its activated, and properly handle modsuits that can be equipped to different slots." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3473.yml b/html/changelogs/AutoChangeLog-pr-3473.yml deleted file mode 100644 index 66334b0584de..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3473.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Ivniinvi" -delete-after: True -changes: - - spellcheck: "Fixed some typos in the cassette system" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3482.yml b/html/changelogs/AutoChangeLog-pr-3482.yml deleted file mode 100644 index 12a01f5a9bb3..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3482.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Wisemonster" -delete-after: True -changes: - - qol: "Geysers now have a description explaining how to extract chemicals from them." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-3484.yml b/html/changelogs/AutoChangeLog-pr-3484.yml deleted file mode 100644 index 709c3205dbca..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3484.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Absolucy" -delete-after: True -changes: - - bugfix: "Hopefully fix bloodsuckers getting stuck in their coffin after torpor." \ No newline at end of file diff --git a/html/changelogs/archive/2024-09.yml b/html/changelogs/archive/2024-09.yml index edc13d332562..66db00c92c21 100644 --- a/html/changelogs/archive/2024-09.yml +++ b/html/changelogs/archive/2024-09.yml @@ -471,6 +471,32 @@ healed. - qol: Wound tending surgeries can no longer be started on patients who are incapable of being healed. + - bugfix: Hopefully fix bloodsuckers getting stuck in their coffin after torpor. + - bugfix: Abandoned areas in maint (i.e gambling den, garden, etc) are now properly + protected from radstorms. + - rscadd: Radstorm-proofed some more areas. + - bugfix: MOD chameleon modules actually work properly - they disguise when the + suit is deactivated, undisguise when its activated, and properly handle modsuits + that can be equipped to different slots. + Ivniinvi: + - spellcheck: Fixed some typos in the cassette system + PotatoTomahto: + - rscadd: Cooking removes diseases from all reagents. + - bugfix: Mice properly transfer their disease to their dead carcass. + RafRoq: + - rscadd: 'New plant trait: Catalytic Inhibitor Serum.' + - rscadd: 'New restricted traitor uplink item: plant data disk with Catalytic Inhibitor + Serum gene for 20 TC.' + - bugfix: Fixed Dank Vesicles and Densified Chemicals interaction. + - rscdel: Removed the Potency Limiter gene. ThePooba: - rscadd: added maints between supply and top centcom - bugfix: fixed retirement air + - rscadd: Warden requires 10 sec hours now + - rscadd: added security bot "Bigsky" (he big!) + - balance: Rust heretics mark doesnt delete 75% of your items now and instead does + 50 damage to your items + - balance: cosmic mark makes you confused for 7 seconds + Wisemonster: + - balance: Heavily slowed the progression of heart worms + - qol: Geysers now have a description explaining how to extract chemicals from them. From 0dece8e41e91f21fcca91e8665e1d286dc8f35ce Mon Sep 17 00:00:00 2001 From: ThePooba <81843097+ThePooba@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:12:48 -0600 Subject: [PATCH 11/40] removed part of change that made florida men florida mans (#3487) --- .../code/modules/antagonists/florida_man/_florida_man.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkestation/code/modules/antagonists/florida_man/_florida_man.dm b/monkestation/code/modules/antagonists/florida_man/_florida_man.dm index 50cc0f23803d..de4b5df4888b 100644 --- a/monkestation/code/modules/antagonists/florida_man/_florida_man.dm +++ b/monkestation/code/modules/antagonists/florida_man/_florida_man.dm @@ -52,9 +52,7 @@ owner.current.playsound_local(get_turf(owner.current), 'monkestation/sound/ambience/antag/floridaman.ogg',100,0, use_reverb = FALSE) to_chat(owner, "You are THE Florida Man!\nYou're not quite sure how you got out here in space, but you don't generally bother thinking about things.\n\nYou love methamphetamine!\nYou love wrestling lizards!\nYou love getting drunk!\nYou love sticking it to THE MAN!\nYou don't act with any coherent plan or objective.\nYou don't outright want to destroy the station or murder people, as you have no home to return to.\n\nGo forth, son of Space Florida, and sow chaos!") owner.announce_objectives() - if(!prob(1)) // 1% chance to be Tony Brony...because meme references to streams are good! - floridan.fully_replace_character_name(newname = "Florida Man") - else + if(prob(1)) // 1% chance to be Tony Brony...because meme references to streams are good! floridan.fully_replace_character_name(newname = "Tony Brony") /datum/antagonist/florida_man/antag_token(datum/mind/hosts_mind, mob/spender) From 75b6ddcdc9e9abaa066e9d4fc3ab0970a69ff903 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 21:13:09 +0000 Subject: [PATCH 12/40] Automatic changelog for PR #3487 [ci skip] --- html/changelogs/AutoChangeLog-pr-3487.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3487.yml diff --git a/html/changelogs/AutoChangeLog-pr-3487.yml b/html/changelogs/AutoChangeLog-pr-3487.yml new file mode 100644 index 000000000000..669eccb17aae --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3487.yml @@ -0,0 +1,4 @@ +author: "ThePooba" +delete-after: True +changes: + - balance: "changed florida men anmes to be character names and not set to florida man" \ No newline at end of file From 1d50ea110117c0e273950a76cbcc3c307bf04465 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Sat, 21 Sep 2024 01:35:38 +0000 Subject: [PATCH 13/40] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-3487.yml | 4 ---- html/changelogs/archive/2024-09.yml | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-3487.yml diff --git a/html/changelogs/AutoChangeLog-pr-3487.yml b/html/changelogs/AutoChangeLog-pr-3487.yml deleted file mode 100644 index 669eccb17aae..000000000000 --- a/html/changelogs/AutoChangeLog-pr-3487.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "ThePooba" -delete-after: True -changes: - - balance: "changed florida men anmes to be character names and not set to florida man" \ No newline at end of file diff --git a/html/changelogs/archive/2024-09.yml b/html/changelogs/archive/2024-09.yml index 66db00c92c21..b3b9d21fe952 100644 --- a/html/changelogs/archive/2024-09.yml +++ b/html/changelogs/archive/2024-09.yml @@ -500,3 +500,7 @@ Wisemonster: - balance: Heavily slowed the progression of heart worms - qol: Geysers now have a description explaining how to extract chemicals from them. +2024-09-21: + ThePooba: + - balance: changed florida men anmes to be character names and not set to florida + man From d36e8509554a2479e74a5bf6b223f10693ce9dce Mon Sep 17 00:00:00 2001 From: Lucy Date: Sat, 21 Sep 2024 20:13:30 -0400 Subject: [PATCH 14/40] janky lag fix (#3453) * oh god fix this lag asap * what could POSSIBLY go wrong? * byeah * rfgijrwefguherfguherghuerguh * failsafe! * make sure it also shows up in runtime log * make code slightly less ugly * log to plexora --- code/__DEFINES/subsystems.dm | 2 + code/__DEFINES/~monkestation/logging.dm | 1 + code/__DEFINES/~monkestation/maths.dm | 1 + code/__HELPERS/logging/debug.dm | 3 ++ code/controllers/subsystem.dm | 39 +++++++++++++++++++ code/controllers/subsystem/statpanel.dm | 7 ++-- monkestation/code/__HELPERS/files.dm | 2 +- .../logging/categories/log_category_debug.dm | 3 ++ tgstation.dme | 2 + 9 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 code/__DEFINES/~monkestation/maths.dm create mode 100644 monkestation/code/modules/logging/categories/log_category_debug.dm diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index d04e40311ce2..ab2bd38217d6 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -352,3 +352,5 @@ #define SSLIQUIDS_RUN_TYPE_OCEAN 6 #define SSLIQUIDS_RUN_TYPE_TEMPERATURE 7 #define SSLIQUIDS_RUN_TYPE_CACHED_EDGES 8 + +#define ENQUEUE_SANITY 10000 diff --git a/code/__DEFINES/~monkestation/logging.dm b/code/__DEFINES/~monkestation/logging.dm index 3ecc13c91064..7862616789ad 100644 --- a/code/__DEFINES/~monkestation/logging.dm +++ b/code/__DEFINES/~monkestation/logging.dm @@ -1,2 +1,3 @@ #define LOG_CATEGORY_GAME_LOOC "game-looc" #define LOG_CATEGORY_STORYTELLER "storyteller" +#define LOG_CATEGORY_ENQUEUE "enqueue" diff --git a/code/__DEFINES/~monkestation/maths.dm b/code/__DEFINES/~monkestation/maths.dm new file mode 100644 index 000000000000..04901dc4e387 --- /dev/null +++ b/code/__DEFINES/~monkestation/maths.dm @@ -0,0 +1 @@ +#define RELATIVE_ERROR(actual, expected) (abs(actual - expected) / expected) diff --git a/code/__HELPERS/logging/debug.dm b/code/__HELPERS/logging/debug.dm index 61b686811c89..de0900a23912 100644 --- a/code/__HELPERS/logging/debug.dm +++ b/code/__HELPERS/logging/debug.dm @@ -59,3 +59,6 @@ logger.Log(LOG_CATEGORY_RUNTIME, text, data) #endif SEND_TEXT(world.log, text) + +/proc/log_enqueue(text, list/data) + logger.Log(LOG_CATEGORY_ENQUEUE, text, data) diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 2e122535fe46..f4b628fe1f14 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -106,6 +106,10 @@ /// Previous subsystem in the queue of subsystems to run this tick var/datum/controller/subsystem/queue_prev + var/avg_iter_count = 0 + var/avg_drift = 0 + var/list/enqueue_log = list() + //Do not blindly add vars here to the bottom, put it where it goes above //If your var only has two values, put it in as a flag. @@ -191,10 +195,38 @@ var/queue_node_priority var/queue_node_flags + var/iter_count = 0 + + enqueue_log.Cut() for (queue_node = Master.queue_head; queue_node; queue_node = queue_node.queue_next) + iter_count++ + if(iter_count >= ENQUEUE_SANITY) + var/msg = "[src] subsystem has likely entered an infinite enqueue loop, restarting MC immediately!" + to_chat_immediate( + GLOB.admins, + examine_block(span_userdanger("ERROR: [msg]")), + type = MESSAGE_TYPE_DEBUG + ) + log_enqueue(msg, list("enqueue_log" = enqueue_log.Copy())) +#if defined(INIT_ORDER_PLEXORA) && !defined(UNIT_TESTS) + SSplexora.mc_alert("[src] has likely entered an infinite loop in enqueue(), we're restarting the MC immediately!") +#endif + stack_trace("enqueue() entered an infinite loop, we're restarting the MC!") + enqueue_log.Cut() + Recreate_MC() + return + + queue_node_priority = queue_node.queued_priority queue_node_flags = queue_node.flags + enqueue_log["[iter_count]"] = list( + "node" = "[queue_node]", + "next" = "[queue_node.queue_next || "(none)"]", + "priority" = queue_node_priority, + "flags" = queue_node_flags, + ) + if (queue_node_flags & (SS_TICKER|SS_BACKGROUND) == SS_TICKER) if ((SS_flags & (SS_TICKER|SS_BACKGROUND)) != SS_TICKER) continue @@ -215,6 +247,11 @@ if (queue_node_priority < SS_priority) break + if(iter_count > 0) + avg_iter_count = avg_iter_count ? ((avg_iter_count + iter_count) * 0.5) : iter_count + var/drift = RELATIVE_ERROR(iter_count, avg_iter_count) + avg_drift = avg_drift ? ((drift + avg_drift) * 0.5) : drift + queued_time = world.time queued_priority = SS_priority state = SS_QUEUED @@ -325,5 +362,7 @@ out["relation_id_SS"] = "[ss_id]-[time_stamp()]-[rand(100, 10000)]" // since we insert custom into its own table we want to add a relational id to fetch from the custom data and the subsystem out["cost"] = cost out["tick_usage"] = tick_usage + out["avg_iter_count"] = avg_iter_count + out["avg_drift"] = avg_drift out["custom"] = list() // Override as needed on child return out diff --git a/code/controllers/subsystem/statpanel.dm b/code/controllers/subsystem/statpanel.dm index 2d3a452fdec5..22cbf7824c3d 100644 --- a/code/controllers/subsystem/statpanel.dm +++ b/code/controllers/subsystem/statpanel.dm @@ -172,17 +172,18 @@ SUBSYSTEM_DEF(statpanels) for(var/image/target_image as anything in target.images) if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override) continue - overrides += target_image.loc + overrides[target_image.loc] = TRUE var/list/atoms_to_display = list(target_mob.listed_turf) + var/should_check_obscured = (length(target_mob.listed_turf?.contents) < 25) for(var/atom/movable/turf_content as anything in target_mob.listed_turf) if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT) continue if(turf_content.invisibility > target_mob.see_invisible) continue - if(turf_content in overrides) + if(overrides[turf_content]) continue - if(turf_content.IsObscured()) + if(should_check_obscured && turf_content.IsObscured()) continue atoms_to_display += turf_content diff --git a/monkestation/code/__HELPERS/files.dm b/monkestation/code/__HELPERS/files.dm index be454635ab42..25ea7c4537a7 100644 --- a/monkestation/code/__HELPERS/files.dm +++ b/monkestation/code/__HELPERS/files.dm @@ -1,4 +1,4 @@ -/client/proc/browse_files(root_type = BROWSE_ROOT_ALL_LOGS, max_iterations = 10, list/valid_extensions = list("txt", "log", "htm", "html", "gz", "json"), list/whitelist = null, allow_folder = TRUE) +/client/proc/browse_files(root_type = BROWSE_ROOT_ALL_LOGS, max_iterations = 10, list/valid_extensions = list("txt", "log", "htm", "html", "gz", "json", "log.json"), list/whitelist = null, allow_folder = TRUE) var/regex/valid_ext_regex = new("\\.(?:[regex_quote_list(valid_extensions)])$", "i") var/regex/whitelist_regex if(whitelist) diff --git a/monkestation/code/modules/logging/categories/log_category_debug.dm b/monkestation/code/modules/logging/categories/log_category_debug.dm new file mode 100644 index 000000000000..dd98fa011d25 --- /dev/null +++ b/monkestation/code/modules/logging/categories/log_category_debug.dm @@ -0,0 +1,3 @@ +/datum/log_category/debug_enqueue + category = LOG_CATEGORY_ENQUEUE + debugger_visible = TRUE diff --git a/tgstation.dme b/tgstation.dme index 57986e06964a..b89624c94c00 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -437,6 +437,7 @@ #include "code\__DEFINES\~monkestation\market.dm" #include "code\__DEFINES\~monkestation\martial_arts.dm" #include "code\__DEFINES\~monkestation\materials.dm" +#include "code\__DEFINES\~monkestation\maths.dm" #include "code\__DEFINES\~monkestation\mecha.dm" #include "code\__DEFINES\~monkestation\microfusion.dm" #include "code\__DEFINES\~monkestation\misc.dm" @@ -7135,6 +7136,7 @@ #include "monkestation\code\modules\loafing\code\loafer.dm" #include "monkestation\code\modules\logging\log_category.dm" #include "monkestation\code\modules\logging\log_holder.dm" +#include "monkestation\code\modules\logging\categories\log_category_debug.dm" #include "monkestation\code\modules\logging\categories\log_category_game.dm" #include "monkestation\code\modules\map_gen_expansions\_basemapping.dm" #include "monkestation\code\modules\map_gen_expansions\areas.dm" From d08f5878326dd4ccd27cd654ced404ca410e38f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 00:13:54 +0000 Subject: [PATCH 15/40] Automatic changelog for PR #3453 [ci skip] --- html/changelogs/AutoChangeLog-pr-3453.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3453.yml diff --git a/html/changelogs/AutoChangeLog-pr-3453.yml b/html/changelogs/AutoChangeLog-pr-3453.yml new file mode 100644 index 000000000000..ad79ede09d0a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3453.yml @@ -0,0 +1,5 @@ +author: "Absolucy" +delete-after: True +changes: + - bugfix: "Fixed some major lag that'd occur related to alt-clicking." + - server: "Added a failsafe to immediately restart the MC during certain conditions where a subsystem would loop infinitely while queuing." \ No newline at end of file From 1860e5b95ddae3159ff005de98f4337c6809d0ee Mon Sep 17 00:00:00 2001 From: Lucy Date: Sat, 21 Sep 2024 20:14:44 -0400 Subject: [PATCH 16/40] Replaces rigged storyteller with automatic transfer votes (#3278) * Replaces rigged storyteller with automatic transfer votes * meow * Refactor to use `SSautotransfer` --- .../configuration/entries/monkestation.dm | 18 +++++ code/controllers/subsystem/vote.dm | 16 +++-- code/modules/events/_event.dm | 2 - config/game_options.txt | 8 +++ .../controllers/subsystem/autotransfer.dm | 57 +++++++++++++++ monkestation/code/datums/votes/_vote_datum.dm | 2 + .../code/datums/votes/transfer_vote.dm | 50 +++++++++++++ .../modules/goonimizations/shuttle_votes.dm | 72 ------------------- .../modules/virology/living/spread_disease.dm | 2 - tgstation.dme | 4 +- tgui/packages/tgui/interfaces/VotePanel.tsx | 7 +- 11 files changed, 156 insertions(+), 82 deletions(-) create mode 100644 monkestation/code/controllers/subsystem/autotransfer.dm create mode 100644 monkestation/code/datums/votes/_vote_datum.dm create mode 100644 monkestation/code/datums/votes/transfer_vote.dm delete mode 100644 monkestation/code/modules/goonimizations/shuttle_votes.dm diff --git a/code/controllers/configuration/entries/monkestation.dm b/code/controllers/configuration/entries/monkestation.dm index 6c838e4fff6e..c49237131fec 100644 --- a/code/controllers/configuration/entries/monkestation.dm +++ b/code/controllers/configuration/entries/monkestation.dm @@ -44,3 +44,21 @@ /datum/config_entry/flag/disable_particle_weather /datum/config_entry/flag/disable_storyteller + +/datum/config_entry/number/transfer_vote_time + default = 90 MINUTES + min_val = 0 + +/datum/config_entry/number/transfer_vote_time/ValidateAndSet(str_val) + . = ..() + if(.) + config_entry_value *= 600 // documented as minutes + +/datum/config_entry/number/subsequent_transfer_vote_time + default = 30 MINUTES + min_val = 0 + +/datum/config_entry/number/subsequent_transfer_vote_time/ValidateAndSet(str_val) + . = ..() + if(.) + config_entry_value *= 600 // documented as minutes diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 787748405aaa..df0bbeedcec4 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(vote) var/to_display = current_vote.get_result_text(winners, final_winner, non_voters) log_vote(to_display) - to_chat(world, span_infoplain(vote_font("\n[to_display]"))) + to_chat(world, "\n" + examine_block(span_infoplain(vote_font("[to_display]"))) + "\n", type = MESSAGE_TYPE_OOC) // monkestation edit: wrap in examine block, use MESSAGE_TYPE_OOC // Finally, doing any effects on vote completion if (final_winner) // if no one voted final_winner will be null @@ -103,6 +103,10 @@ SUBSYSTEM_DEF(vote) return if(CONFIG_GET(flag/no_dead_vote) && voter.stat == DEAD && !voter.client?.holder) return + // monkestation start + if(!current_vote.can_vote(voter)) + return + // monkestation end // If user has already voted, remove their specific vote if(voter.ckey in current_vote.choices_by_ckey) @@ -133,9 +137,12 @@ SUBSYSTEM_DEF(vote) return if(!voter?.ckey) return + // monkestation start + if(!current_vote.can_vote(voter)) + return + // monkestation end if(CONFIG_GET(flag/no_dead_vote) && voter.stat == DEAD && !voter.client?.holder) return - else voted += voter.ckey @@ -226,9 +233,9 @@ SUBSYSTEM_DEF(vote) var/to_display = current_vote.initiate_vote(vote_initiator_name, duration) log_vote(to_display) - to_chat(world, span_infoplain(vote_font("\n[span_bold(to_display)]\n\ + to_chat(world, "\n" + examine_block(span_infoplain(vote_font("[span_bold(to_display)]\n\ Type vote or click here to place your votes.\n\ - You have [DisplayTimeText(duration)] to vote."))) + You have [DisplayTimeText(duration)] to vote."))) + "\n", type = MESSAGE_TYPE_OOC) // monkestation edit: wrap in examine block, use MESSAGE_TYPE_OOC // And now that it's going, give everyone a voter action for(var/client/new_voter as anything in GLOB.clients) @@ -304,6 +311,7 @@ SUBSYSTEM_DEF(vote) "countMethod" = current_vote.count_method, "choices" = choices, "vote" = vote_data, + "canVote" = current_vote.can_vote(user), // monkestation edit ) all_vote_data += list(vote_data) diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm index c27396de1aca..03a0cbd0718b 100644 --- a/code/modules/events/_event.dm +++ b/code/modules/events/_event.dm @@ -102,8 +102,6 @@ return FALSE if(roundstart && ((SSticker.round_start_time && (world.time - SSticker.round_start_time) >= 2 MINUTES) || (SSgamemode.ran_roundstart && !fake_check))) return FALSE - if(istype(src, /datum/round_event_control/antagonist/solo/from_ghosts) && (SSautotransfer.starttime + 85 MINUTES <= world.time)) - return TRUE // we allow all ghost roles to run at this point and dont care about other checks // monkestation end if(occurrences >= max_occurrences) return FALSE diff --git a/config/game_options.txt b/config/game_options.txt index 8e2d62c329b5..66448be8ea59 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -548,6 +548,14 @@ METACURRENCY_NAME Metacoin TWITCH_KEY mrhouse +## How long (in minutes) after roundstart should the server start an automatic crew transfer vote? +## Defaults to 90 minutes. Set to 0 to completely disable automatic crew transfer votes. +TRANSFER_VOTE_TIME 90 + +## If players vote against a crew transfer, how long (in minutes) until another automatic transfer vote will be initiated? +## Defaults to 30 minutes. Set to 0 to completely disable subsequent crew transfer votes. +SUBSEQUENT_TRANSFER_VOTE_TIME 30 + ## Gamemode configurations ## Multipliers for points gained over time for event tracks. diff --git a/monkestation/code/controllers/subsystem/autotransfer.dm b/monkestation/code/controllers/subsystem/autotransfer.dm new file mode 100644 index 000000000000..e136b3aca303 --- /dev/null +++ b/monkestation/code/controllers/subsystem/autotransfer.dm @@ -0,0 +1,57 @@ +SUBSYSTEM_DEF(autotransfer) + name = "Autotransfer Vote" + flags = SS_KEEP_TIMING | SS_BACKGROUND + wait = 1 MINUTES + runlevels = RUNLEVEL_GAME + + var/doing_transfer_vote = FALSE + COOLDOWN_DECLARE(next_transfer_vote) + +/datum/controller/subsystem/autotransfer/Initialize(timeofday) + if(!CONFIG_GET(number/transfer_vote_time)) + flags |= SS_NO_FIRE + return SS_INIT_NO_NEED + SSticker.OnRoundstart(CALLBACK(src, PROC_REF(crew_transfer_setup))) + return SS_INIT_SUCCESS + +/datum/controller/subsystem/autotransfer/fire() + if(can_run_transfer_vote()) + SSvote.initiate_vote(/datum/vote/shuttle_call, "automatic shuttle vote", forced = TRUE) + +/datum/controller/subsystem/autotransfer/proc/can_run_transfer_vote() + . = TRUE + if(doing_transfer_vote) + return FALSE + if(!CONFIG_GET(number/transfer_vote_time)) + return FALSE + if(!next_transfer_vote || !COOLDOWN_FINISHED(src, next_transfer_vote)) + return FALSE + if(SSvote.current_vote) + return FALSE + if(EMERGENCY_PAST_POINT_OF_NO_RETURN) + return FALSE + if(SSshuttle.supermatter_cascade) + return FALSE + +/datum/controller/subsystem/autotransfer/proc/crew_transfer_setup() + COOLDOWN_START(src, next_transfer_vote, CONFIG_GET(number/transfer_vote_time)) + +/datum/controller/subsystem/autotransfer/proc/crew_transfer_passed() + if(!SSticker.IsRoundInProgress()) + CRASH("Somehow tried to initiate crew transfer, even tho there is not ongoing round!") + SSshuttle.admin_emergency_no_recall = TRUE + if(SSshuttle.emergency?.mode == SHUTTLE_DISABLED || EMERGENCY_PAST_POINT_OF_NO_RETURN) + return + if(EMERGENCY_IDLE_OR_RECALLED) + SSshuttle.emergency.request( + red_alert = (SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED) + ) + crew_transfer_continue() // safety measure + +/datum/controller/subsystem/autotransfer/proc/crew_transfer_continue() + SSgamemode.point_gain_multipliers[EVENT_TRACK_ROLESET]++ + var/subsequent_transfer_vote_time = CONFIG_GET(number/subsequent_transfer_vote_time) + if(!subsequent_transfer_vote_time) + next_transfer_vote = 0 + return + COOLDOWN_START(src, next_transfer_vote, subsequent_transfer_vote_time) diff --git a/monkestation/code/datums/votes/_vote_datum.dm b/monkestation/code/datums/votes/_vote_datum.dm new file mode 100644 index 000000000000..e19428a64d16 --- /dev/null +++ b/monkestation/code/datums/votes/_vote_datum.dm @@ -0,0 +1,2 @@ +/datum/vote/proc/can_vote(mob/voter) + return TRUE diff --git a/monkestation/code/datums/votes/transfer_vote.dm b/monkestation/code/datums/votes/transfer_vote.dm new file mode 100644 index 000000000000..5baa6218e1a5 --- /dev/null +++ b/monkestation/code/datums/votes/transfer_vote.dm @@ -0,0 +1,50 @@ +#define CHOICE_CALL "Call Shuttle" +#define CHOICE_CONTINUE "Continue Round" + +/// If a map vote is called before the emergency shuttle leaves the station, the players can call another vote to re-run the vote on the shuttle leaving. +/datum/vote/shuttle_call + name = "Call Shuttle" + message = "Should we go home?" + default_choices = list( + CHOICE_CALL, + CHOICE_CONTINUE, + ) + player_startable = FALSE + +/datum/vote/shuttle_call/reset() + . = ..() + SSautotransfer.doing_transfer_vote = FALSE + +/datum/vote/shuttle_call/can_be_initiated(mob/by_who, forced = FALSE) + . = ..() + if(!.) + return FALSE + if(!SSticker.IsRoundInProgress()) + return FALSE + if(EMERGENCY_PAST_POINT_OF_NO_RETURN) + return FALSE + if(SSautotransfer.doing_transfer_vote) + return FALSE + +/datum/vote/shuttle_call/initiate_vote(initiator, duration) + . = ..() + SSautotransfer.doing_transfer_vote = TRUE + +/datum/vote/shuttle_call/finalize_vote(winning_option) + switch(winning_option) + if(CHOICE_CALL) + SSautotransfer.crew_transfer_passed() + if(CHOICE_CONTINUE) + SSautotransfer.crew_transfer_continue() + else + CRASH("[type] wasn't passed a valid winning choice. (Got: [winning_option || "null"])") + +/datum/vote/shuttle_call/can_vote(mob/voter = usr) + . = TRUE + if(voter.client?.holder) + return TRUE + if(isobserver(voter) || voter.stat == DEAD || !(voter.ckey in GLOB.joined_player_list)) // only living crew gets to vote + return FALSE + +#undef CHOICE_CONTINUE +#undef CHOICE_CALL diff --git a/monkestation/code/modules/goonimizations/shuttle_votes.dm b/monkestation/code/modules/goonimizations/shuttle_votes.dm deleted file mode 100644 index e68c62867759..000000000000 --- a/monkestation/code/modules/goonimizations/shuttle_votes.dm +++ /dev/null @@ -1,72 +0,0 @@ - -SUBSYSTEM_DEF(autotransfer) - name = "Autotransfer Vote" - flags = SS_KEEP_TIMING | SS_BACKGROUND - wait = 1 MINUTES - - var/starttime - var/targettime - var/called = FALSE - -/datum/controller/subsystem/autotransfer/Initialize(timeofday) - starttime = world.time - targettime = starttime + 90 MINUTES - - return SS_INIT_SUCCESS - -/datum/controller/subsystem/autotransfer/fire() - if(length(GLOB.player_list) < 25) - return - if(world.time > targettime) - if(EMERGENCY_ESCAPED_OR_ENDGAMED) - return - if(called || SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_DOCKED) - return - SSvote.initiate_vote(/datum/vote/shuttle_call, "automatic shuttle vote") - targettime = targettime + 20 MINUTES - -/datum/vote/shuttle_call - name = "Call Shuttle" - message = "Should we go home?!" - default_choices = list("Yes", "No") - player_startable = FALSE - -/datum/vote/shuttle_call/can_be_initiated(mob/by_who, forced = FALSE) - . = ..() - if(!.) - return FALSE - if(EMERGENCY_ESCAPED_OR_ENDGAMED) - return FALSE - if(!SSticker.HasRoundStarted() || SSautotransfer.called || SSshuttle.emergency.mode == SHUTTLE_CALL) - return FALSE - if(started_time) - var/next_allowed_time = SSautotransfer.targettime - if(next_allowed_time > world.time && !forced) - message = "A vote was initiated recently. You must wait [DisplayTimeText(next_allowed_time - world.time)] before a shuttle vote can happen!" - return FALSE - - message = initial(message) - -/datum/vote/shuttle_call/create_vote(mob/vote_creator) - . = ..() - if(!.) - return FALSE - if(EMERGENCY_ESCAPED_OR_ENDGAMED) - return FALSE - if(!SSticker.HasRoundStarted() || SSautotransfer.called || SSshuttle.emergency.mode == SHUTTLE_CALL) - return FALSE - if(length(GLOB.player_list) < 25) - return FALSE - - -/datum/vote/shuttle_call/finalize_vote(winning_option) - if(SSautotransfer.called) - return - if(winning_option == "No") - return - if(SSshuttle.emergency.mode == SHUTTLE_CALL) - return - SSshuttle.admin_emergency_no_recall = TRUE - SSshuttle.emergency.mode = SHUTTLE_IDLE - SSshuttle.emergency.request() - SSautotransfer.called = TRUE diff --git a/monkestation/code/modules/virology/living/spread_disease.dm b/monkestation/code/modules/virology/living/spread_disease.dm index 21b1da308fd7..5f8885afdf3b 100644 --- a/monkestation/code/modules/virology/living/spread_disease.dm +++ b/monkestation/code/modules/virology/living/spread_disease.dm @@ -65,8 +65,6 @@ return TRUE /mob/dead/new_player/proc/DiseaseCarrierCheck(mob/living/carbon/human/H) - if(world.time < SSautotransfer.starttime + 30 MINUTES) - return // 10% of players are joining the station with some minor disease if latejoined if(prob(10)) var/virus_choice = pick(subtypesof(/datum/disease/advanced)- typesof(/datum/disease/advanced/premade)) diff --git a/tgstation.dme b/tgstation.dme index b89624c94c00..0d226c94099b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5805,6 +5805,7 @@ #include "monkestation\code\area\areas\direction_names.dm" #include "monkestation\code\area\areas\ruins.dm" #include "monkestation\code\area\areas\station.dm" +#include "monkestation\code\controllers\subsystem\autotransfer.dm" #include "monkestation\code\controllers\subsystem\economy.dm" #include "monkestation\code\controllers\subsystem\glowshroom.dm" #include "monkestation\code\controllers\subsystem\job.dm" @@ -5867,6 +5868,8 @@ #include "monkestation\code\datums\status_effects\food_buffs.dm" #include "monkestation\code\datums\status_effects\debuffs\drunk.dm" #include "monkestation\code\datums\storage\storage.dm" +#include "monkestation\code\datums\votes\_vote_datum.dm" +#include "monkestation\code\datums\votes\transfer_vote.dm" #include "monkestation\code\datums\weather\weather_types\radiation_storm.dm" #include "monkestation\code\datums\wires\particle_accelerator.dm" #include "monkestation\code\game\atom.dm" @@ -7056,7 +7059,6 @@ #include "monkestation\code\modules\ghost_players\job_helpers\injured_spawner.dm" #include "monkestation\code\modules\ghost_players\job_helpers\organ_printer.dm" #include "monkestation\code\modules\goonimizations\goon_keybinds.dm" -#include "monkestation\code\modules\goonimizations\shuttle_votes.dm" #include "monkestation\code\modules\guns\laser.dm" #include "monkestation\code\modules\holomaps\areas.dm" #include "monkestation\code\modules\holomaps\base_datum.dm" diff --git a/tgui/packages/tgui/interfaces/VotePanel.tsx b/tgui/packages/tgui/interfaces/VotePanel.tsx index f41ed99a1034..d5d1b7a6e576 100644 --- a/tgui/packages/tgui/interfaces/VotePanel.tsx +++ b/tgui/packages/tgui/interfaces/VotePanel.tsx @@ -37,6 +37,7 @@ type ActiveVote = { timeRemaining: number; choices: Option[]; countMethod: number; + canVote?: BooleanLike; }; type UserData = { @@ -192,7 +193,10 @@ const ChoicesPanel = (props) => { buttons={