Skip to content

Commit

Permalink
bugfix: icons and runtime in roboquest + prettier store (#5729)
Browse files Browse the repository at this point in the history
* bugfix: icons and runtime in roboquest + prettier store

* bum

* comment

* thefuck
  • Loading branch information
ROdenFL authored Aug 17, 2024
1 parent da91178 commit 177401f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
7 changes: 5 additions & 2 deletions code/modules/economy/robotic_quests/robo_quest_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@

/obj/machinery/computer/roboquest/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/card/id))
currentID = O
user.drop_item_ground(O)
if(currentID)
currentID.forceMove(loc)
user.put_in_any_hand_if_possible(currentID)
currentID = O
O.forceMove(src)
SStgui.try_update_ui(user, src)
if(istype(O, /obj/item/multitool))
Expand Down Expand Up @@ -201,7 +204,7 @@
if("GetTask")
var/list/mecha_types = list("Working Mech" = WORKING_CLASS, "Medical Mech" = MEDICAL_CLASS, "Combat Mech" = COMBAT_CLASS, "Random Mech" = RANDOM_CLASS)
var/mecha_type = tgui_input_list(usr, "Select event type.", "Select", mecha_types)
if(!mecha_type)
if(!mecha_type || !currentID || currentID.robo_bounty)
return
pick_mecha(mecha_types[mecha_type])
if("RemoveTask")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/economy/robotic_quests/robo_quests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
var/list/newmodule = list()
var/obj/module = new i
newmodule["id"] = modules_amount
newmodule["icon"] = icon2base64(icon(module.icon, module.icon_state, SOUTH, 1))
newmodule["icon"] = path2assetID(i)
newmodule["name"] = capitalize(module.name)
questinfo["modules"] += list(newmodule)
qdel(module)
Expand Down
33 changes: 18 additions & 15 deletions tgui/packages/tgui/interfaces/RoboQuest.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const RoboQuest = (props, context) => {
};

return (
<Window theme={style} width={940} height={540}>
<Window theme={style} width={1000} height={540}>
<Window.Content>
<Stack fill>
<Stack.Item basis={40}>
Expand Down Expand Up @@ -301,22 +301,25 @@ export const RoboQuest = (props, context) => {
{shopItems.robo.map(
(i) =>
(!i.emagOnly || style === 'syndicate') && (
<Section
<ImageButton
key={i.name}
title={i.name}
buttons={
<Button
content={'Buy (' + i.cost.robo + 'P)'}
onClick={() =>
act('buyItem', {
item: i.path,
})
}
/>
asset
color="purple"
image={i.icon}
imageAsset="roboquest64x64"
title={
<Box nowrap inline>
{i.name}{' '}
<b style={{ color: 'purple' }}>{i.cost.robo}</b>
</Box>
}
>
<Box italic>{i.desc}</Box>
</Section>
content={i.desc}
onClick={() =>
act('buyItem', {
item: i.path,
})
}
/>
)
)}
</Section>
Expand Down
2 changes: 1 addition & 1 deletion tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

0 comments on commit 177401f

Please sign in to comment.