X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2Fitems_logic.mpsrc;h=84db3342d06b6dc5d9bee8e6a00abe704949010b;hp=a3d41c04f757880049a1db63f27694ee9ad375bb;hb=4d7cf2ab1e10d9926d03afb5a3f883bcf5312469;hpb=9115be0a19d5716f33a2e2cba76f3447ce0f4c2f diff --git a/src/items_logic.mpsrc b/src/items_logic.mpsrc index a3d41c0..84db334 100644 --- a/src/items_logic.mpsrc +++ b/src/items_logic.mpsrc @@ -12,7 +12,8 @@ interface procedure updateBlock(x, y:integer); implementation - uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign; + + uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, chest, inv, player, items_store, particles, worldgen, phy, sign, Blocks; procedure usebonemeal(block:integer); var @@ -1153,7 +1154,7 @@ procedure fluidLogic(x, y, ifbx, thenbx, ifby, thenby:integer); setMap(thenby, x, y+1); else //Если нижний блок можно уничтожить, то ставим туда копию - if getBlockSet(blockYp1) then + if Blocks.IsOverlapped(blockYp1) then begin destroy_block_0(blockYp1, x, y+1); setMap(block, x, y+1); @@ -1164,7 +1165,7 @@ procedure fluidLogic(x, y, ifbx, thenbx, ifby, thenby:integer); if blockXm1=ifbx then setMap(thenbx, x-1, y); else - if getBlockSet(blockXm1) then + if Blocks.IsOverlapped(blockXm1) then begin destroy_block_1(blockXm1, x-1, y); setMap(block, x-1, y); @@ -1173,7 +1174,7 @@ procedure fluidLogic(x, y, ifbx, thenbx, ifby, thenby:integer); if blockXp1=ifbx then setMap(thenbx, x+1, y); else - if getBlockSet(blockXp1) then + if Blocks.IsOverlapped(blockXp1) then begin destroy_block_1(blockXp1, x+1, y); setMap(block, x+1, y); @@ -1202,7 +1203,7 @@ procedure updateBlock(x, y:integer); if block=2 then begin //Трава разрастается при условии что освещение выше чем 3 - if (getBlockSet(getMap(x, y-1))=false) or (light=0) then + if (light = 0) or (Blocks.IsOverlapped(getMap(x, y - 1)) = false) then setMap(1, x, y); else if light>3 then @@ -1219,7 +1220,7 @@ procedure updateBlock(x, y:integer); else if block=7 then begin - if getBlockSet(getMap(x, y+1)) then + if Blocks.IsOverlapped(getMap(x, y+1)) then begin setMap(0, x, y); setMap(7, x, y+1); @@ -1228,7 +1229,7 @@ procedure updateBlock(x, y:integer); else if block=8 then begin - if getBlockSet(getMap(x, y+1)) then + if Blocks.IsOverlapped(getMap(x, y+1)) then begin setMap(0, x, y); setMap(8, x, y+1); @@ -1260,7 +1261,7 @@ procedure updateBlock(x, y:integer); else if block=74 then begin - if getBlockSet(getMap(x, y-1))=false then + if Blocks.IsOverlapped(getMap(x, y-1))=false then setMap(1, x, y); else if light>3 then