Commit Message

This commit is contained in:
SilicaAndPina 2020-07-29 13:47:22 +12:00
parent f20c4b7469
commit 92e13fdf7b
3 changed files with 38 additions and 4 deletions

View File

@ -114,8 +114,26 @@ var selected_item = obj_inv_controller.inventory[obj_hotbar.selected_slot];
if(selected_item != 0)
{
use_item_in_inventory(obj_hotbar.selected_slot);
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;
var inst = instance_create(round(mouse_x/TILE_SIZE)*TILE_SIZE,round(mouse_y/TILE_SIZE)*TILE_SIZE,obj_placed_item);
var has_colision = false;
for(var xx = selX; xx < selX + TILE_SIZE; xx++)
{
for(yy = selY; yy < selY + TILE_SIZE; yy++)
{
var objid = instance_place(xx,yy,all)
if(objid != noone && objid.object_index != obj_chunk)
{
has_colision = true;
}
}
}
var inst = instance_create(selX,selY,obj_placed_item);
var chunkid = id;
with(inst){
inst.ITEM_ID = selected_item;

View File

@ -90,7 +90,15 @@ if((mouse_x >= x && mouse_x <= x+424) && (mouse_y >= y
<argument>
<kind>1</kind>
<string>selected_slot --;
selected_slot = selected_slot % 9;
selected_slot = selected_slot % 8;
if(selected_slot &lt; 0)
{
selected_slot = 0;
}
if(selected_slot &gt; 8)
{
selected_slot = 8;
}
</string>
</argument>
</arguments>
@ -114,7 +122,14 @@ selected_slot = selected_slot % 9;
<argument>
<kind>1</kind>
<string>selected_slot ++;
selected_slot = selected_slot % 9;
if(selected_slot &lt; 0)
{
selected_slot = 0;
}
if(selected_slot &gt; 8)
{
selected_slot = 8;
}
</string>
</argument>
</arguments>

View File

@ -77,7 +77,8 @@ with(instance_create(x,y,obj_dropped_item))
<arguments>
<argument>
<kind>1</kind>
<string>image_index = ITEM_ID;
<string>pull_towards_black_holes();
image_index = ITEM_ID;
</string>
</argument>
</arguments>