Skip to content

Releases: sovdeeth/oopsk

oopsk 1.0 beta 2 release

23 Nov 05:09
206be12

Choose a tag to compare

Pre-release

beta 2

Beta 2 introduces some very interesting features, namely concrete types and custom converters. These crack open the very heart of Skript's internals, so I'm rather tentative about declaring them stable. They should be treated with care. I want to double down on the advice that you should always reload all scripts after editing a struct template. This is even more important with the registration of types and converters, now. If you are encountering weird behavior, reload all and see if it still occurs.

concrete types:

struct alpha:
    b: bravo struct
    c: number

struct bravo:
    d: string = "bravo"
    
function test(input: alpha struct):
    broadcast {_input}->b->d # should always print "bravo"

Concrete types means you can now use _ struct as a type in fields, functions, and more! This should help with specifying typing in your custom functions and nested structs.

custom converters

struct ServerPlayer:
    player: player
    money: number
    max_health: number
    converts to:
        player via this->player
        location via this->player's location

Custom converters (<type> via <expression>) allow you to register types that Skript can convert your struct object to automatically. This lets you do things like teleport {struct} to me if you have a player/entity converter for the struct. Due to restrictions with Skript's converter system and the hacking I have to do to make this work, this will not register chaining converters for you, so if you provide a player converter, Skript will not be able to convert it to a location despite the existence of a player->location converter it could chain with. Use with care!

Changelog:

  • Allows options in fields
  • Allow single Object fields to accept any type in acceptChange (thanks @miberss)
  • Adds concrete types for struct templates.
  • Adds custom converters for struct types.

Full Changelog: 1.0-beta1...1.0-beta2

oopsk 1.0 beta 1 release

02 Jun 22:26
2ef321a

Choose a tag to compare

Pre-release

beta 1

Beta 1 should be a rather stable release. I intend to a set of (experimental) reflective syntaxes before release, like getting the type of a field, the field names of a struct, and unsafe accesses to structs with strings instead of literal field names. Excluding those, this beta is feature complete.

Changelog:

  • Adds add/remove changers for fields
  • Adds dynamic fields, fields that always evaluate their expression when retrieved, rather than evaluating once on creation. These cannot be set manually after creation.
  • Fixes a few bugs with changers
  • Adds automated test support
  • Adds a struct copy expression to get deep copies of a struct.

Full Changelog: 1.0-alpha2...1.0-beta1

oopsk 1.0 alpha 2 release

10 Apr 21:47

Choose a tag to compare

Pre-release

alpha 2

Alpha 2 adds some more bug fixes and some more features, like constant fields and getting the template of a struct.

Changelog:

  • Adds constant fields: const fieldName: fieldType = defaultValue. These fields can't be changed after a struct is created.
  • Adds a SectionExpression for creating structs:
    set {_a} to a result struct with values:
        success: true
        message: "Message sent successfully!"
  • Adds a condition and an expression for checking and getting the template a struct was made from: if {_struct} is a "result" struct, broadcast template of {_struct}
  • Adds docs (to be posted on skUnity and SkriptHub)
  • Adds some more type safety safeguards when getting/setting fields.

oopsk 1.0 alpha release

10 Apr 06:20

Choose a tag to compare

Pre-release

oopsk 1.0 alpha contains a barebones implementation of structs, with the ability to define templates, create instances, and modify fields. Be prepared for bugs or strange behaviors, which should be promptly reported to this repository. See the README for docs, an example, and more information.