BarrelWeightTweaker 0.2.0
- configurable weight
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/target/
|
||||
@@ -1,5 +0,0 @@
|
||||
for _, item in pairs(data.raw.item) do
|
||||
if item.name:match("%-barrel$") then -- Matches "water-barrel", "crude-oil-barrel", etc.
|
||||
item.weight = 1 * kg
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
mod_name := `jq -r .name src/info.json`
|
||||
version := `jq -r .version src/info.json`
|
||||
zip_file := mod_name + "_" + version + ".zip"
|
||||
|
||||
default: build
|
||||
|
||||
build:
|
||||
mkdir -p target
|
||||
rm -f "target/{{zip_file}}"
|
||||
rm -rf "target/{{mod_name}}"
|
||||
mkdir -p "target/{{mod_name}}"
|
||||
cp -a src/. "target/{{mod_name}}/"
|
||||
cd target && zip -qr "{{zip_file}}" "{{mod_name}}"
|
||||
rm -rf "target/{{mod_name}}"
|
||||
|
||||
clean:
|
||||
rm -rf target
|
||||
@@ -0,0 +1,7 @@
|
||||
local barrel_weight = settings.startup["barrel-weight-tweaker-barrel-weight-kg"].value * kg
|
||||
|
||||
for _, item in pairs(data.raw.item) do
|
||||
if item.name:match("%-barrel$") then
|
||||
item.weight = barrel_weight
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
data.raw.item["barrel"].weight = settings.startup["barrel-weight-tweaker-barrel-weight-kg"].value * kg
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "BarrelWeightTweaker",
|
||||
"version": "0.1.0",
|
||||
"version": "0.2.0",
|
||||
"title": "Barrel Weight Tweaker",
|
||||
"author": "ddidderr",
|
||||
"description": "Sets the weight of barrels to 1 kg for increased rocket capacity.",
|
||||
"description": "Makes the weight of barrels configurable for rocket capacity tuning. (default 1 kg)",
|
||||
"factorio_version": "2.0",
|
||||
"dependencies": [
|
||||
"base >= 2.0"
|
||||
@@ -0,0 +1,5 @@
|
||||
[mod-setting-name]
|
||||
barrel-weight-tweaker-barrel-weight-kg=Barrel weight
|
||||
|
||||
[mod-setting-description]
|
||||
barrel-weight-tweaker-barrel-weight-kg=Weight in kg for any kind of barrels. Higher values reduce how many barrels fit in a rocket.
|
||||
@@ -0,0 +1,11 @@
|
||||
data:extend({
|
||||
{
|
||||
type = "double-setting",
|
||||
name = "barrel-weight-tweaker-barrel-weight-kg",
|
||||
setting_type = "startup",
|
||||
default_value = 1,
|
||||
minimum_value = 0,
|
||||
maximum_value = 10000,
|
||||
order = "a"
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user