Major refactoring - internal server state machine implemented

This commit is contained in:
Vladislav Khorev committed 2026-10-29 00:09:16 +06:00
1 parent 71c654e5b6
commit 66e93d46f4
48 files changed
+3948 -3696

No files matched your search

+8 -19
View File
@@ -1,16 +1,5 @@
print("Lua script loaded successfully!")
function callback_enter_location()
end
function callback_exit_location()
end
game_api.set_location_callbacks(
callback_enter_location,
callback_exit_location
)
function darklands_exit001_enter_callback()
if game_api.is_darklands() then
print("Lua script start_darklands_transition")
@@ -77,11 +66,14 @@ game_api.set_enter_night_callback(
)
function callback_init_location()
end
function callback_enter_location()
print("Enter location uni exterior")
local hp = game_api.getFloatValue("player_hp")
game_api.set_player_hp(hp)
game_api.set_teleport_active(0, false)
game_api.set_teleport_active("tp_loc2_to_dorm", false)
if (game_api.is_night()) then
game_api.deactivate_interactive_object("car001")
game_api.deactivate_interactive_object("car001wheels")
@@ -100,6 +92,7 @@ function callback_exit_location()
end
game_api.set_location_callbacks(
callback_init_location,
callback_enter_location,
callback_exit_location
)
@@ -108,10 +101,6 @@ game_api.set_trigger_zone_callbacks("darklands_exit001",
darklands_exit001_enter_callback,
nil
)
game_api.set_trigger_zone_callbacks("darklands_exit002",
darklands_exit001_enter_callback,
nil
)
game_api.set_trigger_zone_callbacks("darklands_exit003",
darklands_exit001_enter_callback,
nil
@@ -129,12 +118,12 @@ game_api.set_trigger_zone_callbacks("darklands_exit005",
function taxi_zone001_enter_callback()
game_api.start_dialogue("dialog_taxi001")
game_api.set_trigger_zone_enabled(0, false)
game_api.set_trigger_zone_enabled("taxi_zone001", false)
end
function callback_call_taxi()
game_api.set_teleport_active(0, true)
game_api.set_trigger_zone_enabled(0, false)
game_api.set_teleport_active("tp_loc2_to_dorm", true)
game_api.set_trigger_zone_enabled("taxi_zone001", false)
end
game_api.set_call_taxi_callback(