Skip to content

Commit

Permalink
Merge pull request #5993 from mwerle/feat/equipment_sizes
Browse files Browse the repository at this point in the history
feat(equipment): add equipment for all size slots
  • Loading branch information
sturnclaw authored Jan 12, 2025
2 parents 2b9846f + cccf9d8 commit fa7567e
Show file tree
Hide file tree
Showing 10 changed files with 585 additions and 55 deletions.
272 changes: 247 additions & 25 deletions data/lang/equipment-core/en.json

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion data/lang/ui-core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
"description": "Market header when buying items",
"message": "Available For Purchase"
},
"AVAILABLE_STOCK": {
"description": "Market stat showing number of items in stock",
"message": "Available Stock"
},
"AVERAGE": {
"description": "",
"message": "Average"
Expand Down Expand Up @@ -1831,6 +1835,10 @@
"description": "Ship jump status",
"message": "Out of range"
},
"OUT_OF_STOCK": {
"description": "Equipment availability",
"message": "Out of stock"
},
"OVERVIEW_NAME_FILTER": {
"description": "Filter overview window entries by name",
"message": "Filter overview window entries by name"
Expand Down Expand Up @@ -2405,7 +2413,7 @@
},
"TECH_LEVEL": {
"description": "System view label for technology level",
"message": "Tech level"
"message": "Tech Level"
},
"TEXTURE_COMPRESSION": {
"description": "",
Expand Down
10 changes: 10 additions & 0 deletions data/libs/EquipType.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function EquipType._createTransient(obj)
local l = Lang.GetResource(obj.l10n_resource)
obj.transient = {
description = l:get(obj.l10n_key .. "_DESCRIPTION") or "",
flavourtext = l:get(obj.l10n_key .. "_FLAVOURTEXT") or "",
name = l[obj.l10n_key] or ""
}
end
Expand Down Expand Up @@ -267,6 +268,15 @@ function EquipType:GetDescription()
return self.transient.description
end

-- Method: GetFlavourText
--
-- Returns the translated tooltip for this equipment item suitable for
-- display to the user
---@return string
function EquipType:GetFlavourText()
return self.transient.flavourtext
end

--==============================================================================

-- Base type for weapons
Expand Down
169 changes: 159 additions & 10 deletions data/modules/Equipment/Internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,35 +125,168 @@ Equipment.Register("misc.hull_autorepair", EquipType.New {
-- Thruster Mods
--===============================================

Equipment.Register("misc.thrusters_default", ThrusterType.New {
-- S1 thrusters
Equipment.Register("misc.thrusters_default_s1", ThrusterType.New {
l10n_key="THRUSTERS_DEFAULT", slots="thruster",
price=120, purchasable=true, tech_level=2,
slot = { type="thruster", size=1 },
mass=0, volume=0, capabilities={ thruster_power=0 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_basic", ThrusterType.New {
l10n_key="THRUSTERS_BASIC", slots="thruster",
Equipment.Register("misc.thrusters_improved_s1", ThrusterType.New {
l10n_key="THRUSTERS_IMPROVED", slots="thruster",
price=250, purchasable=true, tech_level=5,
slot = { type="thruster", size=1 },
mass=0.1, volume=0.05, capabilities={ thruster_power=1 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_medium", ThrusterType.New {
l10n_key="THRUSTERS_MEDIUM", slots="thruster",
Equipment.Register("misc.thrusters_optimised_s1", ThrusterType.New {
l10n_key="THRUSTERS_OPTIMISED", slots="thruster",
price=560, purchasable=true, tech_level=8,
slot = { type="thruster", size=1 },
mass=0.05, volume=0.05, capabilities={ thruster_power=2 },
mass=0.05, volume=0.03, capabilities={ thruster_power=2 },
icon_name="equip_thrusters_medium"
})

Equipment.Register("misc.thrusters_best", ThrusterType.New {
l10n_key="THRUSTERS_BEST", slots="thruster",
price=14000, purchasable=true, tech_level="MILITARY",
Equipment.Register("misc.thrusters_naval_s1", ThrusterType.New {
l10n_key="THRUSTERS_NAVAL", slots="thruster",
price=1400, purchasable=true, tech_level="MILITARY",
slot = { type="thruster", size=1 },
mass=0, volume=0, capabilities={ thruster_power=3 },
mass=0.1, volume=0.1, capabilities={ thruster_power=3 },
icon_name="equip_thrusters_best"
})

-- S2 thrusters
Equipment.Register("misc.thrusters_default_s2", ThrusterType.New {
l10n_key="THRUSTERS_DEFAULT", slots="thruster",
price=220, purchasable=true, tech_level=2,
slot = { type="thruster", size=2 },
mass=0, volume=0, capabilities={ thruster_power=0 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_improved_s2", ThrusterType.New {
l10n_key="THRUSTERS_IMPROVED", slots="thruster",
price=460, purchasable=true, tech_level=5,
slot = { type="thruster", size=2 },
mass=0.24, volume=0.12, capabilities={ thruster_power=1 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_optimised_s2", ThrusterType.New {
l10n_key="THRUSTERS_OPTIMISED", slots="thruster",
price=1025, purchasable=true, tech_level=8,
slot = { type="thruster", size=2 },
mass=0.12, volume=0.1, capabilities={ thruster_power=2 },
icon_name="equip_thrusters_medium"
})

Equipment.Register("misc.thrusters_naval_s2", ThrusterType.New {
l10n_key="THRUSTERS_NAVAL", slots="thruster",
price=2565, purchasable=true, tech_level="MILITARY",
slot = { type="thruster", size=2 },
mass=0.24, volume=0.24, capabilities={ thruster_power=3 },
icon_name="equip_thrusters_best"
})

-- S3 thrusters
Equipment.Register("misc.thrusters_default_s3", ThrusterType.New {
l10n_key="THRUSTERS_DEFAULT", slots="thruster",
price=420, purchasable=true, tech_level=2,
slot = { type="thruster", size=3 },
mass=0, volume=0, capabilities={ thruster_power=0 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_improved_s3", ThrusterType.New {
l10n_key="THRUSTERS_IMPROVED", slots="thruster",
price=880, purchasable=true, tech_level=5,
slot = { type="thruster", size=3 },
mass=0.46, volume=0.23, capabilities={ thruster_power=1 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_optimised_s3", ThrusterType.New {
l10n_key="THRUSTERS_OPTIMISED", slots="thruster",
price=1950, purchasable=true, tech_level=8,
slot = { type="thruster", size=3 },
mass=0.23, volume=0.2, capabilities={ thruster_power=2 },
icon_name="equip_thrusters_medium"
})

Equipment.Register("misc.thrusters_naval_s3", ThrusterType.New {
l10n_key="THRUSTERS_NAVAL", slots="thruster",
price=4970, purchasable=true, tech_level="MILITARY",
slot = { type="thruster", size=3 },
mass=0.46, volume=0.46, capabilities={ thruster_power=3 },
icon_name="equip_thrusters_best"
})

-- S4 Thrusters
Equipment.Register("misc.thrusters_default_s4", ThrusterType.New {
l10n_key="THRUSTERS_DEFAULT", slots="thruster",
price=880, purchasable=true, tech_level=2,
slot = { type="thruster", size=4 },
mass=0, volume=0, capabilities={ thruster_power=0 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_improved_s4", ThrusterType.New {
l10n_key="THRUSTERS_IMPROVED", slots="thruster",
price=1850, purchasable=true, tech_level=5,
slot = { type="thruster", size=4 },
mass=0.96, volume=0.48, capabilities={ thruster_power=1 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_optimised_s4", ThrusterType.New {
l10n_key="THRUSTERS_OPTIMISED", slots="thruster",
price=4096, purchasable=true, tech_level=8,
slot = { type="thruster", size=4 },
mass=0.48, volume=0.42, capabilities={ thruster_power=2 },
icon_name="equip_thrusters_medium"
})

Equipment.Register("misc.thrusters_naval_s4", ThrusterType.New {
l10n_key="THRUSTERS_NAVAL", slots="thruster",
price=10240, purchasable=true, tech_level="MILITARY",
slot = { type="thruster", size=4 },
mass=0.96, volume=0.96, capabilities={ thruster_power=3 },
icon_name="equip_thrusters_best"
})

-- S5 thrusters
Equipment.Register("misc.thrusters_default_s5", ThrusterType.New {
l10n_key="THRUSTERS_DEFAULT", slots="thruster",
price=1950, purchasable=true, tech_level=2,
slot = { type="thruster", size=5 },
mass=0, volume=0, capabilities={ thruster_power=0 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_improved_s5", ThrusterType.New {
l10n_key="THRUSTERS_IMPROVED", slots="thruster",
price=4090, purchasable=true, tech_level=5,
slot = { type="thruster", size=5 },
mass=2.1, volume=1.05, capabilities={ thruster_power=1 },
icon_name="equip_thrusters_basic"
})

Equipment.Register("misc.thrusters_optimised_s5", ThrusterType.New {
l10n_key="THRUSTERS_OPTIMISED", slots="thruster",
price=9050, purchasable=true, tech_level=8,
slot = { type="thruster", size=5 },
mass=1.05, volume=0.9, capabilities={ thruster_power=2 },
icon_name="equip_thrusters_medium"
})

Equipment.Register("misc.thrusters_naval_s5", ThrusterType.New {
l10n_key="THRUSTERS_NAVAL", slots="thruster",
price=22620, purchasable=true, tech_level="MILITARY",
slot = { type="thruster", size=5 },
mass=2.1, volume=2.1, capabilities={ thruster_power=3 },
icon_name="equip_thrusters_best"
})

Expand Down Expand Up @@ -185,6 +318,22 @@ Equipment.Register("misc.fuel_scoop_s3", EquipType.New {
icon_name="equip_fuel_scoop"
})

Equipment.Register("misc.fuel_scoop_s4", EquipType.New {
l10n_key="FUEL_SCOOP",
price=14500, purchasable=true, tech_level=9,
slot = { type="fuel_scoop", size=4, hardpoint=true },
mass=22, volume=16, capabilities={ fuel_scoop=7 },
icon_name="equip_fuel_scoop"
})

Equipment.Register("misc.fuel_scoop_s5", EquipType.New {
l10n_key="FUEL_SCOOP",
price=21500, purchasable=true, tech_level=12,
slot = { type="fuel_scoop", size=5, hardpoint=true },
mass=30, volume=22, capabilities={ fuel_scoop=9 },
icon_name="equip_fuel_scoop"
})

Equipment.Register("misc.cargo_scoop", EquipType.New {
l10n_key="CARGO_SCOOP",
price=3900, purchasable=true, tech_level=5,
Expand Down
Loading

0 comments on commit fa7567e

Please sign in to comment.