mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Fixes item quirks giving items on charslot change (#5671)
## About The Pull Request Title. Closes https://github.com/Bubberstation/Bubberstation/issues/5632 The exact implementation is a new variable on quirks that qdels the items they spawn or early returns if its a path. Family heirloom and medicine allergy are exempt. ## Why It's Good For The Game bugs bad ## Proof Of Testing <details> <summary>Screenshots/Videos</summary> <img width="1556" height="628" alt="image" src="https://github.com/user-attachments/assets/0162d509-4dab-48a5-8a78-ded340fad641" /> ignore the runtimes thats a tg error </details> ## Changelog 🆑 fix: Item quirks no longer give items on char slot change /🆑
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
var/cleanup = TRUE
|
||||
|
||||
/// Remove any quirks that the client's prefs do not have, and apply any new ones
|
||||
/datum/controller/subsystem/processing/quirks/proc/OverrideQuirks(mob/living/user, client/applied_client)
|
||||
/datum/controller/subsystem/processing/quirks/proc/OverrideQuirks(mob/living/user, client/applied_client, spawn_items = TRUE)
|
||||
var/list/required_quirks = applied_client.prefs.all_quirks
|
||||
var/list/present_quirks = list()
|
||||
for(var/datum/quirk/quirk in user.quirks)
|
||||
@@ -16,5 +16,8 @@
|
||||
var/existing_quirk = present_quirks[quirk_name]
|
||||
var/quirk_type = quirks[quirk_name]
|
||||
var/datum/quirk/quirk = new quirk_type
|
||||
if (!spawn_items)
|
||||
quirk.set_item_giving_paused(TRUE)
|
||||
quirk.add_to_holder(user, existing_quirk, applied_client)
|
||||
quirk.set_item_giving_paused(FALSE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user