mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Merge voting controller into SSvote (#2183)
changes: Merged the voting controller into the voting subsystem. Changed the voting UI to use /datum/browser. Converted /datum/browser to use HTML5 & attempt to use edge if available. All users of the browser datum have been confirmed functional with Edge. Changed the ChemMaster to use SSassets for resource download.
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
|
||||
// Update asset_cache.dm if you change these.
|
||||
#define BOTTLE_SPRITES list("bottle-1", "bottle-2", "bottle-3", "bottle-4") //list of available bottle sprites
|
||||
#define REAGENTS_PER_SHEET 20
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -25,12 +27,11 @@
|
||||
var/pillamount = 10
|
||||
var/bottlesprite = "bottle-1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
var/max_pill_count = 20
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
..()
|
||||
/obj/machinery/chem_master/Initialize()
|
||||
. = ..()
|
||||
var/datum/reagents/R = new/datum/reagents(120)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
@@ -201,7 +202,6 @@
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to_obj(P,50)
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&pill_sprite=[i]\"><img src=\"pill[i].png\" /></a></td></tr>"
|
||||
@@ -230,13 +230,10 @@
|
||||
if(inoperable())
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(!(user.client in has_sprites))
|
||||
spawn()
|
||||
has_sprites += user.client
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
usr << browse_rsc(icon('icons/obj/chemical.dmi', "pill" + num2text(i)), "pill[i].png")
|
||||
for(var/sprite in BOTTLE_SPRITES)
|
||||
usr << browse_rsc(icon('icons/obj/chemical.dmi', sprite), "[sprite].png")
|
||||
|
||||
var/datum/asset/pill_icons = get_asset_datum(/datum/asset/chem_master)
|
||||
pill_icons.send(user.client)
|
||||
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert beaker.<BR>"
|
||||
|
||||
Reference in New Issue
Block a user