Fixing minor bugs in scripts
This commit is contained in:
1 parent
80133aa8c8
commit
87fb6d4655
14 files changed
+490
-234
No files matched your search
+238
-117
@@ -10,7 +10,9 @@ teacher_told_about_book = false
|
||||
|
||||
night_time = false
|
||||
|
||||
player_left_darklands = false
|
||||
--player_left_darklands = false
|
||||
|
||||
was_darklands = false
|
||||
|
||||
morning_can_open_door_index = 0
|
||||
morning_did_open_door_index = 0
|
||||
@@ -153,18 +155,6 @@ function on_npc_interact(npc_index)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("dialog_aiperi_morning001")
|
||||
--[[
|
||||
if (player_ghost_aware) then
|
||||
local player_alik_aware = game_api.getIntValue("player_alik_aware")
|
||||
if player_alik_aware == 1 then
|
||||
game_api.start_dialogue("aiperi_dialog002")
|
||||
else
|
||||
game_api.start_dialogue("aiperi_dialog001")
|
||||
game_api.setIntValue("player_alik_aware", 1)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("aiperi_dialog003")
|
||||
end]]
|
||||
end
|
||||
end
|
||||
if npc_index == 0 then
|
||||
@@ -292,82 +282,98 @@ function on_teachers_door_click()
|
||||
game_api.start_dialogue("door_teacher_dialog001")
|
||||
end
|
||||
else
|
||||
print("morning_can_open_door_index is")
|
||||
print(morning_can_open_door_index)
|
||||
|
||||
if (game_api.is_dawn()) then
|
||||
print("morning_can_open_door_index is")
|
||||
print(morning_can_open_door_index)
|
||||
|
||||
if (teacher_door_opened == false) then
|
||||
teacher_door_opened = true
|
||||
if (morning_can_open_door_index == 3) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
else
|
||||
if (morning_did_open_door_index == 1) then
|
||||
--s1 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(16)
|
||||
|
||||
elseif (morning_did_open_door_index == 2) then
|
||||
--s2 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(15)
|
||||
elseif (morning_did_open_door_index == 5) then
|
||||
--n3 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(13)
|
||||
elseif (morning_did_open_door_index == 4) then
|
||||
--n2 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(14)
|
||||
elseif (morning_did_open_door_index == 6) then
|
||||
--hall + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(12)
|
||||
else
|
||||
--Player was in corridor, but tries to open the teacher's door
|
||||
--s3 only
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--game_api.start_dialogue("door_unlock_dialog001")
|
||||
|
||||
|
||||
if (morning_can_open_door_index == 3) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
else
|
||||
if (morning_did_open_door_index == 1) then
|
||||
--s1 + s3
|
||||
elseif (game_api.is_night()) then
|
||||
if (teacher_door_opened == false) then
|
||||
teacher_door_opened = true
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(16)
|
||||
if (morning_can_open_door_index == 3) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
else
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
end
|
||||
|
||||
elseif (morning_did_open_door_index == 2) then
|
||||
--s2 + s3
|
||||
game_api.switch_navigation(10)
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(15)
|
||||
elseif (morning_did_open_door_index == 5) then
|
||||
--n3 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(13)
|
||||
elseif (morning_did_open_door_index == 4) then
|
||||
--n2 + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(14)
|
||||
elseif (morning_did_open_door_index == 6) then
|
||||
--hall + s3
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(12)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
if (morning_can_open_door_index == 3) then
|
||||
print("morning_did_open_door_index is")
|
||||
print(morning_did_open_door_index)
|
||||
if (morning_did_open_door_index == 0) then
|
||||
morning_did_open_door_index = 3
|
||||
game_api.start_dialogue("door_unlock_dialog001")
|
||||
|
||||
game_api.rotate_object("Room_S_2_Leaf001", 90, 0.5, nil)
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(10)
|
||||
end
|
||||
else
|
||||
game_api.start_dialogue("door_dialog001")
|
||||
end]]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -458,8 +464,8 @@ end
|
||||
function on_n2_door_click()
|
||||
|
||||
|
||||
print("player_left_darklands")
|
||||
print(player_left_darklands)
|
||||
--print("player_left_darklands")
|
||||
--print(player_left_darklands)
|
||||
print("morning_can_open_door_index")
|
||||
print(morning_can_open_door_index)
|
||||
print("morning_did_open_door_index")
|
||||
@@ -507,9 +513,9 @@ function book_dialog_zone001_enter_callback()
|
||||
print("book_dialog_zone001_enter_callback step 3")
|
||||
if (player_hold_book) and (night_time == false) then
|
||||
print("book_dialog_zone001_enter_callback step 4")
|
||||
game_api.player_stop()
|
||||
game_api.start_dialogue("book_dialog001")
|
||||
game_api.switch_navigation(0)
|
||||
game_api.player_stop()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -530,25 +536,29 @@ function on_computer_clicked()
|
||||
print("on_computer_clicked--1")
|
||||
game_api.start_dialogue("computer_dialog003")
|
||||
else
|
||||
if teacher_told_about_book then
|
||||
print("on_computer_clicked--2")
|
||||
if (night_time == false) then
|
||||
print("on_computer_clicked--3")
|
||||
if (player_hold_book) then
|
||||
print("on_computer_clicked--4")
|
||||
game_api.quest_set_objective_completed("study_project", "study_project_write")
|
||||
game_api.start_cutscene("computer_cutscene001")
|
||||
if game_api.is_darklands() then
|
||||
game_api.start_dialogue("computer_dialog004")
|
||||
else
|
||||
if teacher_told_about_book then
|
||||
print("on_computer_clicked--2")
|
||||
if (night_time == false) then
|
||||
print("on_computer_clicked--3")
|
||||
if (player_hold_book) then
|
||||
print("on_computer_clicked--4")
|
||||
game_api.quest_set_objective_completed("study_project", "study_project_write")
|
||||
game_api.start_cutscene("computer_cutscene001")
|
||||
else
|
||||
print("on_computer_clicked--5")
|
||||
game_api.start_dialogue("book_dialog002")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--5")
|
||||
game_api.start_dialogue("book_dialog002")
|
||||
print("on_computer_clicked--6")
|
||||
game_api.start_dialogue("computer_dialog002")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--6")
|
||||
game_api.start_dialogue("computer_dialog002")
|
||||
print("on_computer_clicked--7")
|
||||
game_api.start_dialogue("computer_dialog001")
|
||||
end
|
||||
else
|
||||
print("on_computer_clicked--7")
|
||||
game_api.start_dialogue("computer_dialog001")
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -576,6 +586,8 @@ function on_sleep_cutscene()
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Main_Hall_001", 1)
|
||||
game_api.activate_interactive_object("Note001")
|
||||
|
||||
teacher_door_opened = false
|
||||
end
|
||||
|
||||
function on_teacher_arrived_intermediate()
|
||||
@@ -675,8 +687,9 @@ game_api.set_darklands_callbacks(
|
||||
game_api.set_npc_enabled(4, false)
|
||||
game_api.set_npc_enabled(5, false)
|
||||
game_api.setIntValue("day", 1)
|
||||
game_api.setIntValue("need_sleep", 1)
|
||||
player_left_darklands = true
|
||||
print("Setting to day 1----x")
|
||||
--game_api.setIntValue("need_sleep", 1)
|
||||
--player_left_darklands = true
|
||||
morning_did_open_door_index = 0
|
||||
setDay1MorningSetup()
|
||||
game_api.set_dawn()
|
||||
@@ -694,9 +707,14 @@ game_api.set_darklands_callbacks(
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
morning_can_open_door_index = 5
|
||||
elseif (pz <= 8.0) and (pz > 0) and (px <= -1.5) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
else
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
end
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
morning_can_open_door_index = 3
|
||||
|
||||
elseif (pz <= 0.0) and (pz > -8) and (px >= 1.5) then
|
||||
game_api.activate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
@@ -711,7 +729,11 @@ game_api.set_darklands_callbacks(
|
||||
morning_can_open_door_index = 1
|
||||
else
|
||||
--All set before
|
||||
if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end
|
||||
morning_can_open_door_index = 0
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -761,6 +783,7 @@ function setDay0setup()
|
||||
end
|
||||
|
||||
function setDay1setup()
|
||||
print("Enter setDay1setup")
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_North_2_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_North_3_001", 1)
|
||||
@@ -802,7 +825,11 @@ function setDay1MorningSetup()
|
||||
|
||||
game_api.activate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.activate_interactive_object("Room_Cover_South_3_001")
|
||||
--[[if (teacher_door_opened) then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
else]]
|
||||
game_api.activate_interactive_object("Room_Cover_South_3_001")
|
||||
--end
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
game_api.activate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
|
||||
@@ -811,7 +838,11 @@ function setDay1MorningSetup()
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_0_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_1_Leaf001", 0)
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 0)
|
||||
if (teacher_door_opened) then
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 90)
|
||||
else
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 0)
|
||||
end
|
||||
game_api.set_object_rotation("Hall_Leaf001", 0)
|
||||
|
||||
game_api.set_object_alpha("Room_Cover_North_1_001", 1)
|
||||
@@ -822,6 +853,8 @@ function setDay1MorningSetup()
|
||||
game_api.set_object_alpha("Room_Cover_South_3_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Corridor_001", 1)
|
||||
game_api.set_object_alpha("Room_Cover_Main_Hall_001", 1)
|
||||
|
||||
-- TODO: Make check for teacher_door_opened false or true
|
||||
|
||||
game_api.set_npc_enabled(0, false)
|
||||
game_api.set_npc_enabled(1, false)
|
||||
@@ -833,34 +866,61 @@ function setDay1MorningSetup()
|
||||
if morning_did_open_door_index == 1 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_1_001")
|
||||
game_api.set_object_rotation("Room_S_0_Leaf001", 90)
|
||||
game_api.switch_navigation(8)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(16)
|
||||
else
|
||||
game_api.switch_navigation(8)
|
||||
end
|
||||
elseif morning_did_open_door_index == 2 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_2_001")
|
||||
game_api.set_object_rotation("Room_S_1_Leaf001", 90)
|
||||
game_api.switch_navigation(9)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(15)
|
||||
else
|
||||
game_api.switch_navigation(9)
|
||||
end
|
||||
elseif morning_did_open_door_index == 3 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
game_api.set_object_rotation("Room_S_2_Leaf001", 90)
|
||||
|
||||
game_api.switch_navigation(10)
|
||||
|
||||
elseif morning_did_open_door_index == 4 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_2_001")
|
||||
game_api.set_object_rotation("Room_N_1_Leaf001", -90)
|
||||
game_api.switch_navigation(11)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(14)
|
||||
else
|
||||
game_api.switch_navigation(11)
|
||||
end
|
||||
elseif morning_did_open_door_index == 5 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_North_3_001")
|
||||
game_api.set_object_rotation("Room_N_2_Leaf001", -90)
|
||||
game_api.switch_navigation(7)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(13)
|
||||
else
|
||||
game_api.switch_navigation(7)
|
||||
end
|
||||
elseif morning_did_open_door_index == 6 then
|
||||
game_api.deactivate_interactive_object("Room_Cover_Main_Hall_001")
|
||||
game_api.set_object_rotation("Hall_Leaf001", 90)
|
||||
game_api.switch_navigation(6)
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(12)
|
||||
else
|
||||
game_api.switch_navigation(6)
|
||||
end
|
||||
else
|
||||
if (teacher_door_opened) then
|
||||
game_api.switch_navigation(10)
|
||||
else
|
||||
game_api.switch_navigation(17)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function setDay1NightSetup()
|
||||
night_time = true
|
||||
teacher_door_opened = false
|
||||
|
||||
print("setDay1NightSetup")
|
||||
morning_did_open_door_index = 0
|
||||
@@ -985,7 +1045,15 @@ function on_aiperi_opens_door()
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(6)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(12)
|
||||
else
|
||||
game_api.switch_navigation(6)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, 6.5)
|
||||
@@ -1003,7 +1071,15 @@ function on_aiperi_opens_door()
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(7)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(13)
|
||||
else
|
||||
game_api.switch_navigation(7)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0.0, 0, 6.43818)
|
||||
@@ -1022,7 +1098,14 @@ function on_aiperi_opens_door()
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(11)
|
||||
if (teacher_door_opened) then
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(14)
|
||||
else
|
||||
game_api.switch_navigation(11)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -1.7911)
|
||||
@@ -1042,7 +1125,15 @@ function on_aiperi_opens_door()
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(9)
|
||||
|
||||
if (teacher_door_opened) then
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(15)
|
||||
else
|
||||
game_api.switch_navigation(9)
|
||||
end
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -1.7911)
|
||||
game_api.set_npc_enabled(1, true)
|
||||
@@ -1062,7 +1153,14 @@ function on_aiperi_opens_door()
|
||||
game_api.fade_object("Room_Cover_Corridor_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_Corridor_001")
|
||||
end)
|
||||
game_api.switch_navigation(8)
|
||||
if (teacher_door_opened) then
|
||||
game_api.fade_object("Room_Cover_South_3_001", 0, 0.5, function()
|
||||
game_api.deactivate_interactive_object("Room_Cover_South_3_001")
|
||||
end)
|
||||
game_api.switch_navigation(16)
|
||||
else
|
||||
game_api.switch_navigation(8)
|
||||
end
|
||||
|
||||
--Aiperi incoming
|
||||
game_api.npc_set_position(1, 0, 0, -9.77948)
|
||||
@@ -1081,10 +1179,31 @@ end
|
||||
|
||||
game_api.set_location_callbacks(
|
||||
function()
|
||||
print("Enter location uni interior")
|
||||
player_left_darklands = false
|
||||
print("Enter location uni interior-")
|
||||
--player_left_darklands = false
|
||||
local hp = game_api.getFloatValue("player_hp")
|
||||
game_api.set_player_hp(hp)
|
||||
local day = game_api.getIntValue("day")
|
||||
|
||||
print("day is:")
|
||||
print(day)
|
||||
|
||||
if (day > 0) and (game_api.is_night()==false) then
|
||||
print("entered day setup")
|
||||
setDay1setup()
|
||||
game_api.switch_navigation(3)
|
||||
end
|
||||
|
||||
print("entered exited-")
|
||||
|
||||
if (was_darklands) and (game_api.is_darklands() == false) and game_api.is_dawn() then
|
||||
--Player died in exterior and then in the morning returned back
|
||||
print("setDay1MorningSetup entered-")
|
||||
setDay1MorningSetup()
|
||||
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
local need_sleep = game_api.getIntValue("need_sleep")
|
||||
local day = game_api.getIntValue("day")
|
||||
@@ -1095,13 +1214,15 @@ game_api.set_location_callbacks(
|
||||
game_api.switch_navigation(3)
|
||||
else
|
||||
--Do nothing, it should have been already set up
|
||||
end
|
||||
end]]
|
||||
end,
|
||||
function()
|
||||
print("Exit location uni interior")
|
||||
player_left_darklands = false
|
||||
--player_left_darklands = false
|
||||
local hp = game_api.get_player_hp()
|
||||
game_api.setFloatValue("player_hp", hp)
|
||||
|
||||
was_darklands = game_api.is_darklands()
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user