Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
PyroFire232 authored Aug 1, 2019
1 parent 77dfced commit cb759f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1441,15 +1441,15 @@ function warptorio.BuildNewPlanet()

if(gwarptorio.charting)then game.print(w.name) end
game.print(w.desc)
game.print("Generating Planet: " .. w.name)
--game.print("Generating Planet: " .. w.name)

local orig=(game.surfaces["nauvis"].map_gen_settings)
local seed=(orig.seed + math.random(0,4294967295)) % 4294967296
local t=table.deepcopy(orig) t.seed=seed
local wmap=(w.gen and table.deepcopy(w.gen) or {}) if(w.fgen)then w.fgen(wmap,gwarptorio.charting,orig) end
--game.print("wmap") for k,v in pairs(wmap)do game.print(tostring(k) .. " " .. tostring(v)) if(istable(v))then for a,b in pairs(v)do game.print("-->" .. tostring(a) .. " " .. tostring(b)) end end end
if(w.orig_mul)then
if(wmap.autoplace_controls)then for k,v in pairs(wmap.autoplace_controls)do local x=getmetatable(v) if(x~=nil)then wmap[k]=v*(orig.autoplace_controls[k] or 1) end end end
if(wmap.autoplace_controls)then for k,v in pairs(wmap.autoplace_controls)do if(getmetatable(v))then wmap.autoplace_controls[k]=v*(orig.autoplace_controls[k] or 1) end end end
end
table.deepmerge(t,wmap)

Expand Down
4 changes: 2 additions & 2 deletions control_planets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ planet.normal={ rng=23, name="A Normal Planet", desc="This world reminds you of
planet.average={ zone=1, rng=17, name="An Average Planet", desc="The usual critters and riches surrounds you, but you feel like something is missing.", -- remove 1-2 resources
orig_mul=true,
gen={autoplace_controls={}},
fgen=function(t,b)
fgen=function(t,b,o)
local z,x=table.deepcopy(resourceTypes),{} for i=1,math.random(1,2),1 do local u=math.random(1,#z) x[i]=z[u] table.remove(z,u) end
for k,v in pairs(x)do t.autoplace_controls[v]={size=0} end
for k,v in pairs(x)do t.autoplace_controls[v]=new(czMeta,0,0,0) end --{size=0} end
if(b)then local s=x[1] if(x[2])then s=s .. " and " .. x[2] .. " do" else s=s.. " does" end s=s.." not spawn on this planet" game.print(s) end
end,
spawn=function(f,b)
Expand Down

0 comments on commit cb759f3

Please sign in to comment.