CommitLog |

This commit is contained in:
SilicaAndPina 2020-07-25 18:26:58 +12:00
parent e064f6d571
commit 29110d6a69
2 changed files with 7 additions and 28 deletions

View file

@ -28,21 +28,24 @@
<string>/// GENERATE CHUNK
instance_list = ds_list_create();
loaded = true;
var hasGeneratedBlackHole = false;
// GENERATION
for(var xx = 0; xx &lt; CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE)
{
for(var yy = 0; yy &lt; CHUNK_SIZE*TILE_SIZE; yy+= TILE_SIZE)
{
var rnd = random_range(0,500);
var rnd = random_range(0,1000);
show_debug_message("Generation: "+string(rnd))
if(rnd &lt; 100 &gt; 200)
{
if(floor(rnd) == 500)
{
if(hasGeneratedBlackHole)
continue;
var inst = instance_create(x+xx,y+yy, obj_black_hole);
inst.CHUNK_CONTAINED = self.id;
ds_list_add(instance_list, inst);
hasGeneratedBlackHole = true;
continue;
}
if(rnd % 100 &lt; 1)