Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Reworked Contacts, Commodity and Trade boards #109

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9d71356
Hide abstract class implementation
jaghaimo Jun 10, 2023
cedf978
Add table support to uilib2
jaghaimo Jun 10, 2023
0a7e166
avoid adding undiscovered abandoned stations
jaghaimo Jun 11, 2023
e5c49d3
Rename and move stuff
jaghaimo Jun 12, 2023
adec5b7
Use new LargeIntel class
jaghaimo Jun 12, 2023
4a9db61
wording
jaghaimo Jun 12, 2023
9358a63
Pretteir
jaghaimo Jun 12, 2023
fae7ce3
Require main intel tag
jaghaimo Jun 12, 2023
ee90c20
Return UIComponentAPI from Drawable::draw
jaghaimo Jun 12, 2023
16ce9d1
Fix exploration board
jaghaimo Jun 12, 2023
a079dbc
Remove new commodity for now
jaghaimo Jun 12, 2023
73c50f3
PoC for new Contacts board
jaghaimo Jun 12, 2023
3555d90
add stelnet icon
jaghaimo Jun 13, 2023
c885e84
Merge branch 'master' into 3.2.0
jaghaimo Jun 19, 2023
dc0a4f5
Remove unused
jaghaimo Jun 26, 2023
f8ff7df
Flatten the structure
jaghaimo Jun 26, 2023
9fcc52a
Refactor
jaghaimo Jun 26, 2023
8ad60dd
More refactor
jaghaimo Jun 26, 2023
17dc27b
.
jaghaimo Jun 26, 2023
90b1df8
Prettier
jaghaimo Jun 26, 2023
4a7f7b9
.
jaghaimo Jun 26, 2023
9d11a89
remove enums for translations
jaghaimo Jun 27, 2023
ab28fe7
prettier
jaghaimo Jun 27, 2023
a7bd593
Simplify query-result-grouping logic
jaghaimo Jun 29, 2023
4ce192f
.
jaghaimo Jun 29, 2023
780c45e
Untangle exploration
jaghaimo Jun 30, 2023
76c3319
.
jaghaimo Jun 30, 2023
9c8997c
Further exploration refactor
jaghaimo Jul 1, 2023
afe6d8c
add first test
jaghaimo Jul 2, 2023
2b7f9fd
changes
jaghaimo Jul 3, 2023
c72759c
One update to rule them all
jaghaimo Jul 3, 2023
f214026
pretteir fix
jaghaimo Jul 3, 2023
f7b960c
rename things and remove 3rd party integrations
jaghaimo Jul 3, 2023
15736b6
Pipeline fixes
jaghaimo Jul 3, 2023
e5b46d3
.
jaghaimo Jul 3, 2023
d460c8d
add todo for static analysis
jaghaimo Jul 3, 2023
78d12f9
sort properties and docblock
jaghaimo Jul 3, 2023
8989e9e
intellij reformat
jaghaimo Jul 4, 2023
77883de
make classes using MemoryManager testable
jaghaimo Jul 8, 2023
8e16f7c
towards commodity rewrite as well
jaghaimo Jul 14, 2023
1b53bca
add contact image
jaghaimo Jul 16, 2023
95e7a25
finalize contact rework
jaghaimo Jul 17, 2023
96cd456
combine two methods
jaghaimo Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 0 additions & 43 deletions .circleci/config.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .codeclimate.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
lfs: true

- name: Install Prettier
run: npm install
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
name: GitHub Release

on:
# Triggers the workflow on pushing a tag only
push:
tags: "*"
branches:
- "!*"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
# Checks-out repository under $GITHUB_WORKSPACE, so your job can access it
# GitHub Actions by default doesn't check out tags, so make sure those are included
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build

on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true

- name: Run Tests
run: |
chmod +x gradlew
./gradlew build --no-daemon

# TODO: https://www.linkedin.com/pulse/static-code-analysis-sonarlint-github-actions-lucas-persson
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.gradle/
.project
.settings/
.idea/
/*.zip
bin/
build/
Expand Down
14 changes: 0 additions & 14 deletions .vscode/extensions.json

This file was deleted.

15 changes: 0 additions & 15 deletions .vscode/launch.json

This file was deleted.

6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

3 changes: 0 additions & 3 deletions .vscode/starsector-debug.bat

This file was deleted.

5 changes: 5 additions & 0 deletions assets/data/config/LunaSettingsConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"stelnet": {
"iconPath": "graphics/icons/stelnet.png"
}
}
5 changes: 0 additions & 5 deletions assets/data/l10n/cargoapi.json

This file was deleted.

8 changes: 0 additions & 8 deletions assets/data/l10n/cargostackistype.json

This file was deleted.

5 changes: 4 additions & 1 deletion assets/data/l10n/commodity.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"ACTION_BUY": "Buy",
"ACTION_SELL": "Sell",
"ACTION_PROFIT": "Profit",
"BOARD_DESCRIPTION": "Compare and track commodity prices among all known markets.",
"BOARD_TITLE": "Commodity Market",
"DELETE": "Delete",
Expand Down Expand Up @@ -34,4 +37,4 @@
"INTEL_WITH_DEFICIT": "All commodities with deficit",
"INTEL_WITH_EXCESS": "All commodities with excess",
"PRICE_CHANGED": "{0} (was {1})"
}
}
5 changes: 0 additions & 5 deletions assets/data/l10n/commodityaction.json

This file was deleted.

17 changes: 16 additions & 1 deletion assets/data/l10n/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,20 @@
"WEAPONS": "Weapons",
"WING_BOMBERS": "Bombers",
"WING_FIGHTERS": "Fighters",
"WING_INTERCEPTORS": "Interceptors"
"WING_INTERCEPTORS": "Interceptors",
"STACK_BLUEPRINT": "Blueprint",
"STACK_COMMODITY": "Commodity",
"STACK_FIGHTER": "Fighter Wing",
"STACK_MODSPEC": "Modspec",
"STACK_SPECIAL": "Special",
"STACK_WEAPON": "Weapon",
"ROLE_ASSAULT": "Assault",
"ROLE_BOMBER": "Bomber",
"ROLE_FIGHTER": "Fighter",
"ROLE_INTERCEPTOR": "Interceptor",
"ROLE_SUPPORT": "Support",
"HULL_CAPITAL_SHIP": "Capital Ship",
"HULL_CRUISER": "Cruiser",
"HULL_DESTROYER": "Destroyer",
"HULL_FRIGATE": "Frigate"
}
4 changes: 0 additions & 4 deletions assets/data/l10n/contentrenderer.json

This file was deleted.

6 changes: 0 additions & 6 deletions assets/data/l10n/groupingstrategy.json

This file was deleted.

7 changes: 6 additions & 1 deletion assets/data/l10n/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,10 @@
"SUBMARKET_SHIPS": "{0} matching ships",
"TITLE": "Queries",
"WEAPON_MOUNTS": "Weapon Mounts",
"WING_ROLES": "Wing roles"
"WING_ROLES": "Wing roles",
"STATE_LIST": "List Queries",
"STATE_MANAGE": "Manage Results",
"STATE_NEW": "Add a New Query",
"BY_MARKET": "Group By Market",
"BY_SYSTEM": "Group By Star System"
}
5 changes: 0 additions & 5 deletions assets/data/l10n/querystate.json

This file was deleted.

6 changes: 0 additions & 6 deletions assets/data/l10n/shipapi.json

This file was deleted.

6 changes: 5 additions & 1 deletion assets/data/l10n/widget.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
"VIEWER_NO_MARKETS": "Please select a market to view.",
"VIEWER_NO_SHIPS": "There are no matching ships to display.",
"VIEWER_NO_STORAGES": "You do not have any storages.",
"VIEWER_UNIFIED_VIEW_TITLE": "Unified View"
"VIEWER_UNIFIED_VIEW_TITLE": "Unified View",
"PER_LOCATION": "Per Location",
"UNIFIED": "Unified",
"ITEMS": "Items",
"SHIPS": "Ships"
}
7 changes: 0 additions & 7 deletions assets/data/l10n/wingrole.json

This file was deleted.

Binary file added assets/graphics/icons/stelnet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/mod_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Stellar Networks",
"author": "Jaghaimo",
"utility": true,
"version": "3.1.3",
"version": "3.2.0",
"description": "A collection of intel boards for Starsector",
"gameVersion": "0.96a-RC10",
"modPlugin": "stelnet.StelnetMod",
Expand Down
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ configurations {
}

// install dependencies from zipped releases
task installDependencies(type: Sync) {
tasks.register('installDependencies', Sync) {
def extractDir = "${buildDir}/libs"

ext.extractedJars = fileTree(extractDir) {
include "**/*.jar"
exclude "stelnet.jar"
builtBy "installDependencies"
}

dependsOn configurations.zipped
from {
from {
configurations.zipped.collect { zipTree(it) }
}
into extractDir
Expand All @@ -49,6 +49,7 @@ java {

// where to find sources
sourceSets.main.java.srcDirs = ['src/']
sourceSets.test.java.srcDirs = ['tests/']

// build everything and make a jar
build {
Expand All @@ -64,7 +65,7 @@ build {
// compile time dependencies
dependencies {
implementation "jaghaimo:starsector-api:0.96a-RC10@starfarer.api.jar"
zipped "Lukas22041:LunaLib:1.7.6@LunaLib.zip"
zipped "Lukas22041:LunaLib:1.7.7@LunaLib.zip"
implementation files({ tasks.installDependencies.extractedJars })

// game dependencies
Expand All @@ -79,10 +80,14 @@ dependencies {
// lombok
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.28'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.28'

// tests
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:2.28.2'
}

// custom tasks
task release(type: Zip) {
tasks.register('release', Zip) {
dependsOn build
archiveFileName = "${project.name}-${readModInfoJson().version}.zip"
destinationDirectory = file(rootDir)
Expand Down
8 changes: 4 additions & 4 deletions src/stelnet/DelayedDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import com.fs.starfarer.api.campaign.CampaignUIAPI;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
/**
* A delayed dialog that shows `message` after `delayInSeconds` time.
*/
@RequiredArgsConstructor
public class DelayedDialog implements EveryFrameScript {

private float advanced = 0;
private final String message;
private final float delayInSeconds;
private float advanced = 0;

@Override
public boolean isDone() {
Expand All @@ -26,8 +26,8 @@ public boolean runWhilePaused() {
}

@Override
public void advance(float amount) {
CampaignUIAPI campaignUi = Global.getSector().getCampaignUI();
public void advance(final float amount) {
final CampaignUIAPI campaignUi = Global.getSector().getCampaignUI();
if (campaignUi == null) {
unregister();
return;
Expand Down
3 changes: 3 additions & 0 deletions src/stelnet/EmptyIntel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin;

/**
* An empty intel that will be removed at next opportunity by IntelManager.
*/
public class EmptyIntel extends BaseIntelPlugin {

@Override
Expand Down
Loading