mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
icon fixes (#15827)
* icon fixes * ntos ui icons --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
|
||||
/obj/machinery/computer/cloning/resleeving/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/cloning)
|
||||
get_asset_datum(/datum/asset/simple/cloning)
|
||||
)
|
||||
|
||||
/obj/machinery/computer/cloning/tgui_interact(mob/user, datum/tgui/ui = null)
|
||||
@@ -493,4 +493,4 @@
|
||||
SStgui.update_uis(src)
|
||||
|
||||
#undef MENU_MAIN
|
||||
#undef MENU_RECORDS
|
||||
#undef MENU_RECORDS
|
||||
|
||||
@@ -426,49 +426,32 @@
|
||||
// ..()
|
||||
|
||||
//Pill sprites for UIs
|
||||
/datum/asset/chem_master
|
||||
var/assets = list()
|
||||
var/verify = FALSE
|
||||
/datum/asset/spritesheet/chem_master
|
||||
name = "chem_master"
|
||||
|
||||
/datum/asset/chem_master/register()
|
||||
/datum/asset/spritesheet/chem_master/create_spritesheets()
|
||||
for(var/i = 1 to 24)
|
||||
assets["pill[i].png"] = icon('icons/obj/chemical.dmi', "pill[i]")
|
||||
Insert("pill[i]", 'icons/obj/chemical.dmi', "pill[i]")
|
||||
|
||||
for(var/i = 1 to 4)
|
||||
assets["bottle-[i].png"] = icon('icons/obj/chemical.dmi', "bottle-[i]")
|
||||
Insert("bottle-[i]", 'icons/obj/chemical.dmi', "bottle-[i]")
|
||||
|
||||
for(var/asset_name in assets)
|
||||
SSassets.transport.register_asset(asset_name, assets[asset_name])
|
||||
|
||||
/datum/asset/chem_master/send(client)
|
||||
SSassets.transport.send_assets(client, assets, verify)
|
||||
|
||||
//Cloning pod sprites for UIs
|
||||
/datum/asset/cloning
|
||||
var/assets = list()
|
||||
var/verify = FALSE
|
||||
|
||||
/datum/asset/cloning/register()
|
||||
assets["pod_idle.gif"] = icon('icons/obj/cloning.dmi', "pod_idle")
|
||||
assets["pod_cloning.gif"] = icon('icons/obj/cloning.dmi', "pod_cloning")
|
||||
assets["pod_mess.gif"] = icon('icons/obj/cloning.dmi', "pod_mess")
|
||||
for(var/asset_name in assets)
|
||||
SSassets.transport.register_asset(asset_name, assets[asset_name])
|
||||
|
||||
/datum/asset/cloning/send(client)
|
||||
SSassets.transport.send_assets(client, assets, verify)
|
||||
/datum/asset/simple/cloning
|
||||
assets = list(
|
||||
"pod_idle.gif" = 'icons/UI_Icons/synthprinter.gif',
|
||||
"pod_cloning.gif" = 'icons/UI_Icons/synthprinter_working.gif',
|
||||
)
|
||||
|
||||
// VOREStation Add
|
||||
/datum/asset/cloning/resleeving
|
||||
/datum/asset/cloning/resleeving/register()
|
||||
// This intentionally does not call the parent. Duplicate assets are not allowed.
|
||||
assets["sleeve_empty.gif"] = icon('icons/obj/machines/implantchair.dmi', "implantchair")
|
||||
assets["sleeve_occupied.gif"] = icon('icons/obj/machines/implantchair.dmi', "implantchair_on")
|
||||
assets["synthprinter.gif"] = icon('icons/obj/machines/synthpod.dmi', "pod_0")
|
||||
assets["synthprinter_working.gif"] = icon('icons/obj/machines/synthpod.dmi', "pod_1")
|
||||
for(var/asset_name in assets)
|
||||
SSassets.transport.register_asset(asset_name, assets[asset_name])
|
||||
// VOREStation Add End
|
||||
/datum/asset/simple/cloning/resleeving
|
||||
assets = list(
|
||||
"sleeve_empty.gif" = 'icons/UI_Icons/sleeve_empty.gif',
|
||||
"sleeve_occupied.gif" = 'icons/UI_Icons/sleeve_occupied.gif',
|
||||
"synthprinter.gif" = 'icons/UI_Icons/synthprinter.gif',
|
||||
"synthprinter_working.gif" = 'icons/UI_Icons/synthprinter_working.gif',
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/sheetmaterials
|
||||
name = "sheetmaterials"
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
/obj/item/modular_computer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
|
||||
switch(action)
|
||||
if("PC_exit")
|
||||
kill_program()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/machinery/chem_master/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/chem_master),
|
||||
get_asset_datum(/datum/asset/spritesheet/chem_master),
|
||||
)
|
||||
|
||||
/obj/machinery/chem_master/tgui_interact(mob/user, datum/tgui/ui = null)
|
||||
@@ -209,8 +209,8 @@
|
||||
if("change_pill_style")
|
||||
var/list/choices = list()
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
choices += "pill[i].png"
|
||||
tgui_modal_bento(src, id, "Please select the new style for pills:", null, arguments, pillsprite, choices)
|
||||
choices += "chem_master32x32 pill[i]"
|
||||
tgui_modal_bento_spritesheet(src, id, "Please select the new style for pills:", null, arguments, pillsprite, choices)
|
||||
if("create_patch")
|
||||
if(condi || !reagents.total_volume)
|
||||
return
|
||||
@@ -244,8 +244,8 @@
|
||||
if("change_bottle_style")
|
||||
var/list/choices = list()
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
choices += "bottle-[i].png"
|
||||
tgui_modal_bento(src, id, "Please select the new style for bottles:", null, arguments, bottlesprite, choices)
|
||||
choices += "chem_master32x32 bottle-[i]"
|
||||
tgui_modal_bento_spritesheet(src, id, "Please select the new style for bottles:", null, arguments, bottlesprite, choices)
|
||||
else
|
||||
return FALSE
|
||||
if(TGUI_MODAL_ANSWER)
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
|
||||
/obj/machinery/computer/transhuman/resleeving/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/cloning),
|
||||
get_asset_datum(/datum/asset/cloning/resleeving),
|
||||
get_asset_datum(/datum/asset/simple/cloning),
|
||||
get_asset_datum(/datum/asset/simple/cloning/resleeving),
|
||||
)
|
||||
|
||||
/obj/machinery/computer/transhuman/resleeving/tgui_interact(mob/user, datum/tgui/ui = null)
|
||||
@@ -139,7 +139,7 @@
|
||||
/obj/machinery/computer/transhuman/resleeving/tgui_data(mob/user)
|
||||
var/data[0]
|
||||
data["menu"] = menu
|
||||
|
||||
|
||||
var/list/temppods[0]
|
||||
for(var/obj/machinery/clonepod/transhuman/pod in pods)
|
||||
var/status = "idle"
|
||||
@@ -184,7 +184,7 @@
|
||||
data["selected_pod"] = "\ref[selected_pod]"
|
||||
data["selected_printer"] = "\ref[selected_printer]"
|
||||
data["selected_sleever"] = "\ref[selected_sleever]"
|
||||
|
||||
|
||||
var/bodyrecords_list_ui[0]
|
||||
for(var/N in our_db.body_scans)
|
||||
var/datum/transhuman/body_record/BR = our_db.body_scans[N]
|
||||
|
||||
@@ -146,6 +146,13 @@ GLOBAL_LIST(tgui_modals)
|
||||
var/datum/tgui_modal/input/bento/modal = new(id, text, delegate, arguments, value, choices)
|
||||
return tgui_modal_new(source, modal)
|
||||
|
||||
//Bento but spritesheet edition
|
||||
/datum/proc/tgui_modal_bento_spritesheet(datum/source = src, id, text = "Default modal message", delegate, arguments, value, choices)
|
||||
ASSERT(length(id))
|
||||
|
||||
var/datum/tgui_modal/input/bento/spritesheet/modal = new(id, text, delegate, arguments, value, choices)
|
||||
return tgui_modal_new(source, modal)
|
||||
|
||||
/**
|
||||
* Opens a yes/no TGUI modal
|
||||
*
|
||||
@@ -339,6 +346,10 @@ GLOBAL_LIST(tgui_modals)
|
||||
. = ..()
|
||||
.["choices"] = choices
|
||||
|
||||
//Bento modal but takes spritesheet classes as choices
|
||||
/datum/tgui_modal/input/bento/spritesheet
|
||||
modal_type = "bentospritesheet"
|
||||
|
||||
/**
|
||||
* Boolean modal - has yes/no buttons that do different actions depending on which is pressed
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,13 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff
|
||||
/datum/tgui_module/tgui_host()
|
||||
return host ? host.tgui_host() : src
|
||||
|
||||
/datum/tgui_module/ui_assets(mob/user)
|
||||
var/list/data = list()
|
||||
var/obj/item/modular_computer/host = tgui_host()
|
||||
if(istype(host))
|
||||
data += get_asset_datum(/datum/asset/simple/headers)
|
||||
return data
|
||||
|
||||
/datum/tgui_module/tgui_close(mob/user)
|
||||
if(host)
|
||||
host.tgui_close(user)
|
||||
@@ -56,7 +63,7 @@ Code is pretty much ripped verbatim from nano modules, but with un-needed stuff
|
||||
|
||||
/datum/tgui_module/tgui_static_data()
|
||||
. = ..()
|
||||
|
||||
|
||||
var/obj/item/modular_computer/host = tgui_host()
|
||||
if(istype(host))
|
||||
. += host.get_header_data()
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
return TRUE
|
||||
|
||||
/datum/tgui_module/atmos_control/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/simple/nanomaps),
|
||||
)
|
||||
. = ..()
|
||||
. += get_asset_datum(/datum/asset/simple/nanomaps)
|
||||
|
||||
/datum/tgui_module/atmos_control/tgui_interact(mob/user, datum/tgui/ui = null)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 910 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,5 +1,6 @@
|
||||
import { Component } from 'react';
|
||||
|
||||
import { resolveAsset } from '../assets';
|
||||
import { useBackend } from '../backend';
|
||||
import { Box, Button, Icon, LabeledList, Slider, Tooltip } from '.';
|
||||
|
||||
@@ -123,7 +124,9 @@ export class NanoMap extends Component {
|
||||
const { dragging, offsetX, offsetY, zoom = 1 } = this.state;
|
||||
const { children } = this.props;
|
||||
|
||||
const mapUrl = config.map + '_nanomap_z' + config.mapZLevel + '.png';
|
||||
const mapUrl = resolveAsset(
|
||||
config.map + '_nanomap_z' + config.mapZLevel + '.png',
|
||||
);
|
||||
// (x * zoom), x Needs to be double the turf- map size. (for virgo, 140x140)
|
||||
const mapSize = this.props.zoomScale * zoom + 'px';
|
||||
const newStyle = {
|
||||
|
||||
@@ -343,14 +343,25 @@ const ChemMasterProductionChemical = (props) => {
|
||||
<div
|
||||
style={{
|
||||
display: 'inline-block',
|
||||
width: '16px;',
|
||||
width: '16px',
|
||||
height: '16px',
|
||||
verticalAlign: 'middle;',
|
||||
background: 'url(pill' + data.pillsprite + '.png)',
|
||||
verticalAlign: 'middle',
|
||||
backgroundSize: '200%',
|
||||
backgroundPosition: 'left -10px bottom -6px',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<Box
|
||||
className={classes([
|
||||
'chem_master32x32',
|
||||
'pill' + data.pillsprite,
|
||||
])}
|
||||
style={{
|
||||
bottom: '10px',
|
||||
right: '10px',
|
||||
position: 'relative',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
Style
|
||||
</Button>
|
||||
</LabeledList.Item>
|
||||
@@ -388,11 +399,22 @@ const ChemMasterProductionChemical = (props) => {
|
||||
width: '16px',
|
||||
height: '16px',
|
||||
verticalAlign: 'middle',
|
||||
background: 'url(bottle-' + data.bottlesprite + '.png)',
|
||||
backgroundSize: '200%',
|
||||
backgroundPosition: 'left -10px bottom -6px',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<Box
|
||||
className={classes([
|
||||
'chem_master32x32',
|
||||
'bottle-' + data.bottlesprite,
|
||||
])}
|
||||
style={{
|
||||
bottom: '10px',
|
||||
right: '10px',
|
||||
position: 'relative',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
Style
|
||||
</Button>
|
||||
</LabeledList.Item>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { round } from 'common/math';
|
||||
|
||||
import { resolveAsset } from '../assets';
|
||||
import { useBackend } from '../backend';
|
||||
import {
|
||||
Box,
|
||||
@@ -307,7 +308,7 @@ const CloningConsoleMain = (props) => {
|
||||
mr="0.5rem"
|
||||
>
|
||||
<img
|
||||
src={'pod_' + pod.status + '.gif'}
|
||||
src={resolveAsset('pod_' + pod.status + '.gif')}
|
||||
style={{
|
||||
width: '100%',
|
||||
'-ms-interpolation-mode': 'nearest-neighbor',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { round } from 'common/math';
|
||||
|
||||
import { resolveAsset } from '../assets';
|
||||
import { useBackend } from '../backend';
|
||||
import {
|
||||
Box,
|
||||
@@ -355,7 +356,7 @@ const ResleevingConsolePodGrowers = (props) => {
|
||||
mr="0.5rem"
|
||||
>
|
||||
<img
|
||||
src={'pod_' + pod.status + '.gif'}
|
||||
src={resolveAsset('pod_' + pod.status + '.gif')}
|
||||
style={{
|
||||
width: '100%',
|
||||
'-ms-interpolation-mode': 'nearest-neighbor',
|
||||
@@ -391,7 +392,9 @@ const ResleevingConsolePodSleevers = (props) => {
|
||||
mr="0.5rem"
|
||||
>
|
||||
<img
|
||||
src={'sleeve_' + (pod.occupied ? 'occupied' : 'empty') + '.gif'}
|
||||
src={resolveAsset(
|
||||
'sleeve_' + (pod.occupied ? 'occupied' : 'empty') + '.gif',
|
||||
)}
|
||||
style={{
|
||||
width: '100%',
|
||||
'-ms-interpolation-mode': 'nearest-neighbor',
|
||||
@@ -471,7 +474,9 @@ const ResleevingConsolePodSpods = (props) => {
|
||||
mr="0.5rem"
|
||||
>
|
||||
<img
|
||||
src={'synthprinter' + (pod.busy ? '_working' : '') + '.gif'}
|
||||
src={resolveAsset(
|
||||
'synthprinter' + (pod.busy ? '_working' : '') + '.gif',
|
||||
)}
|
||||
style={{
|
||||
width: '100%',
|
||||
'-ms-interpolation-mode': 'nearest-neighbor',
|
||||
|
||||
@@ -151,6 +151,21 @@ export const ComplexModal = (props) => {
|
||||
))}
|
||||
</Flex>
|
||||
);
|
||||
} else if (type === 'bentospritesheet') {
|
||||
modalBody = (
|
||||
<Flex spacingPrecise="1" wrap="wrap" my="0.5rem" maxHeight="1%">
|
||||
{data.modal.choices.map((c, i) => (
|
||||
<Flex.Item key={i} flex="1 1 auto">
|
||||
<Button
|
||||
selected={i + 1 === parseInt(data.modal.value, 10)}
|
||||
onClick={() => modalAnswer(id, i + 1)}
|
||||
>
|
||||
<Box className={c} />
|
||||
</Button>
|
||||
</Flex.Item>
|
||||
))}
|
||||
</Flex>
|
||||
);
|
||||
} else if (type === 'boolean') {
|
||||
modalFooter = (
|
||||
<Box mt="0.5rem">
|
||||
|
||||
+101
-101
File diff suppressed because one or more lines are too long
+91
-91
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user