Skip to content

Commit 4e7cbb8

Browse files
committed
Circumvent RemoteView.get_stack_limit(stack) screwing everything up
Actually this fails too, remote view is dropping capsules smh
1 parent 4597e37 commit 4e7cbb8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

mods/se-space-capsule-fast-travel/control.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ local price = "se-space-capsule"
22

33
script.on_event("se--targeter", function(event)
44
local player = game.get_player(event.player_index)
5-
local cursor_item = player.cursor_stack
5+
local hand_stack = player.cursor_stack or player.cursor_ghost
66

7-
if not (cursor_item and cursor_item.valid_for_read) then return end
8-
if cursor_item.name ~= "se-space-capsule-fast-travel-targeter" then return end
7+
if not (hand_stack and hand_stack.valid_for_read) then return end
8+
if hand_stack.name ~= "se-space-capsule-fast-travel-targeter" then return end
99

1010
-- local inventory = player.get_main_inventory()
1111
local inventory = remote.call("space-exploration", "get_player_character", {player = player}).get_main_inventory()

mods/se-space-capsule-fast-travel/data.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local targeter = table.deepcopy(data.raw["item"]["se-space-capsule-targeter"])
33
targeter.name = "se-space-capsule-fast-travel-targeter"
44
targeter.icon = data.raw["item"]["se-space-capsule"].icon
55
table.insert(targeter.flags, "spawnable")
6+
table.insert(targeter.flags, "not-stackable")
67

78
data:extend({
89
{

mods/se-space-capsule-fast-travel/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "se-space-capsule-fast-travel",
33
"title": "Space Exploration - space capsule fast travel",
44
"description": "Allows you to emergency burn anywhere using the shortcut, pretty much a teleport that damages your capsule.",
5-
"version": "1.0.5",
5+
"version": "1.0.6",
66
"author": "Quezler",
77
"factorio_version": "1.1",
88
"dependencies": [

0 commit comments

Comments
 (0)