mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Junkies get the drug addiction they have in their preferences (#96044)
## About The Pull Request `add()` runs before `add_unique()`, and `add()` includes randomization of `reagent_type` in lieu of an already defined one. `add_to_holder()` runs before both, so that's where the pref will be read.
This commit is contained in:
@@ -95,11 +95,11 @@
|
||||
associated_typepath = /datum/quirk/item_quirk/addict/junkie
|
||||
customization_options = list(/datum/preference/choiced/junkie)
|
||||
|
||||
/datum/quirk/item_quirk/addict/junkie/add_unique(client/client_source)
|
||||
|
||||
var/addiction = client_source?.prefs.read_preference(/datum/preference/choiced/junkie)
|
||||
if(addiction && (addiction != "Random"))
|
||||
reagent_type = GLOB.possible_junkie_addictions[addiction]
|
||||
/datum/quirk/item_quirk/addict/junkie/add_to_holder(mob/living/new_holder, quirk_transfer = FALSE, client/client_source, unique = TRUE, announce = TRUE)
|
||||
if(!quirk_transfer)
|
||||
var/addiction = client_source?.prefs.read_preference(/datum/preference/choiced/junkie)
|
||||
if(addiction && (addiction != "Random"))
|
||||
reagent_type = GLOB.possible_junkie_addictions[addiction]
|
||||
return ..()
|
||||
|
||||
/datum/quirk/item_quirk/addict/remove()
|
||||
|
||||
Reference in New Issue
Block a user