From e3ad2d65493b1dd51c9dd4368f379360b670fffb Mon Sep 17 00:00:00 2001 From: Geeves Date: Tue, 15 Dec 2020 23:23:02 +0200 Subject: [PATCH] Cognac Fix (#10783) --- aurorastation.dme | 1 + code/__defines/drinks.dm | 4 ++++ code/modules/customitems/item_defines.dm | 2 ++ .../reagents/reagent_containers/food/drinks.dm | 11 +++-------- html/changelogs/geeves-cognac_fix.yml | 6 ++++++ icons/obj/custom_items/leonce_cognac.dmi | Bin 584 -> 859 bytes 6 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 code/__defines/drinks.dm create mode 100644 html/changelogs/geeves-cognac_fix.yml diff --git a/aurorastation.dme b/aurorastation.dme index 52f5d31dedf..e8db1b878a8 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -28,6 +28,7 @@ #include "code\__defines\color.dm" #include "code\__defines\damage_organs.dm" #include "code\__defines\dna.dm" +#include "code\__defines\drinks.dm" #include "code\__defines\dview.dm" #include "code\__defines\extools.dm" #include "code\__defines\flags.dm" diff --git a/code/__defines/drinks.dm b/code/__defines/drinks.dm new file mode 100644 index 00000000000..2f25b7c039b --- /dev/null +++ b/code/__defines/drinks.dm @@ -0,0 +1,4 @@ +#define NO_EMPTY_ICON 1 //does NOT have an iconstate_empty icon. If adding empty icons for a drink, make sure it does not have this flag +#define UNIQUE_EMPTY_ICON 2 //Uses the empty_icon_state listed. Should really only be used when one trash state applies to multiple drinks. Remove if one is added +#define UNIQUE_EMPTY_ICON_FILE 4 //Uses the empty_icon_state listed. also doesn't change its icon file, giving it a pseudo contained sprite status +#define IS_GLASS 8 //Container is glass. Affects shattering, unacidable, etc. \ No newline at end of file diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 4a2ea700257..5a314d2fa94 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -485,6 +485,8 @@ All custom items with worn sprites must follow the contained sprite system: http which smells of the barrel it was aged in. The region and producer are on the label." icon = 'icons/obj/custom_items/leonce_cognac.dmi' icon_state = "leonce_cognac" + empty_icon_state = "leonce_cognac_empty" + drink_flags = UNIQUE_EMPTY_ICON_FILE | IS_GLASS /obj/item/clothing/suit/storage/fluff/sonorous_mantle //Maraziite Throw Over - Sonorous Zouzoror - sleepywolf diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index f9a364d97b3..5c3c124a5e1 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -1,8 +1,3 @@ -//drink_flags defines -#define NO_EMPTY_ICON 1 //does NOT have an iconstate_empty icon. If adding empty icons for a drink, make sure it does not have this flag -#define UNIQUE_EMPTY_ICON 2 //Uses the empty_icon_state listed. Should really only be used when one trash state applies to multiple drinks. Remove if one is added -#define IS_GLASS 4 //Container is glass. Affects shattering, unacidable, etc. - /* Standards for trash/empty states under the /drinks path: Adding Empty States: Trash/Empty states should be placed in the drinks_empty.dmi and should be the drink's icon_state name followed by _empty (ex: whiskeybottle_empty) and the NO_EMPTY_ICON flag should be removed. @@ -44,11 +39,11 @@ If you add a drink with no empty icon sprite, ensure it is flagged as NO_EMPTY_I if(drink_flags & UNIQUE_EMPTY_ICON) icon = 'icons/obj/drinks_empty.dmi' icon_state = empty_icon_state - return - if(!(drink_flags & NO_EMPTY_ICON)) + else if(drink_flags & UNIQUE_EMPTY_ICON_FILE) + icon_state = empty_icon_state + else if(!(drink_flags & NO_EMPTY_ICON)) icon = 'icons/obj/drinks_empty.dmi' icon_state = "[initial(icon_state)]_empty" - return else icon = initial(icon) //Necessary for refilling empty drinks icon_state = initial(icon_state) diff --git a/html/changelogs/geeves-cognac_fix.yml b/html/changelogs/geeves-cognac_fix.yml new file mode 100644 index 00000000000..3df4983fb9a --- /dev/null +++ b/html/changelogs/geeves-cognac_fix.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "Fixed the Old Earth Luxury Cognac lacking an empty sprite." \ No newline at end of file diff --git a/icons/obj/custom_items/leonce_cognac.dmi b/icons/obj/custom_items/leonce_cognac.dmi index 984c8d43f06ad2285c9435990a80a8dfe9c20a9c..2122e4167cf08abb7e76290dd49dd656c1e198ff 100644 GIT binary patch literal 859 zcmV-h1ElV=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex7wuvIWN;^NFm z%}mcIfpCgT5=&AQY!#GpQuFhYQ{$8K)AJIOmAE)lGK-28Y!wW-IMa#}b5kK~?5g8a za|=o;ap_T3aP@OhaPjrz0sutM0i3Br#}*ISOuLus;&0HwU>i)95Q2=UgN|?s z*TFiYDo1-d-zAvdAB<%o>!)1ZNYas+yAK89vzNhfLwDat4vWQnN(3Q>8P3Fmf|0eAmCDT7dyZy6dqgt&302Ye{ zUWcnt98ApTG~|1d|5oGwko-fF`HU9pS_m(e_yPbT!0e9MrvR|a$6Z=R9RLn0c%PRO zTnpaC5}zfX-!c1}@O+ymlTmB z^f6hB5i}HjU*Y%T#w1Z<2Mi`C)d-rZftMA5%ZgAJ=+p?BdE|h>1cx<(mTF)OzfmJ- zndE@fWw3X%ETPtE2AoK?c+Q5F;w7nJ?Z6j3|tG|wU4jd z$5i1nJ?WVq1EUDwK8EU!>&DYE>Z*gX7WXk#cU(7~mcdj9B~c;=xE8|E{Nb5r1WsJm zAI;It@_pc1@J4g=V)%`?tUsEgm-KyL6ai|;GXkeAXtOQox-y6WvpjQx8uE;w(H8Wq zE$CU~1QCFn=7hvmfDt%qcyk}ab1K&Ds9yw_<#88a1PwL3xsT~N6(6Fu!sjM;fz%fv z2_EWa{;@7Xl0VhYyy->AxC*F!HG(Dp#P#P@1vE}e@*ngktpdicLG?Eyt8ecAIWEuF lU_!pplekc!LWTZY{RUOh8-(={`BVS^002ovPDHLkV1iB;n0NpH literal 584 zcmV-O0=NB%P)V=-0C=1w$2$&$AQT1AnzxD@=*@g=X$;0t=oTgfos(=6n5t*O!Hzl znAOt7wWX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