Skip to content

Releases: Eir-nya/userdata-wrapper

Update to CYF v0.6.3!

19 Sep 00:47
Compare
Choose a tag to compare

Changes

  • Added wrapper.WrapFile for the new File object in CYF v0.6.3

  • Updated existing properties and functions to match CYF v0.6.3, and added new properties and functions that were added

    • Among these, I added an exception for Misc.OpenFIle so that if a new bool wrapper.autoWrapFile is true, upon calling Misc.OpenFile you will be given a wrapped File object
  • Fixed an error that occurs when you wrap an object but don't give a custom override table, such as by doing wrapper.WrapMisc()

  • Fixed all strange isCYF checks that also checked for Encounter because I was dumb and thought isCYF only existed in the Encounter script but it exists in all scripts actually >w>

Installation

Download userdataWrapper.lua, place it in YOUR MOD/Lua/Libraries and load it in any desired files with

wrapper = require "Libraries/userdataWrapper"

Fix comparing bug

09 Sep 03:10
Compare
Choose a tag to compare

Changes

  • Fixed a major bug causing any wrapped userdata compared with ANY regular userdata to always return true.
    Example:
bullet1 = CreateProjectile("bullet", 0, 0)

bullet2 = CreateProjectile("bullet", 0, 0)
bullet2 = wrapper.WrapProjectile(bullet2)

DEBUG(bullet1 == bullet2) -- true -- buggy behavior, fixed in this version

This also means that doing a check such as the following in OnHit would always erroneously return true:

function OnHit(b)
    if b == bul1 then
        -- do something
    end
end

Installation

Download userdataWrapper.lua, place it in YOUR MOD/Lua/Libraries and load it in any desired files with

wrapper = require "Libraries/userdataWrapper"

Initial Release

28 Aug 17:53
Compare
Choose a tag to compare

Changes

  • Initial release!

Installation

Download userdataWrapper.lua, place it in YOUR MOD/Lua/Libraries and load it in any desired files with

wrapper = require "Libraries/userdataWrapper"