Skip to content

Commit

Permalink
Version: 1.3.1
Browse files Browse the repository at this point in the history
Date: 17.03.2021
  Features:
    - Add deadlock tier by draddy82 - https://github.com/draddy82
    - Add next_upgrade to entities
    - Add related_underground_belt to normal belts - Thanks JanSharp - https://github.com/JanSharp
  • Loading branch information
DerMistkaefer committed Mar 17, 2021
1 parent 31dc517 commit 0dfa9a8
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 4 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---------------------------------------------------------------------------------------------------
Version: 1.3.1
Date: 17.03.2021
Features:
- Add deadlock tier by draddy82 - https://github.com/draddy82
- Add next_upgrade to entities
- Add related_underground_belt to normal belts - Thanks JanSharp - https://github.com/JanSharp
---------------------------------------------------------------------------------------------------
Version: 1.3.0
Date: 06.12.2020
Features:
Expand Down
25 changes: 25 additions & 0 deletions data-updates.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if deadlock then
deadlock.add_tier({
transport_belt = "BetterBelts_ultra-transport-belt",
colour = {r=0,g=211,b=37},
technology = "logistics-3",
order = "d",
loader = "BetterBelts_ultra-deadlock-loader",
loader_ingredients = {
{"express-transport-belt-loader",1},
{"iron-gear-wheel",40},
},
beltbox = "BetterBelts_ultra-deadlock-beltbox",
beltbox_ingredients = {
{"express-transport-belt-beltbox",1},
{"steel-plate",40},
{"iron-gear-wheel",40},
{"processing-unit",5},
},
beltbox_technology = "deadlock-stacking-3",
})

if data.raw.furnace["BetterBelts_ultra-transport-belt-beltbox"] then
data.raw.furnace["express-transport-belt-beltbox"].next_upgrade = "BetterBelts_ultra-transport-belt-beltbox"
end
end
16 changes: 13 additions & 3 deletions data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ function BetterBelts_addRecipe(baseName,thisName,thisIngredients)
data.raw[obj.type][obj.name] = obj
end

function BetterBelts_addEntity_Belt(beltName,beltSpeed)
function BetterBelts_addEntity_Belt(beltName,beltSpeed, relatedUndergroundBelt)
local obj = util.table.deepcopy(data.raw["transport-belt"]["express-transport-belt"])
obj.name = BB.modName .. "_" .. beltName
obj.minable.result = obj.name

obj.speed = beltSpeed
obj.related_underground_belt = BB.modName .. "_" .. relatedUndergroundBelt

obj.icon = BB.baseGraphicsIcons .. beltName .. ".png"
obj.icon_size = 32
Expand All @@ -75,6 +76,7 @@ function BetterBelts_addEntity_Belt(beltName,beltSpeed)
obj.belt_animation_set.animation_set.hr_version.filename = BB.baseGraphicsEntity .. "hr-" .. beltName .. ".png"

data.raw[obj.type][obj.name] = obj
data.raw["transport-belt"]["express-transport-belt"].next_upgrade = obj.name
end

function BetterBelts_addEntity_undergroundBelt(beltName,beltSpeed,beltMax_distance,mainName)
Expand Down Expand Up @@ -138,6 +140,7 @@ function BetterBelts_addEntity_Loader(beltName,beltSpeed,beltMax_distance)
obj.belt_animation_set = ultra_belt_animation_set

data.raw[obj.type][obj.name] = obj
data.raw["loader"]["express-loader"].next_upgrade = obj.name
end

function BetterBelts_addEntity_Splitter(beltName,beltSpeed,beltMax_distance)
Expand Down Expand Up @@ -182,6 +185,7 @@ function BetterBelts_addEntity_Splitter(beltName,beltSpeed,beltMax_distance)
obj.belt_animation_set = ultra_belt_animation_set

data.raw[obj.type][obj.name] = obj
data.raw["splitter"]["express-splitter"].next_upgrade = obj.name
end

function BetterBelts_addTechnology(thisName,thisIcon,thisType,thisEffect,thisPrerequisites,thisCount,thisIngredients,thisTime,thisOrder,className,modName)
Expand Down Expand Up @@ -223,7 +227,7 @@ function BetterBelts_BeltClass(className,classSpeed)

BetterBelts_addItem("fast-transport-belt",className .. "-transport-belt","a[transport-belt]-d[" .. className .. "-transport-belt]")
BetterBelts_addRecipe("fast-transport-belt",className .. "-transport-belt",{{"iron-gear-wheel", 5},{"express-transport-belt", 2}})
BetterBelts_addEntity_Belt(className .. "-transport-belt",classSpeed)
BetterBelts_addEntity_Belt(className .. "-transport-belt",classSpeed, className .. "-underground-belt-v1")


BetterBelts_addItem("fast-underground-belt",className .. "-underground-belt-v1","b[underground-belt]-d[" .. className .. "-underground-belt-v1]")
Expand All @@ -248,7 +252,13 @@ function BetterBelts_BeltClass(className,classSpeed)
BetterBelts_addTechnology(className .. "-class",className .. "-transport-belt","unlock-recipe",classRecipes,{"logistics-3"},150,4,30,"a",className,BB.modName)
end


--activate again default loaders
data.raw["loader"]["loader"].flags = {"placeable-neutral", "player-creation"}
data.raw["loader"]["fast-loader"].flags = {"placeable-neutral", "player-creation"}
data.raw["loader"]["express-loader"].flags = {"placeable-neutral", "player-creation"}
data.raw["item"]["loader"].flags = null
data.raw["item"]["fast-loader"].flags = null
data.raw["item"]["express-loader"].flags = null

BetterBelts_BeltClass("ultra",0.2)

Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BetterBelts",
"version": "1.3.0",
"version": "1.3.1",
"title": "Better Belts",
"author": "DerMistkaefer, adcrafter27, LaVADraGoN, Updated by: XiNaru",
"contact": "dermistkaefer@gmail.com",
Expand Down
2 changes: 2 additions & 0 deletions locale/en/BetterBelts.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ BetterBelts_ultra-underground-belt-v2=High Speed Underground Belt v2
BetterBelts_ultra-underground-belt-v3=High Speed Underground Belt v3
BetterBelts_ultra-splitter=High Speed Splitter Belt
BetterBelts_ultra-loader=High Speed Loader
BetterBelts_ultra-deadlock-loader=High Speed stacking beltbox
BetterBelts_ultra-deadlock-beltbox=High Speed compact loader

[technology-name]
BetterBelts_ultra-class=High Speed Belt Class
Expand Down
17 changes: 17 additions & 0 deletions migrations/BetterBelts_1.3.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"item":
[
["Ultra-CompactLoader", "BetterBelts_ultra-deadlock-loader"],
["Ultra-Beltbox", "BetterBelts_ultra-deadlock-beltbox"]
],
"recipe":
[
["Ultra-CompactLoader", "BetterBelts_ultra-deadlock-loader"],
["Ultra-Beltbox", "BetterBelts_ultra-deadlock-beltbox"]
],
"entity":
[
["Ultra-CompactLoader", "BetterBelts_ultra-deadlock-loader"],
["Ultra-Beltbox", "BetterBelts_ultra-deadlock-beltbox"]
]
}

0 comments on commit 0dfa9a8

Please sign in to comment.