Working on fixing dorm bugs and some uni

This commit is contained in:
Vladislav Khorev committed 2026-06-16 14:05:18 +03:00
1 parent 939136c705
commit c891161d69
16 files changed
+200 -230

No files matched your search

+32 -39
View File
@@ -7,24 +7,13 @@ player_door_opened = false
alik_door_opened = false
local function step2()
game_api.npc_walk_to(0, 1.03298, 0, -4.61801, step1)
end
function step1()
game_api.npc_walk_to(0, -6.65295, 0, 4.15397, step2)
end
step1()
game_api.start_dialogue("dialog_start001")
phone_picked_up = false
journal_picked_up = false
function on_npc_interact(npc_index)
if npc_index == 2 then
if npc_index == 0 then
local player_alik_aware = game_api.getIntValue("alik_aware")
local player_container_aware = game_api.getIntValue("player_container_aware")
if player_container_aware == 1 then
@@ -36,12 +25,6 @@ function on_npc_interact(npc_index)
game_api.start_dialogue("dialog_alik001")
end
end
if npc_index == 0 then
game_api.start_dialogue("dialog_female_student001")
end
if npc_index == 1 then
game_api.start_dialogue("dialog_female_student002")
end
end
function on_phone_pickup()
@@ -60,25 +43,6 @@ function on_journal_pickup()
game_api.quest_set_objective_completed("tutorial_take_items", "take_journal")
end
--[[
function pickup_phone_zone001_enter_callback()
print("pickup_phone_zone001_enter_callback--!")
if (not phone_picked_up) or (not journal_picked_up) then
game_api.start_dialogue("dialog_phone001")
game_api.switch_navigation(1)
end
end
function pickup_phone_zone001_exit_callback()
print("pickup_phone_zone001_exit_callback--!")
game_api.switch_navigation(0)
end
game_api.set_trigger_zone_callbacks("pickup_phone_zone001",
pickup_phone_zone001_enter_callback,
pickup_phone_zone001_exit_callback
)]]
function ladder_zone001_enter_callback()
game_api.start_dialogue("dialog_second_floor001")
end
@@ -127,13 +91,22 @@ function on_sleep_cutscene()
end
function on_alik_door_click()
if (game_api.is_night()) then
game_api.start_dialogue("door_alik_dialog002")
else
if (alik_door_opened == false) then
game_api.start_dialogue("door_alik_dialog001")
end
end
end
function alik_door_open_callback()
if (alik_door_opened == false) then
alik_door_opened = true
game_api.start_dialogue("door_alik_dialog001")
game_api.rotate_object("Door_Room_-1_-1_1_Leaf_001", -90, 0.5, nil)
game_api.fade_object("Room_Cover_LivingRoom_W_S_2_001", 0, 0.5, function()
game_api.deactivate_interactive_object("Room_Cover_LivingRoom_W_S_2_001")
game_api.set_npc_enabled(0, true)
end)
if (bathroom_door_opened) then
@@ -144,6 +117,21 @@ function on_alik_door_click()
end
end
function closeAlikDoor()
if (alik_door_opened) then
alik_door_opened = false
game_api.activate_interactive_object("Room_Cover_LivingRoom_W_S_2_001")
game_api.set_object_alpha("Room_Cover_LivingRoom_W_S_2_001", 1)
game_api.set_object_rotation("Door_Room_-1_-1_1_Leaf_001", 0)
game_api.set_npc_enabled(0, false)
if (bathroom_door_opened) then
game_api.switch_navigation(3) -- closed only alik (a)
else
game_api.switch_navigation(2) --closed bathroom and alik (ba)
end
end
end
function on_player_bathroom_click()
if (bathroom_door_opened == false) then
bathroom_door_opened = true
@@ -201,6 +189,7 @@ end
game_api.set_enter_night_callback(
function()
game_api.start_dialogue("dialog_video001")
closeAlikDoor()
end
)
@@ -256,6 +245,9 @@ game_api.set_location_callbacks(
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
game_api.set_teleport_active(0, false)
if (game_api.is_night()) then
closeAlikDoor()
end
end,
function()
print("Exit location dorm")
@@ -277,5 +269,6 @@ game_api.set_call_taxi_callback(
)
game_api.set_npc_enabled(0, false)
game_api.switch_navigation(0)
print("Lua script loaded successfully--!")