mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +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
|
||||
|
||||
Factorio*
|
||||
!*Factorio*.ts
|
||||
!*Factorio*.tsx
|
||||
!*Factorio*.js
|
||||
/factorio
|
||||
!/test/file/factorio
|
||||
!/test/file/html/*.html
|
||||
!/test/lib/factorio
|
||||
!/packages/lib/src/factorio
|
||||
/factorio*
|
||||
/instances
|
||||
/mods
|
||||
/database
|
||||
/plugin-list.json
|
||||
/config-controller.json
|
||||
/config-control.json
|
||||
/config-host.json
|
||||
/config-*.json
|
||||
/config-*.json.lock
|
||||
pnpm-lock.yaml
|
||||
mod_cache.json
|
||||
/static/
|
||||
|
||||
@@ -275,6 +275,9 @@ function keyToLabels(key: string) {
|
||||
if (key !== "") {
|
||||
for (let pair of key.split(",")) {
|
||||
let [name, value] = pair.split("=", 2);
|
||||
if (!name || value === undefined) {
|
||||
continue;
|
||||
}
|
||||
labels.set(name, value
|
||||
.slice(1, -1)
|
||||
.replace(/\\"/g, "\"")
|
||||
|
||||
@@ -76,6 +76,12 @@ end
|
||||
-- min
|
||||
-- max
|
||||
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
|
||||
local logistic_point = player.get_requester_point()
|
||||
if logistic_point == nil then
|
||||
@@ -129,9 +135,18 @@ function serialize.deserialize_personal_logistic_slots(player, serialized)
|
||||
return
|
||||
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
|
||||
if v2_logistic_api then
|
||||
local logistic_point = player.get_requester_point()
|
||||
if logistic_point == nil then
|
||||
return
|
||||
end
|
||||
|
||||
-- Remove old sections up to section_count
|
||||
for i = logistic_point.sections_count, 1, -1 do
|
||||
|
||||
Reference in new issue
Block a user