From 05b494e15e8c4b1e27bc1414c0841d994880b4c4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 5 Feb 2023 13:43:22 +0100 Subject: [PATCH] [MIRROR] Station traits won't roll twice [MDB IGNORE] (#19177) * Station traits won't roll twice (#73174) ## About The Pull Request Station traits can't roll twice in the same round. They currently have blacklist for traits that can't roll together, this makes them not roll with themselves too. ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/61873 Station traits are not made with rolling twice in the same round in mind, and is just a waste of trait points, or will just be annoying (like in the issue report's case) ## Changelog :cl: fix: There will no longer have 2 of the same station trait roll twice in the same round. /:cl: * Station traits won't roll twice --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/controllers/subsystem/processing/station.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/processing/station.dm b/code/controllers/subsystem/processing/station.dm index 7971e78c7a7..21cd66c11a7 100644 --- a/code/controllers/subsystem/processing/station.dm +++ b/code/controllers/subsystem/processing/station.dm @@ -68,12 +68,14 @@ PROCESSING_SUBSYSTEM_DEF(station) pick_traits(STATION_TRAIT_NEUTRAL, neutral_trait_count) pick_traits(STATION_TRAIT_NEGATIVE, negative_trait_count) -///Picks traits of a specific category (e.g. bad or good) and a specified amount, then initializes them and adds them to the list of traits. +///Picks traits of a specific category (e.g. bad or good) and a specified amount, then initializes them, adds them to the list of traits, +///then removes them from possible traits as to not roll twice. /datum/controller/subsystem/processing/station/proc/pick_traits(trait_sign, amount) if(!amount) return for(var/iterator in 1 to amount) var/datum/station_trait/trait_type = pick_weight(selectable_traits_by_types[trait_sign]) //Rolls from the table for the specific trait type + selectable_traits_by_types[trait_sign] -= trait_type setup_trait(trait_type) ///Creates a given trait of a specific type, while also removing any blacklisted ones from the future pool.