-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Item length #40186
Item length #40186
Conversation
Items made entirely from |
Presumably such items just won't get a length value? So long as length is not used for anything else, that shouldn't be a problem. |
At some point I will probably borrow |
i didn't think of soft items. I can except them for now, but i do think we should have some kind of idea for limitation for them. |
probably the green line makes more sense, as the member is called "longest_side" after all and is mostly used for being able to fit things into pockets. |
|
Co-authored-by: John Bytheway <jbytheway@gmail.com>
Maybe allowing to stick out by less than a third or a quarter of the total length should be possible. |
This is segfaulting with this stack in the archery damage test:
|
turns out the test was seg faulting because arrows were too long for the bows. woops. |
"pocket_data": [ { "pocket_type": "CONTAINER", "max_contains_volume": "18 L", "max_contains_weight": "30 kg", "moves": 300 } ], | ||
"longest_side": "900 cm", | ||
"//": "The main section of the golf bag actually assumes things will stick out of it, but specifically contains them, so some extra wiggle room was added.", | ||
"pocket_data": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So new melee meta is going to be golf bag of weapons? :D
if( value_ % 1'000'000 ) { | ||
jsout.write( string_format( "%d km", value_ / 1'000'000 ) ); | ||
} else if( value_ % 1'000 ) { | ||
jsout.write( string_format( "%d meter", value_ / 1'000'000 ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be 1000?
And all value_ % 1xxx
checks be value_ % 1xxx == 0
to avoid e.g. formatting 1
as 0 km
and 1000000
as 1000000 mm
Summary
SUMMARY: Features "Implement item length"
Purpose of change
For item pockets, it's weird you can store a longsword in a tin can. So, the first of 2 ways to stop this is to implement a 'longest side' trait for items.
Describe the solution
Describe alternatives you've considered
putting swords in tin cans is pretty humorous, so probably that
Testing
spawned a plastic tub
and tried to place a pool cue in it
it did not fit.
Additional context
this pr is mostly all infrastructure work, so most items won't change, but some might. it will also be worth eyeballing the calculated lengths in game to sanity check the formula i used, and/or use that to denote items that need some hard quinting-at. also pinging @laveyanfiend because he's been asking about this feature