Added New Mods and Profiles Folders

This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
This commit is contained in:
2025-01-14 05:07:53 -05:00
parent 85c665b107
commit 376b4b9689
21217 changed files with 546254 additions and 0 deletions
@@ -0,0 +1,466 @@
--[[ ----------------------------------------------------------------------------------------------
Ïëàòôîðìû: CS 1.5.10, CoP 1.6.02
Îïèñàíèå : Ðàçëè÷íûå óòèëèòû äëÿ ðàáîòû ñ äàííûìè
Ïîääåðæêà: 2013 © Shoker Weapon Mod
Àâòîðû : Shoker, <...>
Shoker Weapon Mod 2.1 port, modified by Wang_Laoshi (Ethereal) to work with Anomaly mod. Thanks a lot to the original creators of this mod - Shoker, ÐèêîøåÒ and SWM Team in general.
--]] ----------------------------------------------------------------------------------------------
--[[
TODO:
* Ïðè ÷òåíèè ÷åðåç ltx() èç ini-ôàéëà ìîæåò ñîâïàñòü èìÿ ñåêöèè è ñòðîêà äëÿ ÷òåíèÿ ñ ïîõîæåé
ñåêöèåé èç system_ini() èëè ëþáîãî äðóãîãî ini, èç çà ÷åãî îíà áóôåðèçèðóåòñÿ è ïåðåáü¸ò çíà÷åíèÿ èç íèõ
--]]
--************************************************************--
--***********************[ßäðî ñêðèïòà]***********************--
--************************************************************--
local _SN = script_name()
--**************************************************************--
--********************[Ôóíêöèîíàëüíàÿ ÷àñòü]********************--
--**************************************************************--
--\\ Èç âåêòîðà "âïåð¸ä" âîçâðàùàåò âåêòîð "âïðàâî" è âåêòîð "ââåðõ" (Roll íå ó÷èòûâàåòñÿ)
--\\ Ñïàñèáî malandrinus çà ôîðìóëû
function get_all_direction(dir)
--* "Âïðàâî"
local dir_right = vector()
dir_right:crossproduct(dir, vector():set(0,1,0))
dir_right = dir_right:normalize()
--* "Ââåðõ"
local dir_up = vector()
dir_up:crossproduct(dir_right, dir)
dir_up = dir_up:normalize()
return dir_right:invert(), dir_up
end
--\\ Ïðèíèìàåò êîîðäèíàòû íà çåìëå è ïðåâðàùàåò èõ â êîîðäèíàòû äëÿ ýêðàíà
--\\ Ìîæíî èñïîëüçîâàòü â öåëåóêàçàòåëÿõ (malandrinus)
function point_to_hud(point)
local dev = device()
local scr_w = dev.width
local scr_h = dev.height
local fov2 = (dev.fov/2) * (math.pi/180)
local scr_dist = 0.5 * scr_h / math.tan(fov2)
local ppp = vector():sub(point, dev.cam_pos)
local dp = dev.cam_dir:dotproduct(ppp)
local x = 512 + dev.cam_right:dotproduct(ppp) * scr_dist / dp * (1024/scr_w)
local y = 384 - dev.cam_top:dotproduct(ppp) * scr_dist / dp * (768/scr_h)
return x, y
end
--\\ Âåêòîð X,Y â óãëàõ ïåðåâîäèò â äèðåêöèþ
function angle_to_direction(oangle)
local yaw = oangle.y
local pitch = oangle.x
return vector():setHP(yaw,pitch):normalize()
end
--\\ Ðýíäîì äâóõ float-÷èñåë ñ ïîääåðæêîé îäíîãî ðàçðÿäà
function frandom(n1, n2)
n1 = n1 * 10
n2 = n2 * 10
return (math.random(n1, n2) / 10)
end
local ltxBuffer = {} --> Õðàíèò óæå çàãðóæåííûå äàííûå èç êîíôèãîâ
--\\ Âîçâðàùàåò çíà÷åíèå èç ñåêöèè â êîíôèãàõ
-- sec - ñåêöèÿ
-- line - ñòðîêà
-- *mode - ðåæèì ÷òåíèÿ, ïî óìîë÷àíèþ ÷èòàåò ÷èñëî ñ òî÷êîé ("str", "tbl1", "bol", "num", "numf")
-- *ini_file - ini-êîíôèã îòêóäà íàäî ÷èòàòü, ïî óìîë÷àíèþ ÷èòàåò èç system.ltx è ïîäêë. ê íåìó ôàéëàõ
-- Âíèìàíèå: â ñëó÷àå îòñóòñòâèÿ ñåêöèè\ñòðîêè â êîíôèãå - âûëåòà íå áóäåò, òàê ÷òî âñå òàêèå ìåñòà
-- ïðîâåðÿòü ñîîòâ. ôóíêöèÿìè ñàìèì. Ñäåëàíî äëÿ óïðîùåíèÿ êîäà.
function ltx(sec, line, mode, ini_file)
if sec == nil then
_abort(_SN, "ltx", "sec (%s)(%s)", tostring(line), tostring(mode))
end
if not ltxBuffer[sec] then
ltxBuffer[sec] = {}
end
local result = ltxBuffer[sec][line]
if result ~= nil then
--* Âåêòîðà âîçâðàùàþòñÿ êàê ññûëêè! Ïîýòîìó èõ íóæíî êîïèðîâàòü
if type(result) == "userdata" then
return utils.vector_copy_by_val(result)
end
return result
end --> Íåò ñìûñëà êàæäûé ðàç ÷èòàòü èç êîíôèãîâ, êîãäà äîñòàòî÷íî 1 ðàç çàïèñàòü â òàáëèöó
local ini = ini_file or system_ini()
if ltxExist(sec, line, ini) then
if mode==nil or mode=="numf" then --> ÷èñëî ñ çàïÿòîé
ltxBuffer[sec][line] = ini:r_float(sec, line)
return ltxBuffer[sec][line]
end
if mode=="bol" then --> true\false
ltxBuffer[sec][line] = ini:r_bool(sec, line)
return ltxBuffer[sec][line]
end
if mode=="num" then --> öåëîå ÷èñëî
ltxBuffer[sec][line] = ini:r_u32(sec, line)
return ltxBuffer[sec][line]
end
if mode=="str" then --> ñòðîêà
ltxBuffer[sec][line] = ini:r_string(sec, line)
return ltxBuffer[sec][line]
end
if mode=="vec" then --> âåêòîð
local vec = ini:r_vector(sec, line)
ltxBuffer[sec][line] = vec
--return ltxBuffer[sec][line] --> ÒÀÊ ÍÅ ÄÅËÀÒÜ
return utils.vector_copy_by_val(ltxBuffer[sec][line])
end
if mode=="tbl1" then --> òàáëèöà èç ñòðîêè ñ çàïÿòûìè (1 = ..., 2 = ....)
local temp = ini:r_string(sec, line)
ltxBuffer[sec][line] = string_expl(temp, ",")
return ltxBuffer[sec][line]
end
end
-- mDbg(_SN, "ltx - no section: "..sec.." || "..line)
return nil
end
--\\ Ïîçâîëÿåò âûñòàâèòü çíà÷åíèå êàêîãî ëèáî èç çàãðóæåííûõ ïàðàìåòðîâ êîíôèãà
function ltxBufferW(sec, line, value)
if not ltxBuffer[sec] then
ltxBuffer[sec] = {}
end
ltxBuffer[sec][line] = value
end
--\\ Âîçâðàùàåò èìÿ è îïèñàíèå ïðåäìåòà
-- sec - ñåêöèÿ ïðåäìåòà â êîíôèãàõ
function ltxItem(sec)
local name = ltx(sec, "inv_name", "str") or ""
local descr = ltx(sec, "description", "str") or ""
return xml(name), xml(descr)
end
--\\ Ïðîâåðÿåò, ÷òî òàêàÿ êîìáèíàöèÿ ñåêöèè-*ñòðîêè ñóùåñòâóåò â êîíôèãå
-- sec - ñåêöèÿ
-- *line - ñòðîêà
-- *ini_file - ini-êîíôèã îòêóäà íàäî ÷èòàòü, ïî óìîë÷àíèþ ÷èòàåò èç system.ltx è ïîäêë. ê íåìó ôàéëàõ
function ltxExist(sec, line, ini_file)
local ini = ini_file or system_ini()
if sec == nil then _abort(_SN, "ltxExist", "sec") end
if not ini:section_exist(sec) then return false end
if line and not ini:line_exist(sec, line) then return false end
printf("SWMtrue")
return true
end
--\\ Âîçâðàùàåò <text> èç òåêñòîâîãî xml-ôàéëà
-- xml_id - èäåíòèôèêàòîð òåêñòà
function xml(xml_id)
return game.translate_string(xml_id)
end
--\\ Ïðåîáðàçóåò òàáëèöó â îòôîðìàòèðîâàííóþ ñòðîêó äëÿ çàïèñè â custom data
--[[
local value = 123
local cd = {}
cd["test"] = {}
cd["test"]["string"] = ""
cd["test"]["line"] = value
cd["test"]["simple_table"] = {2,4,6,8}
cd["test"]["extended_table"] = {val1 = 1, val2 = 2, val3 = 3}
[test]
string
line = 123
simple_table = 2468
extended_table = val1, 1, val2, 2, val3, 3
]]
function tocdata(tTbl)
local result = ""
for sec, tData in pairs(tTbl) do
result = result.."\n["..sec.."]\n"
if type(tData) ~= "table" then
_abort(_SN, "tocdata", "tData is not table! result = %s, tData = %s", result, tostring(tData))
else
for line, t_Param in pairs(tData) do
if t_Param == "" then
result = result..tostring(line).."\n"
else
result = result..tostring(line).." = "
if type(t_Param) == "table" then
if table_size(t_Param) > 0 and #t_Param > 0 then
--* Ñêîðåå âñåãî ýòî íóìåðîâàííàÿ òàáëèöà, ïàêóåì å¸ áåç êëþ÷à
for _,p1 in pairs(t_Param) do
local first = true
if first then
result = result..tostring(p1)
first = false
else
result = result..", "..tostring(p1)
end
end
else
--* Õýø-òàáëèöà, å¸ ïèøåì âìåñòå ñ êëþ÷àìè
local first = true
for p1,p2 in pairs(t_Param) do
if first then
result = result..tostring(p1)..", "..tostring(p2)
first = false
else
result = result..", "..tostring(p1)..", "..tostring(p2)
end
end
end
result = result.."\n"
else
result = result..tostring(t_Param).."\n"
end
end
end
end
end
return result
end
--\\ Ñ÷èòûâàåò âñå ñòðîêè èç ñåêöèè â òàáëèöó âèäà ñòðîêà = çíà÷åíèå
function collect_sections(ini, sec)
local r = {}
if ini:section_exist(sec) then
local n = ini:line_count(sec)
if n > 0 then
for i = 0,n-1 do
local res,id,val = ini:r_line(sec,i,"","")
if r[id] == nil then
r[id] = val
end
end
end
end
return r
end
--\\ Êðýøíóòü èãðó ñ âûâîäîì â ëîã
function _abort(script_name, function_name, error_string, ...)
if script_name == nil then
script_name = "<nil>"
end
if function_name == nil then
function_name = "<nil>"
end
abort("%s.%s - "..error_string, script_name, function_name, ...)
end
--\\ Âûâîä â ëîã
function log(text)
if _console == nil or (_console.GetVal("dbg.log") == true) then
get_console():execute("load ~~ " .. tostring(text))
end
end
--\\ Ïîäñ÷¸ò êîë-âà ýëåìåíòîâ â òàáëèöå (ïîä-òàáëèöû ñ÷èòàåò çà 1 ýëåìåíò)
function table_size(tTbl)
local count = 0
for _,_ in pairs(tTbl) do
count = count + 1
end
return count
end
--! Âíèìàíèå: ñòàíäàðòíûé øàáëîí ïëîõî ðàáîòàåò ñ "îñîáûìè" ñèìâîëàìè (íàïðèìåð #) è ðàçáèâàåò ñòðîêó êðèâî
function string_expl(sStr, sDiv, Mode, bNoClear)
sStr = tostring(sStr)
if not (sStr ~= "nil" and sStr ~= '') then return {} end --> íå÷åãî ðàçäåëÿòü
local tRet = {}
local sPattern = '[%w%_]+' --> äåôîëòíûé ïàòåðí (ðàçäåëåíèå ïî 'ñëîâàì')
if type(sDiv) == "string" then --> åñëè çàäàí ñåïàðàòîð: ðàçäåëÿåì ïî íåìó
if bNoClear then --> åñëè ÍÅ óêàçàíî '÷èñòèòü ïðîáåëû'
sPattern = '([^'..sDiv..']+)'
else --> èíà÷å ñ ÷èñòêîé ïðîáåëîâ
sPattern = '%s*([^'..sDiv..']+)%s*'
end
end
--* ðàçäåëÿåì ñòðîêó ïî ïàòåðíó
if Mode == nil then --> îáû÷íûé ìàññèâ
for sValue in sStr:gmatch(sPattern) do
table.insert(tRet, sValue)
end
else
local sTypeMode = type(Mode)
if sTypeMode == "boolean" then --> òàáëèöà '[çíà÷åíèå] = true èëè false'
for sValue in sStr:gmatch(sPattern) do
tRet[sValue] = Mode
end
elseif sTypeMode == "number" then --> òàáëèöà '[idx] = ÷èñëî èëè ñòðèíã'
for sValue in sStr:gmatch(sPattern) do
tRet[#tRet+1] = tonumber(sValue) or sValue
end
end
end
return tRet --> âîçâðàùàåì òàáëèöó
end
--* Ðàñ÷¸ò ðàçíèöû ìåæäó äâóìÿ cam_dir:getH()
-- Äà, ó ìåíÿ ïëîõî ñ âåêòîðíîé àëãåáðîé î_Î
function calc_Y(new, old)
local wL = 0
local wR = 0
if new < old then
wR = old - new
if new < 0 then
wL = math.abs(-1.6 - new) + (4.8 - old)
else
wL = new + 1.6 + (4.8 - old)
end
else
wL = new - old
if old < 0 then
wR = (4.8 - new) + math.abs(-1.6 - old)
else
wR = (4.8 - new) + math.abs(-1.6) + old
end
end
if wL < wR then
return wL
end
if wL > wR then
return -wR
end
return 0
end
-- Âûäåëåíèå èç ìàòðèöû óãëîâ ïîâîðîòà â ïîñëåäîâàòåëüíîñòè x,z,y (P,B,H)
-- ïîäðàçóìåâàåòñÿ, ÷òî ìàòðèöà ÿâëÿåòñÿ ïðàâèëüíîé ìàòðèöåé ïîâîðîòà
-- ôóíêöèÿ ñîäðàíà èç áèáëèîòåêè Wild Magic 5
function extract_euler_xzy(m)
if m.i.y < 1 then
if m.i.y > -1 then
local az = math.asin(-m.i.y)
local ax = math.atan2(m.k.y, m.j.y)
local ay = math.atan2(m.i.z, m.i.x)
return ax, az, ay
else
local az = math.pi / 2
local ax = -math.atan2(-m.k.x, m.k.z)
local ay = 0
return ax, az, ay
end
else
local az = -math.pi / 2
local ax = math.atan2(-m.k.x, m.k.z)
local ay = 0
return ax, az, ay
end
end
function extract_direction(ph_element)
local m = ph_element:global_transform()
local p,b,h = extract_euler_xzy(m)
return vector():setHP(h, p)
end
--\\ Óçíà¸ì êàðòó, íà êîòîðîé íàõîäèòñÿ îáúåêò ïî ID\Server OBJ
function getMapName(id_or_sobj)
local sobj
if type(id_or_sobj) == "number" then
sobj = alife():object(id_or_sobj)
else
sobj = id_or_sobj
end
if sobj then
local lvert = game_graph():vertex(sobj.m_game_vertex_id)
local lid = lvert:level_id()
if lid ~= nil then
return alife():level_name(lid)
end
end
end
--\\ Óçíà¸ì ðàíã íåïèñÿ (âîçâðàùÿåò íîìåð ðàíãà, ðàíê (÷èñëî) è íàçâàíèå ðàíãà)
local rang_num_to_name = {
[0] = "st_rang_zero",
[1] = "st_rang_novice",
[2] = "st_rang_experienced",
[3] = "st_rang_experienced",
[4] = "st_rang_veteran",
[5] = "st_rang_master",
}
function rang(obj)
local rank = 0
local obj_rank = obj:rank()
if obj_rank >=0 and obj_rank <=25 then --> novice
rank = 1
end
if obj_rank >=26 and obj_rank <=30 then --> ext 1
rank = 2
end
if obj_rank >=31 and obj_rank <=40 then --> ext 2
rank = 3
end
if obj_rank >=41 and obj_rank <=50 then --> veteran
rank = 4
end
if obj_rank >=51 then --> master
rank = 5
end
--[[ CS 1.5.10
if obj_rank >= 0 and obj_rank <= 300 then
rank = 1 -- Novice
end
if obj_rank > 300 and obj_rank <= 450 then
rank = 2 -- Extnd. 1
end
if obj_rank > 450 and obj_rank <= 600 then
rank = 3 -- Extnd. 2
end
if obj_rank > 600 and obj_rank < 900 then
rank = 4 -- Veteran
end
if obj_rank >= 900 then
rank = 5 -- Master
end
]]
return rank, obj_rank, rang_num_to_name[rank]
end
@@ -0,0 +1,148 @@
--prefetch("_g")
function cs_register(factory,client_object_class,server_object_class,clsid,script_clsid)
factory:register(client_object_class,server_object_class,clsid,script_clsid)
end
function c_register(factory,client_object_class,clsid,script_clsid)
if (editor() == false) then
factory:register(client_object_class,clsid,script_clsid)
end
end
function s_register(factory,server_object_class,clsid,script_clsid)
factory:register(server_object_class,clsid,script_clsid)
end
function register(object_factory)
-- GENERAL ---------------------------------------------------------------------------------------------------------------------------
c_register (object_factory, "ui_main_menu.main_menu", "MAIN_MNU", "main_menu")
cs_register (object_factory, "ce_smart_zone", "smart_terrain.se_smart_terrain", "SMRTTRRN", "smart_terrain")
cs_register (object_factory, "CLevelChanger", "se_level_changer.se_level_changer", "LVL_CHNG", "level_changer_s")
cs_register (object_factory, "CActor", "se_actor.se_actor", "S_ACTOR", "script_actor")
cs_register (object_factory, "CAI_Stalker", "se_stalker.se_stalker", "AI_STL_S", "script_stalker")
cs_register (object_factory, "CHelicopter", "se_heli.se_heli", "C_HLCP_S", "script_heli")
cs_register (object_factory, "ce_script_zone", "se_zones.se_restrictor", "SPC_RS_S", "script_restr") -- changed from ce_smart_zone to ce_script_zone for enter_zone and exit_zone callbacks
cs_register (object_factory, "CPhysicObject", "se_item.se_physic", "O_PHYS_S", "script_phys")
cs_register (object_factory, "smart_cover_object", "se_smart_cover.se_smart_cover", "SMRT_C_S", "smartcover_s")
cs_register (object_factory, "CDestroyablePhysicsObject", "se_item.se_physic", "O_DSTR_S", "destrphys_s")
cs_register (object_factory, "hanging_lamp", "se_item.se_lamp", "SO_HLAMP", "hlamp_s")
cs_register (object_factory, "CCar", "se_car.se_car", "SCRPTCAR", "car_s")
cs_register (object_factory, "CAI_Trader", "se_stalker.se_trader", "AI_TRD_S", "script_trader")
-- ARTEFACTS --------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CElectricBall", "se_artefact.se_artefact", "SCRPTART", "artefact_s")
-- MONSTERS ---------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CAI_Bloodsucker", "se_monster.se_monster", "SM_BLOOD", "bloodsucker_s")
cs_register (object_factory, "CAI_Boar", "se_monster.se_monster", "SM_BOARW", "boar_s")
cs_register (object_factory, "CAI_Dog", "se_monster.se_monster", "SM_DOG_S", "dog_s")
cs_register (object_factory, "CAI_Flesh", "se_monster.se_monster", "SM_FLESH", "flesh_s")
cs_register (object_factory, "CAI_PseudoDog", "se_monster.se_monster", "SM_P_DOG", "pseudodog_s")
cs_register (object_factory, "CBurer", "se_monster.se_monster", "SM_BURER", "burer_s")
cs_register (object_factory, "CCat", "se_monster.se_monster", "SM_CAT_S", "cat_s")
cs_register (object_factory, "CChimera", "se_monster.se_monster", "SM_CHIMS", "chimera_s")
cs_register (object_factory, "CController", "se_monster.se_monster", "SM_CONTR", "controller_s")
cs_register (object_factory, "CFracture", "se_monster.se_monster", "SM_IZLOM", "fracture_s")
cs_register (object_factory, "CPoltergeist", "se_monster.se_monster", "SM_POLTR", "poltergeist_s")
cs_register (object_factory, "CPseudoGigant", "se_monster.se_monster", "SM_GIANT", "gigant_s")
cs_register (object_factory, "CZombie", "se_monster.se_monster", "SM_ZOMBI", "zombie_s")
cs_register (object_factory, "CSnork", "se_monster.se_monster", "SM_SNORK", "snork_s")
cs_register (object_factory, "CTushkano", "se_monster.se_monster", "SM_TUSHK", "tushkano_s")
cs_register (object_factory, "CTushkano", "se_monster.se_monster", "SM_RAT", "rat_s")
cs_register (object_factory, "CPsyDog", "se_monster.se_monster", "SM_DOG_P", "psy_dog_s")
cs_register (object_factory, "CPsyDogPhantom", "se_monster.se_monster", "SM_DOG_F", "psy_dog_phantom_s")
-- DEVICES ----------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CTorch", "se_item.se_item_torch", "TORCH_S", "device_torch_s")
-- cs_register (object_factory, "CFlashlight", "se_item.se_item", "D_FLALIT", "device_flashlight") --61
-- cs_register (object_factory, "CDosimeter", "se_item.se_item", "D_DSMETR", "device_dosimeter") --59
cs_register (object_factory, "CScientificDetector", "se_item.se_detector", "DET_SCIE", "detector_scientific_s")
cs_register (object_factory, "CEliteDetector", "se_item.se_detector", "DET_ELIT", "detector_elite_s")
cs_register (object_factory, "CAdvancedDetector", "se_item.se_detector", "DET_ADVA", "detector_advanced_s")
cs_register (object_factory, "CSimpleDetector", "se_item.se_detector", "DET_SIMP", "detector_simple_s")
cs_register (object_factory, "CPda", "se_item.se_pda", "S_PDA", "obj_pda_s")
-- cs_register (object_factory, "CPda", "se_item.se_pda", "D_PDA", "obj_pda_s") --63
-- OUTFITS ----------------------------------------------------------------------------------------------------------------------------
-- cs_register (object_factory, "CCustomOutfit", "se_item.se_outfit", "EQU_STLK", "equ_stalker") --70
-- cs_register (object_factory, "CCustomOutfit", "se_item.se_outfit", "E_STLK", "equ_stalker_s")
cs_register (object_factory, "CStalkerOutfit", "se_item.se_outfit", "E_STLK", "equ_stalker_s")
cs_register (object_factory, "CHelmet", "se_item.se_helmet", "E_HLMET", "equ_helmet_s")
-- WEAPONS ----------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CWeaponBinoculars", "se_item.se_weapon_magazined", "WP_BINOC", "wpn_binocular_s")
cs_register (object_factory, "CWeaponKnife", "se_item.se_weapon", "WP_KNIFE", "wpn_knife_s")
cs_register (object_factory, "CWeaponBM16", "se_item.se_weapon_shotgun", "WP_BM16", "wpn_bm16_s")
cs_register (object_factory, "CWeaponGroza", "se_item.se_weapon_magazined_w_gl", "WP_GROZA", "wpn_groza_s")
cs_register (object_factory, "CWeaponSVD", "se_item.se_weapon_magazined", "WP_SVD", "wpn_svd_s")
cs_register (object_factory, "CWeaponAK74", "se_item.se_weapon_magazined_w_gl", "WP_AK74", "wpn_ak74_s")
cs_register (object_factory, "CWeaponLR300", "se_item.se_weapon_magazined", "WP_LR300", "wpn_lr300_s")
cs_register (object_factory, "CWeaponHPSA", "se_item.se_weapon_magazined", "WP_HPSA", "wpn_hpsa_s")
cs_register (object_factory, "CWeaponPM", "se_item.se_weapon_magazined", "WP_PM", "wpn_pm_s")
cs_register (object_factory, "CWeaponRG6", "se_item.se_weapon_shotgun", "WP_RG6", "wpn_rg6_s")
cs_register (object_factory, "CWeaponRPG7", "se_item.se_weapon_magazined", "WP_RPG7", "wpn_rpg7_s")
cs_register (object_factory, "CWeaponShotgun", "se_item.se_weapon_shotgun", "WP_SHOTG", "wpn_shotgun_s")
cs_register (object_factory, "CWeaponAutomaticShotgun", "se_item.se_weapon_automatic_shotgun", "WP_ASHTG", "wpn_auto_shotgun_s")
-- cs_register (object_factory, "CWeaponMagazined", "se_item.se_weapon_magazined", "WP_MAGAZ", "wpn_magazined_s")
cs_register (object_factory, "CWeaponSVU", "se_item.se_weapon_magazined", "WP_SVU", "wpn_svu_s")
cs_register (object_factory, "CWeaponUSP45", "se_item.se_weapon_magazined", "WP_USP45", "wpn_usp45_s")
cs_register (object_factory, "CWeaponVal", "se_item.se_weapon_magazined", "WP_VAL", "wpn_val_s")
cs_register (object_factory, "CWeaponVintorez", "se_item.se_weapon_magazined", "WP_VINT", "wpn_vintorez_s")
cs_register (object_factory, "CWeaponWalther", "se_item.se_weapon_magazined", "WP_WALTH", "wpn_walther_s")
--cs_register (object_factory, "CWeaponStatMgun", "se_item.se_mgun", "W_STMGUN", "wpn_stat_mgun")
-- ANOMALY ZONES ---------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CHairsZone", "se_zones.se_zone_visual", "ZS_BFUZZ", "zone_bfuzz_s")
cs_register (object_factory, "CMosquitoBald", "se_zones.se_zone_anom", "ZS_MBALD", "zone_mbald_s")
cs_register (object_factory, "CMincer", "se_zones.se_zone_anom", "ZS_GALAN", "zone_galant_s")
cs_register (object_factory, "CMincer", "se_zones.se_zone_anom", "ZS_MINCE", "zone_mincer_s")
cs_register (object_factory, "CRadioactiveZone", "se_zones.se_zone_anom", "ZS_RADIO", "zone_radio_s")
cs_register (object_factory, "CTorridZone", "se_zones.se_zone_torrid", "ZS_TORRD", "zone_torrid_s")
cs_register (object_factory, "CAmebaZone", "se_zones.se_zone_visual", "ZS_AMEBA", "zone_ameba_s")
cs_register (object_factory, "CNoGravityZone", "se_zones.se_zone_anom", "ZS_NGRAV", "zone_nograv_s")
-- AMMO ------------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CWeaponAmmo", "se_item.se_ammo", "AMMO_S", "wpn_ammo_s")
cs_register (object_factory, "CWeaponAmmo", "se_item.se_ammo", "S_VOG25", "wpn_ammo_vog25_s")
cs_register (object_factory, "CWeaponAmmo", "se_item.se_ammo", "S_OG7B", "wpn_ammo_og7b_s")
cs_register (object_factory, "CWeaponAmmo", "se_item.se_ammo", "S_M209", "wpn_ammo_m209_s")
-- GRENADES --------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CF1", "se_item.se_grenade", "G_F1_S", "wpn_grenade_f1_s")
cs_register (object_factory, "CRGD5", "se_item.se_grenade", "G_RGD5_S", "wpn_grenade_rgd5_s")
-- EATABLE ---------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CFoodItem", "se_item.se_eatable", "S_FOOD", "obj_food_s")
-- ITEMS ---------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CScope", "se_item.se_item", "WP_SCOPE", "wpn_scope_s")
cs_register (object_factory, "CSilencer", "se_item.se_item", "WP_SILEN", "wpn_silencer_s")
cs_register (object_factory, "CGrenadeLauncher", "se_item.se_item", "WP_GLAUN", "wpn_grenade_launcher_s")
-- INVENTORY BOX ---------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CInventoryBox", "se_item.se_invbox", "S_INVBOX", "inventory_box_s")
-- EXPLOSIVE -------------------------------------------------------------------------------------------------------------------------
cs_register (object_factory, "CExplosiveItem", "se_item.se_explosive", "S_EXPLO", "obj_explosive_s")
-- ONLINE_OFFLINE_GROUP --------------------------------------------------------------------------------------------------------------
s_register (object_factory, "sim_squad_scripted.sim_squad_scripted", "ON_OFF_S", "online_offline_group_s")
cs_register (object_factory, "CAI_Bloodsucker", "se_legs.se_legs", "SWM_LEGS", "legs_s")
end
-- TODO: consider adding II_ATTCH and changing II_FOOD to S_FOOD in the future to register the rest of items in se_item binder
-- Hack:
_G._ALIFE_UNREGISTER = {
["E_STLK"] = "se_outfit",
["EQU_STLK"] = "se_outfit",
["D_DSMETR"] = "se_item",
["D_FLALIT"] = "se_item",
["D_PDA"] = "se_pda",
["II_FOOD"] = "se_eatable",
["II_ATTCH"] = "se_item",
}
@@ -0,0 +1,31 @@
--[[
Shoker Weapon Mod 2.1 port, modified by Wang_Laoshi (Ethereal) to work with Anomaly mod. Thanks a lot to the original creators of this mod - Shoker, РикошеТ and SWM Team in general.
--]]
LegsTbl = {}
class "se_legs" (cse_alife_monster_base)
function se_legs:__init (section) super (section)
--
end
function se_legs:can_switch_offline()
return false
end
function se_legs:can_switch_online()
return true
end
function se_legs:on_register()
cse_alife_monster_base.on_register( self )
local level_name = alife():level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
LegsTbl[level_name] = self.id
end
function se_legs:on_unregister()
local level_name = alife():level_name(game_graph():vertex(self.m_game_vertex_id):level_id())
LegsTbl[level_name] = nil
cse_alife_monster_base.on_unregister(self)
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,53 @@
function on_mcm_load()
op = { id= "swm_legs",sh=true ,gr={
{id = "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_swm_legs_title",size= {512,50},spacing= 20 },
{id = "hide_legs_low_crouch", type = "check", val = 1, def=true},
{id = "legs_offset", type = "track", val = 2, min=-1.5,max=-0.4,step=0.01, def = -0.65},
{id = "legs_offset_side", type = "track", val = 2, min=-0.2,max=0.2,step=0.01, def = 0},
{id = "toggle_turn_step_sound", type = "check", val = 1, def=true},
{id = "toggle_turn_step_sound_exo", type = "check", val = 1, def=true},
{id = "turn_step_sound_volume", type = "track", val = 2, min=0.1,max=1,step=0.1, def = 0.3},
{id = "use_hd_models", type = "check", val = 1, def=false},
{id = "enable_idle_anims", type = "check", val = 1, def=true},
{id = "idle_anim_min_cooldown", type = "track", val = 2, min=3,max=120,step=1, def = 6},
{id = "idle_anim_max_cooldown", type = "track", val = 2, min=4,max=300,step=1, def = 30},
{id = "use_combat_state", type = "check", val = 1, def=true},
{id = "use_special_noncombat_shift", type = "check", val = 1, def=false},
{id = "legs_offset_noncombat", type = "track", val = 2, min=-1.5,max=-0.4,step=0.01, def = -0.5},
{id = "use_slow_down_state", type = "check", val = 1, def=true},
{id = "visual_upg_enabled", type = "check", val = 1, def=true},
--{id = "enable_dirt", type = "check", val = 1, def=true},
--{id = "enable_blood", type = "check", val = 1, def=true},
{id = "enable_debug_warnings", type = "check", val = 1, def=true},
{id = "disabled", type = "check", val = 1, def=false}
}
}
return op
end
local defaults = {
["hide_legs_low_crouch"] = true,
["legs_offset"] = -0.65,
["legs_offset_side"] = 0,
["toggle_turn_step_sound"] = true,
["toggle_turn_step_sound_exo"] = true,
["turn_step_sound_volume"] = 0.3,
["use_hd_models"] = false,
["enable_idle_anims"] = true,
["idle_anim_min_cooldown"] = 6,
["idle_anim_max_cooldown"] = 30,
["use_combat_state"] = true,
["use_special_noncombat_shift"] = false,
["legs_offset_noncombat"] = -0.5,
["use_slow_down_state"] = true,
["visual_upg_enabled"] = true,
--["enable_dirt"] = true,
--["enable_blood"] = true,
["enable_debug_warnings"] = true,
["disabled"] = false
}
function get_config(key)
if ui_mcm then return ui_mcm.get("swm_legs/"..key) else return defaults[key] end
end