X-Git-Url: https://deadsoftware.ru/gitweb?p=cavecraft.git;a=blobdiff_plain;f=src%2Fitems_logic.mpsrc;h=6c730f618f5345b68b5aceecc3373ae2a50cdf0f;hp=d4900720c14ff97e92740b4079910d991620deb5;hb=3564ef6fb4685bbecd05d027d91a9f7d81385b07;hpb=1ef13d5bd0592dde48cc837e05b13e93e82db25b diff --git a/src/items_logic.mpsrc b/src/items_logic.mpsrc index d490072..6c730f6 100644 --- a/src/items_logic.mpsrc +++ b/src/items_logic.mpsrc @@ -231,7 +231,7 @@ procedure destroy_block_cr(id, xx, yy:integer); setmap(0,xx,yy); destsign(getmapinfo(xx,yy)); end; else - if id=106 then + if (id = 106) or (id = 125) then begin setmap(0,xx,yy); DestroyFurnace(xx, yy); @@ -266,7 +266,7 @@ procedure destroy_block_cr(id, xx, yy:integer); begin if createsign(xx,yy)=-1 then set_block_code:=true; end; else - if it=106 then + if (it = 106) or (it = 125) then begin if CreateFurnace(xx, yy)=FURNACE_ERROR then set_block_code:=true; @@ -338,7 +338,7 @@ procedure destroy_block_cr(id, xx, yy:integer); begin destsign(getmapinfo(xx,yy)); end; else - if id=106 then + if (id = 106) or (id = 125) then begin DestroyFurnace(xx, yy); end; else @@ -578,7 +578,7 @@ procedure destroy_block_cr(id, xx, yy:integer); destsign(getmapinfo(xx,yy)); drop.create(104,1,xx*16+4,yy*16+4); end; else - if id=106 then + if (id = 106) or (id = 125) then begin setmap(0,xx,yy); DestroyFurnace(xx, yy); @@ -680,7 +680,7 @@ procedure destroy_block_cr(id, xx, yy:integer); if block=104 then keymode:=5;*/ else - if block=106 then + if (block = 106) or (block = 125) then OpenFurnaceWindow(info); else if block=107 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 @@ -1348,6 +1349,14 @@ procedure updateBlock(x, y:integer); create_particle(4, x*16+4, y*16+4); end; else + if (block = 106) or (block = 125) then + begin + if furnaceBurn(getMapInfo(x, y)) then + setmap(125, x, y); + else + setmap(106, x, y); + end; + else if block=110 then begin if (getmap(x-1, y)=0) or (getmap(x+1, y)=0) or (getmap(x, y-1)=0) or (getmap(x, y+1)=0) then @@ -1356,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);