Skip to content

Releases: MarvinBeym/MscModApi

1.4.1

27 Oct 16:27
24a66e9
Compare
Choose a tag to compare

Hotfix

  • Fixes UserInteraction.ThrottleDown never returning true

1.4.0

27 Oct 15:26
176481b
Compare
Choose a tag to compare

Recompilation of existing mods MANDATORY

  • Fix multi purchase for custom ShopItem handling not set
  • Fix buyable state causing crash for custom implemented ShopItem purchase
  • Fix GamePart can't be blocked from being installed using installBlocked
  • Fix part with no bolts not considered bolted
  • Allow public access to maxTightness property of GamePart
  • Add extension methods to check a list of Parts for their PartEvent.Type state
  • Implement ability to remove event listener from part
  • Return class when adding event listener instead of just the action added
  • Initial Release of (new) ReplacedGameParts functionality (Considered ULTRA BETA!)
  • Add FSM Component to parts, containing relevant variables of a part
  • Don't show instant install debug when player in car
  • Trigger bolted/unbolted action for ReplacedGameParts when part has no bolts
  • Remove unreliable/issues causing globalCache for GameObjects
  • Add constant for name of FSM added by FsmPartData
  • Enable removalFsm if disabled before sending uninstall event
  • Add id property to GamePart class
  • Use Serializable Vector3 & Quaternion classes instead of struct in PartSave class
  • Add saveFileName constant to ReplacedGameParts class
  • Fix removing block from original parts without checking if all new parts are uninstalled
  • Add id & mod parameter to ReplacedGameParts constructor
  • Implement GamePart save class
  • Implement ReplacedGameParts saving functionality
  • Implement ReplacedGameParts load functionality
  • Implement PartEventListener collection allowing removal of a PartEventListener while the collection is being invokes
  • Cleanup ReplacedGameParts savefile on new game

1.3.2

28 Jan 22:07
2ede406
Compare
Choose a tag to compare
  • Fix part box not unpacked on saving, causing parts still inside to not be located at the boxes position when loading again
  • Fix exception message not written to Log
  • Simplify resetting childs of PartBox
  • Fix parts able to fall through floor
  • Allow setting some rigidBody values on Part object through virtual attributes

1.3.1

06 Nov 20:04
1354172
Compare
Choose a tag to compare
  • Fixes PartBox not initializing parts properly, causing the PartBox to not be buyable

1.3.0

02 Sep 20:39
24bb81e
Compare
Choose a tag to compare

Methods/Fields/Properties marked as obsolete have now been removed.

Mods require recompile and changes to the Methods/Fields/Properties used to work with this version!!

Changes:

  • Call post install/uninstall after verification of install/uninstall has happened.
  • Add property to return if part is currently installed on satsuma.
  • Introduce EventHandling of InstalledOnCar & UninstalledFromCar
  • Introduce using event type enum to declare when a Behaviour should be enabled/disabled on a part.
  • Implement executing childs InstalledOnCar & UninstalledFromCar events when parent installs/uninstalls on car
  • Introduce EventHandling of BoltedOnCar & UnboltedOnCar
  • Introduce using GamePart for the parent of Mod Part objects
  • Abandon ability to use GameObject* object as the parent of a Part object
  • Introduce Unified childs property for objects extending from BasicPart
  • Introduce easy way of blocking install of a part based on the state of a different part part.BlockOtherPartInstallOnEvent()
    • This is just a shortcut for having to add 2 Events using AddEventListener and doing
      OnInstall => otherPart.installBlocked = true;
      OnUninstall => otherPart.installBlocked = false
    • Reducing amount of code needed to rewrite.
  • Introduce using ReadOnlyCollection for childs, preventing potential modification of the childs array/list
  • Rework the way parts are made "installed" on the car
    • Until now, the parts collider was set to isTrigger = true
      • This could lead to other proplems when something like a Joint was used
    • Replaced with the same way the game does it, by removing the RigidBody component on install and adding it back on uninstall.
  • Introduce ability to decide if an EventAction should be invoked if the condition is already met before the event listener was added
  • Abandon useless CopyVector exension
  • Removed ALL 'Obsolete' marked code
  • Marked ReplacementPart classes (NewPart, OldPart, ReplacementPart) as obsolete
    (without error, will be replaced in the future)
  • Add some more doc blocks

1.2.0

13 Aug 13:20
ad3fdd6
Compare
Choose a tag to compare

Mods likely have to be recompiled
(which will also require changing some methods possibly used to be replaced with different methods or using a C# property instead)

  • Move Box & Kit classes to parts folder
  • Introduce BasicPart class as an abstract class starting point with required methods
  • Restructure classes to use C# properties instead of Getter/Setter methods
  • Introduce name & cleanName properties for parts (BasicPart)
  • Unify Box Logics (Box & Kit) into a single Logic MonoBehaviour
  • Improve part fixed handling
  • Improve part fixed/unfixed event call moment (no longer get's called on each screw/unscrew
  • Rework ScrewPlacementMode with ModConsole ConsoleCommand and enabling/disabling at run time
  • Rework Event definition using interface with single AddEventListener method & using Enums for Pre/Post & Type
  • Mark obsolete code to throw error when used (preventing compilation if used)
  • Prevent Mod Loop from running while in Menu
  • Fix not yet initialized ShopInterface object causing exception
  • Introduce installationPossible C# property (combines blocked, bought, trigger defined & installed)
  • Allow part to be installed on parent even if parent is not yet installed
  • Implement OldPart bought state property
  • Implement parentInstalled & parentFixed when parent is not a Part object
  • Rename fixed to bolted
  • Add Extension method for fining FsmState on a PlayMakeFSM object
  • Introduce GamePart wrapper class for parts made by the game to add easy access to states (install, bought, damaged, ...) as well as allow adding actions on state change.
  • Fix instant install debug using wrong setting value
  • Require ScrewPlacementMode to be first enabled for a mod (by the dev) for it to be available for that mod through the console command
  • Replace setting part isKinematic to adding/removing RigidBody component for defining what is installed or uninstalled (Just like the game does it)
  • Document trigger class
  • Deprecate methods in trigger classes and replace with C# properties
  • Fix using wrong file names for PaintingSystem saveFile
  • Fix errors when going back to game (after going to menu/saving) by doing a cleanup of all static fields when MscModApi loads (OnMenuLoad)

1.1.1

03 Aug 15:01
32399b4
Compare
Choose a tag to compare
  • Fix and Improve Logger
  • Fix missing space in logged mod disabled info
  • Removed left over testing constructor in Box class

1.1.0

01 Aug 15:17
eeb55f6
Compare
Choose a tag to compare

Please note that this release may have undetected bugs.
I'ts very likely mods available up until now, using older version may not work with this version. (Untested)

  • Improve caching, allows finding inactive objects
  • Add utility method for checking if throttle is down
  • Remove usage of variable devMode no longer available in newer MscLoader versions
  • Add Helper method for retrieving Gameobject from a PlayMakerFSM object
  • Add Helper method for finding an FSM object on a GameObject
  • Add float.Map extension method
  • Fix code styling
  • Update AssetBundle
  • Add Box of parts functionality
  • Add Kit of parts functionality
  • Replace AddXYZMono method with AddXYZBehaviour and mark previous as obsolete
  • Implement handling of Kit & Box functionality
  • Load assets in menu
  • Add settings option to toggle instant install debug functionality (only when compiled as debug)
  • Allow using path search for retrieving from cache (Just like GameObject.Find("ABC/XYZ"); allows)
  • Restructure internal shop code
  • Empty the shopping cart when opening the shopping interface
  • Close games OptionsMenu when closing shoppng interface
  • Add ability to add Kit & Box as shopping items
  • Fix updating shop part count of ModItem
  • Fix bug preventing parts from being moved once installed (like driving car)
  • Implement PaintingSystem
  • Add class "DerivablePart" for easier deriving of the "Part" class
  • Fix trigger preventing installation of part (not showing "Install part" text) when uninstallWhenParentUninstalls is disabled for the part
  • Rename main class to match the mod's/api's name.

ReplacementPart FSM fix

31 Oct 07:19
84417fb
Compare
Choose a tag to compare

This fixes an issue when parts are used that can be bought and are not yet bought (like Racing Carburetor)
That would prevent it from loading as the FSM is not yet initialized.

Changelog (v1.0.4):

  • ReplacementPart: Add Initializing fsm when not yet initialized
  • Add message about currently used version when game loads

ReplacementPart improvement

23 Oct 10:56
3154109
Compare
Choose a tag to compare

Add ability to define if a new part in a replacement part can be installed without blocking the install of old parts.