Description
Details
- Provenance
s0600204 Authored on - Differential Revision
- D900: Remove civ-specific hardcoding in Random Map Generation Wall Placement script.
- Parents
- rP23683: Invert a case in rP23682
- Branches
- Unknown
- Tags
- Build Status
Buildable 11750 Build 21782: Post-Commit Build Jenkins Build 21781: Post-Commit Build (macOS) Jenkins
Event Timeline
/ps/trunk/binaries/data/mods/public/simulation/components/WallPiece.js | ||
---|---|---|
7 | Isn't it actually in simulation template units, e.g. 4×4 corresponds to 1 tile? | |
11 | So if I want to rotate something, I suppose I have to approximate π/2 with 1.552? |
/ps/trunk/binaries/data/mods/public/globalscripts/Templates.js | ||
---|---|---|
470 | Shouldn't you use _string instead to not have to do this? The cpp template parser split by spaces and remove all the unnedeed characters. I suppose this regex is not really used often but it's still slower than the split |
Ok, story time: I wrote this patch, and then sat on it for about a day. Read through it again, thought to myself "this looks ok: factually correct and all that", so committed it. Not half-an-hour later, I realised that I had made a mistake: orientation and bend weren't in radians[^1]. By this time, it was roughly six in the morning, I recognised I was way too tired to attempt to fix then, so resolved to do so after some sleep. I wake up, and find out I'd got the other unit of measurement wrong too... ?
^1 - In my defence, I haven't had to do maths for so long that I'd forgotten what radians actually were... ?
/ps/trunk/binaries/data/mods/public/globalscripts/Templates.js | ||
---|---|---|
470 |
It doesn't in this case - this is not a tokenised string. Something for a revision, perhaps. | |
/ps/trunk/binaries/data/mods/public/simulation/components/WallPiece.js | ||
7 | Uh, yes. Got confused. Can't do maths. | |
11 | I really can't do maths - it's not radians, it's multiples of Pi. |