mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Fix deleting and modifying tags, tags on timeline
This commit is contained in:
1 parent
fc466ec799
commit
cf2efb1380
4 files changed
+109
-33
No files matched your search
@@ -102,13 +102,13 @@ local function on_chart_tag_modified(event)
|
||||
return
|
||||
end
|
||||
|
||||
-- End the old version
|
||||
-- End the old version at current tick
|
||||
local end_tick = game.tick
|
||||
local old_tag_data = create_tag_data(tag, nil, end_tick)
|
||||
send_chart_tag_data(old_tag_data)
|
||||
|
||||
-- Create new tag entry
|
||||
local start_tick = game.tick
|
||||
-- Create new tag entry starting at next tick
|
||||
local start_tick = game.tick + 1
|
||||
local tag_data = create_tag_data(tag, start_tick, nil)
|
||||
|
||||
-- Send to plugin
|
||||
@@ -121,7 +121,7 @@ local function on_chart_tag_removed(event)
|
||||
end
|
||||
|
||||
local tag = event.tag
|
||||
if not tag then
|
||||
if not tag or not tag.valid then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user