Skip to content

Commit

Permalink
Merge pull request #5856 from impaktor/some-tweaks
Browse files Browse the repository at this point in the history
Fix Military Drive 2 not for sale & tweaks
  • Loading branch information
Webster Sheets authored Jul 9, 2024
2 parents d5e3147 + 02ad628 commit 11927fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
6 changes: 2 additions & 4 deletions data/modules/Debug/DebugRPG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ local ui = require 'pigui'
local debugView = require 'pigui.views.debug'
local Commodities = require 'Commodities'
local amount = 1000
local selected = 0

local Legal = require "Legal"
local utils = require "utils"
Expand All @@ -16,7 +15,7 @@ local l = Lang.GetResource("ui-core")

-- build list of all crime types:
local crime_types = {}
for k, v in pairs(Legal.CrimeType) do
for k, _ in pairs(Legal.CrimeType) do
table.insert(crime_types, k)
end

Expand All @@ -41,7 +40,7 @@ end

debugView.registerTab("RPG-debug-view", function()
if Game.player == nil then return end
if not ui.beginTabItem("RPG") then return end
if not ui.beginTabItem("RPG") then return end
ui.text("State: " .. Game.player:GetFlightState())

-- Reputation
Expand Down Expand Up @@ -70,7 +69,6 @@ debugView.registerTab("RPG-debug-view", function()
end
ui.separator()

local rows = 10
if ui.collapsingHeader("Crime", {}) then

ui.text("ADD CRIMINAL CHARGES:")
Expand Down
19 changes: 10 additions & 9 deletions data/modules/Scoop/Scoop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ local spoiled_food = CommodityType.RegisterCommodity("spoiled_food", {
purchasable = false
})

local unknown = CommodityType.RegisterCommodity("unknown", {
l10n_key = "UNKNOWN",
l10n_resource = "module-scoop",
price = -5,
icon_name = "Default",
mass = 1,
purchasable = false
})
-- -- Unclear what player should do with "Unknown" cargo -> disable for now
-- local unknown = CommodityType.RegisterCommodity("unknown", {
-- l10n_key = "UNKNOWN",
-- l10n_resource = "module-scoop",
-- price = -5,
-- icon_name = "Default",
-- mass = 1,
-- purchasable = false
-- })

local rescue_capsules = {
rescue_capsule
Expand All @@ -115,7 +116,7 @@ local weapons = {
local waste = {
toxic_waste,
spoiled_food,
unknown,
-- unknown,
Commodities.radioactives,
Commodities.rubbish
}
Expand Down
2 changes: 1 addition & 1 deletion data/pigui/libs/ship-equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ local hasTech = function (station, e)

if type(equip_tech_level) == "string" then
if equip_tech_level == "MILITARY" then
return station.techLevel == 11
equip_tech_level = 11
else
error("Unknown tech level:\t"..equip_tech_level)
end
Expand Down

0 comments on commit 11927fa

Please sign in to comment.