Fix: Quirk Points & Augments+ (#19063)

* Fix filter_invalid_quirks to check augments, and fixed augments to check quirks

* Cleaning up log calls and docs

* Remove stray comment

* Adding missed Skyrat edit comment
This commit is contained in:
Dani Glore
2023-02-13 21:18:49 -05:00
committed by GitHub
parent 78da484056
commit eb229b7df1
4 changed files with 19 additions and 7 deletions
@@ -61,7 +61,7 @@
//SKYRAT EDIT END
var/list/new_quirks = preferences.all_quirks | quirk_name
if (SSquirks.filter_invalid_quirks(new_quirks) != new_quirks)
if (SSquirks.filter_invalid_quirks(new_quirks, preferences.augments) != new_quirks)// SKYRAT EDIT - AUGMENTS+
// If the client is sending an invalid give_quirk, that means that
// something went wrong with the client prediction, so we should
// catch it back up to speed.
@@ -77,10 +77,7 @@
var/quirk_name = params["quirk"]
var/list/new_quirks = preferences.all_quirks - quirk_name
if ( \
!(quirk_name in preferences.all_quirks) \
|| SSquirks.filter_invalid_quirks(new_quirks) != new_quirks \
)
if (!(quirk_name in preferences.all_quirks) || SSquirks.filter_invalid_quirks(new_quirks, preferences.augments) != new_quirks)// SKYRAT EDIT - AUGMENTS+
// If the client is sending an invalid remove_quirk, that means that
// something went wrong with the client prediction, so we should
// catch it back up to speed.
+1 -1
View File
@@ -312,7 +312,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
if(job_preferences[j] != JP_LOW && job_preferences[j] != JP_MEDIUM && job_preferences[j] != JP_HIGH)
job_preferences -= j
all_quirks = SSquirks.filter_invalid_quirks(SANITIZE_LIST(all_quirks))
all_quirks = SSquirks.filter_invalid_quirks(SANITIZE_LIST(all_quirks), augments)// SKYRAT EDIT - AUGMENTS+
validate_quirks()
return TRUE