Skip to content

Commit

Permalink
[MIRROR] [NO GBP] Fixes Alcoholic quirk selection and addiction in ge…
Browse files Browse the repository at this point in the history
…neral not being forever. (#1802)

* [NO GBP] Fixes Alcoholic quirk selection and addiction in general not being forever. (#82403)

## About The Pull Request

Fixes #82346
Also fixes a bug where Junkie, Smoker, and Alcoholic would not give you
more addiction once yours ran out.
## Changelog
:cl:
fix: Fixes Alcoholic quirk selection
fix: Fixes Junkie, Smoker, and Alcoholic not giving you more addiction
when you come clean.
/:cl:

* [NO GBP] Fixes Alcoholic quirk selection and addiction in general not being forever.

---------

Co-authored-by: DATAxPUNGED <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Apr 4, 2024
1 parent 85e061b commit 0109768
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions code/_globalvars/lists/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ GLOBAL_LIST_INIT(nearsighted_glasses, list(

///Options for the prosthetic limb quirk to choose from
GLOBAL_LIST_INIT(limb_choice, list(
"Left arm" = /obj/item/bodypart/arm/left/robot/surplus,
"Right arm" = /obj/item/bodypart/arm/right/robot/surplus,
"Left leg" = /obj/item/bodypart/leg/left/robot/surplus,
"Right leg" = /obj/item/bodypart/leg/right/robot/surplus,
"Left Arm" = /obj/item/bodypart/arm/left/robot/surplus,
"Right Arm" = /obj/item/bodypart/arm/right/robot/surplus,
"Left Leg" = /obj/item/bodypart/leg/left/robot/surplus,
"Right Leg" = /obj/item/bodypart/leg/right/robot/surplus,
))

///Transhumanist quirk
Expand Down Expand Up @@ -56,7 +56,7 @@ GLOBAL_LIST_INIT(possible_smoker_addictions, setup_junkie_addictions(list(
)))

///Options for the Alcoholic quirk to choose from
GLOBAL_LIST_INIT(possible_alcoholic_addictions, setup_junkie_addictions(list(
GLOBAL_LIST_INIT(possible_alcoholic_addictions, list(
"Beekhof Blauw Curaçao" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/curacao, "reagent" = /datum/reagent/consumable/ethanol/curacao),
"Buckin' Bronco's Applejack" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/applejack, "reagent" = /datum/reagent/consumable/ethanol/applejack),
"Voltaic Yellow Wine" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/wine_voltaic, "reagent" = /datum/reagent/consumable/ethanol/wine_voltaic),
Expand All @@ -81,7 +81,7 @@ GLOBAL_LIST_INIT(possible_alcoholic_addictions, setup_junkie_addictions(list(
"Breezy Shoals Coconut Rum" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/coconut_rum, "reagent" = /datum/reagent/consumable/ethanol/coconut_rum),
"Moonlabor Yūyake" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/yuyake, "reagent" = /datum/reagent/consumable/ethanol/yuyake),
"Shu-Kouba Straight Shochu" = list("bottlepath" = /obj/item/reagent_containers/cup/glass/bottle/shochu, "reagent" = /datum/reagent/consumable/ethanol/shochu)
)))
))

///Options for Prosthetic Organ
GLOBAL_LIST_INIT(organ_choice, list(
Expand Down
8 changes: 4 additions & 4 deletions code/datums/quirks/negative_quirks/addict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,16 @@
customization_options = list(/datum/preference/choiced/alcoholic)

/datum/quirk/item_quirk/addict/alcoholic/New()
drug_container_type = GLOB.possible_alcoholic_addictions[pick(GLOB.possible_alcoholic_addictions["bottlepath"])]
var/random_alcohol = pick(GLOB.possible_alcoholic_addictions)
drug_container_type = GLOB.possible_alcoholic_addictions[random_alcohol]["bottlepath"]
favorite_alcohol = GLOB.possible_alcoholic_addictions[random_alcohol]["reagent"]
return ..()

/datum/quirk/item_quirk/addict/alcoholic/add_unique(client/client_source)
var/addiction = client_source?.prefs.read_preference(/datum/preference/choiced/alcoholic)
if(addiction && (addiction != "Random"))
drug_container_type = GLOB.possible_alcoholic_addictions[addiction]["bottlepath"]
favorite_alcohol = GLOB.possible_alcoholic_addictions[addiction]["reagent"]
return ..()

/datum/quirk/item_quirk/addict/alcoholic/post_add()
Expand All @@ -210,10 +213,7 @@
if(isnull(brandy_container))
stack_trace("Alcoholic quirk added while the GLOB.alcohol_containers is (somehow) not initialized!")
brandy_container = new drug_container_type
favorite_alcohol = brandy_container["reagent"]
qdel(brandy_container)
else
favorite_alcohol = brandy_container["reagent"]

quirk_holder.add_mob_memory(/datum/memory/key/quirk_alcoholic, protagonist = quirk_holder, preferred_brandy = initial(favorite_alcohol.name))
// alcoholic livers have 25% less health and healing
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@
return "[year] [origin] [type]"

/obj/item/reagent_containers/cup/glass/bottle/absinthe
name = "extra-strong absinthe"
name = "Extra-strong absinthe"
desc = "A strong alcoholic drink brewed and distributed by"
icon_state = "absinthebottle"
list_reagents = list(/datum/reagent/consumable/ethanol/absinthe = 100)
Expand Down
2 changes: 1 addition & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3714,6 +3714,7 @@
#include "code\modules\client\preferences_menu.dm"
#include "code\modules\client\preferences_savefile.dm"
#include "code\modules\client\preferences\_preference.dm"
#include "code\modules\client\preferences\addict.dm"
#include "code\modules\client\preferences\admin.dm"
#include "code\modules\client\preferences\age.dm"
#include "code\modules\client\preferences\ai_core_display.dm"
Expand All @@ -3737,7 +3738,6 @@
#include "code\modules\client\preferences\hotkeys.dm"
#include "code\modules\client\preferences\item_outlines.dm"
#include "code\modules\client\preferences\jobless_role.dm"
#include "code\modules\client\preferences\junkie.dm"
#include "code\modules\client\preferences\language.dm"
#include "code\modules\client\preferences\mod_select.dm"
#include "code\modules\client\preferences\multiz_parallax.dm"
Expand Down

0 comments on commit 0109768

Please sign in to comment.