mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +01:00
TG Upstream Part 1
3591 individual conflicts Update build.js Update install_node.sh Update byond.js oh my fucking god hat slow huh holy shit we all fall down 2 more I missed 2900 individual conflicts 2700 Individual conflicts replaces yarn file with tg version, bumping us down to 2200-ish Down to 2000 individual conflicts 140 down mmm aaaaaaaaaaaaaaaaaaa not yt 575 soon 900 individual conflicts 600 individual conflicts, 121 file conflicts im not okay 160 across 19 files 29 in 4 files 0 conflicts, compiletime fix time some minor incap stuff missed ticks weird dupe definition stuff missed ticks 2 incap fixes undefs and pie fix Radio update and some extra minor stuff returns a single override no more dupe definitions, 175 compiletime errors Unticked file fix sound and emote stuff honk and more radio stuff
This commit is contained in:
@@ -2,31 +2,19 @@ local state = require("state")
|
||||
|
||||
local Timer = {}
|
||||
|
||||
<<<<<<< HEAD
|
||||
local SSlua = dm.global_vars:get_var("SSlua")
|
||||
=======
|
||||
local SSlua = dm.global_vars.SSlua
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
__Timer_timers = __Timer_timers or {}
|
||||
__Timer_callbacks = __Timer_callbacks or {}
|
||||
|
||||
function __add_internal_timer(func, time, loop)
|
||||
local timer = {
|
||||
loop = loop,
|
||||
<<<<<<< HEAD
|
||||
executeTime = time + dm.world:get_var("time")
|
||||
=======
|
||||
executeTime = time + dm.world.time,
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
}
|
||||
__Timer_callbacks[tostring(func)] = function()
|
||||
timer.executing = false
|
||||
if loop and timer.terminate ~= true then
|
||||
<<<<<<< HEAD
|
||||
timer.executeTime = dm.world:get_var("time") + time
|
||||
=======
|
||||
timer.executeTime = dm.world.time + time
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
else
|
||||
__stop_internal_timer(tostring(func))
|
||||
end
|
||||
@@ -49,37 +37,21 @@ function __stop_internal_timer(func)
|
||||
end
|
||||
|
||||
__Timer_timer_processing = __Timer_timer_processing or false
|
||||
<<<<<<< HEAD
|
||||
state.state:set_var("timer_enabled", 1)
|
||||
=======
|
||||
state.state.timer_enabled = 1
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
__Timer_timer_process = function(seconds_per_tick)
|
||||
if __Timer_timer_processing then
|
||||
return 0
|
||||
end
|
||||
__Timer_timer_processing = true
|
||||
<<<<<<< HEAD
|
||||
local time = dm.world:get_var("time")
|
||||
=======
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
for func, timeData in __Timer_timers do
|
||||
if timeData.executing == true then
|
||||
continue
|
||||
end
|
||||
<<<<<<< HEAD
|
||||
if over_exec_usage(0.85) then
|
||||
sleep()
|
||||
end
|
||||
if time >= timeData.executeTime then
|
||||
state.state:get_var("functions_to_execute"):add(func)
|
||||
=======
|
||||
if _exec.time / (dm.world.tick_lag * 100) > 0.85 then
|
||||
sleep()
|
||||
end
|
||||
if dm.world.time >= timeData.executeTime then
|
||||
list.add(state.state.functions_to_execute, func)
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
timeData.executing = true
|
||||
end
|
||||
end
|
||||
@@ -88,21 +60,9 @@ __Timer_timer_process = function(seconds_per_tick)
|
||||
end
|
||||
|
||||
function Timer.wait(time)
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
local next_yield_index = __next_yield_index
|
||||
__add_internal_timer(function()
|
||||
SSlua:call_proc("queue_resume", state.state, next_yield_index)
|
||||
=======
|
||||
local yieldIndex = _exec.next_yield_index
|
||||
__add_internal_timer(function()
|
||||
SSlua:queue_resume(state.state, yieldIndex)
|
||||
>>>>>>> 6577c58b948b (Fixes lua function SS13.wait. (#85427))
|
||||
=======
|
||||
local yieldIndex = _exec.next_yield_index
|
||||
__add_internal_timer(function()
|
||||
SSlua:queue_resume(state.state, yieldIndex)
|
||||
>>>>>>> 4b4ae0958fe6b5d511ee6e24a5087599f61d70a3
|
||||
end, time * 10, false)
|
||||
coroutine.yield()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user