File diff 12dc77d6f1ec → 93308919b9f7
items.lua
Show inline comments
 
@@ -469,49 +469,48 @@ item_colt = obj {
 
                here().onreload();
 
            end;
 
		end;
 
	end;
 
};
 
 
item_harpoon = obj {
 
    var {
 
        charge = 1;
 
    };
 
    nam = "item_harpoon";
 
    disp = function(s)
 
        if (s.charge == 0) then
 
            return "Ружье (разряжено)";
 
        else
 
            return "Ружье (заряжено)";
 
        end;
 
    end;
 
    dsc = [[К стене прислонено {гарпунное ружье}. ]];
 
    tak = "Вы забираете ружье. ";
 
    use = function(s, o)
 
        local canshoot = false;
 
        if (type(o.canshoot) == "function") then
 
            canshoot, noshootmsg = o:canshoot();
 
            print(canshoot, noshootmsg);
 
        else
 
            canshoot = o.canshoot;
 
        end;
 
        
 
        local canthrust = false;
 
        if (type(o.canthrust) == "function") then
 
            canthrust = o:canthrust();
 
        else
 
            canthrust = o.canthrust;
 
        end;
 
        
 
        if (canthrust) then
 
            p("Вы атакуете "..o.disp2 .. ". ");
 
            if (o.onthrust) then
 
                return(o.onthrust(o));
 
            else
 
                return "";
 
            end;
 
        elseif (canshoot) then
 
			if (s.charge == 0) then
 
				return "Ружье не заряжено. ";
 
			end;
 
 
            s.charge = s.charge - 1;