This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Dumps value as a string closely resemling Lua code that could be used to | |
-- recreate it (with the exception of functions, threads and recursive tables). | |
-- | |
-- Basic usage: dump(value) | |
-- | |
-- @param value The value to be dumped. | |
-- @param indent (optional) String used for indenting the dumped value. | |
-- @param seen (optional) Table of already processed tables which will be | |
-- dumped as "{...}" to prevent infinite recursion. | |
function dump(value, indent, seen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local my_entity=df.historical_entity.find(df.global.ui.civ_id) | |
local sText=" " | |
local k=0 | |
local v=1 | |
for x,y in pairs(df.global.world.entities.all) do | |
my_entity=y | |
k=0 | |
while k < #my_entity.resources.misc_mat.extracts.mat_index do | |
v=my_entity.resources.misc_mat.extracts.mat_type[k] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[PROFILE] | |
[TITLE:Early metal fast start] | |
[SKILL:1:COOK:5] | |
[SKILL:1:PLANT:4] | |
[SKILL:1:FORGE_ARMOR:1] | |
[SKILL:2:BREWING:1] | |
[SKILL:2:PLANT:4] | |
[SKILL:2:BOWYER:5] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Empty a bin onto the floor | |
print('Finding selected item...') | |
a = dfhack.gui.getSelectedItem() | |
print('Found ', dfhack.items.getDescription(a,0)) | |
if not a then dfhack.printerr("No item selected!") | |
end | |
loc = a.pos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts, OverloadedStrings, NoMonomorphismRestriction #-} | |
import Data.Conduit as C | |
import Data.Conduit.Network as CN | |
import Data.Maybe | |
import Data.Monoid | |
import System.IO (stdout) | |
import qualified Data.Conduit.List as CL | |
import qualified Data.Conduit.Binary as CB | |
import Data.ByteString.Char8 (ByteString, pack) | |
import qualified Data.ByteString as S |