Skip to content

Commit

Permalink
Code reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ckerxx44 committed Apr 25, 2022
1 parent 9d99fa4 commit 8b2acf9
Show file tree
Hide file tree
Showing 22 changed files with 2,718 additions and 3,975 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Feel free to edit and re-upload the mod with new or altered features, however gi
Change Log:
---------------------------------------
##0.19.10 Versioning Mess
Big code reformat
Solve my internal versioning mess.

##Fixed:##
Expand Down
7 changes: 3 additions & 4 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ potential_ores = {
-- Darkstar
"gold-ore",
"lead-ore",
"lithium-ore",

"lithium-ore"
}

result_ore2 = "swarm-relay"
ore_per_second = 4
deep_mining_pollution = 0.03 * 60

star_ores = {
"swarm-relay",
}
"swarm-relay"
}
71 changes: 38 additions & 33 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,35 @@ function built_interface(entity)
entity.power_production = power
end

script.on_event(defines.events.on_research_finished, function(event)
if event.research.name == 'any-launch' then
if not remote.interfaces["silo_script"] then
return
script.on_event(
defines.events.on_research_finished,
function(event)
if event.research.name == "any-launch" then
if not remote.interfaces["silo_script"] then
return
end
remote.call("silo_script", "add_tracked_item", "planet-quarry")
remote.call("silo_script", "add_tracked_item", "dark-matter-drones")
remote.call("silo_script", "add_tracked_item", "antithetic-drones")
remote.call("silo_script", "add_tracked_item", "norbornadiene-drones")
remote.call("silo_script", "add_tracked_item", "star-matter-drones")
remote.call("silo_script", "add_tracked_item", "star-stone")
remote.call("silo_script", "add_tracked_item", "star-research")
remote.call("silo_script", "add_tracked_item", "star-uranium")
remote.call("silo_script", "add_tracked_item", "star-lead")
remote.call("silo_script", "add_tracked_item", "star-gold")
remote.call("silo_script", "add_tracked_item", "star-iron")
remote.call("silo_script", "add_tracked_item", "star-copper")
remote.call("silo_script", "add_tracked_item", "star-coal")
remote.call("silo_script", "add_tracked_item", "dark-matter-capsule-empty")
remote.call("silo_script", "add_tracked_item", "antithetical-capsule-empty")
remote.call("silo_script", "add_tracked_item", "norbornadiene-capsule-empty")
remote.call("silo_script", "add_tracked_item", "antithetic-container")
remote.call("silo_script", "add_tracked_item", "asteroid-quarry")
remote.call("silo_script", "add_tracked_item", "antithetic-container")
end
end
remote.call("silo_script", "add_tracked_item", "planet-quarry")
remote.call("silo_script", "add_tracked_item", "dark-matter-drones")
remote.call("silo_script", "add_tracked_item", "antithetic-drones")
remote.call("silo_script", "add_tracked_item", "norbornadiene-drones")
remote.call("silo_script", "add_tracked_item", "star-matter-drones")
remote.call("silo_script", "add_tracked_item", "star-stone")
remote.call("silo_script", "add_tracked_item", "star-research")
remote.call("silo_script", "add_tracked_item", "star-uranium")
remote.call("silo_script", "add_tracked_item", "star-lead")
remote.call("silo_script", "add_tracked_item", "star-gold")
remote.call("silo_script", "add_tracked_item", "star-iron")
remote.call("silo_script", "add_tracked_item", "star-copper")
remote.call("silo_script", "add_tracked_item", "star-coal")
remote.call("silo_script", "add_tracked_item", "dark-matter-capsule-empty")
remote.call("silo_script", "add_tracked_item", "antithetical-capsule-empty")
remote.call("silo_script", "add_tracked_item", "norbornadiene-capsule-empty")
remote.call("silo_script", "add_tracked_item", "antithetic-container")
remote.call("silo_script", "add_tracked_item", "asteroid-quarry")
remote.call("silo_script", "add_tracked_item", "antithetic-container")
end
end)
)

script.on_init(setup_remote_call)
script.on_configuration_changed(setup_remote_call)
Expand All @@ -84,13 +87,16 @@ function setup_remote_call()
remote.call(interface_name, "set_show_launched_without_satellite", false)
end

script.on_event(defines.events.on_research_finished, function(event)
if event.research.name == 'any-launch' then
function setup_remote_call()
remote.call(interface_name, "set_show_launched_without_satellite", false)
script.on_event(
defines.events.on_research_finished,
function(event)
if event.research.name == "any-launch" then
function setup_remote_call()
remote.call(interface_name, "set_show_launched_without_satellite", false)
end
end
end
end
end)
)
---------------------------------------------------------
-- Constants
local laser_quarry_period = 256
Expand Down Expand Up @@ -147,7 +153,7 @@ end
script.on_load(onLoad)

---------------------------------------------------------
-- On mod update,
-- On mod update,
function onConfigurationChange(change_data)
if global.quarries then
global.laser_quarries = util.table.deepcopy(global.quarries)
Expand Down Expand Up @@ -243,4 +249,3 @@ function insertRandomOre(inventory)
inventory.insert({ name = mixed_ores[math.random(1, #mixed_ores)], count = 1064 })
end
end

1 change: 0 additions & 1 deletion data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ require("prototype.equipment-category")
require("prototype.recipe-category")
require("prototype.achievements")
require("prototype.module-category")

2 changes: 1 addition & 1 deletion prototype/achievements.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,6 @@ data:extend(
icon = "__Darkstar_utilities_fixed__/graphics/achievements/laser2.png",
icon_size = 128,
limited_to_one_game = true
},
}
}
)
2 changes: 1 addition & 1 deletion prototype/ammo-category.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ data:extend(
{
type = "ammo-category",
name = "healing"
},
}
}
)
4 changes: 1 addition & 3 deletions prototype/armor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ data:extend(
name = "power-armor-mk3",
icon = "__Darkstar_utilities_fixed__/graphics/items/power-armor-mk3.png",
icon_size = 32,

resistances = {
{
type = "physical",
Expand All @@ -21,7 +20,7 @@ data:extend(
type = "explosion",
decrease = 20,
percent = 50
},
}
},
durability = 20000,
subgroup = "armor",
Expand All @@ -35,7 +34,6 @@ data:extend(
name = "power-armor-mk4",
icon = "__Darkstar_utilities_fixed__/graphics/items/power-armor-mk3.png",
icon_size = 32,

resistances = {
{
type = "physical",
Expand Down
8 changes: 4 additions & 4 deletions prototype/autoplace-controls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ data:extend(
name = "gold-ore",
richness = true,
order = "d-a",
category = "resource",
category = "resource"
},
{
type = "autoplace-control",
name = "lithium-ore",
richness = true,
order = "d-a",
category = "resource",
category = "resource"
},
{
type = "autoplace-control",
name = "lead-ore",
richness = true,
order = "d-b",
category = "resource",
},
category = "resource"
}
}
)
Loading

0 comments on commit 8b2acf9

Please sign in to comment.