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,27 @@
-- If you don't use MCM, change your defaults from here.
local defaults = {
["trader_sleep"] = false,
["mechanic_sleep"] = false,
["medic_sleep"] = false,
["sleep_from"] = 21,
["sleep_to"] = 5,
}
function get_config(key)
if ui_mcm then return ui_mcm.get("rad_ai/"..key) else return defaults[key] end
end
function on_mcm_load()
op = { id= "rad_ai",sh=true ,gr={
{ id= "title",type= "slide",link= "ui_options_slider_player",text="ui_mcm_rad_ai_title",size= {512,50},spacing= 20 },
{id = "trader_sleep", type = "check", val = 1, def = false},
{id = "mechanic_sleep", type = "check", val = 1, def = false},
{id = "medic_sleep", type = "check", val = 1, def = false},
{id = "sleep_from", type = "track", val = 2, min=18,max=23,step=1, def = 21},
{id = "sleep_to", type = "track", val = 2, min=3,max=9,step=1, def = 5},
}
}
return op
end
@@ -0,0 +1,114 @@
local wpn_t = { ["w_rifle"] = true, ["w_sniper"] = true, ["w_smg"] = true }
xr_conditions.guard_has_rifle = function(actor, npc, p)
if not (npc) then
return false
end
local id = type(npc.id) == "function" and npc:id() or npc.id
local st = db.storage[id]
if not (st) then
return false
end
local obj = st and st.object or level.object_by_id(id)
if (not obj) then
return
end
local wpn = obj:best_weapon() or obj:active_item()
if not (wpn and IsWeapon(wpn) and not IsMelee(wpn)) then
return
end
local kind = wpn and wpn:section() and ini_sys:r_string_ex(wpn:section(), "kind") or nil
if kind and wpn_t[kind] then
return true
end
return false
end
xr_conditions.guard_has_sniper_rifle = function(actor, npc, p)
if not (npc) then
return false
end
local id = type(npc.id) == "function" and npc:id() or npc.id
local st = db.storage[id]
if not (st) then
return false
end
local obj = st and st.object or level.object_by_id(id)
if (not obj) then
return
end
local wpn = obj:best_weapon() or obj:active_item()
if not (wpn and IsWeapon(wpn) and not IsMelee(wpn)) then
return
end
local kind = wpn and wpn:section() and ini_sys:r_string_ex(wpn:section(), "kind") or nil
if kind and kind == "w_sniper" then
return true
end
return false
end
xr_conditions.trader_sleep_time = function(actor, npc, p)
local opt_on = semiradiant_ai_mcm.get_config("trader_sleep")
local hrs_from = semiradiant_ai_mcm.get_config("sleep_from")
local hrs_to = semiradiant_ai_mcm.get_config("sleep_to")
local must_go_sleep = opt_on and hrs_from and hrs_to and (level.get_time_hours() >= hrs_from or level.get_time_hours() < hrs_to)
if db.actor ~= nil and must_go_sleep then
return true
end
return false
end
xr_conditions.mechanic_sleep_time = function(actor, npc, p)
local opt_on = semiradiant_ai_mcm.get_config("mechanic_sleep")
local hrs_from = semiradiant_ai_mcm.get_config("sleep_from")
local hrs_to = semiradiant_ai_mcm.get_config("sleep_to")
local must_go_sleep = opt_on and hrs_from and hrs_to and (level.get_time_hours() >= hrs_from or level.get_time_hours() < hrs_to)
if db.actor ~= nil and must_go_sleep then
return true
end
return false
end
xr_conditions.medic_sleep_time = function(actor, npc, p)
local opt_on = semiradiant_ai_mcm.get_config("medic_sleep")
local hrs_from = semiradiant_ai_mcm.get_config("sleep_from")
local hrs_to = semiradiant_ai_mcm.get_config("sleep_to")
local must_go_sleep = opt_on and hrs_from and hrs_to and (level.get_time_hours() >= hrs_from or level.get_time_hours() < hrs_to)
if db.actor ~= nil and must_go_sleep then
return true
end
return false
end
xr_conditions.check_door_faction_time = function(actor,npc,p)
local opt_on = semiradiant_ai_mcm.get_config("trader_sleep")
local hrs_from = semiradiant_ai_mcm.get_config("sleep_from")
local hrs_to = semiradiant_ai_mcm.get_config("sleep_to")
local must_go_sleep = opt_on and hrs_from and hrs_to and (level.get_time_hours() >= hrs_from or level.get_time_hours() < hrs_to)
if(p[1]~=nil) then
return game_relations.is_factions_enemies(character_community(db.actor), p[1]) or must_go_sleep
end
return false
end