Skip to content

Commit

Permalink
Mods:
Browse files Browse the repository at this point in the history
Elevator Tweaks 0.2:
Removed the mod option as it doesn't do much.

Exotic Meteors 0.3:
Automated mode works on meteorites.
Added selection circle to rare metals meteorites.

Fix Bugs 6.2:
Added my Pins Missing Some Status Icons mod.

View Colony Map 2.5:
Code cleanup

[email protected]
  • Loading branch information
ChoGGi committed Aug 25, 2024
1 parent f55584b commit a59a634
Show file tree
Hide file tree
Showing 105 changed files with 278 additions and 150 deletions.
20 changes: 0 additions & 20 deletions Mods ChoGGi/Elevator Tweaks/Code/Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,7 @@ if not g_AvailableDlc.picard then
return
end

local mod_EnableMod

-- Update mod options
local function ModOptions(id)
-- id is from ApplyModOptions
if id and id ~= CurrentModId then
return
end

mod_EnableMod = CurrentModOptions:GetProperty("EnableMod")
end
-- Load default/saved settings
OnMsg.ModsReloaded = ModOptions
-- Fired when Mod Options>Apply button is clicked
OnMsg.ApplyModOptions = ModOptions

local function StartupCode()
if not mod_EnableMod then
return
end

-- add cargo entry for saved games
if not table.find(ResupplyItemDefinitions, "id", "TriboelectricScrubber") then
ResupplyItemsInit()
Expand Down
1 change: 1 addition & 0 deletions Mods ChoGGi/Elevator Tweaks/changes.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
v0.2
Removed the mod option as it doesn't do much.
10 changes: 0 additions & 10 deletions Mods ChoGGi/Elevator Tweaks/items.lua
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
-- See LICENSE for terms

return {
PlaceObj("ModItemOptionToggle", {
"name", "EnableMod",
"DisplayName", T(302535920011303, "<color ChoGGi_yellow>Enable Mod</color>"),
"Help", T(302535920011793, "Disable mod without having to see missing mod msg."),
"DefaultValue", true,
}),
}
6 changes: 3 additions & 3 deletions Mods ChoGGi/Elevator Tweaks/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ return PlaceObj("ModDef", {
"steam_id", "3307151665",
"pops_any_uuid", "0611880b-a253-4294-b7de-2562f1293b3b",
"lua_revision", 1007000, -- Picard
"version", 1,
"version", 2,
"version_major", 0,
"version_minor", 1,
"version_minor", 2,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
"Code/Script.lua",
},
"has_options", true,
--~ "has_options", true,
"TagGameplay", true,
"TagInterface", true,
"description", [[
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Power Gen Resource/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Replace Colonist Sign/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Save Local Mod Data/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ return PlaceObj("ModDef", {
"id", "ChoGGi_ExampleSaveLocalModData",
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"author", "ChoGGi",
"lua_revision", 1007000, -- Picard
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Sidepanel Controls/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Tech/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Translation Mod/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example Unlock All Buildings/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Example View TextStyles/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"author", "ChoGGi",
"code", {
"Code/Script.lua",
Expand Down
44 changes: 42 additions & 2 deletions Mods ChoGGi/Exotic Meteors/Code/Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ local missing_entity_lookup_nodlc = {
SurfaceDepositMetals_05 = "RocksSlate_07",
}

-- Add proper entity and set amount of res
local meteor_type
local ChoOrig_PlacePrefab = PlacePrefab
local ChoFake_PlacePrefab = function(...)
Expand Down Expand Up @@ -141,12 +142,51 @@ function BaseMeteor:SpawnPrefab(...)
return ChoOrig_BaseMeteor_SpawnPrefab(self, ...)
end

-- override func that gens prefab and replace resource type, then return as usual
-- Override func that gens prefab and replace resource type, then return as usual
PlacePrefab = ChoFake_PlacePrefab
meteor_type = self.deposit_type
local _, ret_value = pcall(ChoOrig_BaseMeteor_SpawnPrefab, self, ...)
PlacePrefab = ChoOrig_PlacePrefab
meteor_type = nil

return ret_value
end
end

-- Transports auto gather new res
local ChoOrig_RCTransport_GetAutoGatherDeposits = RCTransport.GetAutoGatherDeposits
function RCTransport:GetAutoGatherDeposits(...)
if not mod_EnableMod then
return ChoOrig_RCTransport_GetAutoGatherDeposits(self, ...)
end
local list = ChoOrig_RCTransport_GetAutoGatherDeposits(self, ...)

-- insert mine instead of replacing with new list, incase other mods change it
table.insert(list, 1, "SurfaceDepositPreciousMetals")
table.insert(list, 1, "SurfaceDepositPreciousMinerals")

return list
end

-- Add selection circle to new res
function OnMsg.ClassesPostprocess()

if not table.find(Presets.FXPreset.Default, "Actor", "SurfaceDepositPreciousMetals") then
PlaceObj('ActionFXParticles', {
Action = "Select",
Actor = "SurfaceDepositPreciousMetals",
Attach = true,
EndRules = {
PlaceObj('ActionFXEndRule', {
'EndMoment', "end",
}),
},
Flags = "LockedOrientation",
Moment = "start",
Particles = "Selection_Rover",
Scale = 250,
-- random number needed?
handle = 20088408711,
})
end

end
2 changes: 2 additions & 0 deletions Mods ChoGGi/Exotic Meteors/changes.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
v0.2
Automated mode works on meteorites.
Added selection circle to rare metals meteorites.
2 changes: 1 addition & 1 deletion Mods ChoGGi/Exotic Meteors/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"steam_id", "3274108477",
"pops_any_uuid", "c829c12b-39ba-472c-bd54-e53b08fa5c27",
"lua_revision", 1007000, -- Picard
"version", 1,
"version", 2,
"version_major", 0,
"version_minor", 2,
"image", "Preview.jpg",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Expedition Rocket Launch Button/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ return PlaceObj("ModDef", {
"title", "Expedition Rocket Launch Button",
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,

"image", "Preview.png",
"id", "ChoGGi_ExpeditionRocketLaunchButton",
Expand Down
22 changes: 22 additions & 0 deletions Mods ChoGGi/Fix Bugs/Code/Script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,28 @@ function LandingSiteObject:ResolveSpotName(...)
return ChoOrig_LandingSiteObject_ResolveSpotName(self, ...)
end

--
-- Pins Missing Some Status Icons
local ChoOrig_PinsDlg_GetPinConditionImage = PinsDlg.GetPinConditionImage
function PinsDlg:GetPinConditionImage(obj, ...)
if not mod_EnableMod then
return ChoOrig_PinsDlg_GetPinConditionImage(self, obj, ...)
end

local img = ChoOrig_PinsDlg_GetPinConditionImage(self, obj, ...)

if not img and obj:IsKindOf("BaseRover")
and obj.command == "TransferResources"
then
if obj.fx == "Unload" then
img = "UI/Icons/pin_unload.tga"
elseif obj.fx == "Load" then
img = "UI/Icons/pin_load.tga"
end
end

return img
end
--
--
--
Expand Down
5 changes: 5 additions & 0 deletions Mods ChoGGi/Fix Bugs/MoreInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Fix Resupply Menu Not Opening
Fix Stuck Malfunctioning Drones At DroneHub
Fix Transport Negative Amounts
Fix Transports Don't Move After Route Set
Pins Missing Some Status Icons
```

If you have B&B I'd recommend SkiRich's [Better Lander Rockets](https://steamcommunity.com/sharedfiles/filedetails/?id=2619013940)
Expand Down Expand Up @@ -242,6 +243,10 @@ For those wondering LandscapeLastMark is increased each time you open flatten/ra
Thanks to Quirquie for the bug report (and persistence).


**Pins Missing Some Status Icons**

The pinned rover transport buttons are missing un/load icons.



**Known Bugs**
Expand Down
4 changes: 4 additions & 0 deletions Mods ChoGGi/Fix Bugs/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v6.2
Added my Pins Missing Some Status Icons mod.


v6.1
Added missing images for Cargo listings.
Gale crater name doesn't show up for 4S138E, 5S138E (thanks a_pompous_fool).
Expand Down
4 changes: 2 additions & 2 deletions Mods ChoGGi/Fix Bugs/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ return PlaceObj("ModDef", {
"steam_id", "2721921772",
"pops_any_uuid", "3aff9cde-7dc1-4ad8-b38d-31a7568185ff",
"lua_revision", 1007000, -- Picard
"version", 61,
"version", 62,
"version_major", 6,
"version_minor", 1,
"version_minor", 2,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Fix Disable Fireworks/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"steam_id", "2595736963",
"pops_any_uuid", "6b3568d4-ccf8-4de4-a68b-c977ed1073fe",
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Fix Dust Sickness/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"author", "ChoGGi",
"code", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Fix Unlock RC Safari Resupply/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Fix Unrepairable Attack Rovers/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Forestation Plant Goes To 11/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Game Rule One MOXIE/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Game Rules Enable Achievements/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.png",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Get More Tourists/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PlaceObj("ModDef", {
"pops_any_uuid", "8851ae37-cddd-48f8-8940-3921599cb0ea",
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Granary/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/HUD Padding/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
2 changes: 1 addition & 1 deletion Mods ChoGGi/Happy Safe Mode/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ return PlaceObj("ModDef", {
"lua_revision", 1007000, -- Picard
"version", 1,
"version_major", 0,
"version_minor", 2,
"version_minor", 1,
"image", "Preview.jpg",
"author", "ChoGGi",
"code", {
Expand Down
Loading

0 comments on commit a59a634

Please sign in to comment.