X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2Fitems_logic.mpsrc;h=a3d41c04f757880049a1db63f27694ee9ad375bb;hp=a0816c786b5cf4a569b16b157452430252312bb9;hb=9115be0a19d5716f33a2e2cba76f3447ce0f4c2f;hpb=13a872abec65a21544bfa928624c6bf3975fd50f diff --git a/src/items_logic.mpsrc b/src/items_logic.mpsrc index a0816c7..a3d41c0 100644 --- a/src/items_logic.mpsrc +++ b/src/items_logic.mpsrc @@ -12,7 +12,7 @@ interface procedure updateBlock(x, y:integer); implementation - uses invui, maps, drop, console, furnace, png3, func, jpeg, mob, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign; + uses invui, maps, drop, console, furnace, png3, func, jpeg, mobs, vars, bmp, items, chest, inv, player, items_store, particles, worldgen, phy, sign; procedure usebonemeal(block:integer); var @@ -148,7 +148,7 @@ procedure boom(rr,mm,xx,yy:integer); begin if 30<=random(100) then destroy_block_1(getmap(ix,iy),ix,iy); setmap(0,ix,iy); - create_particle(7,(ix*16)+8-16,(iy*16)+8-16); + Particles.Create(Particles.explosion, (ix * 16) + 8 - 16, (iy * 16) + 8 - 16); end; end; minhp:=minhp/360; @@ -853,7 +853,7 @@ procedure destroy_block_cr(id, xx, yy:integer); begin if getBlockColl(block)=0 then begin - mob.create(M_ZOMBY, x*16, y*16); + Mobs.Create(Mobs.zomby, x * 16, y * 16); decItem(invcur); end; end; @@ -1184,7 +1184,7 @@ procedure fluidLogic(x, y, ifbx, thenbx, ifby, thenby:integer); procedure updateBlock(x, y:integer); const GRASS_RND=128; - TORCH_RND=128; + TORCH_RND=10; SPAWN_RND=128; SPAWN_RAD=128; GENWOOD_RND=1024; @@ -1238,7 +1238,7 @@ procedure updateBlock(x, y:integer); if block=26 then begin if random(TORCH_RND)=random(TORCH_RND) then - create_particle(2, x*16+4, y*16+4); + Particles.Create(Particles.graySmoke, x * 16 + 4, y * 16 + 4); end; else if block=50 then @@ -1253,8 +1253,9 @@ procedure updateBlock(x, y:integer); else if block=63 then begin - if (light>7) or (getMap(x, y+1)=0) then - setmap(0, x, y); + // В зимнем биоме снег не растапливается при сильном свете + if ((light > 7) and (getBiomMap(x) <> 2)) or (getMap(x, y + 1) = 0) then + setmap(0, x, y); end; else if block=74 then @@ -1345,7 +1346,7 @@ procedure updateBlock(x, y:integer); if block=105 then begin if random(TORCH_RND)=random(TORCH_RND) then - create_particle(4, x*16+4, y*16+4); + Particles.Create(Particles.redSmoke, x * 16 + 4, y * 16 + 4); end; else if (block = 106) or (block = 125) then @@ -1364,9 +1365,9 @@ procedure updateBlock(x, y:integer); else if block=30 then begin - if (random(GENWOOD_RND)=random(GENWOOD_RND)) and (getMap(x, y+2)<>30) then - setMap(30, x, y-1); - if (getMap(x, y+1)<>7) or (getMap(x, y+1)<>30) then + if (random(GENWOOD_RND) = random(GENWOOD_RND)) and (getMap(x, y + 2) <> 30) then + setMap(30, x, y - 1); + if (getMap(x, y + 1) <> 7) and (getMap(x, y + 1) <> 30) then begin setMap(0, x, y); destroy_block_1(block, x, y);