Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vending tgui #1075

Merged
merged 43 commits into from Sep 19, 2022
Merged

Vending tgui #1075

merged 43 commits into from Sep 19, 2022

Conversation

mullenpaul
Copy link
Contributor

@mullenpaul mullenpaul commented Sep 16, 2022

About The Pull Request

Vendor Sorted nano to tgui

PR migrates /obj/structure/machinery/cm_vending/sorted vending machines from nano to tgui.

USCM Weapon vendor

Weyland Medical vendor

The vendor UI respects:

  • themes: usmc; clf; upp; corporate
  • recommended / mandatory / regular items

A noticebox popup is displayed when the items are hovered over, the items description is displayed.

The bulk of the data is statically generated, improving performance on ui refresh.

A search bar is provided at the top of the UI, it live filters the items.

Item icons are generated and displayed in the vendor UI.

There are no gameplay changes, this is purely a UI change.

USCM template

A basic UI scss has been added for USCM. It is rudimentary, sporting a background image. There is a lot of scope to improve on this but is still worth adding.

Why It's Good For The Game

This upgrades the UI from nano to tgui. It is a much more user friendly experience, making it easier to access many of the items the USCM use.

Changelog

🆑
add: TGUI interface for many cm custom vendors
qol: Search bar for item search for vendors
qol: Item description appears as popup in vendor UI
qol: Item icons are displayed in vendor UI
/:cl:

@github-actions github-actions bot added UI deletes nanoui/html Feature Feature coder badge Quality of Life Make the game harder to play labels Sep 16, 2022
@ghost
Copy link

ghost commented Sep 16, 2022

This is really awesome good work man

@stanalbatross stanalbatross added the Good First PR From small acorns label Sep 17, 2022
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Show resolved Hide resolved
tgui/packages/tgui/styles/themes/uscm.scss Outdated Show resolved Hide resolved
@stanalbatross stanalbatross marked this pull request as draft September 17, 2022 11:52
@mullenpaul
Copy link
Contributor Author

multiple to_chats sent when taking off your id with the window open

Resolved this - problem was that I made the suggested change which put all the to_chats etc in the access logic and when the UI_State came back it flagged that you didn't have access without your access card.

@mullenpaul
Copy link
Contributor Author

image

Fixed icon rendering for ammo boxes, theres a few sprites missing for _reg and _blank ammo box lids

@mullenpaul mullenpaul marked this pull request as ready for review September 19, 2022 12:06
Copy link
Contributor

@stanalbatross stanalbatross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

  • if an item doesn't have a desc (and seemingly some items just don't) it should not show the lower box
  • you should make the search bar not autofocus as if you try to walk away from a vendor without having vended anything it eats your inputs

code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
code/game/machinery/vending/cm_vending.dm Outdated Show resolved Hide resolved
@stanalbatross stanalbatross marked this pull request as draft September 19, 2022 12:39
@mullenpaul
Copy link
Contributor Author

image
implemented changes, no more noticebox when item has no desc

@mullenpaul mullenpaul marked this pull request as ready for review September 19, 2022 14:40
@mullenpaul mullenpaul marked this pull request as draft September 19, 2022 15:32
@mullenpaul mullenpaul marked this pull request as ready for review September 19, 2022 15:53
@mullenpaul
Copy link
Contributor Author

mullenpaul commented Sep 19, 2022

For snowflake vendor:

CLF (retro style)

image

UPP (abductor style)

image

@mullenpaul
Copy link
Contributor Author

image
Stowaway accessing the suspicious automated weapons rack. Showcasing how 'empty vendors' will be handled.

@stanalbatross stanalbatross merged commit f541c09 into cmss13-devs:master Sep 19, 2022
@github-actions
Copy link
Contributor

Your Fix/Feature pull request is currently below zero (-4). Maintainers may close future Feature/Balance PRs. Fixing issues or helping to improve the codebase will raise this score.

github-actions bot added a commit that referenced this pull request Sep 19, 2022
@Zerohiraga
Copy link

dreamseeker_S4jRKTU6rF

Any chances that we can have a fallback nano version? This UI isnt working for everyone.
I have a stable 120+ in the tgui "ping" and it spikes to 300-400ms whenever i scroll or vend one item.

@Doom-external
Copy link

Yeah this UI isn't good at all, it somehow makes lag worse every time you open, scroll or vend an item. Was this even tested?

@mullenpaul mullenpaul deleted the vending_tgui branch November 7, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge Good First PR From small acorns Quality of Life Make the game harder to play UI deletes nanoui/html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants