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

Refactors Navigational Beacons #74575

Merged
merged 20 commits into from
Apr 10, 2023
Merged

Conversation

Profakos
Copy link
Contributor

@Profakos Profakos commented Apr 7, 2023

About The Pull Request

This PR refactors navigational beacons. In detail, this PR does the following:

General Interactions

  • You can now print boards. They are unlocked at Basic Robotics Research, and can be printed both at engineering and robotics.
  • The constructed machine requires no stock parts. When constructed, the floor tile pops up, so you can actually interact with the device from the get go.
  • Made interacting with it more standardized, you no longer have to screwdriver it to access the interface, instead you just click on it.
  • Screwdrivering is instead part of the regular screwdriver -> crowbar deconstruct process. However, you have to unlock the maintenance hatch through the UI first.
  • You can now use wallets too, to unlock the control interface, using the GetID() proc.
  • Interacting with tools uses balloon alerts where its possible.

UI Interactions

  • New tgUI interface!
  • Previously, you could put in anything as codes, and there was no guide in game about what codes and values were valid. This has been replaced by buttons with pop up text boxes, checkboxes and dropdowns.
  • You can also reset the code values to roundstart values, or to blanks, if the beacon had none.
  • InterfaceLockNoticeBox component allows the silicons to unlock the controls

Other backend changes

  • Autodocs vars and procs in the navigational beacon file.
  • Added defines for the various nav beacon codes.
  • The freq var on beacons and the beacon_frequency var on robots did absolutely nothing, so I have removed them, along with the map varedits, and the frequency define. Maybe in the future one can readd them, to make bots that only patrol specific areas (though you can still do that with good next patrol location tagging).
  • Mulebots were using the navbeacon's direction itself to figure out the direction they have to put down crates, instead of the direction tag. Now the tag actually works, allowing me to remove a bunch of varedits. I did keep the beacon's direction as a fallback, in case no direction tag is set, which should be South always.
  • I audited and touched up the directions tags that were not in line with the previous beacon directions (which caused things such as the mule trapping themselves behind the crate.
  • Sadly, making it use the default screwdriver construction means it is no longer transparent in maps editors 😔

image

Why It's Good For The Game

Closes #38064 . More items being constructable is more fun, and its better if you can use an item without checking the map about how it is supposed to work.

Changelog

🆑
refactor: Refactored navigational beacons, making them constructable, deconstructable, and generally easier to use
/:cl:

@tgstation-server tgstation-server added Tools We pretend to be a real development community Refactor Makes the code harder to read UI We make the game less playable, but with round edges Map Edit Thank you for your tile-placing service. It's always appreciated. labels Apr 7, 2023
@github-actions github-actions bot added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Apr 8, 2023
@Wallemations
Copy link
Member

Christ this made me realize we gotta update that beacon sprite
I might do that later since it seems easy enough

@Profakos
Copy link
Contributor Author

Profakos commented Apr 8, 2023

Oh, that would be nice. Also, I am going to remove the transparent sprites, as they will be fully unused.

@Profakos Profakos requested a review from Twaticus as a code owner April 8, 2023 16:13
@tgstation-server tgstation-server added Sprites A bikeshed full of soulless bikes. and removed Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts labels Apr 8, 2023
@jlsnow301
Copy link
Member

Good pr. I'd like for you to convert this to typescript and break the ui into subcomponents, it's a little verbose.

Let me know if you need help doing this (via disc)

@Profakos
Copy link
Contributor Author

Profakos commented Apr 9, 2023

Yeah sure, I can do that. I'll put this on draft until that is finished.

@Profakos Profakos marked this pull request as draft April 9, 2023 07:23
@Profakos Profakos marked this pull request as ready for review April 9, 2023 13:39
@Profakos
Copy link
Contributor Author

Profakos commented Apr 9, 2023

I have broke it up a bit. I considered making a component for the buttons themselves, not sure if it is neccessary as it would still be verbose if i moved all those inputs into Props, but if you want to, I can do it, could be a good generic components.

@jlsnow301
Copy link
Member

I have broke it up a bit. I considered making a component for the buttons themselves, not sure if it is neccessary as it would still be verbose if i moved all those inputs into Props, but if you want to, I can do it, could be a good generic components.

much better ty

generic components a little bit overkill for the request, it's pretty good as is

@github-actions github-actions bot added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Apr 9, 2023
@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Apr 9, 2023
@github-actions github-actions bot added the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Apr 9, 2023
@tgstation-server tgstation-server removed the Merge Conflict Adding upstream files to your repo via drag and drop won't resolve conflicts label Apr 10, 2023
@jlsnow301 jlsnow301 merged commit 1c69ffa into tgstation:master Apr 10, 2023
@jlsnow301
Copy link
Member

let's save this from merge conflict hell

@DAKKA-WAAAGH
Copy link
Contributor

This is fantastic, thank you!

Jolly-66 added a commit to TaleStation/TaleStation that referenced this pull request Apr 16, 2023
Original PR: tgstation/tgstation#74575
-----
## About The Pull Request

This PR refactors navigational beacons. In detail, this PR does the
following:

**General Interactions**

- You can now print boards. They are unlocked at Basic Robotics
Research, and can be printed both at engineering and robotics.
- The constructed machine requires no stock parts. When constructed, the
floor tile pops up, so you can actually interact with the device from
the get go.
- Made interacting with it more standardized, you no longer have to
screwdriver it to access the interface, instead you just click on it.
- Screwdrivering is instead part of the regular screwdriver -> crowbar
deconstruct process. However, you have to unlock the maintenance hatch
through the UI first.
- You can now use wallets too, to unlock the control interface, using
the GetID() proc.
- Interacting with tools uses balloon alerts where its possible.

**UI Interactions**

- New tgUI interface!
- Previously, you could put in anything as codes, and there was no guide
in game about what codes and values were valid. This has been replaced
by buttons with pop up text boxes, checkboxes and dropdowns.
- You can also reset the code values to roundstart values, or to blanks,
if the beacon had none.
- InterfaceLockNoticeBox component allows the silicons to unlock the
controls

**Other backend changes**

- Autodocs vars and procs in the navigational beacon file.
- Added defines for the various nav beacon codes.
- The freq var on beacons and the beacon_frequency var on robots did
absolutely nothing, so I have removed them, along with the map varedits,
and the frequency define. Maybe in the future one can readd them, to
make bots that only patrol specific areas (though you can still do that
with good next patrol location tagging).
- Mulebots were using the navbeacon's direction itself to figure out the
direction they have to put down crates, instead of the direction tag.
Now the tag actually works, allowing me to remove a bunch of varedits. I
did keep the beacon's direction as a fallback, in case no direction tag
is set, which should be South always.
- I audited and touched up the directions tags that were not in line
with the previous beacon directions (which caused things such as the
mule trapping themselves behind the crate.
- Sadly, making it use the default screwdriver construction means it is
no longer transparent in maps editors 😔


![image](https://user-images.githubusercontent.com/2676196/230599815-5265033a-d85f-4645-a73c-60e3f2c7eee8.png)

## Why It's Good For The Game

Closes #38064 . More items being constructable is more fun, and its
better if you can use an item without checking the map about how it is
supposed to work.

## Changelog

:cl:
refactor: Refactored navigational beacons, making them constructable,
deconstructable, and generally easier to use
/:cl:

---------

Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
@san7890 san7890 added this to the Mega-Mega-Map-Reworks milestone Apr 30, 2023
@Profakos Profakos deleted the nav-builder branch December 9, 2023 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Map Edit Thank you for your tile-placing service. It's always appreciated. Refactor Makes the code harder to read Sprites A bikeshed full of soulless bikes. Tools We pretend to be a real development community UI We make the game less playable, but with round edges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navbeacons: can't be built/deconstructed
6 participants