1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 14:09:06 +00:00
Commit graph

19 commits

Author SHA1 Message Date
fgenesis
748dc6cd9d Fix mantis.lua script warning, thx vegetamaker for reporting 2013-07-04 18:42:46 +02:00
fgenesis
84a73b59f9 Hopefully fixed piranha pet script warning (thx `Nax for reporting) 2013-06-19 02:26:12 +02:00
fgenesis
811b015983 "Fix" warning in cc_sunkencity.lua
Thx Diablodoct0r for reporting.
2013-05-02 01:53:15 +02:00
fgenesis
4c8fc05de8 Fix sound problems in energyboss and warning in predatorytunicate script.
Thx Diablodoct0r for reporting the latter.
2013-04-28 22:33:59 +02:00
fgenesis
15884e3b02 Some script fixes that were overlooked and caused warnings in the dev builds 2013-04-15 00:38:18 +02:00
fgenesis
500355019d More russian data files.
The .glf file is based on the original russian file, but binary-patched
so that the game can load it without special hacks messing with
texture coordinates, which would break loading the original english glf file.
2012-07-10 22:22:05 +02:00
fgenesis
ad0eff411c Fix typo in icecunk script, thx Red Skull 2012-06-27 23:46:23 +02:00
fgenesis
1d4eb5533e Worked around "set global function xx" warnings in jukebox mod + fixed long comment ends. 2012-06-01 17:53:21 +02:00
fgenesis
0cdbc66c02 Minor script fixes
- Bigmouth & Grabbyarm will no longer spam "entity invalid pointer"
- Make Huggys follow through local warps (thx to Andrew Church for this)
2012-03-14 01:00:46 +01:00
fgenesis
5623b11f83 little (harmless) typo in IceChunkCommon.lua
Caused a warning, nothing more.
2012-02-09 16:09:17 +01:00
fgenesis
7ff0caaed8 Script interface improvements & extensions.
- Pointer typechecks are now enabled by default.

- enabled all script warnings for non-FULL or DEMO builds by default

- Added generic obj_* functions that operate on any type of RenderObject.
  These give quite low-level control about the renderer, and are quite
  dangerous too.
  Subsequently, many functions sharing the same code (*_setPosition, for example)
  could be removed, and simply call the generic functions after a type check.

- Added interface function deathNotify(). The original logic of death
  notifiers was never used, so i thought i'd make use of it.
  This is useful in scripts to safely drop dangling pointers.

- removed sendEntityMessage, entity_setCollideWithAvatar, entity_setTouchDamage,
  which were essentially no-ops.

- Replaced all unnecessary luaReturnNum(0) and luaReturnInt(0),
  now it does only push a return value on the stack if the function
  is actually supposed to have a retun value.

- Allow variadic calling of entity_msg(). Now any parameters can be passed
  to the function, and the target entity will receive all of them.
  Any values returned from the entity's msg() callback will be returned
  by entity_msg() to the original caller. This allows nice RPC-like
  entity communication.

- fixed possible crash in debugLog, bone_update, entity_debugText

- added an override function for loadfile() that is case-insensitive like dofile()

- entity_createEntity returns the created entity now

- spawnParticleEffect returns the associated RenderObject

- Added some text rendering functions

- Added beam_setFirer()

- removed the underflow check in avatar_decrLeaches() I added earlier

- added a panic function for Lua.

- added the Lua debug library

- fixed a stupid typo in ScriptObject::isType() that made the type checks a lot less accurate

- misc stuff I forgot
2012-02-05 20:22:54 +01:00
fgenesis
39f4f3c856 Fix 2 little bugs
- set default freq/pan for voice playback
- spinycrab script: fix pointer tpe mismatch
2012-01-08 20:22:56 +01:00
fgenesis
99e32e0ee7 Positional audio fixup.
- Finetuned default distance by aspect ratio
- Added a hack to allow entity_sound() to use freq values around 1000 instead of changing all related scripts
- Changed anglerfish bite pitch, 40% only sounds awkward
2011-12-13 18:07:23 +01:00
fgenesis
ff195c6b16 additional seahorse/Li spirit form/riding fix.
This patch enables movement after going into spirit form while hugged,
and fixes getting off a seahorse if returning near an actual spirit crystal.
2011-11-21 02:01:29 +01:00
fgenesis
47c31660ca minor script fixes
- restored leach.lua 1.1.1 compatibility (entity_*TargetLeaches still works)
- fixed possible script warning when picking up a collectible
- made energy bariers ignore damage
2011-11-21 00:01:12 +01:00
fgenesis
e64fb75f84 sync with icculus repo 2011-11-20 15:44:17 +01:00
fgenesis
25dfb44a93 unlock movement & camera when activating spirit form on seahorse 2011-11-13 02:24:08 +01:00
fgenesis
c78d4d7a11 Fixed some script interface functions, error handling & code cleanups
== Script interface changes: ==

Removed entity_setClampOnSwitchDir(), which was a no-op.

Added entity_getFlag() function, for fairness, as nodes already have one.

Added node_getLabel() function, which does not return the _full_ node string, but only the first part before parameters.

dofile() supports relative paths now, and it is no longer necessary to use appendUserDataPath() + full path from a mod.

entity_color() does now support all interpolation functions that similar vector-manipulation functions support (loop, ping-pong, ease).

added entity_getVel() function (an entity_setVel() can be emulated with entity_clearVel(), followed by entity_addVel()).

*_getNearestNode() and *_getNearestEntity() allow an optional ignore parameter.
node_getNearestNode() allowed to specify a node to exclude from the search,
the others not -- now the interface is more consistent.

Deprecated entity_[incr/decr]TargetLeaches(entity) - the attached leach amount was never handled
by any entity other than Naija. Replaced them with avatar_[incr/decr]Leaches(), but kept the old
ames for now, too. Should be removed in a while.


== Script interface & related fixes: ==

Added bool loudScriptErrors to control displaying script syntax error and global variable usage warnings.
So far, syntax errors always went do debugLog(), but it is less time consuming when writing scripts
to have them displayed right away.

*_getNearestNode now scan by label, and not full name.
This allows searching for nodes but ignoring its parameters. The original game scripts never search
for nodes that have parameters, so this does not break anything,
but allows modding without an exploding amount of specialized node scripts.

entity_setBoneLock() failed for certain entites with throwLuaErrors=true,
allowing to burst through them (gears, grouper, big mithalas jelly, probably more).

Removed unnecessary int-casts in entity_setHealth(), entity_changeHealth(), and a few others,
which truncated float fractional parts.

Fixed possible crashes in many functions due to missing NULL-pointer checks,
if wrong data were passed to Lua.

Optimized entity_getNearestEntity() a little - do nocasecmp() after checking all other params

UPPERCASE global variables as used in mod include files are now tolerated, even with all warnings on.
This makes sense because it was impossible to include a custom flags definition file
(which _must_ have globals, otherwise the including scripts won't see them) in a mod without beeing buried in spam.
They won't change, or clobber any states, and UPPERCASE sort of implies a constant/#define, imho.

Added better control over warnings about not-existing files. map_*.lua and premap_*.lua files are optional,
and no warning should be given if they do not exist. Missing Entity scripts and mod-init.lua must be
warned about, however.

Fixed a crash in global variable access warning (NULL pushed into std::ostringstream)

Fixed 2 random warnings i found in scrips


== Misc stuff: ==

Related to the changes above, cleaned out unused variables from the Entity class,
and removed the code that had to do with them somehow. Some parts of the removed code
were still in use, although totally unnecessary.
Saves a few bytes of memory per entity, and less code that can cause headache.
2011-09-18 23:12:02 +02:00
fgenesis
3096eaf5e2 initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4 2011-08-03 22:05:33 +02:00