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

Conceivable sizes #1119

Merged
merged 10 commits into from
May 16, 2024
Merged

Conceivable sizes #1119

merged 10 commits into from
May 16, 2024

Conversation

dimwit105
Copy link
Contributor

Closes DFHack/dfhack#4506

Adjusts the size line to compare units to something more reasonable than cubic centimeters. Will compare small things to cats, most animals and humanoids to dwarves, and particularly large animals to elephants.

Also adds a line to show that particular unit's size modifiers.

…erson can comprehend. Also added a line to include that particular unit's size compared against its own species
@myk002
Copy link
Member

myk002 commented May 15, 2024

pre-commit.ci autofix

gui/unit-info-viewer.lua Show resolved Hide resolved
gui/unit-info-viewer.lua Outdated Show resolved Hide resolved
gui/unit-info-viewer.lua Outdated Show resolved Hide resolved
@@ -333,12 +333,42 @@ local function get_size_in_cc(unit)
return unit.body.size_info.size_cur * 10
Copy link
Member

Choose a reason for hiding this comment

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

is this function now unused? if so, you can remove it

gui/unit-info-viewer.lua Outdated Show resolved Hide resolved
gui/unit-info-viewer.lua Show resolved Hide resolved
Dwarves specifically will not display a weight in dwarves.
Elephants/cats will still display a weight, but will do so in dwarves instead of 1 cat or elephants.
Reduced the percision on meaurements. Cats have 2 decimal places, while dwarves/elephants only have 1.
 into conceivable-sizes

Reformatted long comment
Removed unneeded function
No longer displays sizes as 1 Dwarf, Elephant, or Cat. Dwarves no longer reported weights, but elephants/cats will report weights in dwarves.
Reduced percison, elephants/dwarves to 1 decimal place, while cats are at 2.
Removed unneeded function
No longer displays sizes as 1 Dwarf, Elephant, or Cat. Dwarves no longer reported weights, but elephants/cats will report weights in dwarves.
Reduced percison, elephants/dwarves to 1 decimal place, while cats are at 2.
@dimwit105
Copy link
Contributor Author

I've removed the extra function after checking it wasnt used anywhere else, and reformatted that long comment so it isnt a huge line anymore.

I've adjusted the way weights are displayed, so elephants/cats arent reported as weighing 1 elephant or 1 cat, but instead display weight in dwarves. Dwarves themselves no longer give a precise weight, just the relative to average dwarfiness.

@myk002
Copy link
Member

myk002 commented May 16, 2024

pre-commit.ci autofix

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

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

Looks great! Could you add a line to the "Misc Improvements" section for the "Future" version in changelog.txt?

@myk002
Copy link
Member

myk002 commented May 16, 2024

Also, please feel free to add yourself to https://github.com/DFHack/dfhack/blob/develop/docs/about/Authors.rst (in a separate PR)

@dimwit105
Copy link
Contributor Author

The changelog has been added. I have managed to bumble through my first GitHub experience, and my journey to GitHub Wizard has begun

@myk002 myk002 merged commit c0daef1 into DFHack:master May 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants