Skip to content

Commit

Permalink
Fixes the Impoverished Economic Status Not Saving Properly (Aurorasta…
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyGemmy authored Jun 25, 2022
1 parent 4634d4f commit 1a82b01
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
6 changes: 6 additions & 0 deletions SQL/migrate/V072__economic_status_fix.sql
Original file line number Diff line number Diff line change
@@ -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');
22 changes: 13 additions & 9 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/sql_impoverished_fix.yml
Original file line number Diff line number Diff line change
@@ -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."

0 comments on commit 1a82b01

Please sign in to comment.