Skip to content

Commit 1836856

Browse files
committed
Commodities in cargo missions
Adds commodities to the cargo runs. Only the strings are used so they should not interfere with each other. The new cargo is registered again under a new dummy name cargo_<name of commodity>, and then added to branches with the other cargo.
1 parent c691bc0 commit 1836856

1 file changed

Lines changed: 107 additions & 0 deletions

File tree

data/modules/CargoRun/CargoTypes.lua

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,107 @@ local stem_bolts = CommodityType.RegisterCommodity("stem_bolts", {
110110
l10n_resource="module-cargorun"
111111
})
112112

113+
114+
-- Adapted from the commodity market. They only share
115+
-- the strings and price from the commodities.
116+
local cargo_chemicals = CommodityType.RegisterCommodity("cargo_chemicals", {
117+
l10n_key = 'CHEMICALS', price=124,
118+
mass=1, purchasable=false,
119+
l10n_resource="commodity"
120+
})
121+
local cargo_computers = CommodityType.RegisterCommodity("cargo_computers", {
122+
l10n_key = 'COMPUTERS', price=461,
123+
mass=1, purchasable=false,
124+
l10n_resource="commodity"
125+
})
126+
local cargo_consumer_goods = CommodityType.RegisterCommodity("cargo_consumer_goods", {
127+
l10n_key = 'CONSUMER_GOODS', price=246,
128+
mass=1, purchasable=false,
129+
l10n_resource="commodity"
130+
})
131+
local cargo_farm_machinery = CommodityType.RegisterCommodity("cargo_farm_machinery", {
132+
l10n_key = 'FARM_MACHINERY', price=419,
133+
mass=1, purchasable=false,
134+
l10n_resource="commodity"
135+
})
136+
local cargo_fertilizer = CommodityType.RegisterCommodity("cargo_fertilizer", {
137+
l10n_key = 'FERTILIZER', price=25,
138+
mass=1, purchasable=false,
139+
l10n_resource="commodity"
140+
})
141+
local cargo_fruit_and_veg = CommodityType.RegisterCommodity("cargo_fruit_and_veg", {
142+
l10n_key = 'FRUIT_AND_VEG', price=105,
143+
mass=1, purchasable=false,
144+
l10n_resource="commodity"
145+
})
146+
local cargo_grain = CommodityType.RegisterCommodity("cargo_grain", {
147+
l10n_key = 'GRAIN', price=41,
148+
mass=1, purchasable=false,
149+
l10n_resource="commodity"
150+
})
151+
local cargo_industrial_machinery = CommodityType.RegisterCommodity("cargo_industrial_machinery", {
152+
l10n_key = 'INDUSTRIAL_MACHINERY', price=358,
153+
mass=1, purchasable=false,
154+
l10n_resource="commodity"
155+
})
156+
local cargo_liquor = CommodityType.RegisterCommodity("cargo_liquor", {
157+
l10n_key = 'LIQUOR', price=422,
158+
mass=1, purchasable=false,
159+
l10n_resource="commodity"
160+
})
161+
local cargo_medicines = CommodityType.RegisterCommodity("cargo_medicines", {
162+
l10n_key = 'MEDICINES', price=712,
163+
mass=1, purchasable=false,
164+
l10n_resource="commodity"
165+
})
166+
local cargo_metal_alloys = CommodityType.RegisterCommodity("cargo_metal_alloys", {
167+
l10n_key = 'METAL_ALLOYS', price=75,
168+
mass=1, purchasable=false,
169+
l10n_resource="commodity"
170+
})
171+
local cargo_mining_machinery = CommodityType.RegisterCommodity("cargo_mining_machinery", {
172+
l10n_key = 'MINING_MACHINERY', price=312,
173+
mass=1, purchasable=false,
174+
l10n_resource="commodity"
175+
})
176+
local cargo_plastics = CommodityType.RegisterCommodity("cargo_plastics", {
177+
l10n_key = 'PLASTICS', price=36,
178+
mass=1, purchasable=false,
179+
l10n_resource="commodity"
180+
})
181+
local cargo_precious_metals = CommodityType.RegisterCommodity("cargo_precious_metals", {
182+
l10n_key = 'PRECIOUS_METALS', price=2180,
183+
mass=1, purchasable=false,
184+
l10n_resource="commodity"
185+
})
186+
local cargo_textiles = CommodityType.RegisterCommodity("cargo_textiles", {
187+
l10n_key = 'TEXTILES', price=91,
188+
mass=1, purchasable=false,
189+
l10n_resource="commodity"
190+
})
191+
192+
113193
local chemical = {
194+
cargo_chemicals,
195+
cargo_fertilizer,
114196
digesters,
115197
hazardous_substances
116198
}
117199

118200
local mining = {
201+
cargo_mining_machinery,
119202
clus,
120203
explosives
121204
}
122205

123206
local hardware = {
124207
aluminium_tubes,
208+
cargo_farm_machinery,
209+
cargo_industrial_machinery,
210+
cargo_metal_alloys,
211+
cargo_mining_machinery,
212+
cargo_plastics,
213+
cargo_precious_metals,
125214
diamonds,
126215
hazardous_substances,
127216
machine_tools,
@@ -142,13 +231,31 @@ local infrastructure = {
142231
}
143232

144233
local consumer_goods = {
234+
cargo_chemicals,
235+
cargo_computers,
236+
cargo_consumer_goods,
237+
cargo_fertilizer,
238+
cargo_fruit_and_veg,
239+
cargo_grain,
240+
cargo_liquor,
241+
cargo_medicines,
242+
cargo_plastics,
243+
cargo_textiles,
145244
electrical_appliances,
146245
furniture,
147246
spaceship_parts
148247
}
149248

150249
local expensive = { -- price >= 175
151250
art_objects,
251+
cargo_computers,
252+
cargo_consumer_goods,
253+
cargo_farm_machinery,
254+
cargo_industrial_machinery,
255+
cargo_liquor,
256+
cargo_medicines,
257+
cargo_mining_machinery,
258+
cargo_precious_metals,
152259
diamonds,
153260
neptunium,
154261
plutonium,

0 commit comments

Comments
 (0)