mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Auto launch added tanks to 17.44
This commit is contained in:
@@ -56,7 +56,7 @@ All are welcome to make pull requests and issues for this scenario, if you are i
|
|||||||
|
|
||||||
| Scenario Version* | Version Name | Factorio Version** |
|
| Scenario Version* | Version Name | Factorio Version** |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| [v5.6](s5.6) | Information Guis | [v0.17.43](f0.17.43) |
|
| [v5.6](s5.6) | Information Guis | [v0.17.44](f0.17.44) |
|
||||||
| [v5.5](s5.5) | Gui System | [v0.17.43](f0.17.43) |
|
| [v5.5](s5.5) | Gui System | [v0.17.43](f0.17.43) |
|
||||||
| [v5.4](s5.4) | Admin Controls | [v0.17.32](f0.17.32) |
|
| [v5.4](s5.4) | Admin Controls | [v0.17.32](f0.17.32) |
|
||||||
| [v5.3](s5.3) | Custom Roles | [v0.17.28](f0.17.28) |
|
| [v5.3](s5.3) | Custom Roles | [v0.17.28](f0.17.28) |
|
||||||
@@ -85,7 +85,7 @@ All are welcome to make pull requests and issues for this scenario, if you are i
|
|||||||
[s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0
|
[s1.0]: https://github.com/explosivegaming/scenario/releases/tag/v1.0
|
||||||
[s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1
|
[s0.1]: https://github.com/explosivegaming/scenario/releases/tag/v0.1
|
||||||
|
|
||||||
[f0.17.43]: https://wiki.factorio.com/Version_history/0.17.0#0.17.43
|
[f0.17.44]: https://wiki.factorio.com/Version_history/0.17.0#0.17.44
|
||||||
[f0.17.32]: https://wiki.factorio.com/Version_history/0.17.0#0.17.32
|
[f0.17.32]: https://wiki.factorio.com/Version_history/0.17.0#0.17.32
|
||||||
[f0.17.28]: https://wiki.factorio.com/Version_history/0.17.0#0.17.28
|
[f0.17.28]: https://wiki.factorio.com/Version_history/0.17.0#0.17.28
|
||||||
[f0.17.22]: https://wiki.factorio.com/Version_history/0.17.0#0.17.22
|
[f0.17.22]: https://wiki.factorio.com/Version_history/0.17.0#0.17.22
|
||||||
|
|||||||
@@ -104,18 +104,17 @@ end)
|
|||||||
end)
|
end)
|
||||||
:on_click(function(player,element)
|
:on_click(function(player,element)
|
||||||
local force = player.force
|
local force = player.force
|
||||||
local rocket_silo_name = element.parent.name:sub(7)
|
local rocket_silo_name = element.parent.name:sub(8)
|
||||||
local rocket_silo = rocket_silos[force.name][rocket_silo_name]
|
local rocket_silo_data = rocket_silos[force.name][rocket_silo_name]
|
||||||
local active = true -- need to test for auto launch
|
local active = rocket_silo_data.entity.auto_launch -- need to test for auto launch
|
||||||
if active then
|
if active then
|
||||||
player.print('WIP; We currently have no way to test or set the auto launch of a rocket so this button does not work!')
|
|
||||||
element.sprite = 'utility/play'
|
element.sprite = 'utility/play'
|
||||||
element.tooltip = {'rocket-info.toggle-rocket-tooltip'}
|
element.tooltip = {'rocket-info.toggle-rocket-tooltip'}
|
||||||
-- insert function to disable auto launch
|
rocket_silo_data.entity.auto_launch = false
|
||||||
else
|
else
|
||||||
element.sprite = 'utility/stop'
|
element.sprite = 'utility/stop'
|
||||||
element.tooltip = {'rocket-info.toggle-rocket-tooltip-disabled'}
|
element.tooltip = {'rocket-info.toggle-rocket-tooltip-disabled'}
|
||||||
-- insert function to enable auto launch
|
rocket_silo_data.entity.auto_launch = true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -359,8 +358,8 @@ end
|
|||||||
--- Creats the different buttons used with the rocket silos
|
--- Creats the different buttons used with the rocket silos
|
||||||
local function generate_progress_buttons(player,element,rocket_silo_data)
|
local function generate_progress_buttons(player,element,rocket_silo_data)
|
||||||
local silo_name = rocket_silo_data.name
|
local silo_name = rocket_silo_data.name
|
||||||
local status = rocket_silo_data.entity.status == 21
|
local status = rocket_silo_data.entity.status == defines.entity_status.waiting_to_launch_rocket
|
||||||
local active = false -- need way to check this
|
local active = rocket_silo_data.entity.auto_launch
|
||||||
|
|
||||||
if player_allowed(player,'toggle_active') then
|
if player_allowed(player,'toggle_active') then
|
||||||
local button_element = element['toggle-'..silo_name]
|
local button_element = element['toggle-'..silo_name]
|
||||||
@@ -371,10 +370,11 @@ local function generate_progress_buttons(player,element,rocket_silo_data)
|
|||||||
button_element = toggle_rocket(element,silo_name)
|
button_element = toggle_rocket(element,silo_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
button_element.enabled = false -- remove once check is added
|
|
||||||
if active then
|
if active then
|
||||||
|
button_element.tooltip = {'rocket-info.toggle-rocket-tooltip'}
|
||||||
button_element.sprite = 'utility/stop'
|
button_element.sprite = 'utility/stop'
|
||||||
else
|
else
|
||||||
|
button_element.tooltip = {'rocket-info.toggle-rocket-tooltip-disabled'}
|
||||||
button_element.sprite = 'utility/play'
|
button_element.sprite = 'utility/play'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user