[Ready]You can now select what your pills will look like when making pills from the Chem Master (#41825)
cl Floyd/Qustinnus, paid for by Kryson add: You can now select what your pills will look like when making pills from the Chem Master /cl we had 21 pill sprites and used 1. waste. now you can pick from our list of 21 and it'll show you beforehand what they look like == Original commit names== * pillshere * names for fruit-kun * they do * they do * done * thanks mr mrdoombringer * reeling it in * Revert "reeling it in" This reverts commit 2b795a8baf5eec89fdc1e6b6a6ef9d36276c2e62. * [maximum peepee] * u got a boyfriend i bet he ddoesnt kiss ya * redpilled * adds random pills * boom * mrdoombringer is fat
@@ -467,6 +467,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
"stamp-law" = 'icons/stamp_icons/large_stamp-law.png'
|
||||
)
|
||||
|
||||
|
||||
/datum/asset/simple/IRV
|
||||
assets = list(
|
||||
"jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js',
|
||||
@@ -559,6 +560,32 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
"none_button.png" = 'html/none_button.png',
|
||||
)
|
||||
|
||||
/datum/asset/simple/pills
|
||||
assets = list(
|
||||
"pill1" = 'icons/UI_Icons/Pills/pill1.png',
|
||||
"pill2" = 'icons/UI_Icons/Pills/pill2.png',
|
||||
"pill3" = 'icons/UI_Icons/Pills/pill3.png',
|
||||
"pill4" = 'icons/UI_Icons/Pills/pill4.png',
|
||||
"pill5" = 'icons/UI_Icons/Pills/pill5.png',
|
||||
"pill6" = 'icons/UI_Icons/Pills/pill6.png',
|
||||
"pill7" = 'icons/UI_Icons/Pills/pill7.png',
|
||||
"pill8" = 'icons/UI_Icons/Pills/pill8.png',
|
||||
"pill9" = 'icons/UI_Icons/Pills/pill9.png',
|
||||
"pill10" = 'icons/UI_Icons/Pills/pill10.png',
|
||||
"pill11" = 'icons/UI_Icons/Pills/pill11.png',
|
||||
"pill12" = 'icons/UI_Icons/Pills/pill12.png',
|
||||
"pill13" = 'icons/UI_Icons/Pills/pill13.png',
|
||||
"pill14" = 'icons/UI_Icons/Pills/pill14.png',
|
||||
"pill15" = 'icons/UI_Icons/Pills/pill15.png',
|
||||
"pill16" = 'icons/UI_Icons/Pills/pill16.png',
|
||||
"pill17" = 'icons/UI_Icons/Pills/pill17.png',
|
||||
"pill18" = 'icons/UI_Icons/Pills/pill18.png',
|
||||
"pill19" = 'icons/UI_Icons/Pills/pill19.png',
|
||||
"pill20" = 'icons/UI_Icons/Pills/pill20.png',
|
||||
"pill21" = 'icons/UI_Icons/Pills/pill21.png',
|
||||
"pill22" = 'icons/UI_Icons/Pills/pill22.png',
|
||||
)
|
||||
|
||||
//this exists purely to avoid meta by pre-loading all language icons.
|
||||
/datum/asset/language/register()
|
||||
for(var/path in typesof(/datum/language))
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define PILL_STYLE_COUNT 22 //Update this if you add more pill icons or you die
|
||||
#define RANDOM_PILL_STYLE 22 //Dont change this one though
|
||||
|
||||
/obj/machinery/chem_master
|
||||
name = "ChemMaster 3000"
|
||||
desc = "Used to separate chemicals and distribute them in a variety of forms."
|
||||
@@ -13,6 +16,7 @@
|
||||
var/obj/item/storage/pill_bottle/bottle = null
|
||||
var/mode = 1
|
||||
var/condi = FALSE
|
||||
var/chosenPillStyle = 1
|
||||
var/screen = "home"
|
||||
var/analyzeVars[0]
|
||||
var/useramount = 30 // Last used amount
|
||||
@@ -125,6 +129,9 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/pills)
|
||||
assets.send(user)
|
||||
|
||||
ui = new(user, src, ui_key, "chem_master", name, 500, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
@@ -138,7 +145,7 @@
|
||||
data["condi"] = condi
|
||||
data["screen"] = screen
|
||||
data["analyzeVars"] = analyzeVars
|
||||
|
||||
data["chosenPillStyle"] = chosenPillStyle
|
||||
data["isPillBottleLoaded"] = bottle ? 1 : 0
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
@@ -156,7 +163,12 @@
|
||||
for(var/datum/reagent/N in reagents.reagent_list)
|
||||
bufferContents.Add(list(list("name" = N.name, "id" = N.id, "volume" = N.volume))) // ^
|
||||
data["bufferContents"] = bufferContents
|
||||
|
||||
var/list/pillStyles = list()
|
||||
for (var/x in 1 to PILL_STYLE_COUNT)
|
||||
var/list/SL = list()
|
||||
SL["id"] = x
|
||||
pillStyles += list(SL)
|
||||
data["pillStyles"] = pillStyles
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_master/ui_act(action, params)
|
||||
@@ -231,6 +243,12 @@
|
||||
else
|
||||
P = new(drop_location())
|
||||
P.name = trim("[name] pill")
|
||||
if(chosenPillStyle == RANDOM_PILL_STYLE)
|
||||
P.icon_state ="pill[rand(1,21)]"
|
||||
else
|
||||
P.icon_state = "pill[chosenPillStyle]"
|
||||
if(P.icon_state == "pill4")
|
||||
P.desc = "A tablet or capsule, but not just any, a red one, one taken by the ones not scared of knowledge, freedom, uncertainty and the brutal truths of reality."
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each, transfered_by = usr)
|
||||
else
|
||||
@@ -245,6 +263,10 @@
|
||||
reagents.trans_to(P,10, transfered_by = usr)
|
||||
. = TRUE
|
||||
|
||||
if("pillStyle")
|
||||
var/id = text2num(params["id"])
|
||||
chosenPillStyle = id
|
||||
|
||||
if("createPatch")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
@@ -365,3 +387,6 @@
|
||||
name = "CondiMaster 3000"
|
||||
desc = "Used to create condiments and other cooking supplies."
|
||||
condi = TRUE
|
||||
|
||||
#undef PILL_STYLE_COUNT
|
||||
#undef RANDOM_PILL_STYLE
|
||||
BIN
icons/UI_Icons/Pills/pill1.png
Normal file
|
After Width: | Height: | Size: 236 B |
BIN
icons/UI_Icons/Pills/pill10.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
icons/UI_Icons/Pills/pill11.png
Normal file
|
After Width: | Height: | Size: 250 B |
BIN
icons/UI_Icons/Pills/pill12.png
Normal file
|
After Width: | Height: | Size: 247 B |
BIN
icons/UI_Icons/Pills/pill13.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
icons/UI_Icons/Pills/pill14.png
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
icons/UI_Icons/Pills/pill15.png
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
icons/UI_Icons/Pills/pill16.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
icons/UI_Icons/Pills/pill17.png
Normal file
|
After Width: | Height: | Size: 250 B |
BIN
icons/UI_Icons/Pills/pill18.png
Normal file
|
After Width: | Height: | Size: 231 B |
BIN
icons/UI_Icons/Pills/pill19.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
icons/UI_Icons/Pills/pill2.png
Normal file
|
After Width: | Height: | Size: 226 B |
BIN
icons/UI_Icons/Pills/pill20.png
Normal file
|
After Width: | Height: | Size: 237 B |
BIN
icons/UI_Icons/Pills/pill21.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
icons/UI_Icons/Pills/pill22.png
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
icons/UI_Icons/Pills/pill3.png
Normal file
|
After Width: | Height: | Size: 225 B |
BIN
icons/UI_Icons/Pills/pill4.png
Normal file
|
After Width: | Height: | Size: 231 B |
BIN
icons/UI_Icons/Pills/pill5.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
icons/UI_Icons/Pills/pill6.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
icons/UI_Icons/Pills/pill7.png
Normal file
|
After Width: | Height: | Size: 251 B |
BIN
icons/UI_Icons/Pills/pill8.png
Normal file
|
After Width: | Height: | Size: 247 B |
BIN
icons/UI_Icons/Pills/pill9.png
Normal file
|
After Width: | Height: | Size: 241 B |
@@ -50,14 +50,16 @@
|
||||
|
||||
{{#if !data.condi}}
|
||||
<ui-display title='Pills, Bottles and Patches' >
|
||||
{{#each data.pillStyles}}
|
||||
<ui-button state='{{id==data.chosenPillStyle ? "selected" : null}}' action='pillStyle' params='{"id": "{{id}}"}'><img src='pill{{id}}'></ui-button>
|
||||
{{/each}}
|
||||
<br>
|
||||
{{#if data.isPillBottleLoaded}}
|
||||
<ui-button action='ejectp' state='{{data.isPillBottleLoaded ? null : "disabled"}}'>{{data.isPillBottleLoaded ? "Eject" : "No Pill bottle loaded"}}</ui-button>
|
||||
<span class='content'>{{data.pillBotContent}}/{{data.pillBotMaxContent}}</span>
|
||||
{{else}}
|
||||
<span class='average'>No Pillbottle</span>
|
||||
{{/if}}
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<ui-button action='createPill' params='{"many": 0}' state='{{data.bufferContents ? null : "disabled"}}' >Create Pill (max 50µ)</ui-button>
|
||||
<br/>
|
||||
|
||||