AlienSpawn 10 Опубликовано 1 Августа 2017 Lost Alpha DC 1.4004, спим когда захотим.)) В файле la_actor_sleep.script ищем: function Sleep_Mgr:can_sleep() local tbl_tip = {} if self.phase == 0 then --/ "block" tbl_tip = tTips.no_need elseif level_weathers.is_blowout_active() then tbl_tip = tTips.blowout elseif la_actor_thirst and la_actor_thirst.is_thirsty() and not self:is_very_tired() then tbl_tip = tTips.thirsty elseif la_actor_hunger and la_actor_hunger.is_hungry() and not self:is_very_tired() then tbl_tip = tTips.hungry elseif this.CheckForEnemy() then tbl_tip = tTips.enemy else return true --/> end --log("Sleep_Mgr:can_sleep:time=[%s] phase=[%s] tip=[%s]", game.get_game_time():timeToString(3), self.phase, tostring(tbl_tip[2])) --/#~# news_manager.send_tip_hud( unpack(tbl_tip) ) return false --/> end Делаем так: function Sleep_Mgr:can_sleep() local tbl_tip = {} -- if self.phase == 0 then --/ "block" -- tbl_tip = tTips.no_need -- else if level_weathers.is_blowout_active() then tbl_tip = tTips.blowout elseif la_actor_thirst and la_actor_thirst.is_thirsty() and not self:is_very_tired() then tbl_tip = tTips.thirsty elseif la_actor_hunger and la_actor_hunger.is_hungry() and not self:is_very_tired() then tbl_tip = tTips.hungry elseif this.CheckForEnemy() then tbl_tip = tTips.enemy else return true --/> end --log("Sleep_Mgr:can_sleep:time=[%s] phase=[%s] tip=[%s]", game.get_game_time():timeToString(3), self.phase, tostring(tbl_tip[2])) --/#~# news_manager.send_tip_hud( unpack(tbl_tip) ) return false --/> end Профит, спокойных снов.)))))) 4 1 1 Поделиться этим сообщением Ссылка на сообщение
AlienSpawn 10 Опубликовано 3 Августа 2017 (изменено) Niko971, gamedata\config\lostalpha\la_skills.ltx, вам нужен этот файл, с содержимым я думаю разберетесь, там ничего сложного.)))))))))) И да, в actor лучше не лазьте. Изменено 3 Августа 2017 пользователем AlienSpawn 3 Поделиться этим сообщением Ссылка на сообщение
AlienSpawn 10 Опубликовано 19 Апреля 2018 Lost Alpha 1.4006-4005 Ремонтники ремонтируют оружие в любом состоянии: Ищем файл inventory_upgrades.script. В нем ищем такую функцию: Скрытый текст function can_repair_item( item_name, item_condition, mechanic ) --( string, float, string ) --if param_ini:line_exist(mechanic_name, "repair_condition_factor") then -- local condlist = param_ini:r_string(mechanic_name, "discount_condlist") -- local parsed = xr_logic.parse_condlist(db.actor, nil, nil, condlist) -- xr_logic.pick_section_from_condlist(db.actor, nil, parsed) --end local cond = fixer_conditions[mechanic] if cond == nil then cond = fixer_conditions["general_fixer"] end if cond then if (item_condition) < cond then return false end end local profit = fixer_profits[mechanic] if profit == nil then profit = 5 end local price = how_much_repair(item_name, item_condition, profit) if db.actor:money() < price then return false end return true end Делаем так: Скрытый текст function can_repair_item( item_name, item_condition, mechanic ) --( string, float, string ) --if param_ini:line_exist(mechanic_name, "repair_condition_factor") then -- local condlist = param_ini:r_string(mechanic_name, "discount_condlist") -- local parsed = xr_logic.parse_condlist(db.actor, nil, nil, condlist) -- xr_logic.pick_section_from_condlist(db.actor, nil, parsed) --end local cond = fixer_conditions[mechanic] if cond == nil then cond = fixer_conditions["general_fixer"] end -- if cond then -- if (item_condition) < cond then -- return false -- end -- end local profit = fixer_profits[mechanic] if profit == nil then profit = 5 end local price = how_much_repair(item_name, item_condition, profit) if db.actor:money() < price then return false end return true end И такую функцию, чтоб она нам не писала нам всякую каку на экране: Скрытый текст function question_repair_item( item_name, item_condition, can, mechanic ) --( string, float, bool, string ) local cond = fixer_conditions[mechanic] if cond == nil then cond = fixer_conditions["general_fixer"] end if cond then if (item_condition) < cond then return game.translate_string("st_no_repair_tip_2") end end local profit = fixer_profits[mechanic] if profit == nil then profit = 5 end local price = how_much_repair( item_name, item_condition, profit) if db.actor:money() < price then return game.translate_string("st_upgr_cost")..": "..price.." RU\\n"..game.translate_string("ui_inv_not_enought_money")..": "..price-db.actor:money().." RU" end return game.translate_string("st_upgr_cost").." "..price.." RU. "..game.translate_string("ui_inv_repair").."?" end делаем так: Скрытый текст function question_repair_item( item_name, item_condition, can, mechanic ) --( string, float, bool, string ) local cond = fixer_conditions[mechanic] if cond == nil then cond = fixer_conditions["general_fixer"] end -- if cond then -- if (item_condition) < cond then -- return game.translate_string("st_no_repair_tip_2") -- end -- end local profit = fixer_profits[mechanic] if profit == nil then profit = 5 end local price = how_much_repair( item_name, item_condition, profit) if db.actor:money() < price then return game.translate_string("st_upgr_cost")..": "..price.." RU\\n"..game.translate_string("ui_inv_not_enought_money")..": "..price-db.actor:money().." RU" end return game.translate_string("st_upgr_cost").." "..price.." RU. "..game.translate_string("ui_inv_repair").."?" end Profit!!! Теперь ремонтники не брезгуют у нас даже откровенным хламом.))))))) 1 Поделиться этим сообщением Ссылка на сообщение
AlienSpawn 10 Опубликовано 19 Апреля 2018 Если вас не устраивают цены на ремонт (меня например они не устроили от слова вообще, ибо новое купить в разы дешевле, чем чинить старое) то в том же файле inventory_upgrades.script ищем: Скрытый текст local function how_much_repair(item_name, item_condition, profit) local ltx = system_ini() local cost = ltx:r_u32(item_name, "cost") local class = ltx:r_string(item_name, "class") local cof = 0.6 return math.floor(cost * (1 - item_condition) * cof * cur_price_percent * profit) end Изменяя переменную local cof = 0.6 меняем цены, чем меньше значение переменной тем дешевле ремонт. 1 1 Поделиться этим сообщением Ссылка на сообщение