├── thumbnail.png
├── graphics
├── gui.png
├── ucoin.png
├── but-main.png
├── energy.png
├── black-market-mk.png
├── black-market-fluid.png
├── black-market-group.png
├── black-market-item.png
├── trading-chest-buy.png
├── trading-chest-sell.png
├── trading-tank-buy.png
├── trading-tank-buy2.png
├── trading-tank-sell.png
├── trading-tank-sell2.png
├── black-market-energy.png
├── signal-market-auto-all.png
├── signal-market-auto-buy.png
├── signal-market-auto-sell.png
├── trading-accumulator-buy.png
├── trading-chest-buy-icon.png
├── trading-chest-sell-icon.png
├── trading-tank-buy-icon.png
├── trading-tank-sell-icon.png
├── trading-accumulator-sell.png
├── trading-accumulator-buy-icon.png
├── trading-accumulator-buy-charge.png
├── trading-accumulator-sell-icon.png
├── trading-accumulator-buy-discharge.png
├── trading-accumulator-sell-charge.png
└── trading-accumulator-sell-discharge.png
├── data.lua
├── migrations
└── BlackMarket2_1.2.9.json
├── info.json
├── prototypes
├── signals.lua
├── styles.lua
└── entities.lua
├── symlink.sh
├── .luacheckrc
├── config.lua
├── test-validation.sh
├── README.md
├── DEVELOPMENT.md
├── changelog.txt
├── utils.lua
├── settings.lua
├── locale
├── cn
│ └── cn.cfg
└── en
│ └── en.cfg
└── LICENSE
/thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/thumbnail.png
--------------------------------------------------------------------------------
/graphics/gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/gui.png
--------------------------------------------------------------------------------
/graphics/ucoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/ucoin.png
--------------------------------------------------------------------------------
/graphics/but-main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/but-main.png
--------------------------------------------------------------------------------
/graphics/energy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/energy.png
--------------------------------------------------------------------------------
/graphics/black-market-mk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/black-market-mk.png
--------------------------------------------------------------------------------
/graphics/black-market-fluid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/black-market-fluid.png
--------------------------------------------------------------------------------
/graphics/black-market-group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/black-market-group.png
--------------------------------------------------------------------------------
/graphics/black-market-item.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/black-market-item.png
--------------------------------------------------------------------------------
/graphics/trading-chest-buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-chest-buy.png
--------------------------------------------------------------------------------
/graphics/trading-chest-sell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-chest-sell.png
--------------------------------------------------------------------------------
/graphics/trading-tank-buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-buy.png
--------------------------------------------------------------------------------
/graphics/trading-tank-buy2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-buy2.png
--------------------------------------------------------------------------------
/graphics/trading-tank-sell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-sell.png
--------------------------------------------------------------------------------
/graphics/trading-tank-sell2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-sell2.png
--------------------------------------------------------------------------------
/graphics/black-market-energy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/black-market-energy.png
--------------------------------------------------------------------------------
/data.lua:
--------------------------------------------------------------------------------
1 | require("utils")
2 | require("prototypes/styles")
3 | require("prototypes/entities")
4 | require("prototypes/signals")
--------------------------------------------------------------------------------
/graphics/signal-market-auto-all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/signal-market-auto-all.png
--------------------------------------------------------------------------------
/graphics/signal-market-auto-buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/signal-market-auto-buy.png
--------------------------------------------------------------------------------
/graphics/signal-market-auto-sell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/signal-market-auto-sell.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-buy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-buy.png
--------------------------------------------------------------------------------
/graphics/trading-chest-buy-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-chest-buy-icon.png
--------------------------------------------------------------------------------
/graphics/trading-chest-sell-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-chest-sell-icon.png
--------------------------------------------------------------------------------
/graphics/trading-tank-buy-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-buy-icon.png
--------------------------------------------------------------------------------
/graphics/trading-tank-sell-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-tank-sell-icon.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-sell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-sell.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-buy-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-buy-icon.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-buy-charge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-buy-charge.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-sell-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-sell-icon.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-buy-discharge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-buy-discharge.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-sell-charge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-sell-charge.png
--------------------------------------------------------------------------------
/graphics/trading-accumulator-sell-discharge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/djmango/BlackMarket2/HEAD/graphics/trading-accumulator-sell-discharge.png
--------------------------------------------------------------------------------
/migrations/BlackMarket2_1.2.9.json:
--------------------------------------------------------------------------------
1 | {
2 | "technology":
3 | [
4 | ["black-market-mk-2", "black-market-mk2"],
5 | ["black-market-mk-3", "black-market-mk3"],
6 | ["black-market-mk-4", "black-market-mk4"]
7 | ]
8 | }
--------------------------------------------------------------------------------
/info.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BlackMarket2",
3 | "version": "2.2.19",
4 | "title": "Black Market 2",
5 | "author": "djmango",
6 | "description": "Sell and buy items/fluids/energy on the universal black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.",
7 | "homepage": "https://github.com/djmango/BlackMarket2",
8 | "contact": "djmango",
9 | "factorio_version":"2.0",
10 | "dependencies": [
11 | "base >= 2.0.0",
12 | "flib >= 0.8.0"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/prototypes/signals.lua:
--------------------------------------------------------------------------------
1 | data:extend(
2 | {
3 | {
4 | type = "item-subgroup",
5 | name = "virtual-signal-market",
6 | group = "signals",
7 | order = "y[virtual-signal-market]"
8 | },
9 |
10 | {
11 | type = "virtual-signal",
12 | name = "signal-market-auto-all",
13 | icon = "__BlackMarket2__/graphics/signal-market-auto-all.png",
14 | icon_size = 32,
15 | subgroup = "virtual-signal-market",
16 | order = "y[market]-aa"
17 | },
18 | {
19 | type = "virtual-signal",
20 | name = "signal-market-auto-sell",
21 | icon = "__BlackMarket2__/graphics/signal-market-auto-sell.png",
22 | icon_size = 32,
23 | subgroup = "virtual-signal-market",
24 | order = "y[market]-ab"
25 | },
26 | {
27 | type = "virtual-signal",
28 | name = "signal-market-auto-buy",
29 | icon = "__BlackMarket2__/graphics/signal-market-auto-buy.png",
30 | icon_size = 32,
31 | subgroup = "virtual-signal-market",
32 | order = "y[market]-ac"
33 | },
34 |
35 |
36 | }
37 | )
38 |
--------------------------------------------------------------------------------
/symlink.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get the current version from info.json
4 | VERSION=$(jq -r '.version' info.json)
5 | FACTORIO_MODS_DIR="$HOME/Library/Application Support/factorio/mods"
6 | MOD_NAME="BlackMarket2"
7 |
8 | echo "Setting up development symlink for $MOD_NAME v$VERSION"
9 |
10 | # Remove any existing zip files for this mod
11 | echo "Removing existing zip files..."
12 | rm -f "$FACTORIO_MODS_DIR/${MOD_NAME}_"*.zip
13 |
14 | # Remove any existing symlinks
15 | echo "Removing existing symlinks..."
16 | rm -f "$FACTORIO_MODS_DIR/${MOD_NAME}_"*
17 |
18 | # Create the symlink with the current version
19 | SYMLINK_NAME="${MOD_NAME}_${VERSION}"
20 | SYMLINK_PATH="$FACTORIO_MODS_DIR/$SYMLINK_NAME"
21 |
22 | echo "Creating symlink: $SYMLINK_PATH -> $(pwd)"
23 | ln -sf "$(pwd)" "$SYMLINK_PATH"
24 |
25 | # Verify the symlink was created
26 | if [ -L "$SYMLINK_PATH" ]; then
27 | echo "✅ Symlink created successfully!"
28 | echo "🎯 You can now test your mod in Factorio"
29 | echo "📁 Symlink: $SYMLINK_PATH"
30 | echo "🔗 Points to: $(readlink "$SYMLINK_PATH")"
31 | else
32 | echo "❌ Failed to create symlink"
33 | exit 1
34 | fi
35 |
--------------------------------------------------------------------------------
/.luacheckrc:
--------------------------------------------------------------------------------
1 | std = "min"
2 |
3 | -- Exclude directories that shouldn't be linted
4 | exclude_files = {
5 | ".luarocks/**",
6 | ".github/**",
7 | "node_modules/**",
8 | ".vscode/**"
9 | }
10 |
11 | -- Global variables defined in your mod files
12 | globals = {
13 | -- Factorio API
14 | "game", "script", "defines", "prototypes", "settings", "storage",
15 | "commands", "log", "table_size", "serpent", "util", "mods",
16 | "remote", "rcon", "rendering", "helpers", "data", "pcall",
17 | "ipairs", "pairs", "next", "type", "tostring", "tonumber",
18 | "string", "math", "table", "assert", "error", "getmetatable",
19 | "setmetatable", "rawget", "rawset", "rawlen", "rawequal",
20 | "select", "unpack",
21 |
22 | -- Mod-specific globals from config.lua and utils.lua
23 | "debug_status", "debug_mod_name", "debug_file", "debug_do_raz",
24 | "debug_active", "debug_print", "message_all", "message_force",
25 | "square_area", "distance", "distance_square", "pos_offset",
26 | "surface_area", "iif", "add_list", "del_list", "in_list",
27 | "size_list", "concat_lists", "dupli_proto", "debug_guis",
28 | "extract_monolith", "configure_settings",
29 |
30 | -- Color definitions
31 | "colors", "anticolors", "lightcolors",
32 |
33 | -- Variables from config.lua
34 | "resource_price", "water_price", "free_price", "unknown_price",
35 | "vanilla_resources_prices", "special_prices", "unknown_price_reason_logging",
36 | "recipe_depth_maximum", "only_items_researched", "tax_enabled",
37 | "dynamic_prices_enabled", "energy_price", "energy_cost", "tech_ingr_cost",
38 | "tech_amortization", "commercial_margin", "dynamic_regrowth",
39 | "dynamic_influence_item", "dynamic_influence_fluid", "dynamic_influence_energy",
40 | "dynamic_minimal", "dynamic_maximal", "tax_immediate", "tax_start",
41 | "tax_growth", "periods", "default_n_period", "default_auto", "thousands_separator",
42 |
43 | -- Variables from control.lua
44 | "prices_file", "price_log", "specials_file", "format_money", "format_evolution",
45 | "add_order", "gui3", "price", "item_recipe", "recipe",
46 |
47 | -- Other mod globals
48 | "mod_gui"
49 | }
50 |
51 | -- Read-only globals
52 | read_globals = {
53 | "mod_gui", "_G", "_ENV", "require"
54 | }
55 |
56 | -- Ignore specific warnings that are common in Factorio mods
57 | ignore = {
58 | "212", -- Unused argument (common in event handlers)
59 | "213", -- Unused loop variable
60 | "311", -- Value assigned to variable is unused
61 | "314", -- Field of a table literal is overwritten
62 | "542", -- Empty if branch
63 | "611", -- Line contains only whitespace
64 | "612", -- Line contains trailing whitespace
65 | "614", -- Trailing whitespace in comment
66 | "631", -- Line is too long
67 | }
68 |
69 | -- Maximum line length (increase from default 120)
70 | max_line_length = 140
71 |
--------------------------------------------------------------------------------
/config.lua:
--------------------------------------------------------------------------------
1 | function configure_settings()
2 | resource_price = settings.global["BM2-resource_price"].value -- price of original declared resource object
3 | water_price = settings.global["BM2-infinite_price"].value -- price for easy infinite resource like water, air, etc...
4 | free_price = settings.global["BM2-free_price"].value -- price of free object (product of recipe with no ingredients)
5 | unknown_price = settings.global["BM2-unknown_price"].value -- price of unknown object (product or ingredient of no recipe, so skipped)
6 |
7 | -- vanilla resources
8 |
9 | vanilla_resources_prices = {
10 | ["water"] = settings.global["BM2-water_price"].value,
11 | ["coal"] = settings.global["BM2-coal_price"].value,
12 | ["stone"] = settings.global["BM2-stone_price"].value,
13 | ["iron-ore"] = settings.global["BM2-iron_price"].value,
14 | ["copper-ore"] = settings.global["BM2-copper_price"].value,
15 | ["crude-oil"] = settings.global["BM2-oil_price"].value,
16 | ["uranium-ore"] = settings.global["BM2-uranium_price"].value,
17 | }
18 |
19 | -- special manually declared prices
20 |
21 | special_prices = {
22 | ["ucoin"] = settings.global["BM2-ucoin"].value,
23 |
24 | ["wood"] = settings.global["BM2-wood"].value,
25 | ["raw-fish"] = settings.global["BM2-raw_fish"].value,
26 |
27 | ["steam"] = settings.global["BM2-steam"].value,
28 | }
29 |
30 | unknown_price_reason_logging = settings.global["BM2-unknown_price_reason_logging"]
31 |
32 | recipe_depth_maximum = settings.global["BM2-recipe_depth_maximum"].value -- the maximum depth the recipe search can go
33 | only_items_researched = settings.global["BM2-only_items_researched"].value -- if only want researched items enabled or not
34 | tax_enabled = settings.global["BM2-enable_tax"].value -- if taxes enabled or not
35 | dynamic_prices_enabled = settings.global["BM2-dynamic_prices"].value -- if dynamic is enabled or not
36 |
37 | energy_price= settings.global["BM2-energy_price"].value -- price for selling and buying energy (for 1MJ)
38 | energy_cost = settings.global["BM2-energy_cost"].value -- cost of energy unit in recipes (time, different from MJ)
39 | tech_ingr_cost = settings.global["BM2-tech_ingr_cost"].value -- average cost of a science pack
40 | tech_amortization = settings.global["BM2-tech_amortization"].value -- amortization of the tech cost in object price
41 | commercial_margin = settings.global["BM2-commercial_margin"].value -- commercial margin
42 |
43 | dynamic_regrowth = settings.global["BM2-dynamic_regrowth"].value -- how prices slowly return to optimal value if untouched (every day)
44 | dynamic_influence_item = settings.global["BM2-dynamic_influence_item"].value -- influence of sales and purchases on prices (per item, per day)
45 | dynamic_influence_fluid = settings.global["BM2-dynamic_influence_fluid"].value -- influence of sales and purchases on prices (per item, per day)
46 | dynamic_influence_energy = settings.global["BM2-dynamic_influence_energy"].value -- influence of sales and purchases on prices (per item, per day)
47 | dynamic_minimal = settings.global["BM2-dynamic_minimal"].value
48 | dynamic_maximal = settings.global["BM2-dynamic_maximal"].value
49 |
50 | tax_immediate = settings.global["BM2-tax_immediate"].value -- starting fee in % for one action per day
51 | tax_start = settings.global["BM2-tax_start"].value -- exponential growth with frequency/day : fee = tax_start * (freq ^ tax_growth)
52 | tax_growth = settings.global["BM2-tax_growth"].value -- % fee for immediate action
53 |
54 | periods = {0,1,2,3,4,6,8,12,24} -- available periods in hours
55 | default_n_period = 2 -- default period of a new trading chest
56 | default_auto = settings.global["BM2-default_auto"].value -- default automatic mode
57 |
58 | thousands_separator = ","
59 | end
--------------------------------------------------------------------------------
/test-validation.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Local test script for GitHub Actions validation
4 | # This mimics the .github/workflows/validate.yml workflow
5 |
6 | echo "🧪 Local GitHub Actions Validation Test"
7 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
8 |
9 | # Test 1: Check required files
10 | echo "1. Checking required files..."
11 | if [ ! -f "info.json" ]; then
12 | echo "❌ Missing info.json"
13 | exit 1
14 | fi
15 | if [ ! -f "control.lua" ]; then
16 | echo "❌ Missing control.lua"
17 | exit 1
18 | fi
19 | if [ ! -f "data.lua" ]; then
20 | echo "❌ Missing data.lua"
21 | exit 1
22 | fi
23 | echo "✅ Required files present"
24 |
25 | # Test 2: Validate info.json
26 | echo ""
27 | echo "2. Validating info.json..."
28 | if ! jq empty info.json 2>/dev/null; then
29 | echo "❌ info.json is not valid JSON"
30 | exit 1
31 | fi
32 |
33 | # Check required fields
34 | name=$(jq -r '.name // empty' info.json)
35 | version=$(jq -r '.version // empty' info.json)
36 | title=$(jq -r '.title // empty' info.json)
37 | author=$(jq -r '.author // empty' info.json)
38 | factorio_version=$(jq -r '.factorio_version // empty' info.json)
39 |
40 | if [ -z "$name" ] || [ -z "$version" ] || [ -z "$title" ] || [ -z "$author" ] || [ -z "$factorio_version" ]; then
41 | echo "❌ Missing required fields in info.json"
42 | exit 1
43 | fi
44 |
45 | echo "✅ info.json validation passed"
46 | echo "📋 Mod: $name v$version by $author"
47 | echo "📋 Factorio version: $factorio_version"
48 |
49 | # Test 3: Run Lua linting
50 | echo ""
51 | echo "3. Running Lua linting..."
52 |
53 | # Add LuaRocks bin directory to PATH
54 | export PATH="$HOME/.luarocks/bin:$PATH"
55 |
56 | # Check if luacheck is available
57 | if ! command -v luacheck &>/dev/null; then
58 | echo "⚠️ luacheck not found. Installing..."
59 | if ! luarocks install --local luacheck; then
60 | echo "❌ Failed to install luacheck"
61 | exit 1
62 | fi
63 | fi
64 |
65 | # Run luacheck
66 | if luacheck --config .luacheckrc --formatter=plain -- control.lua data.lua settings.lua utils.lua prototypes/; then
67 | echo "✅ Lua linting passed"
68 | else
69 | echo "❌ Lua linting failed"
70 | exit 1
71 | fi
72 |
73 | # Test 4: Check locale structure
74 | echo ""
75 | echo "4. Checking locale structure..."
76 | if [ -d "locale" ]; then
77 | cfg_files=$(find locale -name "*.cfg" 2>/dev/null | wc -l)
78 | if [ "$cfg_files" -eq 0 ]; then
79 | echo "⚠️ No .cfg files found in locale directory"
80 | else
81 | echo "✅ Found $cfg_files locale file(s)"
82 | fi
83 | else
84 | echo "⚠️ No locale directory found"
85 | fi
86 |
87 | # Test 5: Check for common issues
88 | echo ""
89 | echo "5. Checking for common issues..."
90 | debug_prints=$(grep -r "game\.print\|game\.players\[.*\]\.print" . --include="*.lua" 2>/dev/null | wc -l)
91 | if [ "$debug_prints" -gt 0 ]; then
92 | echo "⚠️ Found $debug_prints potential debug prints"
93 | else
94 | echo "✅ No debug prints found"
95 | fi
96 |
97 | # Test 6: Validate changelog (if present)
98 | echo ""
99 | echo "6. Validating changelog (if present)..."
100 | if [ -f "changelog.txt" ]; then
101 | if ! grep -q "^Version:" changelog.txt; then
102 | echo "⚠️ Changelog doesn't follow standard format"
103 | else
104 | echo "✅ Changelog format looks good"
105 | fi
106 | else
107 | echo "⚠️ No changelog.txt found"
108 | fi
109 |
110 | echo ""
111 | echo "🎯 Local Validation Summary"
112 | echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
113 | echo "✅ All validation checks completed successfully!"
114 | echo "🚀 Your mod should pass the GitHub Actions validation!"
115 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Black Market 2
2 |
3 | [](https://github.com/djmango/BlackMarket2/actions/workflows/validate.yml)
4 | [](https://github.com/djmango/BlackMarket2/actions/workflows/release.yml)
5 |
6 | **BlackMarket 2** is a mod for [Factorio](https://factorio.com/) economics.
7 |
8 | ## Description
9 | Sell and buy items/fluids/energy on the universal black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.
10 |
11 | 
12 |
13 | ## Download
14 | * [Latest](https://github.com/djmango/BlackMarket2/archive/master.zip)
15 | * [Factorio Mod Page](https://mods.factorio.com/mod/BlackMarket2)
16 |
17 | ## Notes
18 | * For selling and buying periods, the day is reset at noon, not at midnight. So if you sell once a day (24h period), sales will always occur around 12:00.
19 | * You can choose to sell or buy immediatly, but the tax is high (by default anyway).
20 | * Note that selling and buying frequencies are per chest. But you can also set them all at once from the main menu.
21 | * You can choose to automatize each chest independantly. Bu you can also set them all automatic from the main menu (or disable them). You can also use the "pause" checkbox to pause the automatic transactions.
22 | * When holding any item in your hand, the upper credit line shows the price of the item instead of your total credit.
23 | * You can browse through the list of prices using the Show button.
24 | * Prices of each item is determined using recipes, prices of ingredients, amortization of technology, cost of energy and a commercial margin. Basic resources value is 100u. There is a button to export a list of prices to the .factorio directory, in a CSV spreadsheet format.
25 | * Remember that the price of an item is always greater than the sum of the prices of its ingredients. That's why you can do profit. You are selling your transformation work as an added value.
26 | * There is an initial prices list construction lauched in background when you installed the mod or when you change other mods configuration, to detect new objects or non existing objects.
27 | * Prices are dynamic : they evolve using a simplified law of supply and demand. The more players sell one object, the more its price decreases ; the more players buy one object, the more its price increases. This dynamic pricing is for the whole map, not only one force. When untouched, an object price return slowly to its original price.
28 | * You can withdraw some cash from your account by buying Ucoins items : there is no fee on such a purchase, and you will get Ucoins items in return in the chest. You can use these Ucoins items to give money to a player from another force (using TradingChests mod for example). You can also deposit some cash on your account, selling Ucoins items with no fee.
29 | * Add Combinator read market prices
30 | * Add Transaction logs
31 | * Add stats Graph / income vs. expenses
32 | * Add support for factorio base game and space age DLC
33 | * Support selling items with higher quality for higher price.
34 | * multiplyer are below:
35 | * normal -> 1x
36 | * uncommon -> 2.1x
37 | * rare -> 4.8x
38 | * epic -> 10.5x
39 | * legendary -> 35x
40 | * TODO: Adds support to buy items with higher quality (2.0)
41 | ## Development
42 |
43 | This mod uses GitHub Actions for automated validation and releases. See [DEVELOPMENT.md](DEVELOPMENT.md) for:
44 | - Setting up the development environment
45 | - Running linting and validation locally
46 | - Understanding the automated workflows
47 | - Creating releases
48 |
49 | ## Contributors
50 | * [Contributors graph](https://github.com/djmango/BlackMarket2/graphs/contributors)
51 | * [@BinbinHfr](https://mods.factorio.com/user/binbinhfr), original mod creator
52 | * [@totobest](https://github.com/totobest/), previous mod maintainer
53 | * [@djmango](https://github.com/djmango/), current mod maintainer
54 |
55 | ## Third party libraries
56 | * [Core/Class : npo6ka from FNEI mod (MIT)](https://github.com/npo6ka/FNEI)
57 | * [Factorio*Flib](https://github.com/factoriolib/flib)
58 |
59 | ## License
60 | * see [LICENSE](https://github.com/djmango/BlackMarket2/blob/master/LICENSE) file
61 |
62 | ## Contact
63 | * Homepage: [GitHub](https://github.com/djmango), [Modpage](https://mods.factorio.com/mod/BlackMarket2)
64 | * email: skghori03@gmail.com
65 |
66 | [](https://flattr.com/submit/auto?user_id=djmango&url=https://github.com/djmango/BlackMarket2&title=BlackMarket2&language=&tags=github&category=software)
67 |
68 |
--------------------------------------------------------------------------------
/DEVELOPMENT.md:
--------------------------------------------------------------------------------
1 | # Development Guide
2 |
3 | This document describes the development setup and workflows for the BlackMarket2 Factorio mod.
4 |
5 | ## GitHub Actions Workflows
6 |
7 | ### Validation Workflow (`.github/workflows/validate.yml`)
8 |
9 | Runs automatically on:
10 | - Push to `master`, `main`, or `develop` branches
11 | - Pull requests to `master`, `main`, or `develop` branches
12 |
13 | **What it does:**
14 | - ✅ Validates mod structure (required files exist)
15 | - ✅ Validates `info.json` format and required fields
16 | - ✅ Runs Lua linting with `luacheck`
17 | - ✅ Validates locale files structure
18 | - ✅ Checks for common issues (debug prints, trailing whitespace, etc.)
19 | - ✅ Validates changelog format (if present)
20 | - ✅ Generates a comprehensive validation report
21 |
22 | ### Release Workflow (`.github/workflows/release.yml`)
23 |
24 | Runs automatically when:
25 | - A version tag is pushed (format: `v1.2.3`)
26 |
27 | **What it does:**
28 | - ✅ Validates that the tag version matches `info.json` version
29 | - ✅ Creates a properly packaged mod zip file
30 | - ✅ Generates release notes from changelog
31 | - ✅ Creates a GitHub release with the mod package
32 |
33 | ## Local Development
34 |
35 | ### Prerequisites
36 |
37 | 1. **Lua and LuaCheck** (for linting):
38 | ```bash
39 | # Install Lua (version 5.4 recommended)
40 | # Install LuaRocks
41 | luarocks install luacheck
42 | ```
43 |
44 | 2. **jq** (for JSON validation):
45 | ```bash
46 | # On Ubuntu/Debian
47 | sudo apt-get install jq
48 |
49 | # On macOS
50 | brew install jq
51 | ```
52 |
53 | ### Linting
54 |
55 | Run the linter locally:
56 |
57 | ```bash
58 | # Lint all Lua files
59 | luacheck .
60 |
61 | # Lint specific file
62 | luacheck control.lua
63 |
64 | # Show only errors (no warnings)
65 | luacheck . --no-unused
66 | ```
67 |
68 | The project includes a `.luacheckrc` configuration file that:
69 | - Defines Factorio-specific globals
70 | - Ignores common Factorio mod patterns
71 | - Sets appropriate rules for different file types
72 |
73 | ### File Structure Validation
74 |
75 | The workflows expect this file structure:
76 |
77 | ```
78 | BlackMarket2/
79 | ├── info.json # Required: Mod metadata
80 | ├── control.lua # Required: Main control script
81 | ├── data.lua # Required: Data stage script
82 | ├── settings.lua # Optional: Mod settings
83 | ├── changelog.txt # Optional: Version history
84 | ├── locale/ # Optional: Localization
85 | │ ├── en/
86 | │ └── cn/
87 | ├── graphics/ # Optional: Sprites and images
88 | ├── prototypes/ # Optional: Prototype definitions
89 | └── migrations/ # Optional: Save migration scripts
90 | ```
91 |
92 | ### Version Management
93 |
94 | 1. **Update version in `info.json`**
95 | 2. **Update `changelog.txt`** with new version changes
96 | 3. **Create a git tag**: `git tag v1.2.3`
97 | 4. **Push the tag**: `git push origin v1.2.3`
98 |
99 | The release workflow will automatically:
100 | - Validate the version consistency
101 | - Package the mod
102 | - Create a GitHub release
103 |
104 | ### Common Issues and Solutions
105 |
106 | #### Luacheck Warnings
107 |
108 | Common warnings you might see:
109 |
110 | - `W211` - Unused local variable
111 | - `W212` - Unused argument
112 | - `W213` - Unused loop variable
113 | - `W311` - Value assigned to local variable is unused
114 |
115 | These are often ignored in Factorio mods due to event handler patterns.
116 |
117 | #### Version Mismatch
118 |
119 | If the release workflow fails with version mismatch:
120 | 1. Check that `info.json` version matches your git tag
121 | 2. Ensure the tag format is `v1.2.3` (with 'v' prefix)
122 |
123 | #### Missing Required Fields
124 |
125 | If validation fails, ensure `info.json` contains:
126 | - `name` - Mod internal name
127 | - `version` - Version string (e.g., "1.2.3")
128 | - `factorio_version` - Compatible Factorio version
129 | - `title` - Display name
130 | - `author` - Author name
131 | - `description` - Mod description
132 |
133 | ## Factorio-Specific Guidelines
134 |
135 | ### Global Variables
136 |
137 | The linting configuration recognizes these Factorio globals:
138 | - `game`, `script`, `defines`, `prototypes`, `settings`, `storage`
139 | - `commands`, `log`, `remote`, `rendering`, `helpers`
140 | - Standard Lua globals: `string`, `math`, `table`, etc.
141 |
142 | ### Event Handlers
143 |
144 | Event handlers often have unused parameters - this is normal:
145 |
146 | ```lua
147 | -- This is fine in Factorio mods
148 | local function on_tick(event) -- 'event' might be unused
149 | -- handler code
150 | end
151 | ```
152 |
153 | ### File Roles
154 |
155 | - `control.lua` - Runtime control logic, event handlers
156 | - `data.lua` - Prototype definitions, recipes, entities
157 | - `settings.lua` - Mod settings definitions
158 | - `prototypes/*.lua` - Additional prototype files
159 |
160 | ## Testing
161 |
162 | While there's no automated game testing (Factorio doesn't provide a headless test environment), the validation workflow checks for:
163 |
164 | - Syntax errors
165 | - Common coding issues
166 | - Mod structure compliance
167 | - Version consistency
168 |
169 | For manual testing:
170 | 1. Package the mod locally
171 | 2. Install in Factorio mods directory
172 | 3. Test in-game functionality
173 | 4. Check for error logs in Factorio's log files
174 |
175 | ## Contributing
176 |
177 | When contributing:
178 | 1. Follow the existing code style
179 | 2. Update changelog for significant changes
180 | 3. Ensure all validation checks pass
181 | 4. Test functionality in-game
182 | 5. Update documentation if needed
183 |
--------------------------------------------------------------------------------
/changelog.txt:
--------------------------------------------------------------------------------
1 | ---------------------------------------------------------------------------------------------------
2 | Version: 2.2.17
3 | Date: 2025-07-13
4 | Changes:
5 | - Added blueprint support for saving and loading trading orders
6 | - Implemented configurable GUI scaling for improved readability
7 | - Added defensive null checks to prevent storage.prices access errors
8 | - Excluded Transport Drone recipes from cost calculation to prevent pricing issues
9 | - Fixed "Only enable items researched" feature for multiplayer compatibility
10 | - Enhanced validation workflow with improved linting and error checking
11 | - Fixed crash when opening equipment grids (modular armor) - LuaEquipmentGrid name access error
12 | - Added comprehensive GitHub Actions validation for mod quality assurance
13 | - Improved price update logic and fixed potential nil references
14 | - Fix LuaEquipmentGrid name access crash in modular armor
15 | - Fixed sprite rectangle size mismatch errors for icon definitions
16 | - Enhanced mod stability and compatibility with other mods
17 | - Fix inflated costs since problematic items now have reasonable prices
18 | ---------------------------------------------------------------------------------------------------
19 | Version: 2.2.12
20 | Date: 2024-11-09
21 | Changes:
22 | - Fixes a crash when Py's mods are installed
23 | ---------------------------------------------------------------------------------------------------
24 | Version: 2.2.11
25 | Date: 2024-11-08
26 | Changes:
27 | - Fixes a crash when Space Age DLC is not installed, or quality is not enabled
28 | ---------------------------------------------------------------------------------------------------
29 | Version: 2.2.10
30 | Date: 2024-11-06
31 | Changes:
32 | - Fixes the price multiplier for the Legendary quality level
33 | - Fixes a crash when viewing buy orders with quality levels that no longer exist
34 | ---------------------------------------------------------------------------------------------------
35 | Version: 2.2.9
36 | Date: 2024-11-04
37 | Changes:
38 | - Fixes "expected LuaQualityPrototype or string" crash when buying items with quality
39 | ---------------------------------------------------------------------------------------------------
40 | Version: 2.2.8
41 | Date: 2024-11-04
42 | Changes:
43 | - Fixes loading of saves from 2.2.6 or earlier
44 | ---------------------------------------------------------------------------------------------------
45 | Version: 2.2.7
46 | Date: 2024-11-04
47 | Changes:
48 | - Adds support for modded quality levels
49 | ---------------------------------------------------------------------------------------------------
50 | Version: 2.2.6
51 | Date: 2024-10-29
52 | Changes:
53 | - Fixes loading of old saves from before quality was added
54 | ---------------------------------------------------------------------------------------------------
55 | Version: 2.2.5
56 | Date: 2024-10-28
57 | Changes:
58 | - Adds the ability to set the quality of items when purchasing
59 | ---------------------------------------------------------------------------------------------------
60 | Version: 2.2.0
61 | Date: 2024-10-24
62 | Changes:
63 | - Adds compatibility with Factorio 2.0
64 | ---------------------------------------------------------------------------------------------------
65 | Version: 2.1.0
66 | Date: 2021-9-15
67 | Changes:
68 | - Huge thanks to xsirh925 for:
69 | - Mod item pricing fix
70 | - Flib 0.8 compatibility
71 | ---------------------------------------------------------------------------------------------------
72 | Version: 2.0.6
73 | Date: 2021-8-13
74 | Changes:
75 | - Downgraded flib dependency due to init bug
76 | ---------------------------------------------------------------------------------------------------
77 | Version: 2.0.5
78 | Date: 2020-12-24
79 | Changes:
80 | - Updated for 1.1, thanks @kittenface
81 | - Added setting to disable/enable 'automatic' setting being on by default on buy/sell entities
82 | - Fixed similar coal buy chest bug
83 | ---------------------------------------------------------------------------------------------------
84 | Version: 2.0.4
85 | Date: 2020-10-11
86 | Changes:
87 | - Fixed icon cutoff, thanks @rookhaven
88 | - Fixed coal buy chest bug
89 | - Fixed tax settings not updating
90 | - Fixed buy/sell all buttons
91 | ---------------------------------------------------------------------------------------------------
92 | Version: 2.0.3
93 | Date: 2020-09-21
94 | Changes:
95 | - Added setting to disable tax entirely
96 | - Fixed tax settings not effecting actual tax
97 | - Fixed inf and Nanu errors, namely Angels crushed stone bug
98 | ---------------------------------------------------------------------------------------------------
99 | Version: 2.0.2
100 | Date: 2020-09-05
101 | Changes:
102 | - Fixed angels-refining (and i assume some other mods) incompatibility due to recursive recipes
103 | ---------------------------------------------------------------------------------------------------
104 | Version: 2.0.1
105 | Date: 2020-09-05
106 | Changes:
107 | - Hotfix for bugs I missed on 2.0.0 release
108 | ---------------------------------------------------------------------------------------------------
109 | Version: 2.0.0
110 | Date: 2020-09-04
111 | Changes:
112 | - Completely rewrote the price calculation engine. This improves compatibility with Bobs/Angels or any other large modpacks
113 | - Made the progression harder, end-game items are much more expensive than they used to be. This can be configured, of course
114 | - Moved settings to the 'Map' tab in Mod Settings. No longer need to restart to apply!
115 | - Added ability to disable dynamic pricing altogether
116 | - Added ability to choose to only allow the buying and selling of only items that you have unlocked through research
117 | - Small gui improvements
118 | ---------------------------------------------------------------------------------------------------
119 | Version: 1.3.0
120 | Date: 2020-08-29
121 | Changes:
122 | - Fixed debug prints being left on (woops)
123 | ---------------------------------------------------------------------------------------------------
124 | Version: 1.2.9
125 | Date: 2020-08-21
126 | Changes:
127 | - Tech name hotfix
128 | - Cleanup of outadted/redundant files
129 | ---------------------------------------------------------------------------------------------------
130 | Version: 1.2.8
131 | Date: 2020-08-18
132 | Changes:
133 | - Added changelog
134 | ---------------------------------------------------------------------------------------------------
135 | Version: 1.2.7
136 | Date: 2020-08-17
137 | Changes:
138 | - Ensured the mod runs in Factorio 1.0
139 | - Fixed small bugs, see milestone 1.2.7 https://github.com/djmango/BlackMarket2/milestone/1
140 |
--------------------------------------------------------------------------------
/prototypes/styles.lua:
--------------------------------------------------------------------------------
1 | -- GUI scale multiplier from mod settings
2 | local gui_scale = settings.startup["BM2-gui_scale"].value
3 |
4 | data:extend(
5 | {
6 | --------------------------------------------------------------------------------------
7 | {
8 | type = "font",
9 | name = "font_blkmkt",
10 | from = "default",
11 | border = false,
12 | size = math.floor(15 * gui_scale)
13 | },
14 | {
15 | type = "font",
16 | name = "font_bold_blkmkt",
17 | from = "default-bold",
18 | border = false,
19 | size = math.floor(15 * gui_scale)
20 | },
21 |
22 | --------------------------------------------------------------------------------------
23 | {
24 | type = "sprite",
25 | name = "sprite_main_blkmkt",
26 | filename = "__BlackMarket2__/graphics/but-main.png",
27 | width = math.floor(30 * gui_scale),
28 | height = math.floor(30 * gui_scale),
29 | },
30 | {
31 | type = "sprite",
32 | name = "sprite_energy_blkmkt",
33 | filename = "__BlackMarket2__/graphics/energy.png",
34 | width = math.floor(32 * gui_scale),
35 | height = math.floor(32 * gui_scale),
36 | },
37 | }
38 | )
39 |
40 | --------------------------------------------------------------------------------------
41 | local default_gui = data.raw["gui-style"].default
42 |
43 | default_gui.frame_blkmkt_style =
44 | {
45 | type="frame_style",
46 | parent="frame",
47 | top_padding = 0,
48 | right_padding = 0,
49 | bottom_padding = 0,
50 | left_padding = 0,
51 | resize_row_to_width = true,
52 | resize_to_row_height = false,
53 | -- max_on_row = 1,
54 | }
55 |
56 | default_gui.vertical_flow_blkmkt_style =
57 | {
58 | type = "vertical_flow_style",
59 |
60 | top_padding = 0,
61 | bottom_padding = 0,
62 | left_padding = 0,
63 | right_padding = 0,
64 |
65 | horizontal_spacing = 2,
66 | vertical_spacing = 2,
67 | resize_row_to_width = true,
68 | resize_to_row_height = false,
69 | max_on_row = 1,
70 |
71 | graphical_set = { type = "none" },
72 | }
73 |
74 | default_gui.horizontal_flow_blkmkt_style =
75 | {
76 | type = "horizontal_flow_style",
77 |
78 | top_padding = 0,
79 | bottom_padding = 0,
80 | left_padding = 0,
81 | right_padding = 0,
82 |
83 | horizontal_spacing = 2,
84 | vertical_spacing = 2,
85 | resize_row_to_width = true,
86 | resize_to_row_height = false,
87 | max_on_row = 1,
88 |
89 | graphical_set = { type = "none" },
90 | }
91 |
92 | default_gui.table_blkmkt_style =
93 | {
94 | type = "table_style",
95 | horizontal_spacing = 5,
96 | vertical_spacing = 2,
97 | resize_row_to_width = true,
98 | resize_to_row_height = false,
99 | max_on_row = 1,
100 | }
101 |
102 | --------------------------------------------------------------------------------------
103 | default_gui.label_blkmkt_style =
104 | {
105 | type="label_style",
106 | parent="label",
107 | font="font_blkmkt",
108 | align = "left",
109 | default_font_color={r=1, g=1, b=1},
110 | hovered_font_color={r=1, g=1, b=1},
111 | top_padding = 1,
112 | right_padding = 1,
113 | bottom_padding = 0,
114 | left_padding = 1,
115 | }
116 |
117 | default_gui.label_bold_blkmkt_style =
118 | {
119 | type="label_style",
120 | parent="label_blkmkt_style",
121 | font="font_bold_blkmkt",
122 | default_font_color={r=1, g=1, b=0.5},
123 | hovered_font_color={r=1, g=1, b=0.5},
124 | }
125 |
126 | default_gui.textfield_blkmkt_style =
127 | {
128 | type = "textbox_style",
129 | font="font_bold_blkmkt",
130 | align = "left",
131 | font_color = {},
132 | default_font_color={r=1, g=1, b=1},
133 | hovered_font_color={r=1, g=1, b=1},
134 | selection_background_color= {r=0.66, g=0.7, b=0.83},
135 | top_padding = 0,
136 | bottom_padding = 0,
137 | left_padding = 1,
138 | right_padding = 1,
139 | minimal_width = math.floor(50 * gui_scale),
140 | maximal_width = math.floor(200 * gui_scale),
141 | graphical_set =
142 | {
143 | type = "composition",
144 | filename = "__core__/graphics/gui.png",
145 | priority = "extra-high-no-scale",
146 | corner_size = {3, 3},
147 | position = {16, 0}
148 | },
149 | }
150 |
151 | default_gui.checkbox_blkmkt_style =
152 | {
153 | type = "checkbox_style",
154 | parent="checkbox",
155 | font = "font_bold_blkmkt",
156 | font_color = {r=1, g=1, b=1},
157 | top_padding = 0,
158 | bottom_padding = 0,
159 | left_padding = 0,
160 | right_padding = 2,
161 | -- minimal_height = 32,
162 | -- maximal_height = 32,
163 | }
164 |
165 | default_gui.button_blkmkt_style =
166 | {
167 | type="button_style",
168 | parent="button",
169 | font="font_bold_blkmkt",
170 | align = "center",
171 | default_font_color={r=1, g=1, b=1},
172 | hovered_font_color={r=1, g=1, b=1},
173 | top_padding = 0,
174 | right_padding = 0,
175 | bottom_padding = 0,
176 | left_padding = 0,
177 | left_click_sound =
178 | {
179 | {
180 | filename = "__core__/sound/gui-click.ogg",
181 | volume = 1
182 | }
183 | },
184 | }
185 |
186 | default_gui.dropdown_blkmkt_style =
187 | {
188 | type="dropdown_style",
189 | parent="dropdown",
190 | font="font_bold_blkmkt",
191 | align = "center",
192 | default_font_color={r=1, g=1, b=1},
193 | hovered_font_color={r=1, g=1, b=1},
194 | top_padding = 0,
195 | right_padding = 0,
196 | bottom_padding = 0,
197 | left_padding = 0,
198 | left_click_sound =
199 | {
200 | {
201 | filename = "__core__/sound/gui-click.ogg",
202 | volume = 1
203 | }
204 | },
205 | }
206 |
207 | default_gui.button_blkmkt_credits_style =
208 | {
209 | type="button_style",
210 | parent="button",
211 | font="font_bold_blkmkt",
212 | align = "center",
213 | default_font_color={r=1, g=1, b=1},
214 | hovered_font_color={r=1, g=1, b=1},
215 | top_padding = 0,
216 | right_padding = 0,
217 | bottom_padding = 0,
218 | left_padding = 0,
219 | height = math.floor(36 * gui_scale),
220 | scalable = false,
221 | left_click_sound =
222 | {
223 | {
224 | filename = "__core__/sound/gui-click.ogg",
225 | volume = 1
226 | }
227 | },
228 | }
229 |
230 | --------------------------------------------------------------------------------------
231 | default_gui.sprite_main_blkmkt_style =
232 | {
233 | type="button_style",
234 | parent="button",
235 | top_padding = 0,
236 | right_padding = 0,
237 | bottom_padding = 0,
238 | left_padding = 0,
239 | height = math.floor(36 * gui_scale),
240 | width = math.floor(36 * gui_scale),
241 | scalable = false,
242 | }
243 |
244 | default_gui.sprite_group_blkmkt_style =
245 | {
246 | type="button_style",
247 | parent="button",
248 | top_padding = 0,
249 | right_padding = 0,
250 | bottom_padding = 0,
251 | left_padding = 0,
252 | width = math.floor(64 * gui_scale),
253 | height = math.floor(64 * gui_scale),
254 | scalable = false
255 | }
256 |
257 | default_gui.sprite_obj_blkmkt_style =
258 | {
259 | type="button_style",
260 | parent="button",
261 | top_padding = 0,
262 | right_padding = 0,
263 | bottom_padding = 0,
264 | left_padding = 0,
265 | height = math.floor(32 * gui_scale),
266 | width = math.floor(32 * gui_scale),
267 | -- minimal_width = 32,
268 | -- minimal_height = 32,
269 | scalable = false
270 | }
271 |
--------------------------------------------------------------------------------
/utils.lua:
--------------------------------------------------------------------------------
1 | -- utils.lua by binbinhfr, v1.0.17, now maintained by djmango
2 |
3 | -- define debug_status to 1 or nil in the control.lua, before statement require("utils")
4 | -- define also debug_file and debug_mod_name
5 |
6 | colors = {
7 | white = {r = 1, g = 1, b = 1},
8 | black = {r = 0, g = 0, b = 0},
9 | darkgrey = {r = 0.25, g = 0.25, b = 0.25},
10 | grey = {r = 0.5, g = 0.5, b = 0.5},
11 | lightgrey = {r = 0.75, g = 0.75, b = 0.75},
12 |
13 | red = {r = 1, g = 0, b = 0},
14 | darkred = {r = 0.5, g = 0, b = 0},
15 | lightred = {r = 1, g = 0.5, b = 0.5},
16 | green = {r = 0, g = 1, b = 0},
17 | darkgreen = {r = 0, g = 0.5, b = 0},
18 | lightgreen = {r = 0.5, g = 1, b = 0.5},
19 | blue = {r = 0, g = 0, b = 1},
20 | darkblue = {r = 0, g = 0, b = 0.5},
21 | lightblue = {r = 0.5, g = 0.5, b = 1},
22 |
23 | orange = {r = 1, g = 0.55, b = 0.1},
24 | yellow = {r = 1, g = 1, b = 0},
25 | pink = {r = 1, g = 0, b = 1},
26 | purple = {r = 0.6, g = 0.1, b = 0.6},
27 | brown = {r = 0.6, g = 0.4, b = 0.1},
28 | }
29 |
30 | anticolors = {
31 | white = colors.black,
32 | black = colors.white,
33 | darkgrey = colors.white,
34 | grey = colors.black,
35 | lightgrey = colors.black,
36 |
37 | red = colors.white,
38 | darkred = colors.white,
39 | lightred = colors.black,
40 | green = colors.black,
41 | darkgreen = colors.white,
42 | lightgreen = colors.black,
43 | blue = colors.white,
44 | darkblue = colors.white,
45 | lightblue = colors.black,
46 |
47 | orange = colors.black,
48 | yellow = colors.black,
49 | pink = colors.white,
50 | purple = colors.white,
51 | brown = colors.white,
52 | }
53 |
54 | lightcolors = {
55 | white = colors.lightgrey,
56 | grey = colors.darkgrey,
57 | lightgrey = colors.grey,
58 |
59 | red = colors.lightred,
60 | green = colors.lightgreen,
61 | blue = colors.lightblue,
62 | yellow = colors.orange,
63 | pink = colors.purple,
64 | }
65 |
66 | --------------------------------------------------------------------------------------
67 | function debug_active(msg, level)
68 | level = level or 1
69 | -- can be called everywhere, except in on_load where game is not existing
70 | local s = ""
71 |
72 | for i, v in ipairs({msg}) do
73 | s = s .. tostring(v)
74 | end
75 |
76 | if s == "RAZ" or debug_do_raz == true then
77 | game.remove_path(debug_file)
78 | debug_do_raz = false
79 | elseif s == "CLEAR" then
80 | for _, player in pairs(game.players) do
81 | if player.connected then player.clear_console() end
82 | end
83 | end
84 |
85 | s = debug_mod_name .. "(" .. game.tick .. "): " .. s
86 | game.write_file( debug_file, s .. "\n", true )
87 |
88 | for _, player in pairs(game.players) do
89 | if player.connected then player.print(s) end
90 | end
91 | end
92 |
93 | if debug_status == 1 then debug_print = debug_active else debug_print = function() end end
94 |
95 | --------------------------------------------------------------------------------------
96 | function message_all(s)
97 | for _, player in pairs(game.players) do
98 | if player.connected then
99 | player.print(s)
100 | end
101 | end
102 | end
103 |
104 | --------------------------------------------------------------------------------------
105 | function message_force(force, s)
106 | for _, player in pairs(force.players) do
107 | if player.connected then
108 | player.print(s)
109 | end
110 | end
111 | end
112 |
113 | --------------------------------------------------------------------------------------
114 | function square_area( origin, radius )
115 | return {
116 | {x=origin.x - radius, y=origin.y - radius},
117 | {x=origin.x + radius, y=origin.y + radius}
118 | }
119 | end
120 |
121 | --------------------------------------------------------------------------------------
122 | function distance( pos1, pos2 )
123 | local dx = pos2.x - pos1.x
124 | local dy = pos2.y - pos1.y
125 | return( math.sqrt(dx*dx+dy*dy) )
126 | end
127 |
128 | --------------------------------------------------------------------------------------
129 | function distance_square( pos1, pos2 )
130 | return( math.max(math.abs(pos2.x - pos1.x),math.abs(pos2.y - pos1.y)) )
131 | end
132 |
133 | --------------------------------------------------------------------------------------
134 | function pos_offset( pos, offset )
135 | return { x=pos.x + offset.x, y=pos.y + offset.y }
136 | end
137 |
138 | --------------------------------------------------------------------------------------
139 | function surface_area(surf)
140 | local x1, y1, x2, y2 = 0,0,0,0
141 |
142 | for chunk in surf.get_chunks() do
143 | if chunk.x < x1 then
144 | x1 = chunk.x
145 | elseif chunk.x > x2 then
146 | x2 = chunk.x
147 | end
148 | if chunk.y < y1 then
149 | y1 = chunk.y
150 | elseif chunk.y > y2 then
151 | y2 = chunk.y
152 | end
153 | end
154 |
155 | return( {{x1*32-8,y1*32-8},{x2*32+40,y2*32+40}} )
156 | end
157 |
158 | --------------------------------------------------------------------------------------
159 | function iif( cond, val1, val2 )
160 | if cond then
161 | return val1
162 | else
163 | return val2
164 | end
165 | end
166 |
167 | --------------------------------------------------------------------------------------
168 | function add_list(list, obj)
169 | -- to avoid duplicates...
170 | for i, obj2 in pairs(list) do
171 | if obj2 == obj then
172 | return(false)
173 | end
174 | end
175 | table.insert(list,obj)
176 | return(true)
177 | end
178 |
179 | --------------------------------------------------------------------------------------
180 | function del_list(list, obj)
181 | for i, obj2 in pairs(list) do
182 | if obj2 == obj then
183 | table.remove( list, i )
184 | return(true)
185 | end
186 | end
187 | return(false)
188 | end
189 |
190 | --------------------------------------------------------------------------------------
191 | function in_list(list, obj)
192 | for k, obj2 in pairs(list) do
193 | if obj2 == obj then
194 | return(k)
195 | end
196 | end
197 | return(nil)
198 | end
199 |
200 | --------------------------------------------------------------------------------------
201 | function size_list(list)
202 | local n = 0
203 | for i in pairs(list) do
204 | n = n + 1
205 | end
206 | return(n)
207 | end
208 |
209 | --------------------------------------------------------------------------------------
210 | function concat_lists(list1, list2)
211 | -- add list2 into list1 , do not avoid duplicates...
212 | for i, obj in pairs(list2) do
213 | table.insert(list1,obj)
214 | end
215 | end
216 |
217 | --------------------------------------------------------------------------------------
218 | function dupli_proto( type, name1, name2 )
219 | if data.raw[type][name1] then
220 | local proto = table.deepcopy(data.raw[type][name1])
221 | proto.name = name2
222 | if proto.minable and proto.minable.result then proto.minable.result = name2 end
223 | if proto.place_result then proto.place_result = name2 end
224 | if proto.take_result then proto.take_result = name2 end
225 | if proto.result then proto.result = name2 end
226 | return(proto)
227 | else
228 | error("prototype unknown " .. name1 )
229 | return(nil)
230 | end
231 | end
232 |
233 | --------------------------------------------------------------------------------------
234 | function debug_guis( guip, indent )
235 | if guip == nil then return end
236 | debug_print( indent .. string.rep("....",indent) .. " " .. guip.name )
237 | indent = indent+1
238 | for k, gui in pairs(guip.children_names) do
239 | debug_guis( guip[gui], indent )
240 | end
241 | end
242 |
243 | --------------------------------------------------------------------------------------
244 | function extract_monolith(filename, x, y, w, h)
245 | return {
246 | type = "monolith",
247 |
248 | top_monolith_border = 0,
249 | right_monolith_border = 0,
250 | bottom_monolith_border = 0,
251 | left_monolith_border = 0,
252 |
253 | monolith_image = {
254 | filename = filename,
255 | priority = "extra-high-no-scale",
256 | width = w,
257 | height = h,
258 | x = x,
259 | y = y,
260 | },
261 | }
262 | end
263 |
264 |
--------------------------------------------------------------------------------
/settings.lua:
--------------------------------------------------------------------------------
1 | data:extend({
2 | -- High-level settings
3 | {
4 | type = "bool-setting",
5 | name = "BM2-dynamic_prices",
6 | setting_type = "runtime-global",
7 | default_value = true,
8 | order = "aaa"
9 | },
10 | {
11 | type = "bool-setting",
12 | name = "BM2-only_items_researched",
13 | setting_type = "runtime-global",
14 | default_value = false,
15 | order = "aab"
16 | },
17 | {
18 | type = "bool-setting",
19 | name = "BM2-enable_tax",
20 | setting_type = "runtime-global",
21 | default_value = true,
22 | order = "aac"
23 | },
24 | {
25 | type = "bool-setting",
26 | name = "BM2-default_auto",
27 | setting_type = "runtime-global",
28 | default_value = false,
29 | order = "aad"
30 | },
31 | {
32 | type = "double-setting",
33 | name = "BM2-price_multiplyer",
34 | setting_type = "runtime-global",
35 | minimum_value = 0,
36 | default_value = 1,
37 | order = "aae"
38 | },
39 | -- Basic prices
40 | {
41 | type = "int-setting",
42 | name = "BM2-resource_price",
43 | setting_type = "runtime-global",
44 | minimum_value = 0,
45 | default_value = 30,
46 | order = "ab"
47 | },
48 | {
49 | type = "int-setting",
50 | name = "BM2-infinite_price",
51 | setting_type = "runtime-global",
52 | minimum_value = 0,
53 | default_value = 0,
54 | order = "ac"
55 | },
56 | {
57 | type = "int-setting",
58 | name = "BM2-free_price",
59 | setting_type = "runtime-global",
60 | minimum_value = 0,
61 | default_value = 0,
62 | order = "ad"
63 | },
64 | {
65 | type = "int-setting",
66 | name = "BM2-unknown_price",
67 | setting_type = "runtime-global",
68 | minimum_value = 0,
69 | default_value = 20,
70 | order = "ae"
71 | },
72 |
73 | -- Vanilla resources
74 | {
75 | type = "int-setting",
76 | name = "BM2-water_price",
77 | setting_type = "runtime-global",
78 | minimum_value = 0,
79 | default_value = 0,
80 | order = "ba"
81 | },
82 | {
83 | type = "int-setting",
84 | name = "BM2-coal_price",
85 | setting_type = "runtime-global",
86 | minimum_value = 0,
87 | default_value = 16,
88 | order = "bb"
89 | },
90 | {
91 | type = "int-setting",
92 | name = "BM2-stone_price",
93 | setting_type = "runtime-global",
94 | minimum_value = 0,
95 | default_value = 27,
96 | order = "bc"
97 | },
98 | {
99 | type = "int-setting",
100 | name = "BM2-iron_price",
101 | setting_type = "runtime-global",
102 | minimum_value = 0,
103 | default_value = 19,
104 | order = "bd"
105 | },
106 | {
107 | type = "int-setting",
108 | name = "BM2-copper_price",
109 | setting_type = "runtime-global",
110 | minimum_value = 0,
111 | default_value = 21,
112 | order = "be"
113 | },
114 | {
115 | type = "int-setting",
116 | name = "BM2-uranium_price",
117 | setting_type = "runtime-global",
118 | minimum_value = 0,
119 | default_value = 182,
120 | order = "be"
121 | },
122 | {
123 | type = "int-setting",
124 | name = "BM2-oil_price",
125 | setting_type = "runtime-global",
126 | minimum_value = 0,
127 | default_value = 100,
128 | order = "bf"
129 | },
130 |
131 | -- special manually declared prices
132 | {
133 | type = "int-setting",
134 | name = "BM2-ucoin",
135 | setting_type = "runtime-global",
136 | minimum_value = 0,
137 | default_value = 1,
138 | order = "cb"
139 | },
140 | {
141 | type = "int-setting",
142 | name = "BM2-wood",
143 | setting_type = "runtime-global",
144 | minimum_value = 0,
145 | default_value = 51,
146 | order = "cc"
147 | },
148 | {
149 | type = "int-setting",
150 | name = "BM2-raw_fish",
151 | setting_type = "runtime-global",
152 | minimum_value = 0,
153 | default_value = 30,
154 | order = "cca"
155 | },
156 | {
157 | type = "int-setting",
158 | name = "BM2-steam",
159 | setting_type = "runtime-global",
160 | minimum_value = 0,
161 | default_value = 100,
162 | order = "cd"
163 | },
164 |
165 | -- other prices
166 |
167 | {
168 | type = "int-setting",
169 | name = "BM2-energy_price",
170 | setting_type = "runtime-global",
171 | minimum_value = 0,
172 | default_value = 500,
173 | order = "ea"
174 | },
175 | {
176 | type = "int-setting",
177 | name = "BM2-energy_cost",
178 | setting_type = "runtime-global",
179 | minimum_value = 0,
180 | default_value = 20,
181 | order = "eb"
182 | },
183 | {
184 | type = "int-setting",
185 | name = "BM2-tech_ingr_cost",
186 | setting_type = "runtime-global",
187 | minimum_value = 0,
188 | default_value = 1000,
189 | order = "ec"
190 | },
191 | {
192 | type = "double-setting",
193 | name = "BM2-tech_amortization",
194 | setting_type = "runtime-global",
195 | minimum_value = 0,
196 | default_value = 0.001,
197 | order = "ed"
198 | },
199 | {
200 | type = "double-setting",
201 | name = "BM2-commercial_margin",
202 | setting_type = "runtime-global",
203 | minimum_value = 0,
204 | default_value = 0.10,
205 | order = "ee"
206 | },
207 | -- dynamic price stuff
208 | {
209 | type = "double-setting",
210 | name = "BM2-dynamic_regrowth",
211 | setting_type = "runtime-global",
212 | minimum_value = 0,
213 | default_value = 0.05,
214 | order = "ef"
215 | },
216 | {
217 | type = "double-setting",
218 | name = "BM2-dynamic_influence_item",
219 | setting_type = "runtime-global",
220 | minimum_value = 0,
221 | default_value = 0.00008,
222 | order = "eg"
223 | },
224 | {
225 | type = "double-setting",
226 | name = "BM2-dynamic_influence_fluid",
227 | setting_type = "runtime-global",
228 | minimum_value = 0,
229 | default_value = 0.00006,
230 | order = "eh"
231 | },
232 | {
233 | type = "double-setting",
234 | name = "BM2-dynamic_influence_energy",
235 | setting_type = "runtime-global",
236 | minimum_value = 0,
237 | default_value = 0.0004,
238 | order = "ei"
239 | },
240 | {
241 | type = "double-setting",
242 | name = "BM2-dynamic_minimal",
243 | setting_type = "runtime-global",
244 | minimum_value = 0,
245 | default_value = 0.01,
246 | order = "ej"
247 | },
248 | {
249 | type = "double-setting",
250 | name = "BM2-dynamic_maximal",
251 | setting_type = "runtime-global",
252 | minimum_value = 0,
253 | default_value = 2,
254 | order = "ek"
255 | },
256 |
257 | -- Tax setting
258 | {
259 | type = "int-setting",
260 | name = "BM2-tax_start",
261 | setting_type = "runtime-global",
262 | minimum_value = 0,
263 | default_value = 4,
264 | order = "fa"
265 | },
266 | {
267 | type = "double-setting",
268 | name = "BM2-tax_growth",
269 | setting_type = "runtime-global",
270 | minimum_value = 0,
271 | default_value = 0.5,
272 | order = "fb"
273 | },
274 | {
275 | type = "int-setting",
276 | name = "BM2-tax_immediate",
277 | setting_type = "runtime-global",
278 | minimum_value = 0,
279 | default_value = 25,
280 | order = "fc"
281 | },
282 | -- GUI settings
283 | {
284 | type = "double-setting",
285 | name = "BM2-gui_scale",
286 | setting_type = "startup",
287 | minimum_value = 0.5,
288 | maximum_value = 3.0,
289 | default_value = 1.5,
290 | order = "ga"
291 | },
292 | -- other
293 | {
294 | type = "int-setting",
295 | name = "BM2-recipe_depth_maximum",
296 | setting_type = "runtime-global",
297 | minimum_value = 1,
298 | default_value = 10,
299 | order = "gb"
300 | },
301 | {
302 | type = "bool-setting",
303 | name = "BM2-unknown_price_reason_logging",
304 | setting_type = "runtime-global",
305 | default_value = false,
306 | order = "gc"
307 | }
308 | })
309 |
--------------------------------------------------------------------------------
/locale/cn/cn.cfg:
--------------------------------------------------------------------------------
1 | blkmkt-gui-blkmkt=黑市 2
2 |
3 | blkmkt-gui-rescan-done=黑市2:价格表!
4 |
5 | blkmkt-gui-gen-prices=价格:
6 | blkmkt-gui-gen-show-prices=显示
7 | blkmkt-gui-gen-show-prices-tt=分类价格
8 | blkmkt-gui-gen-export-prices=出口
9 | blkmkt-gui-gen-export-prices-tt=到处价格表
10 | blkmkt-gui-gen-rescan-prices=重新扫描
11 | blkmkt-gui-gen-rescan-prices-tt=更新所有报价
12 |
13 | blkmkt-gui-gen-pause=暂停
14 | blkmkt-gui-gen-pause-tt=暂停所有自动交易
15 | blkmkt-gui-gen-auto-all=全部自动
16 | blkmkt-gui-gen-auto-all-tt=所有箱子自动交易
17 | blkmkt-gui-gen-auto-none=关闭自动
18 | blkmkt-gui-gen-auto-none-tt=所有箱子禁止自动交易
19 |
20 | blkmkt-gui-gen-sell-now=全部售出
21 | blkmkt-gui-gen-sell-now-tt=全部售出(税率=1%)
22 | blkmkt-gui-gen-buy-now=购买全部
23 | blkmkt-gui-gen-buy-now-tt=购买全部 (税率=1%)
24 |
25 | blkmkt-gui-gen-period=默认周期: 1__小时 (税率=__2%)
26 | blkmkt-gui-gen-period-tt=自动交易的默认周期
27 | blkmkt-gui-gen-period-set=设置
28 | blkmkt-gui-gen-period-set-tt=默认出售所有交易箱子内的物品
29 |
30 | blkmkt-gui-gen-credits=信用
31 | blkmkt-gui-gen-credits-tt=信用=销售额-采购额-交易税
32 | blkmkt-gui-gen-sales=销售额
33 | blkmkt-gui-gen-sales-tt=全部交易箱的销售额
34 | blkmkt-gui-gen-sales-taxes=销售税
35 | blkmkt-gui-gen-sales-taxes-tt=所有交易箱的销售税
36 | blkmkt-gui-gen-purchases=购买
37 | blkmkt-gui-gen-purchases-tt=购买所有交易箱的物品
38 | blkmkt-gui-gen-purchases-taxes=采购税
39 | blkmkt-gui-gen-purchases-taxes-tt=所有交易箱的采购税
40 | blkmkt-gui-gen-average-taxes=平均税率
41 | blkmkt-gui-gen-average-taxes-tt=总余额平均税率
42 | blkmkt-gui-gen-credits-lastday=最后一天的余额
43 | blkmkt-gui-gen-credits-lastday-tt=最后一天的余额变化
44 | blkmkt-gui-gen-transactions=交易
45 | blkmkt-gui-gen-transactions-tt=交易订单数
46 |
47 | blkmkt-gui-trader-sell=交易者 (卖出)
48 | blkmkt-gui-trader-buy=交易者 (买入)
49 | blkmkt-gui-trader-auto=自动交易
50 | blkmkt-gui-trader-auto-tt=每时段自动交易
51 | blkmkt-gui-trader-daylight=仅限白天
52 | blkmkt-gui-trader-daylight-tt=仅限白天交易
53 | blkmkt-gui-trader-sell-now=立即出售
54 | blkmkt-gui-trader-sell-now-tt=立即全部售出 (税率=1%)
55 | blkmkt-gui-trader-buy-now=立即购买
56 | blkmkt-gui-trader-buy-now-tt=立即全部购买 (税率=1%)
57 |
58 | blkmkt-gui-trader-edited=交易者设定 1
59 |
60 | blkmkt-gui-trader-period=时段: 1__小时 (税率=__2%)
61 | blkmkt-gui-trader-period-tt=用于自动交易的时段
62 | blkmkt-gui-trader-money-tot=总金额:
63 | blkmkt-gui-trader-money-tot-tt=开始交易以来的总金额
64 | blkmkt-gui-trader-taxes-tot=税款总计:
65 | blkmkt-gui-trader-taxes-tot-tt=开始交易以来的税款总计
66 | blkmkt-gui-trader-money-period=上个周期:
67 | blkmkt-gui-trader-money-period-tt=上期款项
68 | blkmkt-gui-trader-reset=重置计数器
69 | blkmkt-gui-trader-hours=1__小时
70 | blkmkt-gui-trader-hours-tt=上次重置后的时间
71 | blkmkt-gui-trader-money=金币:
72 | blkmkt-gui-trader-money-tt=上次重置后的金币
73 | blkmkt-gui-trader-taxes=税款:
74 | blkmkt-gui-trader-taxes-tt=上次重置后的税款
75 | blkmkt-gui-trader-money-average=平均值:
76 | blkmkt-gui-trader-perday=__1/天
77 | blkmkt-gui-trader-money-average-tt=上次重置后的金币平均数
78 | blkmkt-gui-trader-evaluate=预估
79 | blkmkt-gui-trader-evaluate-tt=评估当前交易量
80 | blkmkt-gui-trader-evaluation-tt=交易的内容评估
81 | blkmkt-gui-trader-sold=上次出售的对象
82 | blkmkt-gui-trader-sold-tt=上次出售的对象
83 | blkmkt-gui-trader-price-tt=上次术后对象的价格
84 | blkmkt-gui-trader-new=新订单
85 | blkmkt-gui-trader-wipe=全部删除
86 | blkmkt-gui-trader-orders=订单:
87 | blkmkt-gui-trader-orders-tt=无税订单合计
88 |
89 | blkmkt-gui-refresh=刷新价格
90 | blkmkt-gui-quality=选择质量
91 | blkmkt-gui-quality-normal=普通
92 | blkmkt-gui-quality-uncommon=不常见
93 | blkmkt-gui-quality-rare=稀有
94 | blkmkt-gui-quality-epic=史诗
95 | blkmkt-gui-quality-legendary=传奇
96 | blkmkt-gui-close=关闭
97 | blkmkt-gui-cancel=取消
98 | blkmkt-gui-ok=OK
99 | blkmkt-gui-objects-list=列表
100 | blkmkt-gui-tt-object-price=1 (2 3)
101 | blkmkt-gui-energy=能量 (单位: MJ)
102 |
103 | [technology-name]
104 | black-market-item=黑市2交易箱
105 | black-market-fluid=黑市2交易储罐
106 | black-market-energy=黑市2交易累加器
107 | black-market-mk2=黑市2 MK2
108 | black-market-mk3=黑市2 MK3
109 | black-market-mk4=黑市2 MK4
110 |
111 | [technology-description]
112 | black-market-item=使用交易箱在黑市上买卖商品
113 | black-market-fluid=使用交易管在黑市上买卖商品
114 | black-market-energy=使用交易蓄电池在黑市上买卖电力
115 | black-market-mk2=解锁黑市2 MK2
116 | black-market-mk3=解锁黑市2 MK3
117 | black-market-mk4=解锁黑市2 MK4
118 |
119 | [item-group-name]
120 | black-market-group=黑市
121 |
122 | [entity-name]
123 | trader-chst-buy=交易箱 (买入)
124 | trader-chst-sel=交易箱 (卖出)
125 | trader-tank-buy=交易罐 (买入)
126 | trader-tank-sel=交易罐(卖出)
127 | trader-accu-buy=交易蓄电池 (买入)
128 | trader-accu-sel=交易蓄电池 (卖出)
129 | trader-chst-buy-mk2=交易箱 MK2 (buy)
130 | trader-chst-sel-mk2=交易箱 MK2 (sell)
131 | trader-tank-buy-mk2=交易罐 MK2 (buy)
132 | trader-tank-sel-mk2=交易罐 MK2 (sell)
133 | trader-accu-buy-mk2=交易蓄电池 MK2 (buy)
134 | trader-accu-sel-mk2=交易蓄电池 MK2 (sell)
135 | trader-chst-buy-mk3=交易箱 MK3 (buy)
136 | trader-chst-sel-mk3=交易箱 MK3 (sell)
137 | trader-tank-buy-mk3=交易罐 MK3 (buy)
138 | trader-tank-sel-mk3=交易罐 MK3 (sell)
139 | trader-accu-buy-mk3=交易蓄电池 MK3 (buy)
140 | trader-accu-sel-mk3=交易蓄电池MK3 (sell)
141 | trader-chst-buy-mk4=交易箱 MK4 (buy)
142 | trader-chst-sel-mk4=交易箱 MK4 (sell)
143 | trader-tank-buy-mk4=交易罐 MK4 (buy)
144 | trader-tank-sel-mk4=交易罐 MK4 (sell)
145 | trader-accu-buy-mk4=交易蓄电池 MK4 (buy)
146 | trader-accu-sel-mk4=交易蓄电池 MK4 (sell)
147 |
148 | [entity-description]
149 | trader-chst-buy=这个箱子用于接收在黑市购买的物品
150 | trader-chst-sel=放在这个箱子的任何物品都将在黑市售出
151 | trader-tank-buy=该储液罐用于在黑市购买各种液体或气体
152 | trader-tank-sel=该储液罐中所有流体都将在黑市上出售
153 | trader-accu-buy=这个蓄电池将接收从黑市购买的电力(不会从当前电网中消耗电力)
154 | trader-accu-sel=放置在这个蓄电池中的电力将在黑市上出售。(若不售出,则会缓慢返回当前电网)
155 | trader-chst-buy-mk2=这个箱子用于接收在黑市购买的物品
156 | trader-chst-sel-mk2=放在这个箱子的任何物品都将在黑市售出
157 | trader-tank-buy-mk2=该储液罐用于在黑市购买各种液体或气体
158 | trader-tank-sel-mk2=该储液罐中所有流体都将在黑市上出售
159 | trader-accu-buy-mk2=这个蓄电池将接收从黑市购买的电力(不会从当前电网中消耗电力)
160 | trader-accu-sel-mk2=放置在这个蓄电池中的电力将在黑市上出售。(若不售出,则会缓慢返回当前电网)
161 | trader-chst-buy-mk3=这个箱子用于接收在黑市购买的物品
162 | trader-chst-sel-mk3=放在这个箱子的任何物品都将在黑市售出
163 | trader-tank-buy-mk3=该储液罐用于在黑市购买各种液体或气体
164 | trader-tank-sel-mk3=该储液罐中所有流体都将在黑市上出售
165 | trader-accu-buy-mk3=这个蓄电池将接收从黑市购买的电力(不会从当前电网中消耗电力)
166 | trader-accu-sel-mk3=这个蓄电池中的电力将在黑市上出售。(若不售出,则会缓慢返回当前电网)
167 | trader-chst-buy-mk4=这个箱子用于接收在黑市购买的物品
168 | trader-chst-sel-mk4=放在这个箱子的任何物品都将在黑市售出
169 | trader-tank-buy-mk4=该储液罐用于在黑市购买各种液体或气体
170 | trader-tank-sel-mk4=该储液罐中所有流体都将在黑市上出售
171 | trader-accu-buy-mk4=这个蓄电池将接收从黑市购买的电力(不会从当前电网中消耗电力)
172 | trader-accu-sel-mk4=这个蓄电池中的电力将在黑市上出售。(若不售出,则会缓慢返回当前电网)
173 |
174 | [item-name]
175 | ucoin=金币
176 | trader-chst-buy=交易箱 (买入)
177 | trader-chst-sel=交易箱 (卖出)
178 | trader-tank-buy=交易罐 (买入)
179 | trader-tank-sel=交易罐(卖出)
180 | trader-accu-buy=交易蓄电池 (买入)
181 | trader-accu-sel=交易蓄电池 (卖出)
182 | trader-chst-buy-mk2=交易箱 MK2 (买入)
183 | trader-chst-sel-mk2=交易箱 MK2 (卖出)
184 | trader-tank-buy-mk2=交易罐 MK2 (买入)
185 | trader-tank-sel-mk2=交易罐 MK2 (卖出)
186 | trader-accu-buy-mk2=交易蓄电池 MK2 (买入)
187 | trader-accu-sel-mk2=交易蓄电池 MK2 (卖出)
188 | trader-chst-buy-mk3=交易箱 MK3 (买入)
189 | trader-chst-sel-mk3=交易箱 MK3 (卖出)
190 | trader-tank-buy-mk3=交易罐 MK3 (买入)
191 | trader-tank-sel-mk3=交易罐 MK3 (卖出)
192 | trader-accu-buy-mk3=交易蓄电池 MK3 (买入)
193 | trader-accu-sel-mk3=交易蓄电池 MK3 (卖出)
194 | trader-chst-buy-mk4=交易箱 MK4 (买入)
195 | trader-chst-sel-mk4=交易箱 MK4 (卖出)
196 | trader-tank-buy-mk4=交易罐 MK4 (买入)
197 | trader-tank-sel-mk4=交易罐 MK4 (卖出)
198 | trader-accu-buy-mk4=交易蓄电池 MK4 (买入)
199 | trader-accu-sel-mk4=交易蓄电池 MK4 (卖出)
200 |
201 | [virtual-signal-name]
202 | signal-market-auto-all=自动交易:开启(>1)/off(=1)/ignore(=0)
203 | signal-market-auto-sel=自动卖出模式: 开启(>1)/off(=1)/ignore(=0)
204 | signal-market-auto-buy=自动买入模式: 开启(>1)/off(=1)/ignore(=0)
205 |
206 | [mod-setting-name]
207 | BM2-dynamic_prices=启用动态价格
208 | BM2-only_items_researched=仅启用已研究的项目
209 | BM2-enable_tax=启用税收
210 | BM2-default_auto=默认启用自动卖出/买入
211 | BM2-price_multiplyer=价格乘数
212 | BM2-resource_price=资源价格
213 | BM2-infinite_price=水价
214 | BM2-free_price=免费价格
215 | BM2-unknown_price=未知价格
216 | BM2-water_price=水价格
217 | BM2-coal_price=煤炭价格
218 | BM2-stone_price=石材价格
219 | BM2-iron_price=铁价
220 | BM2-uranium_price=铀价格
221 | BM2-copper_price=铜价
222 | BM2-oil_price=原油价格
223 | BM2-ucoin=金币价格
224 | BM2-wood=木材价格
225 | BM2-raw_fish=生鱼价格
226 | BM2-steam=蒸汽价格
227 | BM2-energy_price=能源价格
228 | BM2-energy_cost=能源成本
229 | BM2-tech_ingr_cost=科学包成本
230 | BM2-tech_amortization=技术摊销
231 | BM2-commercial_margin=商业保证金
232 | BM2-dynamic_regrowth=动态再生
233 | BM2-dynamic_influence_item=动态影响项
234 | BM2-dynamic_influence_fluid=动态影响流体
235 | BM2-dynamic_influence_energy=动态影响能量
236 | BM2-dynamic_minimal=动态最小值
237 | BM2-dynamic_maximal=动态最大值
238 | BM2-tax_start=税收启动
239 | BM2-tax_growth=税收增长
240 | BM2-tax_immediate=立即纳税
241 | BM2-recipe_depth_maximum=定价所需运算配方深度的最大值
242 | BM2-unknown_price_reason_logging=价格调试
243 | BM2-gui_scale=GUI缩放
244 |
245 | [mod-setting-description]
246 | BM2-dynamic_prices=如果关闭此选项,则无论您卖出或买入多少,价格都保持不变
247 | BM2-only_items_researched=仅允许购买和出售您通过研究解锁的物品
248 | BM2-enable_tax=启用或禁用税收
249 | BM2-default_auto=默认启用或禁用“自动交易”
250 | BM2-price_multiplyer=将所有价格乘以该值
251 | BM2-resource_price=未知原矿的价格 (mods)
252 | BM2-infinite_price=水、空气等无限资源的价格
253 | BM2-free_price=免费对象的价格(不含配料的配方产品)
254 | BM2-unknown_price=未知对象的价格
255 | BM2-water_price=水的价格
256 | BM2-coal_price=煤的价格
257 | BM2-stone_price=石矿的价格
258 | BM2-iron_price=铁矿的价格
259 | BM2-uranium_price=铀矿的价格
260 | BM2-copper_price=铜矿的价格
261 | BM2-oil_price=原油的价格
262 | BM2-ucoin=金币价格
263 | BM2-wood=木材价格
264 | BM2-raw_fish=生鱼价格
265 | BM2-steam=蒸汽价格,通常与资源价格相同
266 | BM2-energy_price=能源的价格 (单位:MJ)
267 | BM2-energy_cost=时间成本在价格中的摊销
268 | BM2-tech_ingr_cost=科学包的平均成本
269 | BM2-tech_amortization=技术成本在目标价格中的摊销
270 | BM2-commercial_margin=商业保证金
271 | BM2-dynamic_regrowth=如果不受影响,价格如何缓慢恢复到最佳值(每天)
272 | BM2-dynamic_influence_item=销售和采购对价格的影响(每项,每天)
273 | BM2-dynamic_influence_fluid=销售和采购对价格的影响(每天每项)
274 | BM2-dynamic_influence_energy=销售和采购对价格的影响(每项,每天)
275 | BM2-dynamic_minimal=销售和采购对价格的影响(每项,每天)
276 | BM2-dynamic_maximal=销售和采购对价格的影响(每项,每天)
277 | BM2-tax_start=每天一次行动的起始费用(%)
278 | BM2-tax_growth=频率/天的指数增长:费 = tax_start * (freq ^ tax_growth)
279 | BM2-tax_immediate=% 立即行动费用
280 | BM2-recipe_depth_maximum=查找配方的最大"深度"
281 | BM2-unknown_price_reason_logging=写入定价为未知的项目的日志,以及原因
282 | BM2-gui_scale=黑市GUI界面的缩放比例 (0.5-3.0,需要重启)
283 |
--------------------------------------------------------------------------------
/locale/en/en.cfg:
--------------------------------------------------------------------------------
1 | blkmkt-gui-blkmkt=Black Market 2
2 |
3 | blkmkt-gui-rescan-done=Black Market 2: price computed and listed!
4 |
5 | blkmkt-gui-gen-prices=Prices:
6 | blkmkt-gui-gen-show-prices=Show
7 | blkmkt-gui-gen-show-prices-tt=Browse prices per groups and items
8 | blkmkt-gui-gen-export-prices=Export
9 | blkmkt-gui-gen-export-prices-tt=Export prices in CSV spreadsheet format
10 | blkmkt-gui-gen-rescan-prices=Rescan
11 | blkmkt-gui-gen-rescan-prices-tt=Rescan prices for all items and recipes
12 |
13 | blkmkt-gui-gen-pause=Pause
14 | blkmkt-gui-gen-pause-tt=Pause all automatic transactions
15 | blkmkt-gui-gen-auto-all=Auto all
16 | blkmkt-gui-gen-auto-all-tt=Enable automatic on all chests
17 | blkmkt-gui-gen-auto-none=Auto none
18 | blkmkt-gui-gen-auto-none-tt=Disable automatic on all chests
19 |
20 | blkmkt-gui-gen-sell-now=Sell all now!
21 | blkmkt-gui-gen-sell-now-tt=Sell all now! (tax=__1__%)
22 | blkmkt-gui-gen-buy-now=Buy all now!
23 | blkmkt-gui-gen-buy-now-tt=Buy all now! (tax=__1__%)
24 |
25 | blkmkt-gui-gen-period=Default period: __1__h (tax=__2__%)
26 | blkmkt-gui-gen-period-tt=Default period used for automatic sell/buy
27 | blkmkt-gui-gen-period-set=Set all
28 | blkmkt-gui-gen-period-set-tt=Sell all chests periods to default!
29 |
30 | blkmkt-gui-gen-credits=Credits
31 | blkmkt-gui-gen-credits-tt=Credits=sales - purchases - purchases taxes
32 | blkmkt-gui-gen-sales=Sales
33 | blkmkt-gui-gen-sales-tt=Sales of all chests
34 | blkmkt-gui-gen-sales-taxes=Sales taxes
35 | blkmkt-gui-gen-sales-taxes-tt=Sales taxes of all chests
36 | blkmkt-gui-gen-purchases=Purchases
37 | blkmkt-gui-gen-purchases-tt=Purchases of all chests
38 | blkmkt-gui-gen-purchases-taxes=Purchases taxes
39 | blkmkt-gui-gen-purchases-taxes-tt=Purchases taxes of all chests
40 | blkmkt-gui-gen-average-taxes=Average tax rate
41 | blkmkt-gui-gen-average-taxes-tt=Average tax rate on whole balance
42 | blkmkt-gui-gen-credits-lastday=Credits last day
43 | blkmkt-gui-gen-credits-lastday-tt=Credits variation during last day
44 | blkmkt-gui-gen-transactions=Transactions
45 | blkmkt-gui-gen-transactions-tt=Transactions in number of items
46 |
47 | blkmkt-gui-trader-sell=Trader (sell)
48 | blkmkt-gui-trader-buy=Trader (buy)
49 | blkmkt-gui-trader-auto=Automatic
50 | blkmkt-gui-trader-auto-tt=Automatic trading at every period
51 | blkmkt-gui-trader-daylight=Daylight only
52 | blkmkt-gui-trader-daylight-tt=Trades only during daylight
53 | blkmkt-gui-trader-sell-now=Sell now!
54 | blkmkt-gui-trader-sell-now-tt=Sell all now (tax=__1__%)
55 | blkmkt-gui-trader-buy-now=Buy now!
56 | blkmkt-gui-trader-buy-now-tt=Buy all now (tax=__1__%)
57 |
58 | blkmkt-gui-trader-edited=Trader already edited by __1__
59 |
60 | blkmkt-gui-trader-period=Period: __1__h (tax=__2__%)
61 | blkmkt-gui-trader-period-tt=Period used for automatic trading
62 | blkmkt-gui-trader-money-tot=Money tot:
63 | blkmkt-gui-trader-money-tot-tt=Total money since trader creation
64 | blkmkt-gui-trader-taxes-tot=Taxes tot:
65 | blkmkt-gui-trader-taxes-tot-tt=Total taxes since trader creation
66 | blkmkt-gui-trader-money-period=Last period:
67 | blkmkt-gui-trader-money-period-tt=Money on last period
68 | blkmkt-gui-trader-reset=Reset counter
69 | blkmkt-gui-trader-hours=__1__h
70 | blkmkt-gui-trader-hours-tt=Time since last reset
71 | blkmkt-gui-trader-money=Money:
72 | blkmkt-gui-trader-money-tt=Money since last reset
73 | blkmkt-gui-trader-taxes=Taxes:
74 | blkmkt-gui-trader-taxes-tt=Taxes since last reset
75 | blkmkt-gui-trader-money-average=Average:
76 | blkmkt-gui-trader-perday=__1__/day
77 | blkmkt-gui-trader-money-average-tt=Money average since last counter reset
78 | blkmkt-gui-trader-evaluate=Evaluate
79 | blkmkt-gui-trader-evaluate-tt=Evaluate trader's current content
80 | blkmkt-gui-trader-evaluation-tt=Trader's content evaluation
81 | blkmkt-gui-trader-sold=Last sold object
82 | blkmkt-gui-trader-sold-tt=Last sold object
83 | blkmkt-gui-trader-price-tt=Price of the last sold object
84 | blkmkt-gui-trader-new=New order
85 | blkmkt-gui-trader-wipe=Wipe all
86 | blkmkt-gui-trader-orders=Orders:
87 | blkmkt-gui-trader-orders-tt=Total of the orders list without taxes
88 |
89 | blkmkt-gui-refresh=Refresh prices
90 | blkmkt-gui-quality=Select quality
91 | blkmkt-gui-quality-normal=Normal
92 | blkmkt-gui-quality-uncommon=Uncommon
93 | blkmkt-gui-quality-rare=Rare
94 | blkmkt-gui-quality-epic=Epic
95 | blkmkt-gui-quality-legendary=Legendary
96 | blkmkt-gui-close=Close
97 | blkmkt-gui-cancel=Cancel
98 | blkmkt-gui-ok=OK
99 | blkmkt-gui-objects-list=Items list
100 | blkmkt-gui-tt-object-price=__1__ (__2__ __3__)
101 | blkmkt-gui-energy=Energy (electricity in MJ)
102 |
103 |
104 | [technology-name]
105 | black-market-item=Black Market 2 trading chests
106 | black-market-fluid=Black Market 2 trading storage tanks
107 | black-market-energy=Black Market 2 trading accumulators
108 | black-market-mk2=Black Market 2 MK2 upgrade
109 | black-market-mk3=Black Market 2 MK3 upgrade
110 | black-market-mk4=Black Market 2 MK4 upgrade
111 |
112 | [technology-description]
113 | black-market-item=Sell and buy items on the black market using trading chests
114 | black-market-fluid=Sell and buy fluids on the black market using trading storage tanks
115 | black-market-energy=Sell and buy electricity on the black market using trading accumulators
116 | black-market-mk2=Unlocks MK2 selling/buying interfaces, the MK2 chest, MK2 accumulator, and MK2 fluid tank
117 | black-market-mk3=Unlocks MK3 selling/buying interfaces, the MK3 chest, MK3 accumulator, and MK3 fluid tank
118 | black-market-mk4=Unlocks MK4 selling/buying interfaces, the MK4 chest, MK4 accumulator, and MK4 fluid tank
119 |
120 | [item-group-name]
121 | black-market-group=Black Market
122 |
123 | [entity-name]
124 | trader-chst-buy=Trading chest (buy)
125 | trader-chst-sel=Trading chest (sell)
126 | trader-tank-buy=Trading tank (buy)
127 | trader-tank-sel=Trading tank (sell)
128 | trader-accu-buy=Trading accumulator (buy)
129 | trader-accu-sel=Trading accumulator (sell)
130 | trader-chst-buy-mk2=Trading chest MK2 (buy)
131 | trader-chst-sel-mk2=Trading chest MK2 (sell)
132 | trader-tank-buy-mk2=Trading tank MK2 (buy)
133 | trader-tank-sel-mk2=Trading tank MK2 (sell)
134 | trader-accu-buy-mk2=Trading accumulator MK2 (buy)
135 | trader-accu-sel-mk2=Trading accumulator MK2 (sell)
136 | trader-chst-buy-mk3=Trading chest MK3 (buy)
137 | trader-chst-sel-mk3=Trading chest MK3 (sell)
138 | trader-tank-buy-mk3=Trading tank MK3 (buy)
139 | trader-tank-sel-mk3=Trading tank MK3 (sell)
140 | trader-accu-buy-mk3=Trading accumulator MK3 (buy)
141 | trader-accu-sel-mk3=Trading accumulator MK3 (sell)
142 | trader-chst-buy-mk4=Trading chest MK4 (buy)
143 | trader-chst-sel-mk4=Trading chest MK4 (sell)
144 | trader-tank-buy-mk4=Trading tank MK4 (buy)
145 | trader-tank-sel-mk4=Trading tank MK4 (sell)
146 | trader-accu-buy-mk4=Trading accumulator MK4 (buy)
147 | trader-accu-sel-mk4=Trading accumulator MK4 (sell)
148 |
149 | [entity-description]
150 | trader-chst-buy=This chest receives items bought on the market.
151 | trader-chst-sel=Any item placed in this chest is sold on the market.
152 | trader-tank-buy=This storage tank receives fluid bought on the market.
153 | trader-tank-sel=Any fluid placed in this storage tank is sold on the market.
154 | trader-accu-buy=This accumulator receives electricity bought on the market (it never steals electricity from your network).
155 | trader-accu-sel=Any electricity placed in this accumulator is sold on the market (if not sold, it slowly returns to the network).
156 | trader-chst-buy-mk2=This chest receives items bought on the market.
157 | trader-chst-sel-mk2=Any item placed in this chest is sold on the market.
158 | trader-tank-buy-mk2=This storage tank receives fluid bought on the market.
159 | trader-tank-sel-mk2=Any fluid placed in this storage tank is sold on the market.
160 | trader-accu-buy-mk2=This accumulator receives electricity bought on the market (it never steals electricity from your network).
161 | trader-accu-sel-mk2=Any electricity placed in this accumulator is sold on the market (if not sold, it slowly returns to the network).
162 | trader-chst-buy-mk3=This chest receives items bought on the market.
163 | trader-chst-sel-mk3=Any item placed in this chest is sold on the market.
164 | trader-tank-buy-mk3=This storage tank receives fluid bought on the market.
165 | trader-tank-sel-mk3=Any fluid placed in this storage tank is sold on the market.
166 | trader-accu-buy-mk3=This accumulator receives electricity bought on the market (it never steals electricity from your network).
167 | trader-accu-sel-mk3=Any electricity placed in this accumulator is sold on the market (if not sold, it slowly returns to the network).
168 | trader-chst-buy-mk4=This chest receives items bought on the market.
169 | trader-chst-sel-mk4=Any item placed in this chest is sold on the market.
170 | trader-tank-buy-mk4=This storage tank receives fluid bought on the market.
171 | trader-tank-sel-mk4=Any fluid placed in this storage tank is sold on the market.
172 | trader-accu-buy-mk4=This accumulator receives electricity bought on the market (it never steals electricity from your network).
173 | trader-accu-sel-mk4=Any electricity placed in this accumulator is sold on the market (if not sold, it slowly returns to the network).
174 |
175 | [item-name]
176 | ucoin=Ucoin
177 | trader-chst-buy=Trading chest (buy)
178 | trader-chst-sel=Trading chest (sell)
179 | trader-tank-buy=Trading tank (buy)
180 | trader-tank-sel=Trading tank (sell)
181 | trader-accu-buy=Trading accumulator (buy)
182 | trader-accu-sel=Trading accumulator (sell)
183 | trader-chst-buy-mk2=Trading chest MK2 (buy)
184 | trader-chst-sel-mk2=Trading chest MK2 (sell)
185 | trader-tank-buy-mk2=Trading tank MK2 (buy)
186 | trader-tank-sel-mk2=Trading tank MK2 (sell)
187 | trader-accu-buy-mk2=Trading accumulator MK2 (buy)
188 | trader-accu-sel-mk2=Trading accumulator MK2 (sell)
189 | trader-chst-buy-mk3=Trading chest MK3 (buy)
190 | trader-chst-sel-mk3=Trading chest MK3 (sell)
191 | trader-tank-buy-mk3=Trading tank MK3 (buy)
192 | trader-tank-sel-mk3=Trading tank MK3 (sell)
193 | trader-accu-buy-mk3=Trading accumulator MK3 (buy)
194 | trader-accu-sel-mk3=Trading accumulator MK3 (sell)
195 | trader-chst-buy-mk4=Trading chest MK4 (buy)
196 | trader-chst-sel-mk4=Trading chest MK4 (sell)
197 | trader-tank-buy-mk4=Trading tank MK4 (buy)
198 | trader-tank-sel-mk4=Trading tank MK4 (sell)
199 | trader-accu-buy-mk4=Trading accumulator MK4 (buy)
200 | trader-accu-sel-mk4=Trading accumulator MK4 (sell)
201 |
202 | [virtual-signal-name]
203 | signal-market-auto-all=Traders automatic mode: on(>1)/off(=1)/ignore(=0)
204 | signal-market-auto-sel=Traders automatic sell mode: on(>1)/off(=1)/ignore(=0)
205 | signal-market-auto-buy=Traders automatic buy mode: on(>1)/off(=1)/ignore(=0)
206 |
207 | [mod-setting-name]
208 | BM2-dynamic_prices=Enable dynamic prices
209 | BM2-only_items_researched=Only enable items researched
210 | BM2-enable_tax=Enable tax
211 | BM2-default_auto=Automatic sell/buy enabled by default
212 | BM2-price_multiplyer=Price multiplyer
213 | BM2-resource_price=Resource price
214 | BM2-infinite_price=Water price
215 | BM2-free_price=Free price
216 | BM2-unknown_price=Unknown price
217 | BM2-water_price=Vanilla water price
218 | BM2-coal_price=Coal price
219 | BM2-stone_price=Stone price
220 | BM2-iron_price=Iron price
221 | BM2-uranium_price=Uranium price
222 | BM2-copper_price=Copper price
223 | BM2-oil_price=Crude oil price
224 | BM2-ucoin=Ucoin price
225 | BM2-wood=Raw wood price
226 | BM2-raw_fish=Raw fish price
227 | BM2-steam=Steam price
228 | BM2-energy_price=Energy price
229 | BM2-energy_cost=Energy costs
230 | BM2-tech_ingr_cost=Science pack costs
231 | BM2-tech_amortization=Tech amortization
232 | BM2-commercial_margin=Commercial margin
233 | BM2-dynamic_regrowth=Dynamic regrowth
234 | BM2-dynamic_influence_item=Dynamic influence item
235 | BM2-dynamic_influence_fluid=Dynamic influence fluid
236 | BM2-dynamic_influence_energy=Dynamic influence energy
237 | BM2-dynamic_minimal=Dynamic minimal
238 | BM2-dynamic_maximal=Dynamic maximal
239 | BM2-tax_start=Tax start
240 | BM2-tax_growth=Tax growth
241 | BM2-tax_immediate=Tax immediate
242 | BM2-recipe_depth_maximum=Recipe depth maximum
243 | BM2-unknown_price_reason_logging=Price Debugging
244 | BM2-gui_scale=GUI Scale
245 |
246 | [mod-setting-description]
247 | BM2-dynamic_prices=If this is turned off then the prices remain the same no matter how much you sell or buy
248 | BM2-only_items_researched=Allow the buying and selling of only items that you have unlocked through research
249 | BM2-enable_tax=Enable or disable tax in general
250 | BM2-default_auto=Enable or disable the 'automatic' setting on buy/sell entities being on when placed
251 | BM2-price_multiplyer=Multiplys all of the prices by this value
252 | BM2-resource_price=price of an unknown raw ore (for mods)
253 | BM2-infinite_price=Price for easy infinite resources like water, air, etc...
254 | BM2-free_price=Price for free object (product of recipe with no ingredients)
255 | BM2-unknown_price=Price of unknown object
256 | BM2-water_price=Price of the vanilla water
257 | BM2-coal_price=Price of the vanilla coal
258 | BM2-stone_price=Price of the vanilla stone
259 | BM2-iron_price=Price of the vanilla iron
260 | BM2-uranium_price=Price of the vanilla uranium
261 | BM2-copper_price=Price of the vanilla copper
262 | BM2-oil_price=Price of the vanilla crude oil
263 | BM2-ucoin=Value of the ucoins
264 | BM2-wood=Price of Raw Wood
265 | BM2-raw_fish=Price of Raw fish
266 | BM2-steam=Price of steam, usually the same as resource price
267 | BM2-energy_price=Price for selling and buying energy (for 1MJ)
268 | BM2-energy_cost=Cost of energy unit in recipes (time, different from MJ
269 | BM2-tech_ingr_cost=Average cost of a science pack
270 | BM2-tech_amortization=Amortization of the tech cost in object price
271 | BM2-commercial_margin=Commercial margin
272 | BM2-dynamic_regrowth=How prices slowly return to optimal value if untouched (every day)
273 | BM2-dynamic_influence_item=Influence of sales and purchases on prices (per item, per day)
274 | BM2-dynamic_influence_fluid=Influence of sales and purchases on prices (per item, per day)
275 | BM2-dynamic_influence_energy=Influence of sales and purchases on prices (per item, per day)
276 | BM2-dynamic_minimal=Influence of sales and purchases on prices (per item, per day)
277 | BM2-dynamic_maximal=Influence of sales and purchases on prices (per item, per day)
278 | BM2-tax_start=Starting fee in % for one action per day
279 | BM2-tax_growth=Exponential growth with frequency/day : fee = tax_start * (freq ^ tax_growth)
280 | BM2-tax_immediate=% Fee for immediate action
281 | BM2-recipe_depth_maximum=Recipe the maximum 'depth' that BM2 will look into for a recipe, to find its cost.
282 | BM2-unknown_price_reason_logging=Writes a log of items that are priced as unknown, and the reason for such
283 | BM2-gui_scale=Scale of the Black Market GUI interface (0.5-3.0, requires restart)
284 |
--------------------------------------------------------------------------------
/prototypes/entities.lua:
--------------------------------------------------------------------------------
1 | require("utils")
2 | require("config")
3 |
4 | data:extend(
5 | {
6 | ----------------------------------------------------------------------------------
7 | {
8 | type = "item-group",
9 | name = "black-market-group",
10 | icon = "__BlackMarket2__/graphics/black-market-group.png",
11 | icon_size = 64,
12 | inventory_order = "n",
13 | order = "n"
14 | },
15 | {
16 | type = "item-subgroup",
17 | name = "black-market-general",
18 | group = "black-market-group",
19 | order = "a"
20 | },
21 | {
22 | type = "item-subgroup",
23 | name = "black-market-chests",
24 | group = "black-market-group",
25 | order = "b"
26 | },
27 | {
28 | type = "item-subgroup",
29 | name = "black-market-tanks",
30 | group = "black-market-group",
31 | order = "c"
32 | },
33 | {
34 | type = "item-subgroup",
35 | name = "black-market-accumulators",
36 | group = "black-market-group",
37 | order = "d"
38 | },
39 | --------------------------------------------------------------------------------------
40 | {
41 | type = "item",
42 | name = "ucoin",
43 | icon = "__BlackMarket2__/graphics/ucoin.png",
44 | icon_size = 32,
45 | subgroup = "black-market-general",
46 | order = "y",
47 | stack_size = 1000000
48 | },
49 | --------------------------------------------------------------------------------------
50 | {
51 | type = "technology",
52 | name = "black-market-item",
53 | icon = "__BlackMarket2__/graphics/black-market-item.png",
54 | icon_size = 128,
55 | enabled = true,
56 | unit = {
57 | count = 75,
58 | ingredients = {
59 | {"automation-science-pack", 1},
60 | },
61 | time = 15
62 | },
63 | effects =
64 | {
65 | {
66 | type = "unlock-recipe",
67 | recipe = "trader-chst-buy",
68 | },
69 | },
70 | order = "k-z-a",
71 | },
72 | --------------------------------------------------------------------------------------
73 | {
74 | type = "technology",
75 | name = "black-market-fluid",
76 | icon = "__BlackMarket2__/graphics/black-market-fluid.png",
77 | icon_size = 128,
78 | enabled = true,
79 | prerequisites = { "black-market-item", "fluid-handling" },
80 | unit = {
81 | count = 75,
82 | ingredients = {
83 | {"automation-science-pack", 1},
84 | {"logistic-science-pack", 1},
85 | },
86 | time = 20
87 | },
88 | effects =
89 | {
90 | {
91 | type = "unlock-recipe",
92 | recipe = "trader-tank-sel",
93 | },
94 | {
95 | type = "unlock-recipe",
96 | recipe = "trader-tank-buy",
97 | },
98 | },
99 | order = "k-z-b",
100 | },
101 | --------------------------------------------------------------------------------------
102 | {
103 | type = "technology",
104 | name = "black-market-energy",
105 | icon = "__BlackMarket2__/graphics/black-market-energy.png",
106 | icon_size = 128,
107 | enabled = true,
108 | prerequisites = { "black-market-item", "electric-energy-accumulators" },
109 | unit = {
110 | count = 150,
111 | ingredients = {
112 | {"automation-science-pack", 1},
113 | {"logistic-science-pack", 1},
114 | },
115 | time = 25
116 | },
117 | effects =
118 | {
119 | {
120 | type = "unlock-recipe",
121 | recipe = "trader-accu-sel",
122 | },
123 | {
124 | type = "unlock-recipe",
125 | recipe = "trader-accu-buy",
126 | },
127 | },
128 | order = "k-z-c",
129 | },
130 | --------------------------------------------------------------------------------------
131 | {
132 | type = "technology",
133 | name = "black-market-mk2",
134 | icon = "__BlackMarket2__/graphics/black-market-mk.png",
135 | icon_size = 128,
136 | enabled = true,
137 | upgrade = true,
138 | prerequisites = {"steel-processing", "black-market-item", "black-market-fluid", "black-market-energy" },
139 | unit = {
140 | count = 150,
141 | ingredients = {
142 | {"automation-science-pack", 1},
143 | {"logistic-science-pack", 1},
144 | {"chemical-science-pack", 1},
145 | },
146 | time = 15
147 | },
148 | effects =
149 | {
150 | },
151 | order = "k-z-d",
152 | },
153 | --------------------------------------------------------------------------------------
154 | {
155 | type = "technology",
156 | name = "black-market-mk3",
157 | icon = "__BlackMarket2__/graphics/black-market-mk.png",
158 | icon_size = 128,
159 | enabled = true,
160 | upgrade = true,
161 | prerequisites = { "black-market-mk2" },
162 | unit = {
163 | count = 200,
164 | ingredients = {
165 | {"automation-science-pack", 1},
166 | {"logistic-science-pack", 1},
167 | {"chemical-science-pack", 1},
168 | },
169 | time = 15
170 | },
171 | effects =
172 | {
173 | },
174 | order = "k-z-d",
175 | },
176 | --------------------------------------------------------------------------------------
177 | {
178 | type = "technology",
179 | name = "black-market-mk4",
180 | icon = "__BlackMarket2__/graphics/black-market-mk.png",
181 | icon_size = 128,
182 | enabled = true,
183 | upgrade = true,
184 | prerequisites = { "black-market-mk3" },
185 | unit = {
186 | count = 250,
187 | ingredients = {
188 | {"automation-science-pack", 1},
189 | {"logistic-science-pack", 1},
190 | {"chemical-science-pack", 1},
191 | },
192 | time = 15
193 | },
194 | effects =
195 | {
196 | },
197 | order = "k-z-f",
198 | },
199 | }
200 | )
201 |
202 | local names_pastable = {}
203 | local names_chests = {}
204 | local names_tanks = {}
205 | local names_accus = {}
206 |
207 | --------------------------------------------------------------------------------------
208 |
209 | local function add_chests(level)
210 | local name_sell = "trader-chst-sel"
211 | local name_buy = "trader-chst-buy"
212 | if level > 1 then
213 | name_sell = name_sell .. "-mk" .. level
214 | name_buy = name_buy .. "-mk" .. level
215 | end
216 | table.insert(names_chests,name_sell)
217 | table.insert(names_pastable,name_sell)
218 | local inventory_size = level == 1 and 16 or (50 + 100 * (level - 2)) -- vanilla 48
219 | --------------------------------------------------------------------------------------
220 | local ingredients = {{type="item", name="wooden-chest", amount=1}}
221 | local proto = "wooden-chest"
222 | local enabled = true
223 |
224 | if level > 1 then
225 | ingredients = {
226 | {type="item", name="steel-chest", amount=level},
227 | {type="item", name="electronic-circuit", amount=2 * level}
228 | }
229 | proto = "steel-chest"
230 | enabled = false
231 | end
232 |
233 | local chest_sell = dupli_proto( "container", proto, name_sell )
234 | chest_sell.inventory_size = inventory_size
235 | chest_sell.picture =
236 | {
237 | filename = "__BlackMarket2__/graphics/trading-chest-sell.png",
238 | priority = "extra-high",
239 | width = 48,
240 | height = 34,
241 | shift = {0.1875, 0}
242 | }
243 |
244 |
245 | data:extend(
246 | {
247 | chest_sell,
248 |
249 | {
250 | type = "item",
251 | name = name_sell,
252 | icon = "__BlackMarket2__/graphics/trading-chest-sell-icon.png",
253 | icon_size = 32,
254 | subgroup = "black-market-chests",
255 | order = level .. "a",
256 | place_result = name_sell,
257 | stack_size = 50,
258 | },
259 |
260 | {
261 | type = "recipe",
262 | name = name_sell,
263 | enabled = enabled ,
264 | energy_required = 1,
265 | ingredients = ingredients,
266 | results = {{type="item", name=name_sell, amount=1}},
267 | },
268 | }
269 | )
270 |
271 | table.insert(names_chests,name_buy)
272 | table.insert(names_pastable,name_buy)
273 | --------------------------------------------------------------------------------------
274 | local chest_buy = dupli_proto( "container", proto, name_buy )
275 | chest_buy.inventory_size = inventory_size
276 | chest_buy.picture =
277 | {
278 | filename = "__BlackMarket2__/graphics/trading-chest-buy.png",
279 | priority = "extra-high",
280 | width = 48,
281 | height = 34,
282 | shift = {0.1875, 0}
283 | }
284 |
285 | data:extend(
286 | {
287 | chest_buy,
288 |
289 | {
290 | type = "item",
291 | name = name_buy,
292 | icon = "__BlackMarket2__/graphics/trading-chest-buy-icon.png",
293 | icon_size = 32,
294 | subgroup = "black-market-chests",
295 | order = level .. "b",
296 | place_result = name_buy,
297 | stack_size = 50,
298 | },
299 |
300 | {
301 | type = "recipe",
302 | name = name_buy,
303 | enabled = false,
304 | energy_required = 1,
305 | ingredients = ingredients,
306 | results = {{type="item", name=name_buy, amount=1}},
307 | },
308 | }
309 | )
310 |
311 | if level > 1 then
312 | local techno_name = "black-market-mk" .. level
313 | table.insert( data.raw["technology"][techno_name].effects,
314 | {
315 | type = "unlock-recipe",
316 | recipe = name_sell,
317 | }
318 | )
319 | table.insert( data.raw["technology"][techno_name].effects,
320 | {
321 | type = "unlock-recipe",
322 | recipe = name_buy,
323 | }
324 | )
325 | end
326 | end
327 |
328 |
329 | add_chests(1)
330 | add_chests(2)
331 | add_chests(3)
332 | add_chests(4)
333 |
334 | --------------------------------------------------------------------------------------
335 |
336 | local function add_tanks(level)
337 | local name_sell = "trader-tank-sel"
338 | local name_buy = "trader-tank-buy"
339 | if level > 1 then
340 | name_sell = name_sell .. "-mk" .. level
341 | name_buy = name_buy .. "-mk" .. level
342 | end
343 | table.insert(names_tanks,name_sell)
344 | table.insert(names_tanks,name_buy)
345 | table.insert(names_pastable,name_sell)
346 | table.insert(names_pastable,name_buy)
347 | local tank_max -- vanilla 25000
348 | if level == 1 then tank_max = 25000 end
349 | if level == 2 then tank_max = 100000 end
350 | if level == 3 then tank_max = 200000 end
351 | if level == 4 then tank_max = 400000 end
352 | --------------------------------------------------------------------------------------
353 | local tank_sell = dupli_proto( "storage-tank", "storage-tank", name_sell )
354 | tank_sell.pictures.picture.sheets[1].filename = "__BlackMarket2__/graphics/trading-tank-sell.png"
355 | tank_sell.pictures.picture.sheets[1].height = 216
356 | tank_sell.fluid_box.volume = tank_max
357 |
358 | data:extend(
359 | {
360 | tank_sell,
361 |
362 | {
363 | type = "item",
364 | name = name_sell,
365 | icon = "__BlackMarket2__/graphics/trading-tank-sell-icon.png",
366 | icon_size = 32,
367 | subgroup = "black-market-tanks",
368 | order = level .. "a",
369 | place_result = name_sell,
370 | stack_size = 50,
371 | },
372 |
373 | {
374 | type = "recipe",
375 | name = name_sell,
376 | enabled = false,
377 | energy_required = 4,
378 | ingredients = {
379 | {type="item", name="storage-tank", amount=level},
380 | {type="item", name="electronic-circuit", amount=2*level},
381 | },
382 | results = {{type="item", name=name_sell, amount=1}},
383 | },
384 | }
385 | )
386 |
387 | --------------------------------------------------------------------------------------
388 | local tank_buy = dupli_proto( "storage-tank", "storage-tank", name_buy )
389 | tank_buy.pictures.picture.sheets[1].filename = "__BlackMarket2__/graphics/trading-tank-buy.png"
390 | tank_buy.pictures.picture.sheets[1].height = 216
391 | tank_buy.fluid_box.volume = tank_max
392 |
393 | data:extend(
394 | {
395 | tank_buy,
396 |
397 | {
398 | type = "item",
399 | name = name_buy,
400 | icon = "__BlackMarket2__/graphics/trading-tank-buy-icon.png",
401 | icon_size = 32,
402 | subgroup = "black-market-tanks",
403 | order = level .. "b",
404 | place_result = name_buy,
405 | stack_size = 50,
406 | },
407 |
408 | {
409 | type = "recipe",
410 | name = name_buy,
411 | enabled = false,
412 | energy_required = 4,
413 | ingredients = {
414 | {type="item", name="storage-tank", amount=level},
415 | {type="item", name="electronic-circuit", amount=2*level},
416 | },
417 | results = {{type="item", name=name_buy, amount=1}},
418 | },
419 | }
420 | )
421 | if level > 1 then
422 | local techno_name = "black-market-mk" .. level
423 | table.insert( data.raw["technology"][techno_name].effects,
424 | {
425 | type = "unlock-recipe",
426 | recipe = name_sell,
427 | }
428 | )
429 | table.insert( data.raw["technology"][techno_name].effects,
430 | {
431 | type = "unlock-recipe",
432 | recipe = name_buy,
433 | }
434 | )
435 | end
436 | end
437 |
438 | add_tanks(1)
439 | add_tanks(2)
440 | add_tanks(3)
441 | add_tanks(4)
442 |
443 | --------------------------------------------------------------------------------------
444 |
445 | local function add_accus(level)
446 | local name_sell = "trader-accu-sel"
447 | local name_buy = "trader-accu-buy"
448 | if level > 1 then
449 | name_sell = name_sell .. "-mk" .. level
450 | name_buy = name_buy .. "-mk" .. level
451 | end
452 | table.insert(names_accus,name_sell)
453 | table.insert(names_accus,name_buy)
454 | table.insert(names_pastable,name_sell)
455 | table.insert(names_pastable,name_buy)
456 | local accu_max -- vanilla 5MJ
457 | if level == 1 then accu_max = 10 end
458 | if level == 2 then accu_max = 100 end
459 | if level == 3 then accu_max = 250 end
460 | if level == 4 then accu_max = 500 end
461 | local flow_limit -- vanilla 300kW
462 | if level == 1 then flow_limit = 1 end
463 | if level == 2 then flow_limit = 5 end
464 | if level == 3 then flow_limit = 10 end
465 | if level == 4 then flow_limit = 25 end
466 | --------------------------------------------------------------------------------------
467 | local accu_sell = dupli_proto( "accumulator", "accumulator", name_sell )
468 | accu_sell.energy_source.buffer_capacity = accu_max .. "MJ"
469 | accu_sell.energy_source.input_flow_limit = flow_limit .. "MW"
470 | accu_sell.energy_source.output_flow_limit = "0MW"
471 | accu_sell.chargable_graphics.picture.filename = "__BlackMarket2__/graphics/trading-accumulator-sell.png"
472 | accu_sell.chargable_graphics.charge_animation.filename = "__BlackMarket2__/graphics/trading-accumulator-sell-charge.png"
473 | accu_sell.chargable_graphics.discharge_animation.filename = "__BlackMarket2__/graphics/trading-accumulator-sell-discharge.png"
474 |
475 | data:extend(
476 | {
477 | accu_sell,
478 |
479 | {
480 | type = "item",
481 | name = name_sell,
482 | icon = "__BlackMarket2__/graphics/trading-accumulator-sell-icon.png",
483 | icon_size = 32,
484 | subgroup = "black-market-accumulators",
485 | order = level .. "a",
486 | place_result = name_sell,
487 | stack_size = 50,
488 | },
489 |
490 | {
491 | type = "recipe",
492 | name = name_sell,
493 | enabled = false,
494 | energy_required = 20,
495 | ingredients = {
496 | {type="item", name="accumulator", amount=2+(level-1)*2},
497 | {type="item", name="electronic-circuit", amount=2*level},
498 | },
499 | results = {{type="item", name=name_sell, amount=1}},
500 | },
501 | }
502 | )
503 |
504 | --------------------------------------------------------------------------------------
505 | local accu_buy = dupli_proto( "accumulator", "accumulator", name_buy )
506 | accu_buy.energy_source.buffer_capacity = accu_max .. "MJ"
507 | accu_buy.energy_source.input_flow_limit = "0MW"
508 | accu_buy.energy_source.output_flow_limit = flow_limit .. "MW"
509 | accu_buy.chargable_graphics.picture.filename = "__BlackMarket2__/graphics/trading-accumulator-buy.png"
510 | accu_buy.chargable_graphics.charge_animation.filename = "__BlackMarket2__/graphics/trading-accumulator-buy-charge.png"
511 | accu_buy.chargable_graphics.discharge_animation.filename = "__BlackMarket2__/graphics/trading-accumulator-buy-discharge.png"
512 |
513 | data:extend(
514 | {
515 | accu_buy,
516 |
517 | {
518 | type = "item",
519 | name = name_buy,
520 | icon = "__BlackMarket2__/graphics/trading-accumulator-buy-icon.png",
521 | icon_size = 32,
522 | subgroup = "black-market-accumulators",
523 | order = level .. "b",
524 | place_result = name_buy,
525 | stack_size = 50,
526 | },
527 |
528 | {
529 | type = "recipe",
530 | name = name_buy,
531 | enabled = false,
532 | energy_required = 20,
533 | ingredients = {
534 | {type="item", name="accumulator", amount=2+(level-1)*2},
535 | {type="item", name="electronic-circuit", amount=2*level},
536 | },
537 | results = {{type="item", name=name_buy, amount=1}},
538 | },
539 | }
540 | )
541 | if level > 1 then
542 | local techno_name = "black-market-mk" .. level
543 | table.insert( data.raw["technology"][techno_name].effects,
544 | {
545 | type = "unlock-recipe",
546 | recipe = name_sell,
547 | }
548 | )
549 | table.insert( data.raw["technology"][techno_name].effects,
550 | {
551 | type = "unlock-recipe",
552 | recipe = name_buy,
553 | }
554 | )
555 | end
556 | end
557 |
558 | add_accus(1)
559 | add_accus(2)
560 | add_accus(3)
561 | add_accus(4)
562 |
563 | --------------------------------------------------------------------------------------
564 | for _, name in pairs(names_chests) do
565 | data.raw["container"][name].additional_pastable_entities = names_pastable
566 | end
567 |
568 | for _, name in pairs(names_tanks) do
569 | data.raw["storage-tank"][name].additional_pastable_entities = names_pastable
570 | end
571 |
572 | for _, name in pairs(names_accus) do
573 | data.raw["accumulator"][name].additional_pastable_entities = names_pastable
574 | end
575 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------