diff options
| author | BlueWeabo <ilia.iliev2005@gmail.com> | 2023-02-26 13:16:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-26 12:16:07 +0100 |
| commit | b8d1ecf8b9b6348304392d09e4490d473dbb120d (patch) | |
| tree | 1cdc59a1b660510fe2abd40686b2abed8b0ab40f /src/main/java/gregtech/common/misc/spaceprojects/enums | |
| parent | ebd7df3a1ddba9105df008d44ab046d159279628 (diff) | |
| download | GT5-Unofficial-b8d1ecf8b9b6348304392d09e4490d473dbb120d.tar.gz GT5-Unofficial-b8d1ecf8b9b6348304392d09e4490d473dbb120d.tar.bz2 GT5-Unofficial-b8d1ecf8b9b6348304392d09e4490d473dbb120d.zip | |
Add a completely new system for late/endgame content (#1754)
* basic work
* typo fixes
* make an enum folder
* location enums
* space project manager
* implement the space project teams
* commands
* move things around and new things
* upgrade work
* requirement work
* if possible use an upgrades values
* cleanup
* more helpers in command
* fix AOOBE
* fix world saved data
* builder for requirements
* add command autocomplete
* fix command npe
* mark world saved data dirty
* switch to saving to json string. this is fine
* fix npe
* fix files not saving correctly. serialization
* spotless
* part 1 of fixing json saving
* working json file saving
* rename fields
* full implementation of SP_Upgrade
* fixes
* cleanup
* texture prep
* documentation part 1
* documentation part 2 and rework of json saving
* fix the missed conversions
* set texture when copying
* more interface usage and fixes
* rework saving.
* Added rudimentary NEI handler for projects
* Revert "Added rudimentary NEI handler for projects"
This reverts commit 6d8210e25b27fee7dc1865d1afa91708a8d9b875.
* address NPEs
* some textures
* higher quality textures, put in the moon as a temp texture
* add a check to create a team if one smt weird happens
* command work
* add ability to localize the space bodies
* Added disabled button and toggle button
* Added possibility to not render the original stacksize of item stacks in NEI
* Added NEI handler
* Fixes item count on tooltip always rendering as 1
* Fix refactor
* 5 new body textures
* fix misspelled texture name
---------
Co-authored-by: minecraft7771 <maxim235@gmx.de>
Diffstat (limited to 'src/main/java/gregtech/common/misc/spaceprojects/enums')
5 files changed, 178 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/JsonVariables.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/JsonVariables.java new file mode 100644 index 0000000000..665f15af74 --- /dev/null +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/JsonVariables.java @@ -0,0 +1,22 @@ +package gregtech.common.misc.spaceprojects.enums; + +public class JsonVariables { + + public static final String PAIR_LEFT = "pairLeft"; + public static final String PAIR_RIGHT = "pairRight"; + + public static final String MAP_UUID = "mapUUID"; + public static final String MAP_MAP = "mapMap"; + public static final String MAP_PAIR = "mapPair"; + public static final String MAP_PROJECT = "mapProject"; + + public static final String PROJECT_NAME = "projectName"; + public static final String PROJECT_CURRENT_STAGE = "projectCurrentStage"; + public static final String PROJECT_UPGRADES_BUILT = "projectUpgradesBuilt"; + public static final String PROJECT_LOCATION = "projectLocation"; + public static final String PROJECT_CURRENT_UPGRADE = "projectCurrentUpgrade"; + + public static final String UPGRADE_NAME = "upgradeName"; + public static final String UPGRADE_CURRENT_STAGE = "upgradeCurrentStage"; + public static final String UPGRADE_PROJECT_PARENT = "upgradeProjectParent"; +} diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java new file mode 100644 index 0000000000..7d0c4cee3e --- /dev/null +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/SolarSystem.java @@ -0,0 +1,96 @@ +package gregtech.common.misc.spaceprojects.enums; + +import static gregtech.common.misc.spaceprojects.enums.SpaceBodyType.*; +import static gregtech.common.misc.spaceprojects.enums.StarType.*; + +import com.gtnewhorizons.modularui.api.drawable.UITexture; + +import gregtech.common.misc.spaceprojects.SpaceProjectManager; +import gregtech.common.misc.spaceprojects.interfaces.ISpaceBody; + +/** + * An enum of all space bodies in the Sol Solar System. Or to be exact the more important ones + * + * @author BlueWeabo + */ +public enum SolarSystem implements ISpaceBody { + + Sol(Star, GClass), + Overworld(Planet), + Moon(NaturalSatellite), + Mars(Planet), + Deimos(NaturalSatellite), + Phobos(NaturalSatellite), + Mercury(Planet), + Venus(Planet), + Jupiter(GasGiant), + Io(NaturalSatellite), + Ganymede(NaturalSatellite), + Europa(NaturalSatellite), + Callisto(NaturalSatellite), + Saturn(GasGiant), + Mimas(NaturalSatellite), + Enceladus(NaturalSatellite), + Tethys(NaturalSatellite), + Rhea(NaturalSatellite), + Titan(NaturalSatellite), + Hyperion(NaturalSatellite), + Iapetus(NaturalSatellite), + Phoebe(NaturalSatellite), + Uranus(IceGiant), + Miranda(NaturalSatellite), + Ariel(NaturalSatellite), + Umbriel(NaturalSatellite), + Titania(NaturalSatellite), + Oberon(NaturalSatellite), + Neptune(IceGiant), + Proteus(NaturalSatellite), + Triton(NaturalSatellite), + Nereid(NaturalSatellite), + Ceres(DwarfPlanet), + Pluto(DwarfPlanet), + Arrokoth(DwarfPlanet), + MakeMake(DwarfPlanet), + KuiperBelt(AsteroidBelt), + NONE(SpaceBodyType.NONE); + + private SpaceBodyType spaceBody; + private StarType star; + private UITexture texture; + + SolarSystem(SpaceBodyType aType) { + this(aType, NotAStar); + } + + SolarSystem(SpaceBodyType aType, StarType aStarType) { + star = aStarType; + spaceBody = aType; + texture = UITexture.fullImage("gregtech", "solarsystem/" + getName()); + SpaceProjectManager.addLocation(this); + } + + @Override + public StarType getStarType() { + return star; + } + + @Override + public SpaceBodyType getType() { + return spaceBody; + } + + @Override + public String getName() { + return name(); + } + + @Override + public UITexture getTexture() { + return texture; + } + + @Override + public String getUnlocalizedName() { + return "gt.solar.system." + getName().toLowerCase(); + } +} diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/SpaceBodyType.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/SpaceBodyType.java new file mode 100644 index 0000000000..511c2c438e --- /dev/null +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/SpaceBodyType.java @@ -0,0 +1,17 @@ +package gregtech.common.misc.spaceprojects.enums; + +/** + * @author BlueWeabo + */ +public enum SpaceBodyType { + Star, + NeutronStar, + Planet, + NaturalSatellite, + AsteroidBelt, + BlackHole, + GasGiant, + DwarfPlanet, + IceGiant, + NONE; +} diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/StarType.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/StarType.java new file mode 100644 index 0000000000..abcb75d55b --- /dev/null +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/StarType.java @@ -0,0 +1,32 @@ +package gregtech.common.misc.spaceprojects.enums; + +/** + * @author BlueWeabo + */ +public enum StarType { + + OClass(30000, 100), + BClass(10000, 20), + AClass(20, 5), + FClass(4, 2), + GClass(1, 1), + KClass(0.4, 0.5f), + MClass(0.08, 0.1f), + NotAStar(0, 0); + + private double solarLuminosity; + private float costMultiplier; + + private StarType(double solarLuminosity, float costMultiplier) { + this.solarLuminosity = solarLuminosity; + this.costMultiplier = costMultiplier; + } + + public double getSolarLuminosity() { + return solarLuminosity; + } + + public float getCostMultiplier() { + return costMultiplier; + } +} diff --git a/src/main/java/gregtech/common/misc/spaceprojects/enums/UpgradeStatus.java b/src/main/java/gregtech/common/misc/spaceprojects/enums/UpgradeStatus.java new file mode 100644 index 0000000000..d171d53c29 --- /dev/null +++ b/src/main/java/gregtech/common/misc/spaceprojects/enums/UpgradeStatus.java @@ -0,0 +1,11 @@ +package gregtech.common.misc.spaceprojects.enums; + +/** + * @author BlueWeabo + */ +public enum UpgradeStatus { + Locked, + Unlocked, + InProgress, + Finished; +} |
