datacup / dfhackscripts Goto Github PK
View Code? Open in Web Editor NEWSome dfhack scripts from friends of keupo on twitch
License: Apache License 2.0
Some dfhack scripts from friends of keupo on twitch
License: Apache License 2.0
Request from keupo to create regular polygons
When the origin and major axis are aligned in the vertical, digshape bez draws a straight line between them, no matter the cursor placement.
digshape doesn't mark over ramps, this might get annoying if you were channeling down several z-levels. I support continued lack of designating stairs though.
dfhack has yet to master the mysteries of the universe
Only :Wall and :Floor, prob need to add something like :Ramp to the digAt?
We should make a different script that digs a flipped version of what is designated on the screen.
Finally decided to try and tackle using this tool today, but it's just straight throwing errors for everything. Here is the error, it's the same no matter what I attempt to do with it.
E: FloatDomainError: NaN hack/scripts/digshape.rb:335:in
round'
hack/scripts/digshape.rb:335:in block in drawPolygon' hack/scripts/digshape.rb:334:in
each'
hack/scripts/digshape.rb:334:in drawPolygon' hack/scripts/digshape.rb:527:in
<top (required)>'
eval:2:in load' eval:2:in
block in
Actually here's a star error:
E: FloatDomainError: NaN hack/scripts/digshape.rb:335:in
round'
hack/scripts/digshape.rb:335:in block in drawPolygon' hack/scripts/digshape.rb:334:in
each'
hack/scripts/digshape.rb:334:in drawPolygon' hack/scripts/digshape.rb:527:in
<top (required)>'
eval:2:in load' eval:2:in
block in
catch'
Follow-up to #3 we can also create star polygons https://en.wikipedia.org/wiki/Star_polygon
Would be great to trace a spiral using somewhat equidistant points in order to elaborate designations from the guide points
https://stackoverflow.com/questions/13894715/draw-equidistant-points-on-a-spiral
probably because they're a double-meta key combo (which I don't know how to handle yet in dfhack lua), and alt-gr which is specifically the right alt key.
c,v,b,n are unused on the gui/digshape screen so can at least be used there. I should add some pointer comments so that end users can rebind those four keys until I get a better fix.
It's also possible this is a normal dfhack issue when the language isn't set to english. Should check other scripts to see if they use SECONDSCROLL_PAGEUP /DOWN and see if they work or if they use a different way of reading keypresses.
add a flood fill to fill in polygons and other shapes.
could cause massive lag and also unintended flooding would be extremely frusturating
Would it be possible to do something like canceling the command if you've left a hole? Perhaps, something like if the algorithm is going to mark the edge of the map for digging, cancel the whole thing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.