Added, Updated and Removed Mods; Updated Readme
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
<w>
|
||||
<btn_set_spawn x="129.5" y="223" width="136" height="28" check_mode="0">
|
||||
<window_name>button_spawn</window_name>
|
||||
<text y="2" font="letterica18">set_spawn_button</text>
|
||||
<texture>ui_button_ordinary</texture>
|
||||
</btn_set_spawn>
|
||||
</w>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<w>
|
||||
<btn_set_spawn x="97.125" y="223" width="102" height="28" check_mode="0" stretch="1">
|
||||
<window_name>button_spawn</window_name>
|
||||
<text y="2" font="letterica18">set_spawn_button</text>
|
||||
<texture>ui_button_ordinary</texture>
|
||||
</btn_set_spawn>
|
||||
</w>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<w>
|
||||
<btn_set_spawn x="72.84375" y="223" width="76.5" height="28" check_mode="0" stretch="1">
|
||||
<window_name>button_spawn</window_name>
|
||||
<text y="2" font="letterica18">set_spawn_button</text>
|
||||
<texture>ui_button_ordinary</texture>
|
||||
</btn_set_spawn>
|
||||
</w>
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
local _InitControls = ui_sleep_dialog.UISleep.InitControls
|
||||
local _InitCallbacks = ui_sleep_dialog.UISleep.InitCallbacks
|
||||
local _TestAndShow = ui_sleep_dialog.UISleep.TestAndShow
|
||||
local _OnButtonSleep = ui_sleep_dialog.UISleep.OnButtonSleep
|
||||
|
||||
function ui_sleep_dialog.UISleep.OnButtonSleep(self)
|
||||
if not soulslike.IsSoulslikeMode() then
|
||||
_OnButtonSleep(self)
|
||||
return
|
||||
end
|
||||
local bleeding = db.actor.bleeding > 0
|
||||
local radiation = db.actor.radiation > 0
|
||||
|
||||
-- Prevent sleep if bleeding and/or iradiated.
|
||||
if (bleeding or radiation) then
|
||||
if (bleeding and radiation) then
|
||||
actor_menu.set_msg(1, game.translate_string("st_sleep_bleeding_irradiated"),5)
|
||||
elseif (bleeding) then
|
||||
actor_menu.set_msg(1, game.translate_string("st_sleep_bleeding"),4)
|
||||
elseif (radiation) then
|
||||
actor_menu.set_msg(1, game.translate_string("st_sleep_irradiated"),4)
|
||||
end
|
||||
disable_info("sleep_active")
|
||||
if self:IsShown() then
|
||||
self:HideDialog()
|
||||
Unregister_UI("UISleep")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- Check if actor is inside a safe zone
|
||||
local actor_hide = GetEvent("current_safe_cover") and true or false
|
||||
|
||||
-- Check if actor is inside a tent
|
||||
if (not actor_hide) then
|
||||
actor_hide = item_tent.get_nearby_tent(1.5)
|
||||
end
|
||||
|
||||
-- If all is no, dont sleep
|
||||
if (not actor_hide) then
|
||||
actor_menu.set_msg(1, game.translate_string("st_cant_sleep_find_shelter_mlr"),4)
|
||||
disable_info("sleep_active")
|
||||
if self:IsShown() then
|
||||
self:HideDialog()
|
||||
Unregister_UI("UISleep")
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
_OnButtonSleep(self)
|
||||
end
|
||||
|
||||
function ui_sleep_dialog.UISleep.TestAndShow(self, force)
|
||||
if not soulslike.IsSoulslikeMode() then
|
||||
_TestAndShow(self, force)
|
||||
return
|
||||
end
|
||||
|
||||
if force then
|
||||
_TestAndShow(self, force)
|
||||
else
|
||||
-- Detour and show the UI so we can let the user
|
||||
-- set their spawn point. Move the sleep check code
|
||||
-- to the Sleep button click instead
|
||||
self:Initialize()
|
||||
self:ShowDialog(true)
|
||||
Register_UI("UISleep","ui_sleep_dialog")
|
||||
end
|
||||
end
|
||||
|
||||
function ui_sleep_dialog.UISleep.InitControls(self)
|
||||
_InitControls(self)
|
||||
|
||||
if not soulslike.IsSoulslikeMode() then
|
||||
return
|
||||
end
|
||||
|
||||
local xml = CScriptXmlInit()
|
||||
xml:ParseFile("soulslike_ui_sleep_dialog.xml")
|
||||
|
||||
local function move(ctrl, deltaX, deltaY)
|
||||
local pos = ctrl:GetWndPos()
|
||||
ctrl:SetWndPos(vector2():set( pos.x + deltaX ,pos.y + deltaY ))
|
||||
end
|
||||
|
||||
-- Edited by Sota
|
||||
--move(self.btn_sleep, 52, 0)
|
||||
--move(self.btn_cancel, 52, 0)
|
||||
local ratio = utils_xml.screen_ratio()
|
||||
move(self.btn_sleep, 70.5 * ratio, 0)
|
||||
move(self.btn_cancel, 70.5 * ratio, 0)
|
||||
|
||||
self.btn_set_spawn = xml:Init3tButton("btn_set_spawn", self.back)
|
||||
self:Register(self.btn_set_spawn, "btn_set_spawn")
|
||||
|
||||
-- Edited by Sota
|
||||
--if not utils_xml.is_widescreen() then
|
||||
-- move(self.btn_set_spawn, 40, 0)
|
||||
--end
|
||||
end
|
||||
|
||||
function ui_sleep_dialog.UISleep.InitCallbacks(self)
|
||||
_InitCallbacks(self)
|
||||
|
||||
if not soulslike.IsSoulslikeMode() then
|
||||
return
|
||||
end
|
||||
|
||||
self:AddCallback("btn_set_spawn", ui_events.BUTTON_CLICKED, self.OnButtonSetSpawn, self)
|
||||
end
|
||||
|
||||
function ui_sleep_dialog.UISleep:OnButtonSetSpawn()
|
||||
soulslike.set_spawn(true);
|
||||
end
|
||||
@@ -0,0 +1,28 @@
|
||||
[General]
|
||||
gameName=stalkeranomaly
|
||||
modid=0
|
||||
version=d2024.4.1.0
|
||||
newestVersion=
|
||||
category="-1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=Soulslike_Sleep_Btn_Fix.zip
|
||||
repository=Nexus
|
||||
ignoredVersion=
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=false
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-04-01T04:59:38Z
|
||||
nexusCategory=0
|
||||
converted=false
|
||||
validated=false
|
||||
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
|
||||
tracked=0
|
||||
|
||||
[installedFiles]
|
||||
1\modid=0
|
||||
1\fileid=0
|
||||
size=1
|
||||
Reference in New Issue
Block a user