Skip to content

Commit

Permalink
added electric offshore pump
Browse files Browse the repository at this point in the history
  • Loading branch information
LovelySanta committed Oct 23, 2023
1 parent 5abb102 commit 82d36aa
Show file tree
Hide file tree
Showing 14 changed files with 709 additions and 5 deletions.
1 change: 1 addition & 0 deletions angelsrefining/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Version: 0.12.5
Date: xx.xx.xxxx
Changes:
- Added an beaconable electric offshore waterpump
- Moved Electro-refining to purple science. Replaced Crystal catalyst with Hybrid catalyst in Thorium sorting recipe (909)
- Compatibility with Bob's changes (911)
- Enabled productivity modules for Thorium Ore sorting recipe (929)
Expand Down
50 changes: 48 additions & 2 deletions angelsrefining/control.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,65 @@
local starting_items = require("src.starting_items")
local welcome_dialog = require("src.welcome_dialog")
local ground_water_pump = require("src.ground_water_pump")
local sea_pump = require("src.sea-pump")

-- initialisation
local on_configuration_changed = require("src.mod-config")
script.on_configuration_changed(on_configuration_changed)
script.on_init(function()
starting_items:on_init()
sea_pump:on_init()
end)

script.on_event(defines.events.on_cutscene_cancelled, function(event)
welcome_dialog:on_cutscene_cancelled(event.player_index)
end)

script.on_event(defines.events.on_gui_click, function(event)
welcome_dialog:on_gui_click(event.element.name, event.player_index)
-- built events
script.on_event(defines.events.on_built_entity, function(event)
sea_pump:on_build_entity(event.created_entity, {})
end)
script.on_event(defines.events.on_robot_built_entity, function(event)
sea_pump:on_build_entity(event.created_entity, event.tags or {})
end)
script.on_event(defines.events.script_raised_built, function(event)
sea_pump:on_build_entity(event.entity, {})
end)
script.on_event(defines.events.script_raised_revive, function(event)
sea_pump:on_build_entity(event.entity, {})
end)
script.on_event(defines.events.on_post_entity_died, function(event)
sea_pump:on_build_entity(event.ghost, {})
end)

script.on_event(defines.events.on_player_rotated_entity, function(event)
ground_water_pump:on_player_rotated_entity(event.entity, event.previous_direction, event.player_index)
end)

-- destroy events
script.on_event(defines.events.on_entity_died, function(event)
sea_pump:on_remove_entity(event.entity)
end)
script.on_event(defines.events.on_player_mined_entity, function(event)
sea_pump:on_remove_entity(event.entity)
end)
script.on_event(defines.events.on_robot_mined_entity, function(event)
sea_pump:on_remove_entity(event.entity)
end)
script.on_event(defines.events.script_raised_destroy, function(event)
sea_pump:on_remove_entity(event.entity)
end)

-- blueprint events
script.on_event(defines.events.on_player_setup_blueprint, function(event)
sea_pump:on_blueprint_setup(event.player_index)
end)
script.on_event(defines.events.on_player_configured_blueprint, function(event)
sea_pump:on_blueprint_setup(event.player_index)
end)

-- gui events
script.on_event(defines.events.on_gui_click, function(event)
welcome_dialog:on_gui_click(event.element.name, event.player_index)
end)

1 change: 1 addition & 0 deletions angelsrefining/data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ require("prototypes.buildings.hydro-plant")
require("prototypes.buildings.ground-water-pump")
require("prototypes.buildings.salination-plant")
require("prototypes.buildings.seafloor-pump")
require("prototypes.buildings.sea-pump")
require("prototypes.buildings.washing-plant")
require("prototypes.buildings.clarifier")
require("prototypes.buildings.barreling-pump")
Expand Down
Binary file added angelsrefining/graphics/entity/sea-pump/empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added angelsrefining/graphics/icons/sea-pump-ico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions angelsrefining/locale/en/water-treatment.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ clarifier=Clarifier
salination-plant=Salination plant 1
salination-plant-2=Salination plant 2
seafloor-pump=Seafloor pump
sea-pump=Heavy offshore pump
washing-plant=Washing plant 1
washing-plant-2=Washing plant 2
barreling-pump=Barreling pump
Expand All @@ -64,6 +65,7 @@ clarifier=Helps you to get rid of all the water you don't want.
salination-plant=Increases salinity of water via evaporation.
salination-plant-2=Increases salinity of water via evaporation.
seafloor-pump=Extracts viscous mud water from a body of water.
sea-pump=An energised offshore pump to increase pumping performance to pump fluids from a body of water.
washing-plant=Dilutes mud water or extracts sediments.
washing-plant-2=Dilutes mud water or extracts sediments.
barreling-pump=Fills or empties fluid containers.
Expand Down Expand Up @@ -94,3 +96,6 @@ water-washing=Processing of mud water and extraction of sediments.
[cant_insert]
angels-barreling-pump-limitation=__1__ cannot be filled.
[tooltip-description]
custom-parameter=\n__1__: [font=default][color=1,0.74,0.4]__2__[/color][/font]
Loading

0 comments on commit 82d36aa

Please sign in to comment.