Started by Swenzi, June 16, 2017, 12:54:49 PM
Quote from: SpaceDorf on June 16, 2017, 04:37:59 PMFirst Right from the wishlist. Thank you swenzi, Subscribed.
Quote from: AngleWyrm on June 16, 2017, 09:54:05 PMThis post explains how to make an xpath statement that isn't going to generate duplicate field errors. Quick recap:<Operation Class="PatchOperationSequence"> <success>Always</success> <operations> <li Class="PatchOperationTest"> <xpath>*/ThingDef[defName = "ChosenThingy"]/elementThatIWannaAdd</xpath> <success>Invert</success> </li> <li Class="PatchOperationAdd"> <xpath>*/ThingDef[defName = "ChosenThingy"]</xpath> <value> <elementThatIWannaAdd> someValue </elementThatIWannaAdd> </value> </li> </operations></Operation>
Quote from: Swenzi on June 16, 2017, 11:23:39 PMSo if i use this to test than I won't need the submod?
Quote from: AngleWyrm on June 17, 2017, 01:09:25 AMQuote from: Swenzi on June 16, 2017, 11:23:39 PMSo if i use this to test than I won't need the submod?I've used this test to do the same thing: Add a sub-element if it doesn't exist.The error messages are saying that two separate attempts (by two different mods) were made to add a specific element, and so it failed the second time because that element already exists. This test checks to see if the element already exists (maybe because some other mod created it), and if it doesn't then there's a spot in there to add the element. And if it does already exist, then the check quietly bails out of it's sequence without spilling big red oops onto the user's screen.
Quote from: Antaios on June 17, 2017, 05:30:32 AMDo take note that PatchSequenceTest operates per file, not global and not per def.
Quote from: AngleWyrm on June 17, 2017, 08:03:37 PMQuote from: Antaios on June 17, 2017, 05:30:32 AMDo take note that PatchSequenceTest operates per file, not global and not per def.There should be no connection between xpath data searches and the underlying physical storage of that data. The assertion that there is implies a defect in the implementation of the PatchSequenceTest function. Can you construct a test case that fails if the test draws values from different files, but succeeds if those values are drawn from the same file?
Quote from: asquirrel on June 25, 2017, 11:32:06 AMThe water generator is listed and I can drag the blueprint but there is no body of water I can place it in. I've tried all colors of water (light and dark blue) but the blueprint stays red. Is there a technology I have to research before I can place it? Thanks!Edit: I have the base water power mod installed and then the patch for basic bridges installed below that. It looks like this in my mods list:WaterPowerWaterPower [Basic Bridges Compatible]