E
Ethaks645d ago
🧵
M
Mana645d ago
I hope I didn't miss any corner cases where it doesn't work besides the one that the MR had a comment about. Oh, the migration shim is probably bad, on quick glance. I simplified it but I think I broke it at the same time. .. Nope, it works. I was looking at old version of that.
E
Ethaks645d ago
I just created a world container item, opened its contents tab, and added a new weapon through the + sign. The Contents Weight then jumps to NaN from 0 I think that's a sheet and not a data issue though
M
Mana645d ago
I can't even create a new container in an actor... there's something definitely broken.
foundry.js:319 TypeError: Cannot create property 'currency' on number '0' [Detected 1 package: system:pf1] at ItemContainerPF.prepareBaseData (systems/pf1/pf1.js:20140)
E
Ethaks645d ago
Is that after a server restart to account for template.json changes 😛
M
Mana645d ago
Of course I forgot that.
E
Ethaks645d ago
I forgot about that when I checked out the MR, so I saw that error like 5 minutes ago 😄 And yeah, that contents weight stuff is a sheet issue, the hbs needs a data.weight.total I guess
M
Mana645d ago
That attempt may have broken my actor tho
foundry.js:319 TypeError: Cannot read properties of undefined (reading 'forEach') [Detected 1 package: system:pf1] at ItemContainerPF.getValue (systems/pf1/pf1.js:20254) at systems/pf1/pf1.js:17434
E
Ethaks645d ago
Does the Weight field in item sheets only show the .value now? I think it used to show the calculated overall weight (now .total) after multiplying with quantity.
M
Mana645d ago
It should show it like it did before, unless I hooked the wrong variables.
E
Ethaks645d ago
(Sorry if the points I bring up are fragmented, I sent the initial message because something seemed majorly broken, but that was my fault. So now I'm kind of abusing this as a stream of conscious, if you don't mind)
M
Mana645d ago
It's fine. I don't recall if I tested quantities correctly. It's been like a month now since I did the MR. The weight on the sheet was per item even before. Only price changed to represent the entire stack.
E
Ethaks645d ago
Ah, that might have been the case, my bad
M
Mana645d ago
At least that's the case in 0.80.24
E
Ethaks645d ago
One thing with quantities: Create world item container, open contents, add weapon, set weight to 10, set quantity to 2. Container weight is calculated correctly. The weapons weight.total is 10 however. Is that meant to be the case and the quantity including weight is stored somewhere else?
M
Mana645d ago
I'm not sure items ever stored stack total. I didn't change anything related to that, at least I don't think. Same happens with items outside of containers. I guess it should be multiplied by quantity, otherwise it doesn't do much besides .converted?
E
Ethaks645d ago
I'm pretty sure that there was supposed to be a value somewhere, although the weight update from preUpdate to derived might have broken that
M
Mana645d ago
Purely from design point, it should have the lbs value per single item, and lbs value per stack in derived data, with converted values for both. But it doesn't do that right now. Should I fix that on my end or are you fudging that into working order?
E
Ethaks645d ago
I'll probably not get started today/this evening. I'm okay with looking into this as well as with you wiring that up, so I'll leave that up to you.
M
Mana645d ago
I have time I can put into it.
E
Ethaks645d ago
That'd be great, thanks!
LTL
Leo The League Lion645d ago
@ethaks gave vote LeaguePoints™ to @manaflower (#19 • 130)
M
Mana645d ago
Okay, it's all done. As unintentional side effect the sheet now displays weight of the stack when not editing the value. So it matches the behaviour with price. Well, done for the most part. .total now is stack total. and .converted is the stack total converted. There's no converted value for singular item. Not sure what to do about that if anything. I guess converted could be an object with .value and .total of its own..
E
Ethaks645d ago
Thank you! I'll check it out again in ~10 hours.
M
Mana645d ago
Just FYI, I didn't to this part. I can do it, but I was uncertain if I should.
E
Ethaks644d ago
To avoid going totally silent on this: I did check out the MR again, and I've been tinkering a bit with it (going for the .converted object, adding tests, adjusting which values appear in input fields, container contents)
M
Mana644d ago
Alright.
M
Mana642d ago
I'm experiencing some lagginess with what was merged.
No description
M
Mana642d ago
This item is 10lbs, updating quantity doesn't update weight after refresh until after several changes. After it finally changes, it updates in timely fashion for all changes after. This was specifically item in a container in items directory. The container itself updates despite the lag in the item sheet. And this is repeatable after every F5
E
Ethaks642d ago
Not at a computer yet to check this, but what does the item's data contain? Is the weight preparation run and does its thing, is it it already stuck there?
M
Mana642d ago
Looks like it's in the derived data. So it's just not refreshing the sheet for the first several changes to it for unknown reasons.
E
Ethaks642d ago
Found the reason: the item's _onUpdate is never called due to an early continue in item/entity.js:850 when the item's data is not found in memoryVariables["data.inventoryItems"]. No _onUpdate -> no render call at all. This is just not as obvious with the quantity because that input field just stays like it is, whereas the value shown in the weight field is changed after leaving the input and depends on the render.
M
Mana641d ago
Nice investigative work there :)
E
Ethaks641d ago
I had to prep my own session so I left the cleanup to Fury, and it seems the description was not 100% correct as the actual point was a few lines below. Getting within three lines with a single breakpoint and less than 5 minutes is good enough in my book though 😄 Also thanks @manaflower for finding that issue. I definitely did not check for something like that, and I doubt I would've found that bug anytime soon.
LTL
Leo The League Lion641d ago
@ethaks gave vote LeaguePoints™ to @manaflower (#18 • 134)
Want results from more Discord servers?
Add your server
More Posts
2.0.0 explorationFrom Atropos in the mothership (in v10 Feedback) > Hello folks, for those of you testing V10 using tElectron ViteIt loads at least.early v10 compat testing@dnd5e - No action required Work is being done on fixing the core system compatibility with v10 in module.json helpYou have no manifest or download fields.TyphonJS Runtime Library - RC 0.0.12The TyphonJS Runtime Library / TRL release candidate version 0.0.12 is now available. This is a massCypress FunYeah, unfortunately it ain't that simple 😅 Cypress, like you say, automatically retries things, andpreUpdateHook questionHey all, question for anyone who has a sec. I'm trying to use `preCreateActor` to add rolled values spitballing about jest mocksok. ok. ok. pure spitballing theory here. All the client side source exists in esmodule form (hopef1.6.1 testing@dnd5e Testing Action Requested but not required. version 1.6.1 is a bugfix version, it's pretty clconversion macro@max.pat did you have a macro or script which could change the old classFeatures data into advancemeAC calc changesI do not believe the data for AC actually changed, only the way it is calculated. evidence: no chang1.6.0 Custom Sheet ChangesLooking at the changes made which are breaking for custom sheets. Gonna make a thread for this.1.6.0 testingCommunity Testing Requests: For those of you interested in helping to QA this branch, I'll put togeHook documentationdnd5e Hook Documentation: https://gitlab.com/foundrynet/dnd5e/-/wikis/HooksTyphonJS Runtime Library v0.0.9 - Release CandidateAlrighty! The TyphonJS Runtime Library (TRL) v0.0.9 is out... In the last 2 weeks+ I have done massi1.6.0 - 82%@dnd5e - **No action Required** The 1.6.0 milestone is at 82% completion https://gitlab.com/foundryadvancement consumptionnow that I brought that up on #progress-reports @calego , could I maybe pester you later for some adAlternative Alignment System D&D5eWow, that is a really powerful way to codify alignment. I like it! Do you have any ideas as to how iconsumables chat data@Zhell > So that's odd. How come consumables work different and all other item types get a non-funcilthid stop dragActually, would it be possible to modify the core function that allows people to click and drag toke