From 10103ab4e0da1fe8ffad27305beb146b91015fda Mon Sep 17 00:00:00 2001 From: npc-strider Date: Thu, 7 Mar 2019 21:37:18 +0800 Subject: [PATCH] Testing rotation fixes --- Liquid_Fueled_0.1.0/control.lua | 3 ++ Liquid_Fueled_0.1.0/graphics/empty.png | Bin 0 -> 225 bytes .../prototypes/entity_overrides.lua | 17 +++------ Liquid_Fueled_0.1.0/prototypes/fluids.lua | 33 +++++++++++++----- 4 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 Liquid_Fueled_0.1.0/control.lua create mode 100644 Liquid_Fueled_0.1.0/graphics/empty.png diff --git a/Liquid_Fueled_0.1.0/control.lua b/Liquid_Fueled_0.1.0/control.lua new file mode 100644 index 0000000..33494ea --- /dev/null +++ b/Liquid_Fueled_0.1.0/control.lua @@ -0,0 +1,3 @@ +script.on_event(defines.events.on_player_rotated_entity, function(event) + game.print("rotated") +end) \ No newline at end of file diff --git a/Liquid_Fueled_0.1.0/graphics/empty.png b/Liquid_Fueled_0.1.0/graphics/empty.png new file mode 100644 index 0000000000000000000000000000000000000000..0d78482b9048d58c4d4c17103acf9b0924847bd7 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7? zo@t7E1jw2oPZ!6K2=}8W6d4%|cvv?6GXHBVP{XXaGdJGQ`;5@$BRV8fo2x&BeOb1J S``1pO=?tE(elF{r5}E*Ltw%=y literal 0 HcmV?d00001 diff --git a/Liquid_Fueled_0.1.0/prototypes/entity_overrides.lua b/Liquid_Fueled_0.1.0/prototypes/entity_overrides.lua index d23dba5..0be3a60 100644 --- a/Liquid_Fueled_0.1.0/prototypes/entity_overrides.lua +++ b/Liquid_Fueled_0.1.0/prototypes/entity_overrides.lua @@ -26,26 +26,19 @@ for _, entities in pairs(entities) do fluid_box = { production_type = "input", - pipe_picture = assembler2pipepictures(), + pipe_picture = assembler3pipepictures(), pipe_covers = pipecoverspictures(), base_area = 5, base_level = -1, filter = "fuel-gas", - pipe_connections = {{ type="input", position = {-0.5, -1.5}}} + pipe_connections = {{ type="input", position = {-0.5, -math.abs(entity.selection_box[1][2])-0.5}}}, + secondary_draw_orders = { north = -1 } } } if entity.fluid_boxes == nil then entity.fluid_boxes = {} + -- else + -- entity.fluid_boxes.off_when_no_fluid_recipe = false end - entity.fluid_boxes[#entity.fluid_boxes+1] = - { - production_type = "output", - -- pipe_covers = pipecoverspictures(), --TODO: ADD NULL PIPE COVER PICTURES - base_area = 10^-5, - base_level = 0, - -- filter = "water", --TODO: ADD NULL FILTER WITH NULL IMAGE. try the filter = "none" first - pipe_connections = {{ type="output", position = {0, entity.selection_box[2][2]}}} - } - entity.fluid_boxes.off_when_no_fluid_recipe = false data:extend({entity}) end \ No newline at end of file diff --git a/Liquid_Fueled_0.1.0/prototypes/fluids.lua b/Liquid_Fueled_0.1.0/prototypes/fluids.lua index 01a09b6..c81ba5a 100644 --- a/Liquid_Fueled_0.1.0/prototypes/fluids.lua +++ b/Liquid_Fueled_0.1.0/prototypes/fluids.lua @@ -1,5 +1,3 @@ - - data:extend( { { @@ -10,10 +8,10 @@ data:extend( type = "fluid", name = "fuel-gas", default_temperature = 24, - base_color = {r=0, g=0, b=0}, - flow_color = {r=0.5, g=0.5, b=0.5}, - max_temperature = 1000, - icon = "__base__/graphics/icons/fluid/crude-oil.png", + base_color = {r=0.57, g=0.33, b=0}, + flow_color = {r=1, g=0.73, b=0.07}, + max_temperature = 100, + icon = "__base__/graphics/icons/fluid/light-oil.png", icon_size = 32, pressure_to_speed_ratio = 0.4, flow_to_energy_ratio = 0.59, @@ -21,6 +19,25 @@ data:extend( fuel_value = "0.01MJ", fuel_category = "basic-fuel", order = "a[fluid]-b[crude-oil]" + }, + { + type = "recipe", + name = "rotate", + category = "crafting-with-fluid", + energy_required = 1, + ingredients = + { + {type="fluid", name="null", amount=10^-10} + }, + results= + { + {type="fluid", name="null", amount=10^-10} + } } -} -) \ No newline at end of file +}) +local null = util.table.deepcopy(data.raw["fluid"]["water"]) +null.name = "null" +null.icon = "__Liquid_Fueled__/graphics/empty.png" +null.icon_size = 32 +null.order = "a[fluid]-a[null]" +data:extend({null}) \ No newline at end of file