Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
general
games
Factorio Tools
infinity-factory
Commits
402a776d
Commit
402a776d
authored
2 years ago
by
KeyJ148
Browse files
Options
Download
Email Patches
Plain Diff
Fix consts
parent
ae69fe12
main
sandbox
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
functions.lua
+2
-2
functions.lua
with
2 additions
and
2 deletions
+2
-2
functions.lua
+
2
-
2
View file @
402a776d
...
...
@@ -10,11 +10,11 @@ function create_build_with_level(exmaple_type, exmaple_name, prefix_name, level)
object
.
type
=
exmaple_type
object
.
name
=
new_name
object
.
minable
.
result
=
new_name
object
.
max_health
=
math.min
(
prev_object
.
max_health
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
),
Const
.
MAX_HP
)
object
.
max_health
=
math.min
(
prev_object
.
max_health
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
),
Const
s
.
MAX_HP
)
object
.
crafting_speed
=
prev_object
.
crafting_speed
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
)
object
.
energy_source
.
emissions_per_minute
=
prev_object
.
energy_source
.
emissions_per_minute
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
)
object
.
energy_usage
=
string.sub
(
prev_object
.
energy_usage
,
0
,
-
3
)
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
)
..
string.sub
(
prev_object
.
energy_usage
,
-
2
,
-
1
)
object
.
module_specification
.
module_slots
=
math.min
(
prev_object
.
module_specification
.
module_slots
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
),
Const
.
MAX_MODULE_SLOTS
)
object
.
module_specification
.
module_slots
=
math.min
(
prev_object
.
module_specification
.
module_slots
*
math
.
pow
(
Config
.
upgrade_multiplier
,
level
),
Const
s
.
MAX_MODULE_SLOTS
)
if
level
<
Config
.
additional_levels
then
object
.
next_upgrade
=
get_name_by_level
(
prefix_name
,
level
+
1
)
else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets