-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5219d6
commit fa38cd5
Showing
98 changed files
with
7,283 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Changes and additions: | ||
|
||
1. Re-designed and rewritten mod internals - this update is most certainly guaranteed to break your saves. | ||
|
||
2. Reshuffled and removed some superficial settings. | ||
|
||
3. Production report message icon no longer clickable and doesn't take you to intel tab anymore. | ||
|
||
4. Production now also has a chance to trigger fatal incidents which result in a loss of crew, similar to breakdowns. | ||
|
||
5. Redone pretty much every tooltip - hullmods, ability, report. | ||
|
||
6. Removed civgrade and cargo restrictions, replaced with CR malus. | ||
|
||
7. Added control panel, which allows for toggling of individual production capacities. No more setting repairs suspension! | ||
|
||
8. Added hull parts production capacity - can produce some derelict and low tech frigates at a steep cost, requires having Salvage Rigs. | ||
|
||
9. Added plausible way of obtaining hullmods - salvage from derelict Motherships. Hullmods are now unobtainable via normal drop or markets. | ||
|
||
10. Included interactive production values spreadsheet in release package - might be a help in making settings adjustments. | ||
|
||
Tracked issues: | ||
|
||
1. Mouseover events in nested scrollable areas glitch - fixed by Alex in next release. | ||
|
||
2. Ship icon perma-mods widget rendering glitch - fixed by Alex in next release. | ||
|
||
3. Unsatisfactory hull parts icon - work pending due to lack of artistic skill. | ||
|
||
4. Unsatisfactory sound effects qualtiy - work pending due to lack of sound design skill. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name,id,type,tags,activationDays,activationCooldown,durationDays,deactivationDays,deactivationCooldown,unlockedAtStart,defaultForAIFleet,musicSuppression,uiOn,uiOff,uiLoop,worldOn,worldOff,worldLoop,icon,plugin,ai,desc,sortOrder | ||
"Forge Production",forge_production,TOGGLE,,0.5,,,0.25,1,FALSE,,,forge_ability_enable,forge_ability_disable,,,,forge_ability_loop,graphics/forgprod/icons/abilities/forge_production.png,forgprod.abilities.ForgeProductionAbility,,"Control forge production of your fleet.",868 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
id,trigger,conditions,script,text,options,notes | ||
"#Mothership special salvage interaction",,,,,, | ||
forgprod_salvage_start,PopulateSalvageOptions2,"$customType == derelict_mothership | ||
!$mothershipInvestigated | ||
!$hardwareRecovered",,"Exploration crews also report of several chambers left relatively intact deep within mothership hull, which may warrant further investigation.","20:forgprodInvestigate:Investigate the compartments", | ||
forgprod_salvage_recurrent,PopulateSalvageOptions2,"$customType == derelict_mothership | ||
$mothershipInvestigated | ||
!$hardwareRecovered",,,"20:forgprodConsiderRecovery:Consider recovery options", | ||
forgprod_salvage_consider,DialogOptionSelected,"$option == forgprodConsiderRecovery | ||
!$hardwareRecovered","ForgprodShowRetrievalCost | ||
FireBest ForgprodTryEquipmentCheck | ||
SetShortcut forgprodReconsider ESCAPE","It appears that sizable portions of the original autoforge compartment are still operational, rusted and worn out by time as they may be. | ||
|
||
Given necessary preparations, it might be possible to recover workable production modules as-is instead of scuttling them for machinery.","1:forgprodProceedRecovery:Commence recovery operation | ||
2:forgprodReconsider:Reconsider", | ||
forgprod_salvage_start_selected,DialogOptionSelected,"$option == forgprodInvestigate | ||
!$hardwareRecovered","ForgprodShowRetrievalCost | ||
FireBest ForgprodTryEquipmentCheck | ||
SetShortcut forgprodReconsider ESCAPE | ||
$mothershipInvestigated = true","Upon thorough examination of undamaged sections, exploration team's officer concludes that most of the hardware in sight is decayed beyond any practical hope of recovery. | ||
|
||
However, there's one important exception: it appears that sizable portions of the original autoforge compartment are still operational, rusted and worn out by time as they may be. Given necessary preparations, it might be possible to recover workable production modules as-is instead of scuttling them for machinery.","1:forgprodProceedRecovery:Commence recovery operation | ||
2:forgprodReconsider:Reconsider", | ||
forgprod_equipment_check,ForgprodTryEquipmentCheck,"!ForgprodCheckEquipment playerHasEquipment","SetTooltip forgprodProceedRecovery ""Commencing operation without sufficient equipment present would be a pointless endeavour."" | ||
SetEnabled forgprodProceedRecovery false",,, | ||
forgprod_proceed_recovery_selected,DialogOptionSelected,"$option == forgprodProceedRecovery",ForgprodOperationSuccessSFX,"After a rather lengthy wait, head of recovery operation reports back to the bridge. The operation can be considered a success: salvage crews were able to decouple autoforge installations and are now in the process of packaging the hardware. | ||
|
||
Nevertheless, close examinations of forge machinery revealed that these modules are decidedly unsuitable for use without external facilities such as those native to the mothership's hull - at least, in their current form. Your chief engineer notes that the modules, arcane as they might be, can theoretically be disassembled and reassembled in a form more accomodating to whatever ship happened to be available - given, of course, inevitable size constraints and the fact that performance of makeshift versions is likely to be abysmally low.",0:forgprodRecoveryRewards:Continue, | ||
forgprod_recovery_rewards,DialogOptionSelected,"$option == forgprodRecoveryRewards","ForgprodAbilityUnlock | ||
ForgprodRecoveryRewards | ||
$hardwareRecovered = true",,0:forgprodRecoveryContinue:Continue, | ||
forgprod_recovery_continue_selected,DialogOptionSelected,"$option == forgprodRecoveryContinue","FireAll PopulateSalvageOptions2",,, | ||
forgprod_reconsider_selected,DialogOptionSelected,"$option == forgprodReconsider | ||
","FireAll PopulateSalvageOptions2",,, | ||
"#END Mothership special salvage interaction",,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
|
||
"graphics": { | ||
|
||
"forgprod_intel": { | ||
|
||
"forge_production_report": "graphics/forgprod/icons/intel/forge_production_report.png", | ||
"forge_production_report_big": "graphics/forgprod/icons/intel/forge_production_report_big.png", | ||
|
||
}, | ||
|
||
"forgprod_hullmods": { | ||
|
||
"forgprod_refining_module": "graphics/forgprod/hullmods/refining_module.png", | ||
"forgprod_fuel_production_module": "graphics/forgprod/hullmods/fuel_production_module.png", | ||
"forgprod_heavy_industry_module": "graphics/forgprod/hullmods/heavy_industry_module.png", | ||
|
||
"forgprod_refining_module_big": "graphics/forgprod/hullmods/refining_module_big.png", | ||
"forgprod_fuel_production_module_big": "graphics/forgprod/hullmods/fuel_production_module_big.png", | ||
"forgprod_heavy_industry_module_big": "graphics/forgprod/hullmods/heavy_industry_module_big.png", | ||
|
||
}, | ||
|
||
"forgprod_ui": { | ||
|
||
"frame": "graphics/forgprod/ui/frame.png", | ||
"frame_bright": "graphics/forgprod/ui/frame_bright.png", | ||
"frame_small": "graphics/forgprod/ui/frame_small.png", | ||
|
||
"effect_tooltip_anchor": "graphics/forgprod/ui/effect_tooltip_anchor.png", | ||
"income_tooltip_anchor": "graphics/forgprod/ui/income_tooltip_anchor.png", | ||
"cost_tooltip_anchor": "graphics/forgprod/ui/cost_tooltip_anchor.png", | ||
|
||
"hull_parts_symbolic": "graphics/forgprod/icons/tooltip/hull_parts_symbolic.png", | ||
"credits": "graphics/forgprod/icons/tooltip/credits.png", | ||
|
||
"production_small": "graphics/forgprod/icons/tooltip/production_small.png", | ||
"production_satisfied": "graphics/forgprod/icons/tooltip/production_satisfied.png", | ||
"production_shortage": "graphics/forgprod/icons/tooltip/production_shortage.png", | ||
"production_breakdowns": "graphics/forgprod/icons/tooltip/production_breakdowns.png", | ||
"production_casualties": "graphics/forgprod/icons/tooltip/production_casualties.png", | ||
|
||
"forge_production_illustration": "graphics/forgprod/icons/abilities/forge_production_big.png", | ||
|
||
}, | ||
|
||
"forgprod_cargo": { | ||
|
||
"hull_parts": "graphics/forgprod/icons/cargo/hull_parts.png", | ||
|
||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
|
||
# UI sounds must be in stereo, enable/disable sounds are of this sort. Their methods don't have Vector2f location. | ||
|
||
"forge_ability_enable":[ | ||
{"file":"sounds/forgprod/forge_ability_enable.ogg","pitch":1.0,"volume":1.0}, | ||
], | ||
"forge_ability_disable":[ | ||
{"file":"sounds/forgprod/forge_ability_disable.ogg","pitch":1.0,"volume":1.0}, | ||
], | ||
|
||
# This is a world sound, has mono channel and is played on fleet's location. | ||
|
||
"forge_ability_loop":[ | ||
{"file":"sounds/forgprod/forge_ability_loop.ogg","pitch":1.0,"volume":1.0}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name,id,tier,rarity,tech/manufacturer,tags,uiTags,"base value",unlocked,hidden,hiddenEverywhere,cost_frigate,cost_dest,cost_cruiser,cost_capital,script,desc,short,sprite | ||
"Makeshift Production Forge",forgprod_refining_module,,,"Domain Restricted","req_spaceport, special, no_build_in, no_drop, no_drop_salvage","Special, Requires Dock",120000,FALSE,FALSE,FALSE,20,20,20,40,forgprod.hullmods.RefiningModule,"This ship is outfitted with a jury-rigged version of Domain-era production autoforge, downscaled for installation on regular spaceship hulls. | ||
|
||
Increases the minimum crew required by %s and monthly maintenance supply cost by %s to account for production logistics. Unintended use of hull facilities decreases maximum combat readiness by %s. | ||
|
||
Can only be installed on cruiser or capital hulls.","Produces refined materials.",graphics/forgprod/hullmods/refining_module.png | ||
"Makeshift Production Forge",forgprod_fuel_production_module,,,"Domain Restricted","req_spaceport, special, no_build_in, no_drop, no_drop_salvage","Special, Requires Dock",140000,FALSE,FALSE,FALSE,20,20,20,40,forgprod.hullmods.FuelProductionModule,"This ship is outfitted with a jury-rigged version of Domain-era production autoforge, downscaled for installation on regular spaceship hulls. | ||
|
||
Increases the minimum crew required by %s and monthly maintenance supply cost by %s to account for production logistics. Unintended use of hull facilities decreases maximum combat readiness by %s. | ||
|
||
Can only be installed on cruiser or capital hulls.","Produces fuel.",graphics/forgprod/hullmods/fuel_production_module.png | ||
"Makeshift Production Forge",forgprod_heavy_industry_module,,,"Domain Restricted","req_spaceport, special, no_build_in, no_drop, no_drop_salvage","Special, Requires Dock",180000,FALSE,FALSE,FALSE,20,20,20,40,forgprod.hullmods.HeavyIndustryModule,"This ship is outfitted with a jury-rigged version of Domain-era production autoforge, downscaled for installation on regular spaceship hulls. | ||
|
||
Increases the minimum crew required by %s and monthly maintenance supply cost by %s to account for production logistics. Unintended use of hull facilities decreases maximum combat readiness by %s. | ||
|
||
Can only be installed on cruiser or capital hulls.","Produces industrial equipment.",graphics/forgprod/hullmods/heavy_industry_module.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
|
||
####### Installation Settings ####### | ||
|
||
"crew_requirement_per_capacity": 15, | ||
"supply_increase_per_capacity": 1, | ||
|
||
####### Miscellaneous Settings ####### | ||
|
||
# Hold this button before clicking on ability button to bring up production control menu. | ||
# Ability does not activate or deactivate when clicking on a button with this key down. | ||
# UI will not reflect changes to this field, apologies for that. | ||
|
||
"interaction_call_hotkey": LCONTROL, | ||
|
||
"enable_slow_move_penalty": true, | ||
"enable_burn_abilities_incompatibility": true, | ||
"enable_go_dark_incompatibility": true, | ||
"enable_sensor_penalty": true, | ||
|
||
"sensor_profile_increase": 100, | ||
|
||
# How many ships are displayed in ability tooltip. | ||
|
||
"ship_list_size": 5, | ||
|
||
# In days. Production is still calculated daily. | ||
# Results are gathered and cleared when intel is created. | ||
|
||
"notification_interval": 3, | ||
|
||
####### Ship Capacity Settings ####### | ||
|
||
# These values are multipliers of processing cycle. | ||
# Ship's final production is one cycle multiplied by ship's capacity. | ||
# Frigate and destroyer hullsizes do not have code implementations. | ||
|
||
"base_capacity_frigate": 0, | ||
"base_capacity_destroyer": 0, | ||
"base_capacity_cruiser": 2, | ||
"base_capacity_capital": 4, | ||
|
||
# A key variable that serves as a divisor for commodity values and multiplier for ship capacity. | ||
# Determines size of each production cycle unit, the bigger granularity the lower the size. | ||
# Sufficiently big granularity is needed to deal with cargo leftovers. | ||
|
||
"granularity": 20, | ||
|
||
####### Metals Production ####### | ||
|
||
"base_ore_input": 16, | ||
"base_metals_output": 10, | ||
"base_machinery_use_metals": 6, | ||
|
||
####### Transplutonics Production ####### | ||
|
||
"base_transplutonic_ore_input": 8, | ||
"base_transplutonics_output": 4, | ||
"base_machinery_use_transplutonics": 8, | ||
|
||
####### Fuel Production ####### | ||
|
||
"base_volatiles_input": 2, | ||
"base_fuel_output": 8, | ||
"base_machinery_use_fuel": 12, | ||
|
||
####### Supplies Production ####### | ||
|
||
"base_metals_input_supplies": 8, | ||
"base_transplutonics_input_supplies": 2, | ||
"base_supplies_output": 6, | ||
"base_machinery_use_supplies": 10, | ||
|
||
####### Machinery Production ####### | ||
|
||
"base_metals_input_machinery": 10, | ||
"base_transplutonics_input_machinery": 1, | ||
"base_machinery_output": 4, | ||
"base_machinery_use_machinery": 14, | ||
|
||
####### Hull Parts Production ####### | ||
|
||
# Base hull cost formula before modifiers: | ||
# Initial base buy value assigned in ship_data.csv / Base value of all inputs of single part = total parts cost. | ||
|
||
"base_metals_input_hull_parts": 10, | ||
"base_transplutonics_input_hull_parts": 1, | ||
"base_supplies_input_hull_parts": 2, | ||
"base_machinery_input_hull_parts": 2, | ||
"base_hull_parts_output": 1, | ||
"base_machinery_use_hull_parts": 18, | ||
|
||
# Final hull cost in parts mutliplier; applies after all other modificators. | ||
|
||
"hull_cost_multiplier": 0.9, | ||
|
||
####### Machinery Breakdown Settings ####### | ||
|
||
# Number 0.3 translates to 30% base breakdown chance. | ||
|
||
"machinery_breakdown_chance": 0.3, | ||
|
||
# Determines size of breakdown. Exact size of breakdown is semi-randomized. | ||
# Has minimal and maximal range of severity / 2, so for 0.05 the range is 0.025 - 0.075. | ||
|
||
"machinery_breakdown_severity": 0.05, | ||
|
||
####### CR Settings ####### | ||
|
||
# Number 0.02 translates to 2% daily CR decrease. | ||
|
||
"daily_cr_decrease": 0.02, | ||
|
||
####### Special Items Settings ####### | ||
|
||
"catalytic_core_output_bonus": 2, | ||
"synchrotron_core_output_bonus": 4, | ||
"corrupted_nanoforge_output_bonus": 1, | ||
"pristine_nanoforge_output_bonus": 2, | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"id":"forge_production", | ||
"name":"Forge Production", | ||
"author":"Ontheheavens", | ||
"version":"1.1.0", | ||
"description":"Hullmods that allow ships to produce commodities with ability toggle.", | ||
"gameVersion":"0.95.1a-RC6", | ||
"jars":["jars/forge_production.jar"], | ||
"modPlugin":"forgprod.ForgprodModPlugin", | ||
"totalConversion": "false", | ||
"utility": "false", | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
78 changes: 78 additions & 0 deletions
78
source/com/fs/starfarer/api/impl/campaign/rulecmd/ForgprodAbilityUnlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.fs.starfarer.api.impl.campaign.rulecmd; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import com.fs.starfarer.api.Global; | ||
import com.fs.starfarer.api.campaign.InteractionDialogAPI; | ||
import com.fs.starfarer.api.campaign.PersistentUIDataAPI; | ||
import com.fs.starfarer.api.campaign.TextPanelAPI; | ||
import com.fs.starfarer.api.campaign.rules.MemoryAPI; | ||
import com.fs.starfarer.api.loading.AbilitySpecAPI; | ||
import com.fs.starfarer.api.util.Misc; | ||
|
||
import forgprod.abilities.conversion.support.ProductionConstants; | ||
|
||
/** | ||
* @author Ontheheavens | ||
* @since 15.01.2023 | ||
*/ | ||
|
||
@SuppressWarnings("unused") | ||
public class ForgprodAbilityUnlock extends BaseCommandPlugin { | ||
|
||
@Override | ||
public boolean execute(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) { | ||
if (dialog == null) return false; | ||
TextPanelAPI text = dialog.getTextPanel(); | ||
ForgprodAbilityUnlock.unlockAbility(text); | ||
ForgprodAbilityUnlock.unlockHullmods(text); | ||
return true; | ||
} | ||
|
||
private static void unlockAbility(TextPanelAPI text) { | ||
String abilityId = "forge_production"; | ||
AbilitySpecAPI spec = Global.getSettings().getAbilitySpec(abilityId); | ||
boolean hadAbilityAlready = Global.getSector().getPlayerFleet().hasAbility(abilityId); | ||
if (hadAbilityAlready) { | ||
return; | ||
} | ||
Global.getSector().getCharacterData().addAbility(abilityId); | ||
PersistentUIDataAPI.AbilitySlotsAPI slots = Global.getSector().getUIData().getAbilitySlotsAPI(); | ||
int currBarIndex = slots.getCurrBarIndex(); | ||
OUTER: | ||
for (int i = 0; i < 5; i++) { | ||
slots.setCurrBarIndex(i); | ||
for (int j = 0; j < 10; j++) { | ||
PersistentUIDataAPI.AbilitySlotAPI slot = slots.getCurrSlotsCopy().get(j); | ||
if (slot.getAbilityId() == null) { | ||
slot.setAbilityId(abilityId); | ||
break OUTER; | ||
} | ||
} | ||
} | ||
slots.setCurrBarIndex(currBarIndex); | ||
text.addPara("You now possess %s ability - technical know-how needed to operate " + | ||
"Pre-Collapse space manufacturing tech.", | ||
Misc.getHighlightColor(), | ||
"\"" + spec.getName() + "\""); | ||
text.addPara("These know-how, however, do not go as far as " + | ||
"producing brand-new autoforge units yourself - the only practical option right now is to " + | ||
"reassemble makeshift production modules using stock of crucial Domain-made components " + | ||
"salvaged from derelict mothership."); | ||
AddRemoveCommodity.addAbilityGainText(abilityId, text); | ||
} | ||
|
||
private static void unlockHullmods(TextPanelAPI text) { | ||
Global.getSector().getCharacterData().getHullMods().add(ProductionConstants.REFINING_MODULE); | ||
Global.getSector().getCharacterData().getHullMods().add(ProductionConstants.FUEL_PRODUCTION_MODULE); | ||
Global.getSector().getCharacterData().getHullMods().add(ProductionConstants.HEAVY_INDUSTRY_MODULE); | ||
String name = Global.getSettings().getHullModSpec(ProductionConstants.HEAVY_INDUSTRY_MODULE).getDisplayName(); | ||
text.setFontSmallInsignia(); | ||
text.addParagraph("Gained modspec: " + name + "", Misc.getPositiveHighlightColor()); | ||
text.highlightInLastPara(Misc.getHighlightColor(), name); | ||
text.setFontInsignia(); | ||
Global.getSoundPlayer().playUISound("ui_acquired_hullmod", 1f, 1f); | ||
} | ||
|
||
} |
Oops, something went wrong.