diff --git a/SQL/migrate/V072__economic_status_fix.sql b/SQL/migrate/V072__economic_status_fix.sql new file mode 100644 index 00000000000..bb17f8d3066 --- /dev/null +++ b/SQL/migrate/V072__economic_status_fix.sql @@ -0,0 +1,6 @@ +-- +-- Implemented in PR #14329. +-- Adds the impoverished option to the economic status in the database so it saves correctly. +-- + +ALTER TABLE `ss13_characters` MODIFY COLUMN `economic_status` ENUM('Wealthy', 'Well-off', 'Average', 'Underpaid', 'Poor', 'Impoverished'); \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 42587cb68a6..99109cb79de 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -581,15 +581,19 @@ proc/display_logout_report() to_chat(src,get_logout_report()) proc/get_poor() - var/list/dudes = list() - for(var/mob/living/carbon/human/man in player_list) - if(man.client) - if(man.client.prefs.economic_status == ECONOMICALLY_POOR) - dudes += man - else if(man.client.prefs.economic_status == ECONOMICALLY_POOR && prob(50)) - dudes += man - if(dudes.len == 0) return null - return pick(dudes) + var/list/characters = list() + + for(var/mob/living/carbon/human/character in player_list) + if(character.client) + if(character.client.prefs.economic_status == ECONOMICALLY_DESTITUTE) // Discrimination. + characters += character + else if(character.client.prefs.economic_status == ECONOMICALLY_POOR && prob(50)) // 50% discrimination. + characters += character + + if(!length(characters)) + return + + return pick(characters) //Announces objectives/generic antag text. /proc/show_generic_antag_text(var/datum/mind/player) diff --git a/html/changelogs/sql_impoverished_fix.yml b/html/changelogs/sql_impoverished_fix.yml new file mode 100644 index 00000000000..35f76b80e6e --- /dev/null +++ b/html/changelogs/sql_impoverished_fix.yml @@ -0,0 +1,6 @@ +author: SleepyGemmy + +delete-after: True + +changes: + - backend: "Adds the impoverished economic status as an option in the SQL database, so it can save properly." \ No newline at end of file