mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e0d453159 | ||
|
|
a4e4621eaa | ||
|
|
4337555ea1 | ||
|
|
9018397b09 | ||
|
|
1c9aae5909 |
No files matched your search
+3
-12
@@ -29,22 +29,13 @@ dist/
|
|||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
Factorio*
|
/factorio*
|
||||||
!*Factorio*.ts
|
|
||||||
!*Factorio*.tsx
|
|
||||||
!*Factorio*.js
|
|
||||||
/factorio
|
|
||||||
!/test/file/factorio
|
|
||||||
!/test/file/html/*.html
|
|
||||||
!/test/lib/factorio
|
|
||||||
!/packages/lib/src/factorio
|
|
||||||
/instances
|
/instances
|
||||||
/mods
|
/mods
|
||||||
/database
|
/database
|
||||||
/plugin-list.json
|
/plugin-list.json
|
||||||
/config-controller.json
|
/config-*.json
|
||||||
/config-control.json
|
/config-*.json.lock
|
||||||
/config-host.json
|
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
mod_cache.json
|
mod_cache.json
|
||||||
/static/
|
/static/
|
||||||
|
|||||||
@@ -275,6 +275,9 @@ function keyToLabels(key: string) {
|
|||||||
if (key !== "") {
|
if (key !== "") {
|
||||||
for (let pair of key.split(",")) {
|
for (let pair of key.split(",")) {
|
||||||
let [name, value] = pair.split("=", 2);
|
let [name, value] = pair.split("=", 2);
|
||||||
|
if (!name || value === undefined) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
labels.set(name, value
|
labels.set(name, value
|
||||||
.slice(1, -1)
|
.slice(1, -1)
|
||||||
.replace(/\\"/g, "\"")
|
.replace(/\\"/g, "\"")
|
||||||
|
|||||||
@@ -76,6 +76,12 @@ end
|
|||||||
-- min
|
-- min
|
||||||
-- max
|
-- max
|
||||||
function serialize.serialize_personal_logistic_slots(player)
|
function serialize.serialize_personal_logistic_slots(player)
|
||||||
|
-- Check if logistics technology is researched
|
||||||
|
local force = player.force
|
||||||
|
if not force.technologies["logistic-robotics"] or not force.technologies["logistic-robotics"].researched then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
if v2_logistic_api then
|
if v2_logistic_api then
|
||||||
local logistic_point = player.get_requester_point()
|
local logistic_point = player.get_requester_point()
|
||||||
if logistic_point == nil then
|
if logistic_point == nil then
|
||||||
@@ -129,9 +135,18 @@ function serialize.deserialize_personal_logistic_slots(player, serialized)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if logistics technology is researched
|
||||||
|
local force = player.force
|
||||||
|
if not force.technologies["logistic-robotics"] or not force.technologies["logistic-robotics"].researched then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Load personal logistic slots
|
-- Load personal logistic slots
|
||||||
if v2_logistic_api then
|
if v2_logistic_api then
|
||||||
local logistic_point = player.get_requester_point()
|
local logistic_point = player.get_requester_point()
|
||||||
|
if logistic_point == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Remove old sections up to section_count
|
-- Remove old sections up to section_count
|
||||||
for i = logistic_point.sections_count, 1, -1 do
|
for i = logistic_point.sections_count, 1, -1 do
|
||||||
|
|||||||
Reference in new issue
Block a user