Skip to content

Commit

Permalink
1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiplacon committed Dec 17, 2023
1 parent ce60d45 commit bac8c6d
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 16 deletions.
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---------------------------------------------------------------------------------------------------
Version: 1.2.8
Date: 12/17/2023
Changes:
- Set a limit of 500 tiles for thrown items that land on the ground to find space. If there's no space, it will just be destroyed.
Bugfixes:
- Throwers now check if a belt is curved for deciding if it is full for overflow prevention, because it turns out curved belts only hold 7 items instead of 8. Report and fix (in the actual API) by boskid
- Fixed crash for inserters, or mods that adjust the power requirements of inserters, that run without power or a power draw of 0. Reported by Foxy_Boxes
---------------------------------------------------------------------------------------------------
Version: 1.2.7
Date: 10/7/2023
Changes:
Expand Down
3 changes: 2 additions & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ function(event)
incomming = incomming + count
end
local total = incomming + properties.targets[HeldItem].get_transport_line(1).get_item_count() + properties.targets[HeldItem].get_transport_line(2).get_item_count() + catapult.held_stack.count
if (total <= 8) then
if (properties.targets[HeldItem].belt_shape == "straight" and total <= 8)
or (properties.targets[HeldItem].belt_shape ~= "straight" and total <= 7) then
catapult.active = true
if (global.HoverGFX[catapult.unit_number]) then
for playerID, graphic in pairs(global.HoverGFX[catapult.unit_number]) do
Expand Down
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "RenaiTransportation",
"version": "1.2.7",
"version": "1.2.8",
"title": "Renai Transportation",
"author": "Kiplacon",
"factorio_version": "1.1",
"dependencies": ["base >= 1.0", "(?) aai-vehicles-ironclad >= 0.6.8", "(?) aai-programmable-vehicles"],
"dependencies": ["base >= 1.1.100", "(?) aai-vehicles-ironclad >= 0.6.8", "(?) aai-programmable-vehicles"],
"description": "Se~no to belts and walking with these ridiculous ways to transport items and yourself around your factory."
}
2 changes: 1 addition & 1 deletion locale/en/config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ select=Select Destination
[RTmisc]
EightMax=Belts can hold 8 items before thrown items spill off
EightMax=Belts can hold 8 items before thrown items spill off (7 when curved)
[thrower-gen]
DefaultDesc=This inserter has been re-wired to throw items __1__ tiles through the air. Range can be configured once researched using Interact (default F) or with the [virtual-signal=ThrowerRangeSignal] circuit signal.
Expand Down
6 changes: 3 additions & 3 deletions script/event/FlyingItems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ local function on_tick(event)
else
local spilt = FlyingItem.surface.spill_item_stack
(
FlyingItem.surface.find_non_colliding_position("item-on-ground",FlyingItem.target, 0, 0.1),
FlyingItem.surface.find_non_colliding_position("item-on-ground",FlyingItem.target, 500, 0.1),
{name=FlyingItem.item, count=total}
)
if (settings.global["RTSpillSetting"].value == "Spill and Mark") then
Expand Down Expand Up @@ -422,7 +422,7 @@ local function on_tick(event)
if (FlyingItem.CloudStorage) then
local spilt = ProjectileSurface.spill_item_stack
(
ProjectileSurface.find_non_colliding_position("item-on-ground", FlyingItem.target, 0, 0.1),
ProjectileSurface.find_non_colliding_position("item-on-ground", FlyingItem.target, 500, 0.1),
FlyingItem.CloudStorage[1]
)
if (settings.global["RTSpillSetting"].value == "Spill and Mark") then
Expand All @@ -434,7 +434,7 @@ local function on_tick(event)
else
local spilt = ProjectileSurface.spill_item_stack
(
ProjectileSurface.find_non_colliding_position("item-on-ground", FlyingItem.target, 0, 0.1),
ProjectileSurface.find_non_colliding_position("item-on-ground", FlyingItem.target, 500, 0.1),
{name=FlyingItem.item, count=FlyingItem.amount}
)
if (settings.global["RTSpillSetting"].value == "Spill and Mark") then
Expand Down
16 changes: 14 additions & 2 deletions script/event/config_changed.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
local function config_changed()
if (global.CatapultList == nil) then
global.CatapultList = {}
else
for catapultID, properties in pairs(global.CatapultList) do
if (properties.entity.valid) then
if (properties.entity.electric_buffer_size == nil) then
properties.IsElectric = false
else
properties.IsElectric = true
end
else
global.CatapultList[catapultID] = nil
end
end
end

if (global.savedVehicleWagons == nil) then -- used for Vehicle Wagons 2 compatability
Expand Down Expand Up @@ -85,7 +97,7 @@ local function config_changed()
global.FlyingItems = {}
end

if (game.surfaces["RTStasisRealm"] == nil) then
--[[ if (game.surfaces["RTStasisRealm"] == nil) then
game.create_surface("RTStasisRealm",
{
peaceful_mode = true,
Expand All @@ -95,7 +107,7 @@ local function config_changed()
default_enable_all_autoplace_controls = false,
cliff_settings = {name = "cliff", cliff_elevation_0 = 0, richness = 0}
})
end
end ]]

if (global.DataTrackerLinks == nil) then
global.DataTrackerLinks = {}
Expand Down
2 changes: 1 addition & 1 deletion script/event/entity_built.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local function entity_built(event)
properties.InSpace = true
end

if (entity.burner == nil and #entity.fluidbox == 0 and entity.electric_buffer_size > 0) then
if (entity.burner == nil and #entity.fluidbox == 0 and entity.electric_buffer_size ~= nil and entity.electric_buffer_size > 0) then
properties.BurnerSelfRefuelCompensation = 0
properties.IsElectric = true
elseif (entity.name == "RTThrower-PrimerThrower") then
Expand Down
4 changes: 2 additions & 2 deletions script/event/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ local function on_int()
global.FlightNumber = 1
global.FlyingItems = {}

if (game.surfaces["RTStasisRealm"] == nil) then
--[[ if (game.surfaces["RTStasisRealm"] == nil) then
game.create_surface("RTStasisRealm",
{
peaceful_mode = true,
Expand All @@ -98,7 +98,7 @@ local function on_int()
default_enable_all_autoplace_controls = false,
cliff_settings = {name = "cliff", cliff_elevation_0 = 0, richness = 0}
})
end
end ]]

global.DataTrackerLinks = {}

Expand Down
8 changes: 4 additions & 4 deletions script/event/interact.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ local function interact(event1) -- has .name = event ID number, .tick = tick num
else
ThingHovering.drop_position =
{
ThingHovering.drop_position.x-global.OrientationUnitComponents[ThingHovering.orientation].x,
ThingHovering.drop_position.y-global.OrientationUnitComponents[ThingHovering.orientation].y
ThingHovering.drop_position.x - global.OrientationUnitComponents[ThingHovering.orientation].x,
ThingHovering.drop_position.y - global.OrientationUnitComponents[ThingHovering.orientation].y
}
end
local NewRange = math.ceil(math.abs(ThingHovering.drop_position.x-ThingHovering.position.x + ThingHovering.drop_position.y-ThingHovering.position.y))
Expand Down Expand Up @@ -478,8 +478,8 @@ local function interact(event1) -- has .name = event ID number, .tick = tick num
else
WhereWeDroppin =
{
thrower.drop_position.x-global.OrientationUnitComponents[global.Dir2Ori[thrower.direction]].x,
thrower.drop_position.y-global.OrientationUnitComponents[global.Dir2Ori[thrower.direction]].y
thrower.drop_position.x - global.OrientationUnitComponents[global.Dir2Ori[thrower.direction]].x,
thrower.drop_position.y - global.OrientationUnitComponents[global.Dir2Ori[thrower.direction]].y
}
end

Expand Down

0 comments on commit bac8c6d

Please sign in to comment.