-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use 64x64 as default icon size * API update 1.5.0 * Delete DCM API readme 1.5.0.pdf * 1.5.0 API update * Delete public.lua * Delete entities.lua * Delete shared.lua * Update API 1.5.0 + mipmaps * 1.5.0: mipmaps * Create README.md * Update README.md * Update changelog.txt * API update 1.5.0 * Update README.md * Fix broken changelog * Fix changelog
- Loading branch information
1 parent
d667f5c
commit 9982c86
Showing
29 changed files
with
997 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": "DeadlockCrating", | ||
"version": "1.4.10", | ||
"version": "1.5.0", | ||
"title": "Deadlock's Crating Machine", | ||
"author": "Deadlock989", | ||
"contact": "", | ||
"homepage": "https://forums.factorio.com/viewtopic.php?f=94&t=57070", | ||
"dependencies": ["base >= 0.17.35", "?ReStack", "?Regroup"], | ||
"description": "Adds well-balanced packing and unpacking facilities to hugely boost belt throughput using crates.", | ||
"description": "Pack resources into crates and unpack them where needed. Hugely boosts belt throughput, at a cost.", | ||
"factorio_version": "0.17" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"item": [ | ||
["deadlock-machine-packer-item-1", "deadlock-crating-machine-1"], | ||
["deadlock-machine-packer-item-2", "deadlock-crating-machine-2"], | ||
["deadlock-machine-packer-item-3", "deadlock-crating-machine-3"], | ||
["deadlock-machine-packer-item-4", "deadlock-crating-machine-4"], | ||
["deadlock-machine-packer-item-5", "deadlock-crating-machine-5"] | ||
], | ||
"recipe": [ | ||
["deadlock-machine-packer-recipe-1", "deadlock-crating-machine-1"], | ||
["deadlock-machine-packer-recipe-2", "deadlock-crating-machine-2"], | ||
["deadlock-machine-packer-recipe-3", "deadlock-crating-machine-3"], | ||
["deadlock-machine-packer-recipe-4", "deadlock-crating-machine-4"], | ||
["deadlock-machine-packer-recipe-5", "deadlock-crating-machine-5"] | ||
], | ||
"entity": [ | ||
["deadlock-machine-packer-entity-1", "deadlock-crating-machine-1"], | ||
["deadlock-machine-packer-entity-2", "deadlock-crating-machine-2"], | ||
["deadlock-machine-packer-entity-3", "deadlock-crating-machine-3"], | ||
["deadlock-machine-packer-entity-4", "deadlock-crating-machine-4"], | ||
["deadlock-machine-packer-entity-5", "deadlock-crating-machine-5"] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,192 +1,5 @@ | ||
local DCM = require "prototypes.shared" | ||
|
||
-- brighter version of tier colour for working vis glow & lights | ||
local function brighter_colour(c) | ||
local w = 240 | ||
return { r = math.floor((c.r + w)/2), g = math.floor((c.g + w)/2), b = math.floor((c.b + w)/2) } | ||
end | ||
|
||
-- for calculating scales of energy, health etc. | ||
local function get_scale(this_tier, tiers, lowest, highest) | ||
return lowest + ((highest - lowest) * ((this_tier - 1) / (tiers - 1))) | ||
end | ||
|
||
-- Energy and pollution. They just couldn't make it easy, could they | ||
local function get_energy_table(this_tier, tiers, lowest, highest, passive_multiplier) | ||
local total = get_scale(this_tier, tiers, lowest, highest) | ||
local passive_energy_usage = total * passive_multiplier | ||
local active_energy_usage = total * (1 - passive_multiplier) | ||
return { | ||
passive = passive_energy_usage .. "KW", -- passive energy drain as a string | ||
active = active_energy_usage .. "KW", -- active energy usage as a string | ||
} | ||
end | ||
|
||
-- iterate through tiers | ||
for i=1,DCM.TIERS do | ||
local energy_table = get_energy_table(i, DCM.TIERS, 500, 1000, 0.1) | ||
local machine = { | ||
name = "deadlock-machine-packer-entity-"..i, | ||
type = "assembling-machine", | ||
next_upgrade = (i < DCM.TIERS) and "deadlock-machine-packer-entity-"..(i+1) or nil, | ||
fast_replaceable_group = "packer", | ||
icons = { | ||
{ icon = "__DeadlockCrating__/graphics/icons/crating-icon-base-"..DCM.ITEM_ICON_SIZE..".png", icon_size = DCM.ITEM_ICON_SIZE }, | ||
{ icon = "__DeadlockCrating__/graphics/icons/crating-icon-mask-"..DCM.ITEM_ICON_SIZE..".png", icon_size = DCM.ITEM_ICON_SIZE, tint = DCM.TIER_COLOURS[1] }, | ||
}, | ||
minable = { | ||
mining_time = 0.2, | ||
result = "deadlock-machine-packer-item-"..i, | ||
}, | ||
crafting_speed = i, | ||
module_specification = { | ||
module_info_icon_shift = { 0, 0.8 }, | ||
module_slots = 1 | ||
}, | ||
allowed_effects = {"consumption"}, | ||
crafting_categories = {"packing"}, | ||
max_health = get_scale(i, DCM.TIERS, 300, 400), | ||
energy_usage = energy_table.active, | ||
energy_source = { | ||
type = "electric", | ||
usage_priority = "secondary-input", | ||
drain = energy_table.passive, | ||
emissions_per_minute = 5-i, | ||
}, | ||
dying_explosion = "medium-explosion", | ||
resistances = { | ||
{ | ||
type = "fire", | ||
percent = 90 | ||
}, | ||
}, | ||
corpse = "big-remnants", | ||
flags = { | ||
"placeable-neutral", | ||
"placeable-player", | ||
"player-creation" | ||
}, | ||
collision_box = { {-1.3,-1.3}, {1.3,1.3} }, | ||
selection_box = { {-1.5,-1.5}, {1.5,1.5} }, | ||
tile_width = 3, | ||
tile_height = 3, | ||
animation = { | ||
layers = { | ||
{ | ||
hr_version = { | ||
filename = "__DeadlockCrating__/graphics/entities/high/crating-base.png", | ||
animation_speed = 1 / i, | ||
priority = "high", | ||
frame_count = 60, | ||
line_length = 10, | ||
height = 192, | ||
scale = 0.5, | ||
shift = {0, 0}, | ||
width = 192 | ||
}, | ||
filename = "__DeadlockCrating__/graphics/entities/low/crating-base.png", | ||
animation_speed = 1 / i, | ||
priority = "high", | ||
frame_count = 60, | ||
line_length = 10, | ||
height = 96, | ||
scale = 1, | ||
shift = {0, 0}, | ||
width = 96 | ||
}, | ||
{ | ||
hr_version = { | ||
filename = "__DeadlockCrating__/graphics/entities/high/crating-mask.png", | ||
animation_speed = 1 / i, | ||
priority = "high", | ||
repeat_count = 60, | ||
height = 192, | ||
scale = 0.5, | ||
shift = {0, 0}, | ||
width = 192, | ||
tint = DCM.TIER_COLOURS[i], | ||
}, | ||
filename = "__DeadlockCrating__/graphics/entities/low/crating-mask.png", | ||
animation_speed = 1 / i, | ||
priority = "high", | ||
repeat_count = 60, | ||
height = 96, | ||
scale = 1, | ||
shift = {0, 0}, | ||
width = 96, | ||
tint = DCM.TIER_COLOURS[i], | ||
}, | ||
{ | ||
hr_version = { | ||
draw_as_shadow = true, | ||
filename = "__DeadlockCrating__/graphics/entities/high/crating-shadow.png", | ||
animation_speed = 1 / i, | ||
repeat_count = 60, | ||
height = 192, | ||
scale = 0.5, | ||
shift = {1.5, 0}, | ||
width = 384 | ||
}, | ||
draw_as_shadow = true, | ||
filename = "__DeadlockCrating__/graphics/entities/low/crating-shadow.png", | ||
animation_speed = 1 / i, | ||
repeat_count = 60, | ||
height = 96, | ||
scale = 1, | ||
shift = {1.5, 0}, | ||
width = 192 | ||
} | ||
} | ||
}, | ||
working_visualisations = { | ||
{ | ||
animation = { | ||
hr_version = { | ||
animation_speed = 1 / i, | ||
blend_mode = "additive", | ||
filename = "__DeadlockCrating__/graphics/entities/high/crating-working.png", | ||
frame_count = 30, | ||
line_length = 10, | ||
height = 192, | ||
priority = "high", | ||
scale = 0.5, | ||
tint = brighter_colour(DCM.TIER_COLOURS[i]), | ||
width = 192 | ||
}, | ||
animation_speed = 1 / i, | ||
blend_mode = "additive", | ||
filename = "__DeadlockCrating__/graphics/entities/low/crating-working.png", | ||
frame_count = 30, | ||
line_length = 10, | ||
height = 96, | ||
priority = "high", | ||
tint = brighter_colour(DCM.TIER_COLOURS[i]), | ||
width = 96 | ||
}, | ||
light = { | ||
color = brighter_colour(DCM.TIER_COLOURS[i]), | ||
intensity = 0.4, | ||
size = 9, | ||
shift = {0, 0}, | ||
}, | ||
}, | ||
}, | ||
working_sound = { filename = "__DeadlockCrating__/sounds/deadlock-crate-machine.ogg", volume = 0.7 }, | ||
open_sound = { | ||
filename = "__base__/sound/machine-open.ogg", | ||
volume = 0.75 | ||
}, | ||
close_sound = { | ||
filename = "__base__/sound/machine-close.ogg", | ||
volume = 0.75 | ||
}, | ||
mined_sound = { | ||
filename = "__base__/sound/deconstruct-bricks.ogg" | ||
}, | ||
vehicle_impact_sound = { | ||
filename = "__base__/sound/car-metal-impact.ogg", | ||
volume = 0.65 | ||
}, | ||
} | ||
data:extend({machine}) | ||
for tier = 1,DCM.TIERS do | ||
DCM.create_machine_entity(tier, nil, nil, nil, nil, nil, (tier < DCM.TIERS) and (DCM.MACHINE_PREFIX..(tier+1)) or nil, nil) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,6 @@ | ||
local DCM = require "prototypes.shared" | ||
|
||
-- crating machines | ||
for i=1,DCM.TIERS do | ||
data:extend { | ||
{ | ||
type = "item", | ||
name = "deadlock-machine-packer-item-"..i, | ||
subgroup = "production-machine", | ||
stack_size = 50, | ||
icons = { | ||
{ icon = "__DeadlockCrating__/graphics/icons/crating-icon-base-"..DCM.ITEM_ICON_SIZE..".png" }, | ||
{ icon = "__DeadlockCrating__/graphics/icons/crating-icon-mask-"..DCM.ITEM_ICON_SIZE..".png", tint = DCM.TIER_COLOURS[i] }, | ||
}, | ||
icon_size = DCM.ITEM_ICON_SIZE, | ||
order = "z"..i, | ||
place_result = "deadlock-machine-packer-entity-"..i, | ||
flags = {}, | ||
} | ||
} | ||
for tier = 1,DCM.TIERS do | ||
DCM.create_machine_item(tier) | ||
end |
Oops, something went wrong.