Skip to content

Commit 845c0e7

Browse files
authored
Merge pull request #28 from Panda291/main
randomizer bugfixes and improvements
2 parents a5ea4bc + e7c64ad commit 845c0e7

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

Lawrence/mods/randomizer/LocationSyncing.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ local locationToActionMap = {
7373
[53] = function (universe, player) universe.replacedMobys:GetMoby('Magneboots'):Disable() player:SetLevelFlags(1, 10, 1, {0xff}) player:SetLevelFlags(2, 10, 35, {2}) player:SetLevelFlags(1, 10, 1, {0xff}) end, -- magneboots
7474
[54] = function (universe, player) universe.replacedMobys:GetMoby('NanotechVendor'):Progress() player:SetLevelFlags(2, 10, 31, {1}) player:SetLevelFlags(2, 10, 87, {2}) player:SetLevelFlags(1, 10, 0, {0xff}) end, -- premium nanotech
7575
[55] = function (universe, player) universe.replacedMobys:GetMoby('NanotechVendor'):Disable() end, -- ultra nanotech
76-
[56] = function (universe, player) player:SetAddressValue(Player.offset.goldBolts + 10 * 4 + 0, 1, 1) end, -- clank gold bolt
77-
[57] = function (universe, player) player:SetAddressValue(Player.offset.goldBolts + 10 * 4 + 1, 1, 1) end, -- visibomb gold bolt
76+
[56] = function (universe, player) player:SetAddressValue(Player.offset.goldBolts + 10 * 4 + 1, 1, 1) end, -- clank gold bolt
77+
[57] = function (universe, player) player:SetAddressValue(Player.offset.goldBolts + 10 * 4 + 0, 1, 1) end, -- visibomb gold bolt
7878

7979
-- Pokitaru
8080
[58] = function (universe, player) universe:RemoveVendorItem(0x19) end, -- decoy glove

Lawrence/mods/randomizer/RandoPlayer.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function RandoPlayer:Start()
4949
self:AddLabel(self.GhostRatchetLabel)
5050
end
5151

52-
self.TeleportToShipLabel = Label:new("Select: Teleport to ship", 250, 340, 0xC0FFA888, {GameState.Menu})
52+
self.TeleportToShipLabel = Label:new("\x13: Teleport to ship", 250, 340, 0xC0FFA888, {GameState.Menu})
5353
self:AddLabel(self.TeleportToShipLabel)
5454

5555
self.lobby.universe:AddEntity(self)
@@ -91,7 +91,7 @@ function RandoPlayer:OnGameStateChanged(state)
9191
end
9292

9393
function RandoPlayer:OnControllerInputTapped(input)
94-
if self.gameState == 3 and input & 0x8 ~= 0 and self.lobby.options.cheats.value then
94+
if self.gameState == 3 and input & 0x8 ~= 0 and self.lobby.options.cheats.value then -- R1
9595
self:SetGhostRatchet(200)
9696
end
9797

@@ -100,7 +100,7 @@ function RandoPlayer:OnControllerInputTapped(input)
100100
self.lobby.universe.replacedMobys:Triangle(self)
101101
end
102102

103-
if self.gameState == 3 and input & 0x100 ~= 0 then -- select
103+
if self.gameState == 3 and input & 0x80 ~= 0 then -- square
104104
self:TeleportToShip()
105105
end
106106
end
@@ -129,10 +129,6 @@ end
129129
function RandoPlayer:MonitoredAddressChanged(address, oldValue, newValue)
130130
print("Address " .. address .. " changed from " .. oldValue .. " to " .. newValue)
131131

132-
if address == Player.offset.has_raritanium then
133-
print("has_raritanium changed from " .. tostring(oldValue) .. " to " .. tostring(newValue))
134-
end
135-
136132
if address == Player.offset.goldBolts + 16 * 4 + 1 and newValue == 1 and not self.hasCollectedKaleboGrindrailBolt then
137133
self:OnCollectedGoldBolt(16, 1)
138134
self.hasCollectedKaleboGrindrailBolt = true
@@ -222,7 +218,9 @@ function RandoPlayer:TeleportToShip()
222218
elseif level == "Rilgar" then
223219
self:SetPosition(338.32, 110.8, 62.7)
224220
elseif level == "BlargStation" then
225-
self:SetPosition(247.950, 148.68, 138.3)
221+
if self.oClass == 0 then -- if not clank
222+
self:SetPosition(247.950, 148.68, 138.3)
223+
end
226224
elseif level == "Umbris" then
227225
self:SetPosition(264.55, 72.13, 45.77)
228226
elseif level == "Batalia" then

Lawrence/mods/randomizer/RandoUniverse.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ function RandoUniverse:Connect()
5858
end
5959

6060
local uuid = "5"
61-
62-
print(string.format("host: %s, slot: %s, password: %s", tostring(self.host), tostring(self.lobby.slot), tostring(self.lobby.ap_password)))
63-
61+
6462
self.ap_client = APClient(self, game_name, items_handling, uuid, self.host, self.lobby.slot, self.lobby.ap_password)
6563
self.ap_client_initialized = true
6664
end

0 commit comments

Comments
 (0)