mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
## 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 /🆑
24 lines
894 B
Plaintext
24 lines
894 B
Plaintext
|
|
/datum/quirk
|
|
/// special case logic for quirks that don't quite handle being transferred properly
|
|
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, 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)
|
|
present_quirks[quirk.name] = TRUE
|
|
quirk.cleanup = FALSE
|
|
quirk.remove_from_current_holder(TRUE)
|
|
|
|
for(var/quirk_name in required_quirks)
|
|
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)
|
|
|