Commit Message
This commit is contained in:
parent
2b60cde872
commit
88da5bc5f0
10 changed files with 271 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
<object>
|
||||
<spriteName>spr_chunk</spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>0</visible>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>0</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
|
@ -43,8 +43,8 @@ for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE)
|
|||
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;
|
||||
}
|
||||
|
@ -82,12 +82,47 @@ for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE)
|
|||
<kind>1</kind>
|
||||
<string>var chunk_total_size = CHUNK_SIZE * TILE_SIZE
|
||||
|
||||
visible = global.debug
|
||||
|
||||
if(distance_to_object(obj_player) > chunk_total_size*3)
|
||||
{
|
||||
event_user(0);
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="6" enumb="5">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>///Place items
|
||||
var selected_item = obj_inv_controller.inventory[obj_hotbar.selected_slot];
|
||||
if(selected_item != 0)
|
||||
{
|
||||
use_item_in_inventory(obj_hotbar.selected_slot);
|
||||
|
||||
var inst = instance_create(round(mouse_x/TILE_SIZE)*TILE_SIZE,round(mouse_y/TILE_SIZE)*TILE_SIZE,obj_placed_item);
|
||||
var chunkid = id;
|
||||
with(inst){
|
||||
inst.ITEM_ID = selected_item;
|
||||
inst.CHUNK_CONTAINED = chunkid;
|
||||
}
|
||||
ds_list_add(instance_list, inst);
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
@ -146,6 +181,39 @@ for(var i = 0; i < ds_list_size(instance_list); i++)
|
|||
}
|
||||
loaded = false;
|
||||
instance_deactivate_object(id);
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="8" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>if(global.debug)
|
||||
draw_self();
|
||||
|
||||
var selX = round(mouse_x/TILE_SIZE)*TILE_SIZE;
|
||||
var selY = round(mouse_y/TILE_SIZE)*TILE_SIZE;
|
||||
selX -= TILE_SIZE / 2;
|
||||
selY -= TILE_SIZE / 2;
|
||||
|
||||
draw_set_color(c_white);
|
||||
draw_rectangle(selX,selY,selX + TILE_SIZE, selY + TILE_SIZE, true);
|
||||
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
|
|
Reference in a new issue