From 992e9204ec83b331ae44836900eff104d793b6f6 Mon Sep 17 00:00:00 2001 From: TheAIBot Date: Sun, 3 Jul 2016 10:34:42 +0200 Subject: [PATCH] updated to 1.1.0 for factorio 0.13 --- .../AllowedTextureChanges.lua | 65 ++- .../data-final-fixes.lua | 0 {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/info.json | 7 +- .../prototypes/Base-Override.lua | 508 +++++++++++------- .../prototypes/Override-Functions.lua | 65 ++- 5 files changed, 415 insertions(+), 230 deletions(-) rename {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/AllowedTextureChanges.lua (84%) rename {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/data-final-fixes.lua (100%) rename {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/info.json (62%) rename {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/prototypes/Base-Override.lua (72%) rename {WaiTex_1.0.1 => WaiTex_Full_1.1.0}/prototypes/Override-Functions.lua (82%) diff --git a/WaiTex_1.0.1/AllowedTextureChanges.lua b/WaiTex_Full_1.1.0/AllowedTextureChanges.lua similarity index 84% rename from WaiTex_1.0.1/AllowedTextureChanges.lua rename to WaiTex_Full_1.1.0/AllowedTextureChanges.lua index 54a4cd4..7ceb367 100644 --- a/WaiTex_1.0.1/AllowedTextureChanges.lua +++ b/WaiTex_Full_1.1.0/AllowedTextureChanges.lua @@ -1,8 +1,11 @@ --Allowed textures to change -AvailableGB = 3 +local AvailableGB = 3 +MOD_NAME = "__WaiTex_Full__" +--MOD_NAME = "__WaiTex_2GB__" +--MOD_NAME = "__WaiTex_1GB__" -TexturePermissions = +local TexturePermissions = { ["assembling-machine-1"] = {["enabled"] = true, ["requiredGB"] = 1}, ["assembling-machine-2"] = {["enabled"] = true, ["requiredGB"] = 1}, @@ -23,21 +26,20 @@ TexturePermissions = ["burner-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, ["burner-mining-drill"] = {["enabled"] = true, ["requiredGB"] = 1}, ["car"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB - ["cargo-wagon"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB - ["chemical-plant"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED + ["cargo-wagon"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB --UPDATED + ["chemical-plant"] = {["enabled"] = true, ["requiredGB"] = 1}, ["coal"] = {["enabled"] = true, ["requiredGB"] = 1}, ["coal-particle"] = {["enabled"] = false,["requiredGB"] = 3}, --1GB ["copper-ore-particle"] = {["enabled"] = false,["requiredGB"] = 3}, --1GB - ["combinator"] = {["enabled"] = true, ["requiredGB"] = 1}, ["crude-oil"] = {["enabled"] = true, ["requiredGB"] = 1}, ["defender"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["destroyer"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["destroyer"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED ["distractor"] = {["enabled"] = true, ["requiredGB"] = 1}, ["construction-robot"] = {["enabled"] = true, ["requiredGB"] = 1}, ["copper-ore"] = {["enabled"] = true, ["requiredGB"] = 1}, ["curved-rail"] = {["enabled"] = true, ["requiredGB"] = 1}, ["decorative"] = {["enabled"] = true, ["requiredGB"] = 3}, --1GB - ["diesel-locomotive"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB + ["diesel-locomotive"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB --UPDATED ["electric-furnace"] = {["enabled"] = true, ["requiredGB"] = 1}, ["express-splitter"] = {["enabled"] = true, ["requiredGB"] = 1}, ["express-transport-belt"] = {["enabled"] = true, ["requiredGB"] = 1}, @@ -46,11 +48,22 @@ TexturePermissions = ["explosion-gunshot"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["explosion-hit"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["explosive-rocket"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB - ["fast-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --FIXED + ["fast-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["filter-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW + ["stack-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW + ["stack-filter-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW ["fast-splitter"] = {["enabled"] = true, ["requiredGB"] = 1}, ["fast-transport-belt"] = {["enabled"] = true, ["requiredGB"] = 1}, ["fast-transport-belt-to-ground"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["flame-thrower-explosion"] = {["enabled"] = true, ["requiredGB"] = 3}, + ["filter-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW + ["fire"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["fire-flame"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["fire-smoke"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["firesmoke"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["stream"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["flame-thrower-explosion"] = {["enabled"] = true, ["requiredGB"] = 3}, + ["flamethrower-fire-stream"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["flamethrower-turret"] = {["enabled"] = true, ["requiredGB"] = 2}, --NEW ["gate"] = {["enabled"] = true, ["requiredGB"] = 1}, ["gun-turret"] = {["enabled"] = true, ["requiredGB"] = 1}, ["iron-chest"] = {["enabled"] = true, ["requiredGB"] = 1}, @@ -68,38 +81,44 @@ TexturePermissions = ["medium-electric-pole"] = {["enabled"] = true, ["requiredGB"] = 1}, ["medium-explosion"] = {["enabled"] = true, ["requiredGB"] = 3}, --1GB ["offshore-pump"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["oil-refinery"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED + ["oil-refinery"] = {["enabled"] = true, ["requiredGB"] = 1}, ["pipe"] = {["enabled"] = true, ["requiredGB"] = 1}, ["pipe-covers"] = {["enabled"] = true, ["requiredGB"] = 1}, ["pipe-to-ground"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["power-switch"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW ["pumpjack"] = {["enabled"] = true, ["requiredGB"] = 2}, ["radar"] = {["enabled"] = true, ["requiredGB"] = 1}, ["rail-chain-signal"] = {["enabled"] = true, ["requiredGB"] = 1}, ["remnants"] = {["enabled"] = true, ["requiredGB"] = 3}, - ["player"] = {["enabled"] = true, ["requiredGB"] = 2}, --cropcache.dat --1GB --UPDATED + ["player"] = {["enabled"] = true, ["requiredGB"] = 2}, --cropcache.dat --1GB ["rail-signal"] = {["enabled"] = true, ["requiredGB"] = 1}, ["roboport"] = {["enabled"] = true, ["requiredGB"] = 1}, ["rocket-silo"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["rocket-silo-rocket"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["small-electric-pole"] = {["enabled"] = true, ["requiredGB"] = 1}, ["small-lamp"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["small-pump"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED + ["small-pump"] = {["enabled"] = true, ["requiredGB"] = 1}, ["scorchmark"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["slowdown-sticker"] = {["enabled"] = true, ["requiredGB"] = 3}, ["ship-wreck"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["smart-chest"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["smart-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --FIXED + ["smart-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, ["solar-panel"] = {["enabled"] = true, ["requiredGB"] = 1}, ["sparks"] = {["enabled"] = true, ["requiredGB"] = 3}, --1GB + ["smoke"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["smoke-construction"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["smoke-fast"] = {["enabled"] = true, ["requiredGB"] = 3}, --NEW + ["stack-filter-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW + ["stack-inserter"] = {["enabled"] = true, ["requiredGB"] = 1}, --NEW ["steam-engine"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["steel-chest"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["steel-furnace"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["steel-furnace"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED ["stone"] = {["enabled"] = true, ["requiredGB"] = 1}, ["stone-particle"] = {["enabled"] = true, ["requiredGB"] = 3}, - ["stone-furnace"] = {["enabled"] = true, ["requiredGB"] = 1}, - ["stone-wall"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED - ["storage-tank"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED - ["straight-rail"] = {["enabled"] = true, ["requiredGB"] = 1}, --WIP + ["stone-furnace"] = {["enabled"] = true, ["requiredGB"] = 1}, --UPDATED + ["stone-wall"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["storage-tank"] = {["enabled"] = true, ["requiredGB"] = 1}, + ["straight-rail"] = {["enabled"] = true, ["requiredGB"] = 1}, ["substation"] = {["enabled"] = true, ["requiredGB"] = 1}, ["tank"] = {["enabled"] = true, ["requiredGB"] = 2}, --1GB ["train-stop"] = {["enabled"] = true, ["requiredGB"] = 1}, @@ -146,4 +165,12 @@ TexturePermissions = ["spitter-spawner-corpse"] = {["enabled"] = true, ["requiredGB"] = 3}, --1GB -- Fixed tree bug -} \ No newline at end of file +} + +function AllowChange(name) + if TexturePermissions[name] == nil then + return true + end + local tex = TexturePermissions[name] + return (tex.enabled and (AvailableGB >= tex.requiredGB)) +end \ No newline at end of file diff --git a/WaiTex_1.0.1/data-final-fixes.lua b/WaiTex_Full_1.1.0/data-final-fixes.lua similarity index 100% rename from WaiTex_1.0.1/data-final-fixes.lua rename to WaiTex_Full_1.1.0/data-final-fixes.lua diff --git a/WaiTex_1.0.1/info.json b/WaiTex_Full_1.1.0/info.json similarity index 62% rename from WaiTex_1.0.1/info.json rename to WaiTex_Full_1.1.0/info.json index 948c781..009b91a 100644 --- a/WaiTex_1.0.1/info.json +++ b/WaiTex_Full_1.1.0/info.json @@ -1,9 +1,10 @@ { - "name":"WaiTex", + "name":"WaiTex_Full", "author":"keyboardhack", - "version":"1.0.1", + "version":"1.1.0", "title":"WaiTex", "homepage":"http://www.factorioforums.com/forum/viewtopic.php?f=144&t=13142", "description":"HD textures for all vanilla items", - "dependencies": ["base >= 0.12.11"] + "dependencies": ["base >= 0.13.00"], + "factorio_version": "0.13" } \ No newline at end of file diff --git a/WaiTex_1.0.1/prototypes/Base-Override.lua b/WaiTex_Full_1.1.0/prototypes/Base-Override.lua similarity index 72% rename from WaiTex_1.0.1/prototypes/Base-Override.lua rename to WaiTex_Full_1.1.0/prototypes/Base-Override.lua index 511b004..dbf2b28 100644 --- a/WaiTex_1.0.1/prototypes/Base-Override.lua +++ b/WaiTex_Full_1.1.0/prototypes/Base-Override.lua @@ -24,43 +24,36 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/assembling-machine-3/pipe-west.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-beacon]]-- - ["__base__/graphics/entity/basic-beacon/basic-beacon-base.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/basic-beacon/basic-beacon-antenna.png"] = function(t) OverrideSprite(t[#t]) end, + --[[beacon]]-- + ["__base__/graphics/entity/beacon/beacon-base.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/beacon/beacon-antenna.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-inserter]]-- - ["__base__/graphics/entity/basic-inserter/basic-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/basic-inserter/basic-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/basic-inserter/basic-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/basic-inserter/basic-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[electric-mining-drill]]-- + ["__base__/graphics/entity/electric-mining-drill/north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/electric-mining-drill/east.png"] = function(t) ManualOverrideSprite(t[#t], 256, 200, 2) end, + ["__base__/graphics/entity/electric-mining-drill/south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/electric-mining-drill/west.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-mining-drill]]-- - ["__base__/graphics/entity/basic-mining-drill/north.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/basic-mining-drill/east.png"] = function(t) ManualOverrideSprite(t[#t], 256, 200, 2) end, - ["__base__/graphics/entity/basic-mining-drill/south.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/basic-mining-drill/west.png"] = function(t) OverrideSprite(t[#t]) end, + --[[splitter]]-- + ["__base__/graphics/entity/splitter/splitter-north.png"] = function(t) OverrideAnimation(t[#t], 8) end, + ["__base__/graphics/entity/splitter/splitter-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/splitter/splitter-south.png"] = function(t) OverrideAnimation(t[#t], 8) end, + ["__base__/graphics/entity/splitter/splitter-west.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-splitter]]-- - ["__base__/graphics/entity/basic-splitter/basic-splitter-north.png"] = function(t) OverrideAnimation(t[#t], 8) end, - ["__base__/graphics/entity/basic-splitter/basic-splitter-east.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/basic-splitter/basic-splitter-south.png"] = function(t) OverrideAnimation(t[#t], 8) end, - ["__base__/graphics/entity/basic-splitter/basic-splitter-west.png"] = function(t) OverrideSprite(t[#t]) end, + --[[transport-belt]]-- + ["__base__/graphics/entity/transport-belt/transport-belt.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-transport-belt]]-- - ["__base__/graphics/entity/basic-transport-belt/basic-transport-belt.png"] = function(t) OverrideSprite(t[#t]) end, + --[[underground-belt]]-- + ["__base__/graphics/entity/underground-belt/underground-belt-structure.png"] = function(t) OverrideSprite(t[#t]) end, - --[[basic-transport-belt-to-ground]]-- - ["__base__/graphics/entity/basic-transport-belt-to-ground/basic-transport-belt-to-ground-structure.png"] = function(t) OverrideSprite(t[#t]) end, - - - --[[basic-accumulator]]-- - ["__base__/graphics/entity/basic-accumulator/basic-accumulator.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/basic-accumulator/basic-accumulator-charge-animation.png"] = function(t) + --[[accumulator]]-- + ["__base__/graphics/entity/accumulator/accumulator.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/accumulator/accumulator-charge-animation.png"] = function(t) t[#t].layers = { { @@ -74,7 +67,7 @@ local ChangeTextureConfiguration = result = {} stripe = { - filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator.png", + filename = MOD_NAME.."/graphics/entity/accumulator/accumulator.png", width_in_frames = 1, height_in_frames = 1 } @@ -85,7 +78,7 @@ local ChangeTextureConfiguration = end)() }, { - filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator-charge-sparks.png", + filename = MOD_NAME.."/graphics/entity/accumulator/accumulator-charge-sparks.png", width = 138 * 2, height = 135 *2, line_length = 6, @@ -96,7 +89,7 @@ local ChangeTextureConfiguration = } } end, - ["__base__/graphics/entity/basic-accumulator/basic-accumulator-discharge-animation.png"] = function(t) + ["__base__/graphics/entity/accumulator/accumulator-discharge-animation.png"] = function(t) t[#t].layers = { { @@ -110,7 +103,7 @@ local ChangeTextureConfiguration = result = {} stripe = { - filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator.png", + filename = MOD_NAME.."/graphics/entity/accumulator/accumulator.png", width_in_frames = 1, height_in_frames = 1 } @@ -121,7 +114,7 @@ local ChangeTextureConfiguration = end)() }, { - filename = "__WaiTex__/graphics/entity/basic-accumulator/basic-accumulator-discharge-sparks.png", + filename = MOD_NAME.."/graphics/entity/accumulator/accumulator-discharge-sparks.png", width = 147 * 2, height = 128 * 2, line_length = 6, @@ -204,25 +197,25 @@ local ChangeTextureConfiguration = --[[big-biter]]-- ["__base__/graphics/entity/biter/biter-run-1.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-run-1/biter-run-1-", ".png", 128) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-run-2/biter-run-2-", ".png", 128) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-run-1/biter-run-1-", ".png", 128) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-run-2/biter-run-2-", ".png", 128) local combined = StripMerge({part1, part2}, 16, {8, 8}) AddStripes(t[#t - 2], 1, 1, combined) end end, ["__base__/graphics/entity/biter/biter-run-mask1.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-run-mask1/biter-run-mask1-", ".png", 256)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-run-mask1/biter-run-mask1-", ".png", 256)) end, ["__base__/graphics/entity/biter/biter-run-mask2.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-run-mask2/biter-run-mask2-", ".png", 256)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-run-mask2/biter-run-mask2-", ".png", 256)) end, ["__base__/graphics/entity/biter/biter-attack-1.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-1/biter-attack-1-", ".png", 48) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-2/biter-attack-2-", ".png", 40) - local part3 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-3/biter-attack-3-", ".png", 48) - local part4 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-4/biter-attack-4-", ".png", 40) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-1/biter-attack-1-", ".png", 48) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-2/biter-attack-2-", ".png", 40) + local part3 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-3/biter-attack-3-", ".png", 48) + local part4 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-4/biter-attack-4-", ".png", 40) local combined1 = StripMerge({part1, part2}, 8, {6, 5}) local combined2 = StripMerge({part3, part4}, 8, {6, 5}) local combined = MergeTables({combined1, combined2}) @@ -231,17 +224,17 @@ local ChangeTextureConfiguration = end end, ["__base__/graphics/entity/biter/biter-attack-mask1.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-mask1/biter-attack-mask1-", ".png", 176)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-mask1/biter-attack-mask1-", ".png", 176)) end, ["__base__/graphics/entity/biter/biter-attack-mask2.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-attack-mask2/biter-attack-mask2-", ".png", 176)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-attack-mask2/biter-attack-mask2-", ".png", 176)) end, ["__base__/graphics/entity/biter/biter-die-1.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-1/biter-die-1-", ".png", 72) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-2/biter-die-2-", ".png", 64) - local part3 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-3/biter-die-3-", ".png", 72) - local part4 = CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-4/biter-die-4-", ".png", 64) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-1/biter-die-1-", ".png", 72) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-2/biter-die-2-", ".png", 64) + local part3 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-3/biter-die-3-", ".png", 72) + local part4 = CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-4/biter-die-4-", ".png", 64) local combined1 = StripMerge({part1, part2}, 8, {9, 8}) local combined2 = StripMerge({part3, part4}, 8, {9, 8}) local combined = MergeTables({combined1, combined2}) @@ -250,10 +243,10 @@ local ChangeTextureConfiguration = end end, ["__base__/graphics/entity/biter/biter-die-mask1.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-mask1/biter-die-mask1-", ".png", 272)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-mask1/biter-die-mask1-", ".png", 272)) end, ["__base__/graphics/entity/biter/biter-die-mask2.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/biter/biter-die-mask2/biter-die-mask2-", ".png", 272)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/biter/biter-die-mask2/biter-die-mask2-", ".png", 272)) end, @@ -268,13 +261,6 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/boiler/boiler-t-up.png"] = function(t) OverrideSprite(t[#t]) end, - --[[burner-inserter]]-- - ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/burner-inserter/burner-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, - - --[[burner-mining-drill]]-- ["__base__/graphics/entity/burner-mining-drill/north.png"] = function(t) OverrideSprite(t[#t]) end, ["__base__/graphics/entity/burner-mining-drill/east.png"] = function(t) OverrideSprite(t[#t]) end, @@ -291,34 +277,29 @@ local ChangeTextureConfiguration = ChangeAnimation(t[#t - 2].stripes[3], 4, 10) end end, - --["__base__/graphics/entity/car/car-1.png"] = function(t) - -- if #t > 2 then - -- print("sdfsfdsf") - -- TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/car/car-&/car-&-") - -- end - --end, - --["__base__/graphics/entity/car/car-mask-1.png"] = function(t) - -- if #t > 2 then - -- TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/car/car-mask-&/car-mask-&-") - -- t[#t] = nil - -- t[#t] = nil - -- --serpent.block(t[#t - 2]) - -- --t[#t - 2] = nil - -- --t[#t - 3] = nil - -- end - --end, ["__base__/graphics/entity/car/car-turret.png"] = function(t) OverrideSprite(t[#t]) end, --[[cargo-wagon]]-- - ["__base__/graphics/entity/cargo-wagon/cargo-wagon-spritesheet-1.png"] = function(t) - if #t > 1 and t[#t - 1].filenames ~= nil then - ScaleSprite(t[#t - 1]) - t[#t - 1].line_length = 2 - t[#t - 1].lines_per_file = 4 - t[#t - 1].filenames = CreateFilePaths("__WaiTex__/graphics/entity/cargo-wagon/cargo-wagon-spritesheet-", ".png", 16) - end + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-1.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/cargo-wagon/cargo-wagon/cargo-wagon-&/cargo-wagon-&-", ".png") + end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-mask-1.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/cargo-wagon/cargo-wagon-mask/cargo-wagon-mask-&/cargo-wagon-mask-&-", ".png") end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-shadow-1.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/cargo-wagon/cargo-wagon-shadow/cargo-wagon-shadow-&/cargo-wagon-shadow-&-", ".png") + end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-end.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-side.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-side-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-top.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-horizontal-top-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-end.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-side.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-side-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-top.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/cargo-wagon/cargo-wagon-door-vertical-top-mask.png"] = function(t) OverrideSprite(t[#t]) end, --[[chemical-plant]]-- @@ -344,11 +325,22 @@ local ChangeTextureConfiguration = --[[combinator]]-- - ["__base__/graphics/entity/combinator/aritmetic.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/combinator/aritmetic-led.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/combinator/decider.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/combinator/decider-led.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/combinator/constanter.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-entities.png"] = function(t) OverrideSprite(t[#t]) end, + --[[arithmetic lights]]-- + ["__base__/graphics/entity/combinator/combinator-led-arithmetic-north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-arithmetic-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-arithmetic-south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-arithmetic-west.png"] = function(t) OverrideSprite(t[#t]) end, + --[[constant lights]]-- + ["__base__/graphics/entity/combinator/combinator-led-constant-north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-constant-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-constant-south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-constant-west.png"] = function(t) OverrideSprite(t[#t]) end, + --[[decider lights]]-- + ["__base__/graphics/entity/combinator/combinator-led-decider-north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-decider-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-decider-south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/combinator/combinator-led-decider-west.png"] = function(t) OverrideSprite(t[#t]) end, --[[crude-oil]]-- @@ -361,10 +353,11 @@ local ChangeTextureConfiguration = --[[destroyer]]-- ["__base__/graphics/entity/destroyer-robot/destroyer-robot.png"] = function(t) - AddStripes(t[#t], 16, 2, CreateFilePaths("__WaiTex__/graphics/entity/destroyer-robot/destroyer-robot-", ".png", 2)) + AddStripes(t[#t], 16, 2, CreateFilePaths(MOD_NAME.."/graphics/entity/destroyer-robot/destroyer-robot-", ".png", 2)) t[#t].line_length = 16 t[#t].y = nil end, + ["__base__/graphics/entity/destroyer-robot/destroyer-robot-mask.png"] = function(t) OverrideSprite(t[#t]) end, --[[distractor]]-- @@ -422,14 +415,17 @@ local ChangeTextureConfiguration = --[[diesel-locomotive]]-- ["__base__/graphics/entity/diesel-locomotive/diesel-locomotive-01.png"] = function(t) - if #t > 1 and t[#t - 1].filenames ~= nil then - ScaleSprite(t[#t - 1]) - t[#t - 1].line_length = 2 - t[#t - 1].lines_per_file = 4 - t[#t - 1].filenames = CreateFilePaths("__WaiTex__/graphics/entity/diesel-locomotive/diesel-locomotive-", ".png", 32) - end + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/diesel-locomotive/diesel-locomotive/diesel-locomotive-0&/diesel-locomotive-0&-", ".png") + end, + ["__base__/graphics/entity/diesel-locomotive/diesel-locomotive-mask-01.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/diesel-locomotive/diesel-locomotive-mask/diesel-locomotive-mask-0&/diesel-locomotive-mask-0&-", ".png") + end, + ["__base__/graphics/entity/diesel-locomotive/diesel-locomotive-shadow-01.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/diesel-locomotive/diesel-locomotive-shadow/diesel-locomotive-shadow-0&/diesel-locomotive-shadow-0&-", ".png") + end, + ["__base__/graphics/entity/diesel-locomotive/train-wheels-01.png"] = function(t) + TextureToSpritesConverter(t[#t - 1], MOD_NAME.."/graphics/entity/diesel-locomotive/train-wheels/train-wheels-0&/train-wheels-0&-", ".png") end, - --[[electric-furnace]]-- ["__base__/graphics/entity/electric-furnace/electric-furnace-base.png"] = function(t) OverrideSprite(t[#t]) end, @@ -449,8 +445,8 @@ local ChangeTextureConfiguration = local y = t[#t].y or 0 AddStripes(t[#t], 16, 1, { - "__WaiTex__/graphics/entity/express-transport-belt/express-transport-belt.png", - "__WaiTex__/graphics/entity/express-transport-belt/express-transport-belt.png" + MOD_NAME.."/graphics/entity/express-transport-belt/express-transport-belt.png", + MOD_NAME.."/graphics/entity/express-transport-belt/express-transport-belt.png" }) t[#t].stripes[1].y = y * 2 t[#t].stripes[2].y = (y * 2) + t[#t].height @@ -493,13 +489,6 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/flame-thrower-explosion/flame-thrower-explosion.png"] = function(t) OverrideSprite(t[#t]) end, - --[[fast-inserter]]-- - ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/fast-inserter/fast-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, - - --[[fast-splitter]]-- ["__base__/graphics/entity/fast-splitter/fast-splitter-north.png"] = function(t) OverrideAnimation(t[#t], 8) end, ["__base__/graphics/entity/fast-splitter/fast-splitter-east.png"] = function(t) OverrideSprite(t[#t]) end, @@ -513,8 +502,8 @@ local ChangeTextureConfiguration = local y = t[#t].y or 0 AddStripes(t[#t], 16, 1, { - "__WaiTex__/graphics/entity/fast-transport-belt/fast-transport-belt.png", - "__WaiTex__/graphics/entity/fast-transport-belt/fast-transport-belt.png" + MOD_NAME.."/graphics/entity/fast-transport-belt/fast-transport-belt.png", + MOD_NAME.."/graphics/entity/fast-transport-belt/fast-transport-belt.png" }) t[#t].stripes[1].y = y * 2 t[#t].stripes[2].y = (y * 2) + t[#t].height @@ -525,6 +514,73 @@ local ChangeTextureConfiguration = end end, + + --[[fire-flame]]-- + ["__base__/graphics/entity/fire-flame/fire-flame-1.png"] = function(t) OverrideSprite(t[#t]) print("stuff") end, + ["__base__/graphics/entity/fire-flame/fire-flame-2.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-3.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-4.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-5.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-6.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-7.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-8.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-9.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-10.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-11.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-12.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-flame-13.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-01-a.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-01-b.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-01-c.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-03-a.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-03-b.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/tree-fire-flame-03-c.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/burnt-patch.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-smoke-source-1.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/fire-flame/fire-smoke-source-2.png"] = function(t) OverrideSprite(t[#t]) end, + + + --[[fire-smoke]]-- + ["__base__/graphics/entity/fire-smoke/fire-smoke.png"] = function(t) + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/fire-smoke/fire-smoke/fire-smoke-") + end, + ["__base__/graphics/entity/fire-smoke/fire-smoke-glow.png"] = function(t) + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/fire-smoke/fire-smoke-glow/fire-smoke-glow-") + end, + + + --[[flamethrower-fire-stream]]-- + ["__base__/graphics/entity/flamethrower-fire-stream/flamethrower-fire-stream-spine.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-fire-stream/flamethrower-explosion.png"] = function(t) OverrideSprite(t[#t]) end, + + + --[[flamethrower-turret]]-- + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-east-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-east-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-north-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-north-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-south-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-south-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-west.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-west-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-base-west-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-active.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-extension.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-extension-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-extension-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-mask.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-gun-shadow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-led-indicator-east.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-led-indicator-north.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-led-indicator-south.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-led-indicator-west.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/flamethrower-turret/flamethrower-turret-muzzle-fire.png"] = function(t) OverrideSprite(t[#t]) end, + + --[[fast-transport-belt-to-ground]]-- ["__base__/graphics/entity/fast-transport-belt-to-ground/fast-transport-belt-to-ground-structure.png"] = function(t) OverrideSprite(t[#t]) end, ["__base__/graphics/entity/fast-transport-belt-to-ground/fast-transport-belt-to-ground-structure.png"] = function(t) OverrideSprite(t[#t]) end, @@ -568,14 +624,47 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/gun-turret/gun-turret-base.png"] = function(t) OverrideSprite(t[#t]) end, ["__base__/graphics/entity/gun-turret/gun-turret-gun-1.png"] = function(t) if #t > 2 then - AddStripes(t[#t - 2], t[#t - 2].frame_count, 16, CreateFilePaths("__WaiTex__/graphics/entity/gun-turret/gun-turret-gun-", ".png", 4)) + AddStripes(t[#t - 2], t[#t - 2].frame_count, 16, CreateFilePaths(MOD_NAME.."/graphics/entity/gun-turret/gun-turret-gun-", ".png", 4)) end end, ["__base__/graphics/entity/gun-turret/gun-turret-gun-mask.png"] = function(t) - AddStripes(t[#t], t[#t].frame_count, 32, CreateFilePaths("__WaiTex__/graphics/entity/gun-turret/gun-turret-gun-mask-", ".png", 2)) + AddStripes(t[#t], t[#t].frame_count, 32, CreateFilePaths(MOD_NAME.."/graphics/entity/gun-turret/gun-turret-gun-mask-", ".png", 2)) end, + --[[inserters]]-- + --[[inserter]]-- + ["__base__/graphics/entity/inserter/inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/inserter/inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/inserter/inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/inserter/inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[burner-inserter]]-- + ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/burner-inserter/burner-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/burner-inserter/burner-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[fast-inserter]]-- + ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/fast-inserter/fast-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/fast-inserter/fast-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[filter-inserter]]-- + ["__base__/graphics/entity/filter-inserter/filter-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/filter-inserter/filter-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/filter-inserter/filter-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/filter-inserter/filter-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[stack-inserter]]-- + ["__base__/graphics/entity/stack-inserter/stack-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-inserter/stack-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-inserter/stack-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-inserter/stack-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + --[[stack-filter-inserter]]-- + ["__base__/graphics/entity/stack-filter-inserter/stack-filter-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-filter-inserter/stack-filter-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-filter-inserter/stack-filter-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, + ["__base__/graphics/entity/stack-filter-inserter/stack-filter-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, + + --[[iron-chest]]-- ["__base__/graphics/entity/iron-chest/iron-chest.png"] = function(t) OverrideSprite(t[#t]) end, @@ -704,6 +793,13 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/pipe-to-ground/pipe-to-ground-right.png"] = function(t) OverrideSprite(t[#t]) end, + --[[power-switch]]-- + ["__base__/graphics/entity/power-switch/power-switch.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/power-switch/power-switch-electricity-start.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/power-switch/power-switch-electricity-loop.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/power-switch/power-switch-led.png"] = function(t) OverrideSprite(t[#t]) end, + + --[[pumpjack]]-- ["__base__/graphics/entity/pumpjack/pumpjack-base.png"] = function(t) OverrideSprite(t[#t]) end, ["__base__/graphics/entity/pumpjack/pumpjack-animation.png"] = function(t) @@ -719,7 +815,7 @@ local ChangeTextureConfiguration = t[#t].lines_per_file = 1 t[#t].line_length = 4 t[#t].filename = nil - t[#t].filenames = CreateFilePaths("__WaiTex__/graphics/entity/radar/radar", ".png", 16) + t[#t].filenames = CreateFilePaths(MOD_NAME.."/graphics/entity/radar/radar", ".png", 16) end, @@ -739,114 +835,114 @@ local ChangeTextureConfiguration = --[[player]]-- ["__base__/graphics/entity/player/player-basic-idle.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-idle/player-basic-idle-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-idle/player-basic-idle-", ".png") end, ["__base__/graphics/entity/player/player-basic-idle-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-idle-color/player-basic-idle-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-idle-color/player-basic-idle-color-", ".png") end, ["__base__/graphics/entity/player/player-basic-idle-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-idle-gun/player-basic-idle-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-idle-gun/player-basic-idle-gun-", ".png") end, ["__base__/graphics/entity/player/player-basic-idle-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-idle-gun-color/player-basic-idle-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-idle-gun-color/player-basic-idle-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-basic-mine.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-mine/player-basic-mine-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-mine/player-basic-mine-", ".png") end, ["__base__/graphics/entity/player/player-basic-mine-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-mine-color/player-basic-mine-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-mine-color/player-basic-mine-color-", ".png") end, ["__base__/graphics/entity/player/player-basic-mine-tool.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-mine-tool/player-basic-mine-tool-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-mine-tool/player-basic-mine-tool-", ".png") end, ["__base__/graphics/entity/player/player-basic-mine-tool-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-mine-tool-color/player-basic-mine-tool-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-mine-tool-color/player-basic-mine-tool-color-", ".png") end, ["__base__/graphics/entity/player/player-basic-run-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-run-gun/player-basic-run-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-run-gun/player-basic-run-gun-", ".png") end, ["__base__/graphics/entity/player/player-basic-run-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-run-gun-color/player-basic-run-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-run-gun-color/player-basic-run-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-basic-run.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-run/player-basic-run-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-run/player-basic-run-", ".png") end, ["__base__/graphics/entity/player/player-basic-run-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-basic-run-color/player-basic-run-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-basic-run-color/player-basic-run-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-idle.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-idle/player-armor1-idle-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-idle/player-armor1-idle-", ".png") end, ["__base__/graphics/entity/player/player-armor1-idle-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-idle-color/player-armor1-idle-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-idle-color/player-armor1-idle-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-idle-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-idle-gun/player-armor1-idle-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-idle-gun/player-armor1-idle-gun-", ".png") end, ["__base__/graphics/entity/player/player-armor1-idle-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-idle-gun-color/player-armor1-idle-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-idle-gun-color/player-armor1-idle-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-mine.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-mine/player-armor1-mine-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-mine/player-armor1-mine-", ".png") end, ["__base__/graphics/entity/player/player-armor1-mine-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-mine-color/player-armor1-mine-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-mine-color/player-armor1-mine-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-mine-tool.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-mine-tool/player-armor1-mine-tool-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-mine-tool/player-armor1-mine-tool-", ".png") end, ["__base__/graphics/entity/player/player-armor1-mine-tool-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-mine-tool-color/player-armor1-mine-tool-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-mine-tool-color/player-armor1-mine-tool-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-run-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-run-gun/player-armor1-run-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-run-gun/player-armor1-run-gun-", ".png") end, ["__base__/graphics/entity/player/player-armor1-run-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-run-gun-color/player-armor1-run-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-run-gun-color/player-armor1-run-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-armor1-run.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-run/player-armor1-run-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-run/player-armor1-run-", ".png") end, ["__base__/graphics/entity/player/player-armor1-run-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor1-run-color/player-armor1-run-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor1-run-color/player-armor1-run-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-idle.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-idle/player-armor2-idle-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-idle/player-armor2-idle-", ".png") end, ["__base__/graphics/entity/player/player-armor2-idle-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-idle-color/player-armor2-idle-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-idle-color/player-armor2-idle-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-idle-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-idle-gun/player-armor2-idle-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-idle-gun/player-armor2-idle-gun-", ".png") end, ["__base__/graphics/entity/player/player-armor2-idle-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-idle-gun-color/player-armor2-idle-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-idle-gun-color/player-armor2-idle-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-mine.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-mine/player-armor2-mine-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-mine/player-armor2-mine-", ".png") end, ["__base__/graphics/entity/player/player-armor2-mine-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-mine-color/player-armor2-mine-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-mine-color/player-armor2-mine-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-mine-tool.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-mine-tool/player-armor2-mine-tool-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-mine-tool/player-armor2-mine-tool-", ".png") end, ["__base__/graphics/entity/player/player-armor2-mine-tool-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-mine-tool-color/player-armor2-mine-tool-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-mine-tool-color/player-armor2-mine-tool-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-run-gun.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-run-gun/player-armor2-run-gun-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-run-gun/player-armor2-run-gun-", ".png") end, ["__base__/graphics/entity/player/player-armor2-run-gun-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-run-gun-color/player-armor2-run-gun-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-run-gun-color/player-armor2-run-gun-color-", ".png") end, ["__base__/graphics/entity/player/player-armor2-run.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-run/player-armor2-run-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-run/player-armor2-run-", ".png") end, ["__base__/graphics/entity/player/player-armor2-run-color.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/player/player-armor2-run-color/player-armor2-run-color-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/player/player-armor2-run-color/player-armor2-run-color-", ".png") end, @@ -931,13 +1027,6 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/ship-wreck/small-ship-wreck-grass-3.png"] = function(t) OverrideSprite(t[#t]) end, - --[[smart-inserter]]-- - ["__base__/graphics/entity/smart-inserter/smart-inserter-hand-base.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/smart-inserter/smart-inserter-hand-closed.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/smart-inserter/smart-inserter-hand-open.png"] = function(t) OverrideSprite(t[#t], 1) end, - ["__base__/graphics/entity/smart-inserter/smart-inserter-platform.png"] = function(t) OverrideSprite(t[#t]) end, - - --[[solar-panel]]-- ["__base__/graphics/entity/solar-panel/solar-panel.png"] = function(t) OverrideSprite(t[#t]) end, @@ -951,21 +1040,35 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/sparks/sparks-06.png"] = function(t) OverrideSprite(t[#t]) end, + --[[smoke]]-- + ["__base__/graphics/entity/smoke-construction/smoke-01.png"] = function(t) + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/smoke/smoke/smoke-") + end, + + + --[[smoke-construction]]-- + ["__base__/graphics/entity/smoke-construction/smoke-01.png"] = function(t) OverrideSprite(t[#t]) end, + + + --[[smoke-fast]]-- + ["__base__/graphics/entity/smoke-fast/smoke-fast.png"] = function(t) OverrideSprite(t[#t]) end, + + --[[biter-spawner and spitter-spawner]]-- ["__base__/graphics/entity/spawner/spawner-idle.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/spawner/spawner-idle/spawner-idle-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/spawner/spawner-idle/spawner-idle-", ".png") end, ["__base__/graphics/entity/spawner/spawner-idle-mask.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/spawner/spawner-idle-mask/spawner-idle-mask-", ".png") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/spawner/spawner-idle-mask/spawner-idle-mask-", ".png") end, ["__base__/graphics/entity/spawner/spawner-die-01.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spawner/spawner-die-0&/spawner-die-0&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spawner/spawner-die-0&/spawner-die-0&-") end end, ["__base__/graphics/entity/spawner/spawner-die-mask-01.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spawner/spawner-die-mask-0&/spawner-die-mask-0&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spawner/spawner-die-mask-0&/spawner-die-mask-0&-") end end, @@ -979,30 +1082,30 @@ local ChangeTextureConfiguration = --[[spitter]]-- ["__base__/graphics/entity/spitter/spitter-attack-1.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spitter/spitter-attack-&/spitter-attack-&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spitter/spitter-attack-&/spitter-attack-&-") end end, ["__base__/graphics/entity/spitter/spitter-attack-mask-1.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spitter/spitter-attack-mask-&/spitter-attack-mask-&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spitter/spitter-attack-mask-&/spitter-attack-mask-&-") end end, ["__base__/graphics/entity/spitter/spitter-run-1.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spitter/spitter-run-&/spitter-run-&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spitter/spitter-run-&/spitter-run-&-") end end, ["__base__/graphics/entity/spitter/spitter-run-mask.png"] = function(t) - TextureToSpritesConverter(t[#t], "__WaiTex__/graphics/entity/spitter/spitter-run-mask/spitter-run-mask-") + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/spitter/spitter-run-mask/spitter-run-mask-") end, ["__base__/graphics/entity/spitter/spitter-die-1.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spitter/spitter-die-&/spitter-die-&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spitter/spitter-die-&/spitter-die-&-") end end, ["__base__/graphics/entity/spitter/spitter-die-mask-1.png"] = function(t) if #t > 2 then - TextureToSpritesConverter(t[#t - 2], "__WaiTex__/graphics/entity/spitter/spitter-die-mask-&/spitter-die-mask-&-") + TextureToSpritesConverter(t[#t - 2], MOD_NAME.."/graphics/entity/spitter/spitter-die-mask-&/spitter-die-mask-&-") end end, @@ -1015,11 +1118,11 @@ local ChangeTextureConfiguration = --[[steam-engine]]-- ["__base__/graphics/entity/steam-engine/steam-engine-horizontal.png"] = function(t) - AddStripes(t[#t], 4, 2, CreateFilePaths("__WaiTex__/graphics/entity/steam-engine/steam-engine-horizontal-", ".png", 4)) + AddStripes(t[#t], 4, 2, CreateFilePaths(MOD_NAME.."/graphics/entity/steam-engine/steam-engine-horizontal-", ".png", 4)) t[#t].line_length = nil end, ["__base__/graphics/entity/steam-engine/steam-engine-vertical.png"] = function(t) - AddStripes(t[#t], 4, 4, CreateFilePaths("__WaiTex__/graphics/entity/steam-engine/steam-engine-vertical-", ".png", 2)) + AddStripes(t[#t], 4, 4, CreateFilePaths(MOD_NAME.."/graphics/entity/steam-engine/steam-engine-vertical-", ".png", 2)) t[#t].line_length = nil end, @@ -1029,8 +1132,11 @@ local ChangeTextureConfiguration = --[[steel-furnace]]-- - ["__base__/graphics/entity/steel-furnace/steel-furnace-working.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/steel-furnace/steel-furnace-idle.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/steel-furnace/steel-furnace.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/steel-furnace/steel-furnace-fire.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/steel-furnace/steel-furnace-glow.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/steel-furnace/steel-furnace-working-lighting.png"] = function(t) OverrideSprite(t[#t]) end, + --["__base__/graphics/entity/steel-furnace/steel-furnace-idle.png"] = function(t) OverrideSprite(t[#t]) end, --["__base__/graphics/entity/steel-furnace/steel-furnace-fire.png"] = function(t) OverrideSprite(t[#t], 1.96) end, @@ -1123,10 +1229,29 @@ local ChangeTextureConfiguration = --[[train-stop]]-- - ["__base__/graphics/entity/train-stop/train-stop-north.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/train-stop/train-stop-east.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/train-stop/train-stop-south.png"] = function(t) OverrideSprite(t[#t]) end, - ["__base__/graphics/entity/train-stop/train-stop-west.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-bottom.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-ground.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-shadow.png"] = function(t) + TextureToSpritesConverter(t[#t], MOD_NAME.."/graphics/entity/train-stop/train-stop-shadow/train-stop-shadow-") + end, + ["__base__/graphics/entity/train-stop/train-stop-top.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-top-mask.png"] = function(t) OverrideSprite(t[#t]) end, + --[[train-stop lights north]]-- + ["__base__/graphics/entity/train-stop/train-stop-north-light-1.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-north-light-2.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-north-light-2-glow.png"] = function(t) OverrideSprite(t[#t]) end, + --[[train-stop lights south]]-- + ["__base__/graphics/entity/train-stop/train-stop-south-light-1.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-south-light-2.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-south-light-2-glow.png"] = function(t) OverrideSprite(t[#t]) end, + --[[train-stop lights east]]-- + ["__base__/graphics/entity/train-stop/train-stop-east-light-1.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-east-light-2.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-east-light-2-glow.png"] = function(t) OverrideSprite(t[#t]) end, + --[[train-stop lights west]]-- + ["__base__/graphics/entity/train-stop/train-stop-west-light-1.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-west-light-2.png"] = function(t) OverrideSprite(t[#t]) end, + ["__base__/graphics/entity/train-stop/train-stop-west-light-2-glow.png"] = function(t) OverrideSprite(t[#t]) end, --[[water-splash]]-- @@ -1142,26 +1267,26 @@ local ChangeTextureConfiguration = ["__base__/graphics/entity/worm/worm-folded-mask.png"] = function(t) OverrideSprite(t[#t]) end, ["__base__/graphics/entity/worm/worm-preparing-01.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-preparing-01/worm-preparing-01-", ".png", 14) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-preparing-02/worm-preparing-02-", ".png", 12) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-preparing-01/worm-preparing-01-", ".png", 14) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-preparing-02/worm-preparing-02-", ".png", 12) local combined = MergeTables({part1, part2}) AddStripes(t[#t - 2], 1, 1, combined) end end, ["__base__/graphics/entity/worm/worm-preparing-mask.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-preparing-mask/worm-preparing-mask-", ".png", 26)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-preparing-mask/worm-preparing-mask-", ".png", 26)) end, ["__base__/graphics/entity/worm/worm-prepared.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-prepared/worm-prepared-", ".png", 10)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-prepared/worm-prepared-", ".png", 10)) end, ["__base__/graphics/entity/worm/worm-prepared-mask.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-prepared-mask/worm-prepared-mask-", ".png", 10)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-prepared-mask/worm-prepared-mask-", ".png", 10)) end, ["__base__/graphics/entity/worm/worm-attack-01.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-attack-01/worm-attack-01-", ".png", 64) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-attack-02/worm-attack-02-", ".png", 64) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-attack-01/worm-attack-01-", ".png", 64) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-attack-02/worm-attack-02-", ".png", 64) local combined = MergeTables({part1, part2}) AddStripes(t[#t - 2], 1, 1, combined) @@ -1169,18 +1294,31 @@ local ChangeTextureConfiguration = end, ["__base__/graphics/entity/worm/worm-attack-mask-01.png"] = function(t) if #t > 2 then - local part1 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-attack-mask-01/worm-attack-mask-01-", ".png", 64) - local part2 = CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-attack-mask-02/worm-attack-mask-02-", ".png", 64) + local part1 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-attack-mask-01/worm-attack-mask-01-", ".png", 64) + local part2 = CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-attack-mask-02/worm-attack-mask-02-", ".png", 64) local combined = MergeTables({part1, part2}) AddStripes(t[#t - 2], 1, 1, combined) end end, ["__base__/graphics/entity/worm/worm-die.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-die/worm-die-", ".png", 24)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-die/worm-die-", ".png", 24)) end, ["__base__/graphics/entity/worm/worm-die-mask.png"] = function(t) - AddStripes(t[#t], 1, 1, CreateFilePaths("__WaiTex__/graphics/entity/worm/worm-die-mask/worm-die-mask-", ".png", 24)) + AddStripes(t[#t], 1, 1, CreateFilePaths(MOD_NAME.."/graphics/entity/worm/worm-die-mask/worm-die-mask-", ".png", 24)) + end, + + ["__core__/graphics/cursor-boxes.png"] = function(t) + ManualOverrideSprite(t, 128, 128, 4, MOD_NAME.."/graphics/style/cursor-boxes.png") + --print(t.filename) + --print(serpent.block(t)) + --print("changed gui") + end, + + ["__core__/graphics/cursor-boxes-32x32.png"] = function(t) + ManualOverrideSprite(t, 128, 128, 4, MOD_NAME.."/graphics/style/cursor-boxes-32x32.png") + --print(serpent.block(t)) + --print("changed gui") end, } @@ -1238,38 +1376,38 @@ for k, v in pairs(data.raw.tile) do for k1, v1 in pairs(v.variants.main) do if v1.picture then print(v1.picture) - v1.picture = string.gsub(v1.picture, "__base__", "__WaiTex__") + v1.picture = string.gsub(v1.picture, "__base__", MOD_NAME) end end end if v.inner_corner then if v.inner_corner.picture then print(v.inner_corner.picture) - v.inner_corner.picture = string.gsub(v.inner_corner.picture, "__base__", "__WaiTex__") + v.inner_corner.picture = string.gsub(v.inner_corner.picture, "__base__", MOD_NAME) end end if v.outer_corner then if v.outer_corner.picture then print(v.outer_corner.picture) - v.outer_corner.picture = string.gsub(v.outer_corner.picture, "__base__", "__WaiTex__") + v.outer_corner.picture = string.gsub(v.outer_corner.picture, "__base__", MOD_NAME) end end if v.side then if v.side.picture then print(v.side.picture) - v.side.picture = string.gsub(v.side.picture, "__base__", "__WaiTex__") + v.side.picture = string.gsub(v.side.picture, "__base__", MOD_NAME) end end if v.u_transition then if v.u_transition.picture then print(v.u_transition.picture) - v.u_transition.picture = string.gsub(v.u_transition.picture, "__base__", "__WaiTex__") + v.u_transition.picture = string.gsub(v.u_transition.picture, "__base__", MOD_NAME) end end if v.o_transition then if v.o_transition.picture then print(v.o_transition.picture) - v.o_transition.picture = string.gsub(v.o_transition.picture, "__base__", "__WaiTex__") + v.o_transition.picture = string.gsub(v.o_transition.picture, "__base__", MOD_NAME) end end end @@ -1281,7 +1419,7 @@ end for k, v in pairs(data.raw.technology) do if IsBase(v.icon) then print(v.icon) - v.icon = string.gsub(v.icon, "__base__", "__WaiTex__") + v.icon = string.gsub(v.icon, "__base__", MOD_NAME) end end ]]-- @@ -1296,7 +1434,7 @@ if AllowChange("tree") then if IsBase(filename) then OverrideSprite(treeVariations.leaves) filename = string.gsub(filename, ".png", "") -- not good to have it here... oh well - filename = string.gsub(filename, "__base__", "__WaiTex__") + filename = string.gsub(filename, "__base__", MOD_NAME) AddStripes(treeVariations.trunk, nil, nil, { diff --git a/WaiTex_1.0.1/prototypes/Override-Functions.lua b/WaiTex_Full_1.1.0/prototypes/Override-Functions.lua similarity index 82% rename from WaiTex_1.0.1/prototypes/Override-Functions.lua rename to WaiTex_Full_1.1.0/prototypes/Override-Functions.lua index 542d87b..616698b 100644 --- a/WaiTex_1.0.1/prototypes/Override-Functions.lua +++ b/WaiTex_Full_1.1.0/prototypes/Override-Functions.lua @@ -17,16 +17,16 @@ function OverrideAllSprites(t, modifier) end end -function ManualOverrideSprite(t, width, height, modifier) - ChangeFileName(t) +function ManualOverrideSprite(t, width, height, modifier, filename) + ChangeFileName(t, filename) + ScaleSprite(t, modifier) t.width = width t.height = height - t.scale = 1 / modifier end function ChangeFileName(t, filename) if filename == nil then - t.filename = string.gsub(t.filename, "__base__", "__WaiTex__") + t.filename = string.gsub(t.filename, "__base__", MOD_NAME) else t.filename = filename end @@ -34,8 +34,12 @@ end function ScaleSprite(t, modifier) modifier = modifier or 2 - t.width = math.floor(t.width * modifier) - t.height = math.floor(t.height * modifier) + if t.width ~= nil then + t.width = math.floor(t.width * modifier) + end + if t.height ~= nil then + t.height = math.floor(t.height * modifier) + end t.scale = (t.scale or 1) / modifier if t.y ~= nil then @@ -60,18 +64,8 @@ function ChangeAnimationSize(t, width_in_frames, height_in_frames) end end - - -function AllowChange(name) - if TexturePermissions[name] == nil then - return true - end - local tex = TexturePermissions[name] - return (tex.enabled and (AvailableGB >= tex.requiredGB)) -end - function IsBase(filepath) - return string.find(filepath, "__base__") + return string.find(filepath, "__base__") or string.find(filepath, "__core__") end function AddStripes(t, width, height, filenames, yValue) @@ -168,14 +162,38 @@ function ChangeSettings(t, settingsChanges) end function ChangeIcon(t) - t.icon = string.gsub(t.icon, "__base__", "__WaiTex__") + t.icon = string.gsub(t.icon, "__base__", MOD_NAME) end --i should really document how to function works as i --will probably use it a lot in the future, but i am --am too lazy to do it and the code is totally self explanatory! function TextureToSpritesConverter(t, pathTemplate) - if t.stripes ~= nil and t.frame_count ~= nil and t.direction_count ~= nil then + if t.filenames ~= nil and t.line_length ~= nil and t.lines_per_file ~= nil and t.direction_count ~= nil then + local paths = {} + local spritesLeft = t.direction_count + for i = 1, #t.filenames do + local filesPath = string.gsub(pathTemplate, "&", tostring(i)) + local spritesInFile = math.min(t.line_length * t.lines_per_file, spritesLeft) + paths[#paths + 1] = CreateFilePaths(filesPath, ".png", spritesInFile) + spritesLeft = spritesLeft - spritesInFile + end + local allPaths = {} + local index = 1 + for i = 1, #paths do + for x = 1, #paths[i] do + allPaths[index] = paths[i][x] + --print(paths[i][x]) + index = index + 1 + end + end + + ScaleSprite(t) + + t.filenames = allPaths + t.line_length = 1 + t.lines_per_file = 1 + elseif t.stripes ~= nil and t.frame_count ~= nil and t.direction_count ~= nil then if PatternMatchColumnAdditions(t) then local numberOfStripMerges = GetStripeMerges(t) local stripeSpritePaths = GetStripeSpritePaths(t, pathTemplate) @@ -218,7 +236,8 @@ function TextureToSpritesConverter(t, pathTemplate) local width = (t.line_length or t.frame_count) local height = (t.direction_count or 1) * (t.frame_count / (t.line_length or t.frame_count)) local startSpriteNumber = width * (((t.y or 0) / t.height)) + 1 - local numberOfSprites = width * height + local numberOfSprites = t.frame_count * (t.direction_count or 1) + AddStripes(t, 1, 1, CreateFilePaths(pathTemplate, ".png", numberOfSprites, startSpriteNumber)) else print("couldn't convert stripe texture to sprites") @@ -229,17 +248,17 @@ function PatternMatchColumnAdditions(t) local frameHeight = t.stripes[1].height_in_frames for i = 2, #t.stripes do if frameHeight ~= t.stripes[i].height_in_frames then - print("false") + --print("false") return false end end - print("true") + --print("true") return true end function GetStripeMerges(t) local sum = 0 - for i = 1,#t.stripes do + for i = 1, #t.stripes do sum = sum + (t.line_length or t.stripes[i].width_in_frames) if sum == t.frame_count then return #t.stripes / i