mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -458,17 +458,8 @@ local function handle_valve_value(entity, combinator)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function handle_spoil_value(entity, combinator)
|
local function handle_spoil_value(entity, combinator)
|
||||||
local combinator_slot = combinator.get_slot(3)
|
-- combinator.set_slot(1, {value = {type = 'virtual', name = 'signal-OA', quality = 'normal'}, min = 0})
|
||||||
|
|
||||||
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?
|
|
||||||
local v = entity.surface.find_entities_filtered{type='valve', position=entity.position, radius=1}
|
local v = entity.surface.find_entities_filtered{type='valve', position=entity.position, radius=1}
|
||||||
|
|
||||||
if not (v or #v == 0) then
|
if not (v or #v == 0) then
|
||||||
@@ -486,7 +477,6 @@ local function handle_spoil_value(entity, combinator)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
script.on_nth_tick(10, function(_)
|
script.on_nth_tick(10, function(_)
|
||||||
local head = #storage.phi_cl.combinator.combinator_list
|
local head = #storage.phi_cl.combinator.combinator_list
|
||||||
|
|||||||
Reference in New Issue
Block a user