Changeset - 45546845fc04
[Not reviewed]
default
0 2 1
Silverwing - 7 years ago 2017-10-15 12:27:55

Some w32 changes
3 files changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
images/unseen_enemy.png
Show inline comments
 
new file 100644
 
binary diff not shown
Show images
items.lua
Show inline comments
 
@@ -456,6 +456,7 @@ item_w32_key = obj {
 
	disp = "Ключ";
 
	dsc = [[За книгами спрятан небольшой {ключик}. ]];
 
	tak = function(s)
 
        w32_mgr_bookcase.state = 1;   
 
		w32_mgr.key_inplace = false;
 
		return [[Вы забираете ключ. ]];
 
	end;
warehouse32.lua
Show inline comments
 
@@ -274,6 +274,7 @@ w32_mgr_bookcase = obj {
 
	end;
 
	used = function(s, o)
 
		if (o == item_w32_key) then
 
            s.state = 0;      
 
			w32_mgr.key_inplace = true;
 
			remove(item_w32_key, pl);
 
			put(item_w32_key, s);
 
@@ -444,6 +445,9 @@ warehouse_32 = room {
 
            if pl_y - g_y == 0 or pl_x - g_x == 0 and math.abs(pl_y - g_y) + math.abs(pl_x - g_x) < 3 then
 
                rval = rval .. ";images/wh32_guard_" .. tostring(s.guards[i].dir) .. ".png@" .. tostring((g_x - pl_x) * 64 + 128 + deltax) .. ",".. tostring((pl_y - g_y) * 64 + 128 + deltay);
 
            end;
 
            if math.abs(pl_y - g_y) == 1 and math.abs(pl_x - g_x) == 1 then
 
                rval = rval .. ";images/uneen_enemy.png@" .. tostring((g_x - pl_x) * 64 + 128 + deltax) .. ",".. tostring((pl_y - g_y) * 64 + 128 + deltay);
 
            end;
 
        end;
 
        
 
        rval = rval .. ";images/wh32_player.png@128,128";
 
@@ -500,7 +504,7 @@ warehouse_32 = room {
 
		--Каждый стражник делает ход, игрок получает сообщения, о том, слышит ли он шаги, откуда и как они движутся
 
		for i = 1, #s.guards do
 
			if (rnd(10) < 9) then
 
                if (s.guards[i].s == 1) then
 
                --[[if (s.guards[i].s == 1) then
 
                    if s.guards[i].dir ~= 3 then
 
                        s.guards[i].dir = s.guards[i].dir + 1;
 
                    else
 
@@ -521,8 +525,8 @@ warehouse_32 = room {
 
                            s.guards[i].s = 1;
 
                        end;
 
                    end;
 
                end;
 
				--[[if (s.guards[i].s == 1) then
 
                end;]]
 
				if (s.guards[i].s == 1) then
 
					s.guards[i].s = 2;
 
					s.guards[i].dir = s.guards[i].dir + 1;
 
					if (s.guards[i].dir > 4) then
 
@@ -547,7 +551,7 @@ warehouse_32 = room {
 
							s.guards[i].pos = s.definitions[s.guards[i].pos].e4;
 
						end;
 
					end;
 
				end;]]
 
				end;
 
			end;
 
			
 
			local g_y = math.floor(tonumber(s.guards[i].pos) / 10);
0 comments (0 inline, 0 general)