File information
Last updated
Original upload
Created by
LazyWizardUploaded by
ALazyWizardVirus scan
Tags for this mod
About this mod
LazyLib is a library required by most other Starsector mods.
- Requirements
-
This mod does not have any known dependencies other than the base game.
Mods requiring this file
Mod name Notes Archean Order Arsenal Expansion Required to function. Autosave Blackrock Drive Yards Combat Radar Required for this mod to function. Console Commands Dead Man's Riot - Custom Questline Diable Avionics Corporation Hyperion Systems Required Legacy of Arkgneisis MagicLib Musashi Manufactorum (Archean Order SWP) Required by the Archean Order mod. Nexerelin Outer Rim Alliance Scy Nation Seeker - Unknown Contact Shadowyards Reconstruction Authority Star Wars 2020 Torchships And Deadly Armaments Tyrador Safeguard Coalition Mandatory requirement Xenoargh's Mod Pack Is required to operate this mod. - Permissions and credits
-
Credits and distribution permission
- Other user's assets All the assets in this file belong to the author, or are from free-to-use modder's resources
- Upload permission You can upload this file to other sites but you must credit me as the creator of the file
- Modification permission You must get permission from me before you are allowed to modify my files to improve it
- Conversion permission You can convert this file to work with other games as long as you credit me as the creator of the file
- Asset use permission You are allowed to use the assets in this file without permission or crediting me
- Asset use permission in mods/files that are being sold You are allowed to use the assets in this file in mods/files that are being sold, for money, on Steam Workshop or other platforms
- Asset use permission in mods/files that earn donation points You are allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
Parts of the FastTrig class used in this mod are taken from the Slick2D library.
Copyright (c) 2007, Slick 2D
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Slick 2D nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Kotlin and the Kotlin runtime are copyright 2010-2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Donation Points system
Please log in to find out whether this mod is receiving Donation Points
- Mirrors
-
Name GitHub - Changelogs
-
-
Version 3.0
- Updated to be compatible with Starsector 0.98a and Java 17
- Updated to Kotlin 2.1 and the K2 compiler
- Updated bundled libraries to take advantage of the move to Java 17
- Updated kotlin-stdlib from v1.6.21 to v2.1.20
- Updated kotlinx-coroutines from v1.6.4 (custom build) to v1.10.1
- Removed standalone jetbrains-annotations as it's now included in kotlin-stdlib
- Moved LazyLib-Console.jar and Kotlin-Runtime.jar to jars/internal, to better signify that they aren't meant to be added as mod dependencies
- Added org.lazywizard.lazylib.ShapeUtils, a copy of org.lazywizard.lazylib.opengl.DrawUtils, except its methods return a list of vertices instead of drawing the requested shape
- CollisionUtils: Fixed getCollisionPoint(Vector2f lineStart, Vector2f lineEnd, CombatEntityAPI target) returning null if entire line was within target's bounds without touching a bounds segment (now returns copy of lineStart)
- CollisionUtils: getNearestPointOnBounds() no longer requires you to call bounds.update(); as with all other CollisionUtils methods it now calls update() itself
- ColorUtils: Added genRandomColor(), returns a Color with random RGB values
- FastTrig: atan() properly reduces its argument if it's not between -1 and 1 (credit to Genir for the bug report and the fix)
- LazyFont: Fixed display of fonts whose texture scaling doesn't match their texture size (credit to Psiyon for the bug report and the fix)
- LazyFont: Added buildUntilLimit(String line, float fontSize, float maxWidth), which returns a substring of line that will fit within maxWidth width
- LazyFont: Unicode smart quotes (single and double) are converted into basic quotes
- LazyFont: Attempting to create a DrawableString with missing character data will only log a warning once per missing character, instead of every time one is used (explanation: if the font doesn't define Ç, it will log a warning the first time you try to draw one while replacing the missing character with either a question mark, or empty space if the font doesn't define a question mark)
- LazyFont: LazyFont.loadFont() will now make up fake data for a space character if the font file lacks one (it creates an invisible pixel with extra padding)
- LazyFont: Cached fallback char used when font doesn't contain a requested character; very slight performance improvement
- LazyFont: Added missing Javadoc to LazyChar
- VectorUtils: Added toFloatArray(List<Vector2f> vectors), which converts a List of Vector2fs into an array of floats containing their coordinates
- VectorUtils: Added toVectorList(float[] coordinates), which converts a float array of coordinates into a List of Vector2fs
- Removed org.lazywizard.lazylib.campaign.orbits.KeplerOrbit at the request of its contributor
- LazyFont: Removed drawText(); use createText() instead
- LazyFont: Removed appendText(); use append() instead
- LazyFont: Removed getColor() and setColor(); use get/setBaseColor() instead
- LazyFont: Removed checkRebuild(); use triggerRebuildIfNeeded() instead
-
Version 2.8b
- Updated to be compatible with Starsector 0.97a
- LazyFont: Changed default blendSrc back to GL_SRC_ALPHA (was GL_ONE since 2.4c)
- org.lazywizard.lazylib.campaign.orbits.KeplerOrbit: Deprecated at the request of its contributor due to bugs
-
Version 2.8
- Updated to be compatible with Starsector 0.96a
- Updated bundled library kotlin-stdlib: v1.5.31 -> v1.6.21
- Updated bundled library kotlinx-coroutines: v1.5.2 -> v1.6.4 (custom build)
- Added org.lazywizard.lazylib.campaign.orbits.KeplerOrbit. Submitted by Liral, this provides more accurate orbits than EllipticalOrbit
- CombatUtils: Updated to use CombatEngineAPI's bin-lattice system where applicable, as requested by several modders since those methods introduction
-
Version 2.7b
- Updated to be compatible with Starsector 0.95.1a
- Updated bundled library jetbrains-annotations: v22.0.0 -> 23.0.0
- LazyFont.DrawableString: Center/right-aligned text no longer requires maxWidth to be set
- LazyFont.DrawableString: setRenderDebugBounds() now shows anchor and max size
-
Version 2.7
- Fixed links to online Starsector API in javadoc.zip
- Updated bundled library kotlin-stdlib: v1.4.31 -> v1.5.31
- Updated bundled library kotlinx-coroutines: v1.4.3 -> v1.5.2
- Updated bundled library jetbrains-annotations: v20.1.0 -> 22.0.0
- CombatUtils: Fixed a bug where ships spawned by spawnShipOrWingDirectly() would report the wrong fleet side in some circumstances
- LazyFont: Fixed log spam with some whitespace being considered unsupported characters
- LazyFont.DrawableString: Fixed a minor memory leak when dispose() is not called before garbage collection
- LazyFont.DrawableString: Added TextAlignment, setAlignment(), and getAlignment(). TextAlignment controls whether text is drawn left-aligned (the default), right-aligned, or centered
- LazyFont.DrawableString: Added TextAnchor, setAnchor(), and getAnchor(). TextAnchor controls the origin when drawing text; for example, TextAnchor.TOP_LEFT (the default) will mean draw() will start drawing at the top left, so the text will appear below and to the right of the position passed into draw()
- LazyFont.DrawableString: Added setBaseColor() and getBaseColor() (replace setColor()/getColor())
- LazyFont.DrawableString: Added isRebuildNeeded() and triggerRebuildIfNeeded() (unnecessary 99% of the time as rebuilding happens automatically, but useful in fringe cases)
- LazyFont.DrawableString: Cleaned up some out-of-date documentation
- LazyFont.DrawableString: Deprecated setColor() and getColor(), as users were assuming they set the color of the next append. Added setBaseColor() and getBaseColor() as replacements that better convey what these methods do (set/get the color of all text that _doesn't_ have a color argument passed in)
-
Version 2.6
- Updated to be compatible with Starsector 0.95a
- Updated bundled library kotlin-stdlib: v1.4.21 -> v1.4.31
- Updated bundled library kotlinx-coroutines: v1.4.2 -> v1.4.3
- The Javadoc's index is now one single page
- Added org.lazywizard.lazylib.IOUtils
- IOUtils: Contains methods to help with reading/writing files using the API
- byte[] readAllBytes(String filePath), an API-safe port of java.nio.Files.readAllBytes()
- LazyFont.DrawableString: Added tab support (2x the base vertical height of the text)
- LazyFont.DrawableString: Added append(String text)
- LazyFont.DrawableString: Added append(String text, Color color)
- LazyFont.DrawableString: Added appendIndented(String text, int indent)
- LazyFont.DrawableString: Added appendIndented(String text, Color color, int indent)
- LazyFont.DrawableString: Added getBlendSrc(), setBlendSrc(int blendSrc), getBlendDest(), and setBlendDest(int blendDest) to control color blending
- LazyFont.DrawableString: Deprecated all appendText() methods in favor of new append() equivalents. The append() variants take any object and return the DrawableString so that calls can be chained together
-
Version 2.5c
- DrawableString: hopefully fixed the text rendering issues some users were encountering
- DrawableString: added colored substring support
- DrawableString: added appendText(String text, Color color) and appendText(String text, Color color, int indent)
-
Version 2.5b
- Retroactively renamed v2.4g to v2.5
- Added getFontName() to LazyFont
- Fixed a rare crash in DrawableString with word-wrapped text that includes a hyphenated line break
- Added setRenderDebugBounds() to DrawableString, which draws a box showing the text's width, height, and position
-
Version 2.5
- Updated bundled Kotlin libraries to their latest versions
- Fixed a bug that could cause DrawableStrings to become corrupted when used in the campaign
- Rewrote DrawableStrings to use vertex buffers instead of display lists
- Deprecated drawText(String text, float x, float y, float fontSize, float maxWidth, float maxHeight), use createText() instead
-
Version 2.4f
- Updated bundled Kotlin runtime library to v1.3.61
- Javadoc is now available online at https://lazywizard.github.io/lazylib
- Moved .version file hosting to GitHub
-
Version 2.4e
- Updated bundled Kotlin runtime library to v1.3.30
- Bundled Kotlin coroutines library v1.2.0
- CombatUtils: Reverted 2.4c changes due to bugs
-
Version 2.4d
- CombatUtils: Reverted changes to getEntitiesWithinRange() (it now only returns ships, projectiles, missiles and asteroids as it did pre-2.4c)
-
Version 2.4c
- Updated bundled Kotlin runtime library to v1.3.21
- CombatUtils: All getXWithinRange() methods have been updated to use 0.9a's new CollisionGridAPI, which should improve performance
- CombatUtils: getEntitiesWithinRange() now includes BattleObjectiveAPIs
- LazyFont: Blend mode is no longer automatically enabled during rendering - if you want your text to be drawn blended, you must ensure GL_BLEND is enabled and set the blend func (usually glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA))
-
Version 2.4b
- JSONUtils: loadCommonJSON(String filename, String defaultJSONPath) will save the newly created CommonDataJSONObject to disk immediately if defaultJSONPath exist and filename does not
-
- Donations
-
Straight donations accepted
Some mods may require LazyLib to run. If you are ever running a mod and get an error along the lines of 'Imported class "org.lazywizard.lazylib.<whatever>" could not be loaded', then this mod is required. Just make sure you have the latest version installed and that it is tagged in the launcher and everything should work.
Installation Instructions
This is installed the same way as a normal mod. Simply extract the zip into your mods folder and tag it in the launcher. As this mod does nothing until its classes are called, there is no harm in leaving it tagged in the launcher at all times even if your currently active mods don't require it.