Project Zomboid

Project Zomboid

Simplify
Se afișează 11-20 din 23 intrări
< 1  2  3 >
Actualizare: 17 aug. 2022 @ 5:10

v0.5.4
======
- Updated 'Simplify.Const' function. It now creates a copy of provided table before converting it into const table. This will ensure that you can still modify the original table.
- Metatable for constant table now contains a table with metamethods used by this mod. Extended global next, pairs and ipairs functions has been updated to reflect this changes. It should now reduce the chance to create name collision.

Notes:
Next update will focus on changing the exception mechanism. The 'throw' function will be replaced with 'msg' function. This function returns the string to be displayed by error function. This will make the stacktrace much more accurate.

Actualizare: 15 aug. 2022 @ 10:32

v0.5.3
======
- Extended next function has been updated to maximize the compatibility with other modders metatable.

Actualizare: 15 aug. 2022 @ 10:22

v0.5.2
======
- split extension has been removed since it has been confirmed that the function exists by default. this should fix all of the issues related to it.

Actualizare: 15 aug. 2022 @ 6:57

v0.5.1
======
- fixed string.split error caused by number as source parameter. string.gmatch unable to convert number to string, therefore the resulting nil error. the split function now converts a number into string before the split attempts.

this should no longer causing issue.

Actualizare: 14 aug. 2022 @ 0:52

v.0.5.0
======
- Fixed extended pairs and ipairs condition.
- 'File.getModFileWriter 'can no longer overwrite lua files.
- Added 'File.getContent' and 'File.readLines' utilities for getting all content and execute function on each line
- String utilities no longer available through 'Simplify' table and instead has been integrated as string extension. Meaning that you can access the utilities from any string by using colon syntax (:).
- Added HashMap for dealing with null values. It's just a simple implementation to register key with nil value.
- Experimental mod loader feature has been added.

I didn't add usage comments on new stuffs because my time is too limited to work on it. There's still one more thing to be added which is feature to load version based on server settings. Instructions on how to use the mod loader will be written after I update my 'Radar' mod.

Actualizare: 10 aug. 2022 @ 0:14

v.0.4.2
======
- Added 'const.lua' which introduces the ability to cast constant to your table. It will also do recursive cast. While it's meant to avoid new assignment to the const table, other modders can still break this feature by overriding the rawset and not extending it. Either call 'Simplify.Const' function with your table as parameter or you can simply create table using the function by doing this 'Simplify.Const { a = 1, b = 2}'. Const table can iterate through pairs and ipairs.
- Any attempts to override the const table will cause 'ConstTableException' error.

Actualizare: 9 aug. 2022 @ 6:58

v0.4.1
======
- Replaced 'Mod.register' with 'Mod.create(strModId, iMajor, iMinor, iPatch, strModKey)' function. The purpose is to create mod table with provided utilities and return it. If a global key is provided, it will insert the created table into global table using the provided key. 'Mod.register' force you to create a global key which might not be a good choice for some modders therefore replaced.
- Protection has been added to 'File.getModFileWriter'. This function will now produce an error when accessing a lua file.
- Reworked on how exception derivation works. local function 'new()' was removed to reflect the changes.
- 'Exception:superclass()' method has been added which returns the superclass type of the derived subclass.
- Added two more base exceptions which is 'IllegalStateException' and 'IndexOutOfBoundsException'.
- Module loading function has been updated to produce traceable loading errors. This includes custom exception 'ModuleLoadingErrorException' to notify the type of error.
- 'Module.require(strModId, strFilePath)' function has been added. This function also loads a module like 'Module.load'. The difference is that, you are guaranteed to load the module once. If it's already loaded, created table will be returned instead.
- New method ':requireModule(strFilePath)' has been added to mod table created by 'Mod.create' function. It's a utility to call 'Module.require' function to require your mod's module.
- Module 'data/csv.lua' has been added. It's a module which provides utilities to read / write CSV file.
A table containing the CSV utility functions will be returned when the module is loaded. Please read the comments inside the module file.
- Added 'String.split(str, strSeparator)' function to 'String.lua' which separates the string with provided separator. Default separator is a white space.

I can't type any more changes due to character limit! Well, that should covered most of it if not all.

Actualizare: 8 aug. 2022 @ 4:00

v0.4.0
======
- Added new utilities:
1. Exception.lua: Simulate exception class for consistent development process. Added 'RunTimeException' and 'IllegalArgumentException'
2. String.lua: Provide extra string utilities. Currently contains function for startswith, endswith and experimental utf8to32 functions.
3. File.lua: Utility for getting the mod file writer and the file reader too.
4. Module.lua: Provide function for loading lua module outside of 'mod_folder/media/lua/...'. You can now load modules according to your preferred order. The module files should be added inside 'mod_folder/modules' directory.
5. Mod.lua: Provide utility for registering global mod table key. This table key contains a new table with metatable set to provide mod utilities using colon (:) syntax.

- Player.CanSee function has been updated with extra validations. This function should no longer cause errors when used on player that's outside of client's map loading range.
- Player.getPlayers and Player.getFactionMembers will no longer return an extra result which contains a dictionary. This removal might be permanent if those usernames can't be normalized to be used as table key. The new string utility file contains a test function to convert utf8 string to utf32 codepoints.

The new utility files contain proper usage comments. I'll add the usage comment on old utility files when I'm in the mood to do it.

Actualizare: 9 iul. 2022 @ 20:27

v.0.3.2
======
- Updated 'Player#getFactionMembers' method. Instead of receiving player object, now it receives faction object instead.
- Updated 'Player#getPlayers' and 'Player#getFactionMembers' to accept second parameter 'requiredDictionary' as default parameter. Passing 'requiredDictionary' as true will return dictionary as secondary result. It's important if you want to do simple 'not equals to' check without looping through the list again.

Actualizare: 9 iul. 2022 @ 3:32

v0.3.1
======
- Fixed Player#getFactionMembers method. It forgot to call the required function properly.