1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-06-08 09:31:58 +00:00
Commit graph

106 commits

Author SHA1 Message Date
fgenesis
1701c9a67d More Lua functions:
- entity_hasSkeletal()
- entity_getNumAnimLayers()
- filterNearestEntities() to fill an internal filter buffer
- getNextFilteredEntity() to iterate over the filter buffer
2013-11-02 15:22:55 +01:00
fgenesis
9377b6edb9 Add Lua function isShuttingDownGameState() 2013-10-28 04:28:05 +01:00
fgenesis
3fe9ffc2cd Fix setGemPosition(), add more Lua functions:
- isShader()
- isParticleEffect()
- pe_start()
- pe_stop()
- pe_isRunning()
- isMiniMapCursorOkay()
2013-10-25 01:47:24 +02:00
fgenesis
fa6ca8d60a Add 2 Lua functions:
+ obj_getWorldScale()
+ obj_getParent()
2013-10-21 02:34:57 +02:00
fgenesis
d97bb25b9e Add some Lua functions, changes to hair.
+ beam_getEndPos()
+ entity_setCurrentHealth()
+ entity_setMaxHealth()
+ beam_getEndPos()
+ entity_hasAnimation()

- Add 3 new parameters to entity_damage: shot, hitX, hitY
- entity_getAnimationLength() supports string as 2nd parameter now.
  This will lookup an animation's length via name.
  Passing an ANIMLAYER_* constant works as it used to.
2013-10-19 17:30:42 +02:00
fgenesis
84f1b12c67 Add riding related Lua functions:
- entity_getRidingPosition()
- entity_getRidingRotation()
- entity_getRidingFlip()
2013-09-29 01:27:36 +02:00
fgenesis
36c409e1d4 Little things:
- Make ACTION_LOOK and ACTION_ROLL available to handle via nodes
- Add entity_getPushVec()
- Fix typo in beam_setFirer()
- Add pull param to addInfluence()
- Add entity_getPushDamage()
- Add getMouseWheelChange()
2013-09-28 17:21:11 +02:00
fgenesis
0df586874d Script interface:
- Add entity_doElementInteraction()
- Add avatar_setElementEffectMult()
- Change entity_isUnderWater(): Can now supply an override position.
2013-09-24 17:02:06 +02:00
fgenesis
fdae0fe9a4 New action: ACTION_PLACE_AVATAR. Add Lua functions:
- entity_getBoneLockData()
- entity_getWeight()
2013-09-04 16:09:58 +02:00
fgenesis
31ab72334b Fix copy-paste oops. 2013-08-31 16:49:22 +02:00
fgenesis
396f091c85 Add Lua functions:
- quad_isRenderBeforeParent()
- quad_setRenderBorder()
- quad_isRenderBorder()
- quad_setRenderCenter()
- quad_isRenderCenter()
- quad_borderAlpha()
- quad_getBorderAlpha()
- node_getShape()
- text_setAlign()

Constants: ALIGN_CENTER, ALIGN_LEFT, PATHSHAPE_RECT, PATHSHAPE_CIRCLE
2013-08-31 16:14:05 +02:00
fgenesis
4f6447b58e Script interface extensions:
- shot_setTargetPoint()
- shot_getTargetPoint()
- entity_getTargetPriority()
- fix oversight in entity_doEntityAvoidance()
- entity_getTargetRange()
- getJoystickAxisLeft()
- getJoystickAxisRight()
2013-08-29 03:58:50 +02:00
fgenesis
01d9211a34 Little script interface changes:
- Add avatar_isSwimming()
- toggleInput() does now parse bools correctly
- pickupGem() returns gem ID
- Change in entity_doCollisionAvoidance():
  * Add support for ignore obs
  * One arg was shifted, this is now fixed but not sure if it adds a problem somewhere.
2013-08-28 04:20:36 +02:00
fgenesis
69890093bd Add special memory allocator for Lua that should take some memory stress away from heavy scripting. 2013-08-26 21:02:46 +02:00
fgenesis
fefb30a7b3 Allow entities and nodes to update while the game is paused.
Added Lua functions:
- node_setPauseFreeze()
- entity_setPauseFreeze()
- getFPS()

Also fixed possible crash in entity_setStateTime().
2013-08-26 20:56:34 +02:00
fgenesis
41929955d3 Fix ScriptInterface developer mode settings not applying.
Minor changes:
- clean out some Lua functions registered twice
- Correct bool cast in quad_setSegs()
- Show nested mains in debug console
- One less //HACK comment
2013-08-03 22:37:10 +02:00
fgenesis
cf6556b94d Implement stereo to mono mixing for proper L/R separation even for stereo samples.
This mixes only those sounds that are supposed to be played positional.
All centered (default) sounds are played in stereo, as usual.
2013-07-24 19:57:13 +02:00
fgenesis
f5da61fe78 Horrible hack to attenuate stereo sources properly.
OpenAL refuses to pan stereo sources, so apparently
it needs to be done this way.
2013-07-22 05:35:50 +02:00
fgenesis
e6680da428 Implemenet proper positional audio, one issue still.
With this patch, entities can serve as a sound source whose position
updates relative to the listener. This implements the last missing
feature of my previous positional audio patch, which is moving sound sources.
Previously, all sounds were relative to the listener with the listener
centered at (0, 0, 0), and once a sound started playing, the position could
not be changed. Volume was set as an estimation of the distance to the listener.

These restrictions are now gone; OpenAL will handle the volume & panning
based on the distance.

The remaining problem is that stereo sounds are not attenuated, at all.

Lua additions:
- playSfx() takes an additional parameter now.
- entity_setStopSoundsOnDeath()
2013-07-22 03:29:57 +02:00
fgenesis
49b6234ac8 Some new Lua functions for shots. Shots will now respect the prov. unused BouncePrt property.
- shot_setDamageType()
- shot_setCheckDamageTarget()
- shot_isCheckDamageTarget()
- shot_setTrailPrt()
2013-07-21 17:09:47 +02:00
fgenesis
c6ae568ed8 More Lua functions; allow specifying ingredient type by ID
- avatar_setBlockBackflip()
- avatar_isBlockBackflip()
- inv_getNumItems()
- inv_getItemName()
- getIngredientDataSize()
- getIngredientDataName()
2013-07-21 04:28:45 +02:00
fgenesis
08821f5156 Oops, copypaste typo 2013-07-20 23:25:00 +02:00
fgenesis
9f4c55c177 More new Lua functions.
- shot_getMaxSpeed()
- shot_setMaxSpeed()
- shot_getHomingness()
- shot_setHomingness()
- shot_getLifeTime()
- shot_setLifeTime()
- getScreenVirtualSize()
2013-07-20 20:16:26 +02:00
fgenesis
7fb9204e97 Minor changes & simplifications to Lua interface. 5 new functions.
This changes all typical vector interpolation functions that get
value, time, loopType, pingPong, ease as args from the Lua state;
use unified functions for all value type occurances.
This fixes the slightly annoying problem that it was not possible to
pass a boolean true to pingPong or ease, because lua_tonumber() would
always return 0 in that case.

Also changed:
- obj_getWorldPosition() now takes optional x,y-vector

New:
- obj_getWorldPositionAndRotation() is a more efficient shortcut,
	as often both position and rotation are retrieved together,
	and the underlying matrix chain operation is rather expensive.
- entity_getEmitter()
- entity_getNumEmitters()
- setSceneColor2()
- getSceneColor2()
2013-07-20 17:44:27 +02:00
fgenesis
34fbbae71a Add Lua function rumble() to script force feedback 2013-07-20 04:03:15 +02:00
fgenesis
45ba35ca4b Get rid of AQUARIA_FULL define and move the setting to usersettings.xml. Some changes regarding AQUARIA_DEMO.
This means there are no longer two builds necessary (one normal,
one dev), and all mod deveopment can be done using one build,
by setting

Demo builds now allow browsing the online mod list, but neither
downloading nor starting mods or applying patches.
2013-07-20 02:27:53 +02:00
fgenesis
1386e9edb3 Win32 resource file update, icons, and one little float->int cast fix in ScriptInterface 2013-07-20 00:54:28 +02:00
fgenesis
93c59fdb28 Minor extensions to script interface:
- quad_setRepeatTexture()
- quad_setRepeatScale()
- quad_isRepeatTexture()

(bone, entity, ... as well)

- getOldDT() - return unmodified dt
- getDT() - as passed to update(), for complicated edge cases
            where dt is unavailable but required.
2013-07-15 03:22:41 +02:00
fgenesis
76cfa6fe33 Implement node messaging (node_msg() function); there is no reason entities have this but nodes do not.
Also made node script error messages a bit nicer.
2013-07-12 03:07:40 +02:00
fgenesis
3ad6eedd37 Add support for suppressing game actions from being handled, minor changes to actions
This allows to e.g. prevent ACTION_TOGGLEHELPSCREEN from being handled by
the game, and instead use a node's catch action functionality to handle the event.

Add related Lua functions:
- setIgnoreAction()
- isIgnoreAction()
- sendAction()
2013-07-11 23:49:39 +02:00
fgenesis
0431932b2b More extensions to script interface:
- obj_fadeAlphaWithLife()
- obj_setOverrideRenderPass()
- setLayerRenderPass()
- debugBreak()
- saveMenu()
- setGemPosition()
- removeGem()
2013-07-11 15:06:38 +02:00
fgenesis
153dd522c9 Fixed handling of IET_SCRIPT, rename Lua callback func getIngredientString() to getIngredientEffectString(), compile fix 2013-06-26 00:34:35 +02:00
fgenesis
26d056d924 Slightly more sensible error/msgbox handling 2013-06-23 18:50:10 +02:00
fgenesis
54d609a8b5 Make avatar respect maxspeed lerp, allow changing speed multiplier via script. Some extra functions.
Add one additional not-timed speed multiplier that also ignores influence by currents.
Lua functions added:
- avatar_setSpeedMult(num, time)
- avatar_setSpeedMult2(num)
- avatar_getSpeedMult()
- avatar_getSpeedMult2()
- entity_isInCurrent(entity)
- entity_getNumTargetPoints(entity)
2013-06-20 20:01:51 +02:00
fgenesis
1bbd9e097d Initial supported for scripted ingredients, not fully tested.
This adds a few additional interface functions, to be defined in:
scripts/global/cooking.lua, or
_mods/XYZ/scripts/cooking.lua

Added functions:
cookFailure(a,b,c) - Called when no recipe could be found for ingredients a,b,c
getIngredientString() - Called by the menu. Expected to return effects description
                        for scripted ingredient..
useIngredient(name) - Called when a scripted ingredient will be eaten.
                      Return true to eat.

Use a line like this in ingredients.txt:
LuaLoaf sealoaf Loaf (script)
to enable calling useIngredient() upon eating.
2013-06-20 04:49:20 +02:00
fgenesis
6962a3e3ab Improvements to shader API; use handles instead of raw pointers. 2013-06-15 04:11:11 +02:00
fgenesis
3485199bec temp commit - work on shaders 2013-06-15 00:58:32 +02:00
fgenesis
c698b4128a Fix copypaste mistake in avatar_canLockToWall() & avatar_setCanLockToWall(). Add functions:
- obj_getAlphaMod()
- obj_getColor()
2013-06-11 09:02:56 +02:00
fgenesis
dcc676afbc ... AND THOU SHALL TEST YOUR CODE BEFORE PUSH 2013-06-10 01:20:50 +02:00
fgenesis
336c821eb2 Thou shall not push without compiling. 2013-06-10 01:02:47 +02:00
fgenesis
f5f890aade Make particle suck positions accessible to Lua, use suckpos 2, fix possible crash in entity_clearHair() 2013-06-10 00:59:46 +02:00
fgenesis
f7740eb6e8 add beam_setDamageType() Lua function 2013-05-19 20:14:00 +02:00
fgenesis
8c80cf6318 Add shader interface API to Lua API 2013-05-12 00:06:26 +02:00
fgenesis
45821d15ff Fix regression from 7ff0caaed8.
This fixes a glitch in the final boss' last form. Due to a missing
Beam::trace() call, the beam's angle was not updated,
and it always pointed into the upper left corner.
2013-05-02 23:30:06 +02:00
fgenesis
7d158f5f1c Fix typos in a52b26c782 2013-04-28 22:44:28 +02:00
fgenesis
a52b26c782 Forms decoupling #3.
Added Lua functions:
+ setSeeMapMode()
2013-04-27 01:12:50 +02:00
fgenesis
ec7dd94a1c Forms decoupling #2.
Added Lua functions:
+ avatar_setCanCollideWithShots()
+ avatar_canCollideWithShots()
+ avatar_setCollisionAvoidanceData()
2013-04-26 05:03:24 +02:00
fgenesis
e8a7889f82 Decouple form specific effects from the actual form.
Most hardcoded form == FORM_* checks all over the place have been replaced.
Now, forms change certain avatar properties, which are in turn checked
in the places that previously had these explicit form checks.
This allows specifying functionality via scripting, for additional forms
with new effects or a new combination of existing effects.

OT_HURT now deals damage of type DT_WALLHURT,
and by setting avatar->setDamageTarget(DT_WALLHURT, false) collision
with walls can be made harmless (exactly as nature form used to be).

Add related Lua functions:
+ setWorldType() - Change WT without actually switching to spirit form
+ setCanActivate()
+ avatar_setCanBurst()
+ avatar_canBurst()
+ avatar_setCanLockToWall()
+ avatar_canLockToWall()
+ avatar_setCanSwimAgainstCurrents()
+ avatar_canSwimAgainstCurrents()
+ getSceneColor()
+ DT_WALLHURT
2013-04-26 00:34:06 +02:00
fgenesis
55ead19076 Remove spirit form dependency on WorldType, and add related Lua interfaces.
This commit introduces a second pause mode:
Full game pause (as in menu), and world pause (as in spirit form).
All related checks are no longer done against WT_* constants,
but against the new world pause which is functionally equivalent,
but more flexible. Continuity::worldType is now only used to toggle
world pause correctly, and to apply some related graphical effects.
The world pause can also be controlled via script without actually
switching forms.
Added Lua functions:
+ node_setSpiritFreeze()
+ quad_setPauseLevel()
+ isWorldPaused()
+ setWorldPaused()
2013-04-25 02:51:54 +02:00
fgenesis
3ed40e73d3 Minor refactor & add Lua funcs:
+ avatar_setShieldActive()
+ entity_isFillGrid()
* entity_setBoneLock() code made easier to read and not warn on no lock entity
+ entity_getMaxSpeedLerp()
+ entity_isEntityInside()
2013-04-24 04:51:26 +02:00