Skip to content

Commit 42552ba

Browse files
committed
changed license
- changed license to unlicense - fixed old data structure reference
1 parent 67a2afb commit 42552ba

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

Interface_Demo/control.lua

+36-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
1+
--[[
2+
LTN API demo
3+
Copyright (c) 2019 Optera
4+
5+
For complete listing of events and properties refer to https://forums.factorio.com/viewtopic.php?f=214&t=51072#p397844
6+
7+
8+
This is free and unencumbered software released into the public domain.
9+
10+
Anyone is free to copy, modify, publish, use, compile, sell, or
11+
distribute this software, either in source code form or as a compiled
12+
binary, for any purpose, commercial or non-commercial, and by any
13+
means.
14+
15+
In jurisdictions that recognize copyright laws, the author or authors
16+
of this software dedicate any and all copyright interest in the
17+
software to the public domain. We make this dedication for the benefit
18+
of the public at large and to the detriment of our heirs and
19+
successors. We intend this dedication to be an overt act of
20+
relinquishment in perpetuity of all present and future rights to this
21+
software under copyright law.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
26+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29+
OTHER DEALINGS IN THE SOFTWARE.
30+
31+
For more information, please refer to <http://unlicense.org/>
32+
--]]
33+
134
-- LTN interface event functions
235
function OnStopsUpdated(event)
3-
if event.data then
4-
log("Stop Data:"..serpent.block(event) )
5-
end
36+
log("Stop Data:"..serpent.block(event) )
637
end
738

839
function OnDispatcherUpdated(event)
9-
if event.data then
10-
log("Dispatcher Data:"..serpent.block(event) )
11-
end
40+
log("Dispatcher Data:"..serpent.block(event) )
1241
end
1342

1443
---- Initialisation ----
@@ -25,7 +54,7 @@ script.on_load(function(data)
2554
if remote.interfaces["logistic-train-network"] then
2655
script.on_event(remote.call("logistic-train-network", "on_stops_updated"), OnStopsUpdated)
2756
script.on_event(remote.call("logistic-train-network", "on_dispatcher_updated"), OnDispatcherUpdated)
28-
--[[ alternative anonymous function:
57+
--[[ alternative anonymous function:
2958
has to be copied between on_init and on_load
3059
script.on_event(remote.call("logistic-train-network", "on_stops_updated"), function(event)
3160
do something with event.data

0 commit comments

Comments
 (0)