memcallen Posted June 7, 2016 Share Posted June 7, 2016 I'm trying to add a custom prefab, currently based off of the lightning rod, but whenever I try and load the game with it in my prefab object, the game freezes. Not sure which code to provide, so here's my main file, also, the prefab is under scripts/prefab Spoiler local require = GLOBAL.require --require("ModUtil") local LocAssets = { RECIPE = "recipetab", } local function register(name) return Asset("ATLAS","images/" .. name .. ".xml"), Asset("IMAGE","images/" .. name .. ".tex"); end Assets = { Asset("ATLAS","images/recipetab.xml"), Asset("IMAGE","images/recipetab.tex"), } PrefabFiles = { "LightningrodCrucible", } local RECIPETABS = GLOBAL.RECIPETABS RECIPETABS['ELECTRICALS'] = {str = "ELECTRICALS", sort=9, icon = LocAssets.RECIPE..".tex", icon_atlas = "images/"..LocAssets.RECIPE..".xml"} local configStrings = {"geneff", "transmult", "stormult"} --the config names in modinfo local config = {} for k, v in pairs(configStrings) do config[v] = GetModConfigData(v) end GLOBAL.electrical = {} GLOBAL.electrical.config = config print("boozippidy boo bop " .. GLOBAL.mem_electrical.config.geneff) local recipes = { Thulecite = {ing={Ingredient("goldnugget",1)}, tab=RECIPETABS.ELECTRICALS}, LightningrodCrucible = {ing={Ingredient("goldnugget",1)}, tab=RECIPETABS.ELECTRICALS} } for k,v in pairs(recipes) do local rec = Recipe(k, v.ing, v.tab or RECIPETABS.ELECTRICALS, v.tech or GLOBAL.TECH.NONE) rec.atlas = v["atlas"] or "images/recipe.xml" rec.image = v["image"] or "recipe.tex" end Link to comment Share on other sites More sharing options...
memcallen Posted June 8, 2016 Author Share Posted June 8, 2016 Nevermind, I'm just being stupid, I called my prefab folder 'prefab' instead of 'prefabs'... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now