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

Basemats Part 1: Framework & Fixes #10135

Merged

Conversation

Tsar-Salat
Copy link
Contributor

@Tsar-Salat Tsar-Salat commented Nov 3, 2023

Ports:

About The Pull Request

This PR is an attempt at porting basemats, while trying to skip all the problems it caused at the time of its initial implementation. (Looking at you Uranium coins.)

DISCLAIMER: While the port list is long, this is effectively ONE content pr, with NINE fix prs stacked on top. This is very much a framework, as I did not wish to knowingly introduce the horrendous bugs the single pr brought upon TG. As such I've limited the applicable basemat materials quite a bit, all expansions to this are planned in Part 2

Effectively, basemats are a concept of making chairs and other objects from different materials, and the crafted objects from those materials inheriting their properties

closes #10245

TODO

  • All basemat tables constructable
  • All basemat chairs constructable
  • Deconstructing basemat structures gives back the material investment
  • up-to-date table sprite
  • Miner satchel protects against radiation from uranium ore
  • Stacks merge correctly. Exact Material values when converting from tile --> material --> chair

Why It's Good For The Game

We technically already have it, just at a small scale. I think adding the framework to this will mesh with Pigeons planned ideas nicely.

Players also have been wanting things like statue sculpting & tile reskinning, of which this is a prerequisite.

Testing Photographs and Procedure

Screenshots&Videos

Searers are made with plasma as an ingredient, but added code in protolathe makes sure they dont inherit plasma's burn-on-hit ability

image

Deconstructing the objects gives back the expected materials

decon.mp4

Tables & Chairs

image

Testing Stacks and Material refunding

dreamseeker_I0nd6L2ATM.mp4

Changelog

🆑 rkz, kitz-katz, willox, ninjanomnom, haukeschaumann, Qustinnus, TemporalOroborous
add: Adds additional framework to basemats, Materials under the label 'basemat' include Iron, Titanium, Plastic, Uranium, Plasma, Silver and Gold.
add: Adds ability to craft chairs and tables out of any basemat material.
tweak: Miner satchels now provide minor radiation protection from their contents, this is to prevent uranium ore from giving you cancer just for existing.
refactor: lazy initializes the basemats subsystem to cut down on processing
refactor: reduces overall unecessary lists in the basemats & custom_materials code
fix: fixes a bug relating to duplicating materials
fix: fixes a bug where basemats would exagerrate their material properties.
fix: fixes a bug where basemats properties would be inherited by anything crafted with them in an auto/protolathe
/:cl:

@Tsar-Salat
Copy link
Contributor Author

Gonna be broken as shit for the time being, just a proof of concept for now.

@Tsar-Salat Tsar-Salat marked this pull request as ready for review November 4, 2023 20:39
Copy link

github-actions bot commented Nov 5, 2023

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Tsar-Salat
Copy link
Contributor Author

Im going to simply not include glass & diamond. Theres already quite some heft to this PR, we can find a snowflake solution to that later.

A maintainer also told me they didnt like Diamonds being a basemat, so that will be an opportunity to make it more palatable.

@Tsar-Salat
Copy link
Contributor Author

This PR is now good to go

@PowerfulBacon
Copy link
Member

Risky merge

@PowerfulBacon PowerfulBacon added this pull request to the merge queue Dec 1, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@Tsar-Salat Tsar-Salat changed the title Basemats Part 1 Basemats Part 1: Framework & Fixes Dec 2, 2023
@Tsar-Salat
Copy link
Contributor Author

I lied. That modular fabricator code was gross.

Explicitly defining what we want to inherit material effects should generate a hell of a lot less edge-cases & use less processing.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Member

@itsmeow itsmeow left a comment

Choose a reason for hiding this comment

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

yolomerge 2 electric boogaloo

@itsmeow itsmeow added this pull request to the merge queue Dec 19, 2023
Merged via the queue into BeeStation:master with commit cf39ea7 Dec 19, 2023
8 checks passed
@Rukofamicom
Copy link
Contributor

Rukofamicom commented Dec 19, 2023

This PR made an unnecessary variable name change across the board. This causes unnecessary conflicts and headaches for open PRs for no substantial gain.

materials did not need to be renamed to custom_materials. If there was a variable name conflict, the new variable being introduced should be adjusted.

@Tsar-Salat Tsar-Salat deleted the materials-to-all-items-PLUS-chairs-&-tables branch December 19, 2023 16:42
@EvilDragonfiend
Copy link
Contributor

I am personally not against var name change when a massive change like this was brought because it is a good notification for people who are doing some works on the changed variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Basematerials Initialization uses null strings in to_chat
6 participants