mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -351,16 +351,16 @@ script.on_nth_tick(1800, function(_)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
local function handle_research_queue(combinator)
|
local function handle_research_queue(combinator)
|
||||||
local combinator_slot_1 = combinator.get_slot(1)
|
local combinator_slot = combinator.get_slot(1)
|
||||||
|
|
||||||
if not (combinator_slot_1 or (combinator_slot_1.value and combinator_slot_1.value.name and combinator_slot_1.value.name == 'signal-SA')) then
|
if not (combinator_slot or (combinator_slot.value and combinator_slot.value.name and combinator_slot.value.name == 'signal-SA')) then
|
||||||
combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = 0})
|
combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = 0})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local combinator_slot_1_value = combinator_slot_1.get_slot(1).min or 0
|
local combinator_slot_value = combinator_slot.get_slot(1).min or 0
|
||||||
|
|
||||||
if combinator_slot_1_value == 1 or combinator_slot_1_value == 3 then
|
if combinator_slot_value == 1 or combinator_slot_value == 3 then
|
||||||
-- research_queue_read
|
-- research_queue_read
|
||||||
local n = 21
|
local n = 21
|
||||||
|
|
||||||
@@ -377,12 +377,12 @@ local function handle_research_queue(combinator)
|
|||||||
combinator.set_slot(28, {value = {type = 'virtual', name = 'signal-PA', quality = 'normal'}, min = storage.phi_cl.combinator.research_progress})
|
combinator.set_slot(28, {value = {type = 'virtual', name = 'signal-PA', quality = 'normal'}, min = storage.phi_cl.combinator.research_progress})
|
||||||
end
|
end
|
||||||
|
|
||||||
if combinator_slot_1_value == 2 or combinator_slot_1_value == 3 then
|
if combinator_slot_value == 2 or combinator_slot_value == 3 then
|
||||||
-- research_queue_write
|
-- research_queue_write
|
||||||
storage.phi_cl.combinator.research_set_combinator_count = storage.phi_cl.combinator.research_set_combinator_count + 1
|
storage.phi_cl.combinator.research_set_combinator_count = storage.phi_cl.combinator.research_set_combinator_count + 1
|
||||||
|
|
||||||
if storage.phi_cl.combinator.research_set_combinator_count > 1 then
|
if storage.phi_cl.combinator.research_set_combinator_count > 1 then
|
||||||
combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = ((combinator_slot_1_value == 3) and 1) or 0})
|
combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = ((combinator_slot_value == 3) and 1) or 0})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -427,6 +427,18 @@ local function handle_research_queue(combinator)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function handle_valve_value(combinator)
|
local function handle_valve_value(combinator)
|
||||||
|
local combinator_slot = combinator.get_slot(1)
|
||||||
|
|
||||||
|
if not (combinator_slot or (combinator_slot.value and combinator_slot.value.name and combinator_slot.value.name == 'signal-SA')) then
|
||||||
|
combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = 0})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local combinator_slot_value = combinator_slot.get_slot(1).min or 0
|
||||||
|
|
||||||
|
if (combinator_slot_value >= 0 and combinator_slot_value < 101) then
|
||||||
|
-- every item in front of it?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
script.on_nth_tick(10, function(_)
|
script.on_nth_tick(10, function(_)
|
||||||
|
|||||||
Reference in New Issue
Block a user