1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-27 23:35:51 +00:00
Commit graph

411 commits

Author SHA1 Message Date
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
fgenesis
035ad963f5 Add Lua func: avatar_isBlockSinging() 2013-04-23 00:57:13 +02:00
fgenesis
405045b3fb Do not collide shots with entity if shot->firer == entity.
This check was already done if entity was ET_ENEMY,
but it seems more correct to me to check this for all cases.
Hope this doesn't break anything.
2013-04-22 23:41:48 +02:00
fgenesis
0490afe7a2 Script interface additions:
+ entity_isDeathScene()
+ getNearestEntity()
+ entity_getDistanceToPoint()
Add color transition time parameter to fade(), fade2(), fade3()
2013-04-22 23:38:10 +02:00
fgenesis
cba3535487 Keep track of total number of GL render calls 2013-04-22 23:36:31 +02:00
fgenesis
65b1983c61 Make script="x" setting in songs.xml accept other values than boolean.
The value 2 is now used to indicate that both script and internal handler
should be called.
2013-04-22 02:42:53 +02:00
fgenesis
ad10db82ad Add Lua functions: isPaused(), isInGameMenu(), isInEditor() 2013-04-22 02:40:29 +02:00
fgenesis
f835f6c83c Allow nodes to catch revert action 2013-04-22 02:39:58 +02:00
fgenesis
d992e280cc Oops, forgot to save before push. 2013-04-22 01:18:40 +02:00
fgenesis
6182674618 Add createShockEffect() Lua function and rename castSong() to singSong().
castSong() existing in the global Lua namespace caused it to be removed
and stored as an interface function as soon as a script was loaded.
The function was apparently never used in the game or other mod scripts,
thus renaming it now should be safe.
2013-04-22 01:15:20 +02:00
fgenesis
4a3c1dc745 Allow node scripts to catch quick song 1-9 action 2013-04-22 01:08:36 +02:00
fgenesis
9f4a82509a Fix typo added in 17e0ec9d2e. 2013-04-21 20:24:14 +02:00
fgenesis
0c768a711d Cause less memory stress in InterpolatedVector assignment 2013-04-21 18:47:51 +02:00
fgenesis
25262144f3 Add Lua functions:
entity_setVel2()
entity_setVel2Len()
entity_getVel2Len()
node_isEffectOn()
2013-04-21 18:46:56 +02:00
fgenesis
4c0f298946 Add quad_getWidth(), quad_getWidth() Lua functions 2013-04-21 15:59:19 +02:00
fgenesis
17e0ec9d2e Remove hack that keeps setting avatar collide radius. 2013-04-21 15:58:52 +02:00
fgenesis
d6180e7134 Oops, compile fix for 1168eaf1d9 2013-04-15 03:40:08 +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
1168eaf1d9 Remove some dead code + fix clang warning. 2013-04-12 09:17:45 +02:00
fgenesis
b199e40efd forgot to register Lua func obj_getLife() and related 2013-03-14 16:33:37 +01:00
fgenesis
1217432561 allow arbitrary damage type IDs in shots instead of only "DT_*" string constants 2013-03-13 23:28:38 +01:00
fgenesis
0784d1b9df Shot Lua API update + related internal changes.
With this change, shots are no longer stored in a std::list.
In the current code, the global shot store may be modified while iterating,
this did not cause problems with the list implementation,
but would easily crash if a shot is removed while iterating.
To fix this, a 2nd vector stores shots to be deleted from the global store
and does so when no iteration is in progress and modifying the vector is
safe.

Added functions:

getFirstShot -- for iterating over all shots on the map
getNextShot
shot_setFirer
shot_setExtraDamage
shot_getExtraDamage
shot_getDamage
shot_getDamageType
shot_getName
2013-03-06 02:06:52 +01:00
fgenesis
eef2289fb2 allow mods to use treasure scripts + remove debug spam in entity_getID() 2013-03-01 01:14:59 +01:00
fgenesis
23e0707c5b Add Lua func entity_getSkeletalName() and do not abort when a skin file is not found. Also warn on missing skeletal file. 2013-02-27 01:54:38 +01:00
fgenesis
aa60f7cac2 Fix oversight in the Lua interface that would cause certain quad_*() functions not to be registered.
Really wonder why this never failed, and I just noticed this by accident...
2013-02-27 00:06:16 +01:00
fgenesis
ab6e92f256 Add EV_NOAVOID and bone_lookAtPosition() 2013-02-06 21:01:22 +01:00
fgenesis
4433237f3a Add more script functions + little fix in entity poisoning
shot_getEffectTime()
shot_isIgnoreShield()
shot_getFirer()
shot_setTarget()
shot_getTarget()
getLastCollideTileType()
collideCircleWithGrid()
entity_getMaxHealth()
entity_setPoison()
entity_getPoison()
OT_* constants
2013-02-04 15:16:57 +01:00
fgenesis
188469102b add 3 new Lua functions:
entity_getAnimationLoop()
entity_getAnimLayerTimeMult()
obj_getLayer()
2013-02-03 16:13:54 +01:00
fgenesis
76c31f8147 minor fixups (Entity::revive() and some skeletal stuff) 2013-02-03 16:13:07 +01:00
fgenesis
3dbc92b16e readme update 2013-02-03 16:12:19 +01:00
fgenesis
cbd3658b27 Fix *_setRenderPass() regression from 7ff0caaed8. Remove obj_setRealRenderPass() again.
This corrects render pass overriding, especially Li's arm, which was supposed
to be in front of the hug; and being eaten by a grouper, where Naija stayed
visible because the grouper skeletal's render pass was not set correctly.
2013-01-03 02:43:33 +01:00
fgenesis
8712657e75 vcproj update 2013-01-03 00:36:33 +01:00
fgenesis
32aca3b768 Move hair functions to Entity; add quad_setSegs() & obj_setRealRenderPass() 2013-01-03 00:36:24 +01:00
fgenesis
366838d800 little enhancement to scene editor: show more entity details 2012-12-23 22:43:46 +01:00
fgenesis
c358c98256 add some Lua constants 2012-12-23 22:42:34 +01:00
fgenesis
f9ce5c0172 Animation editor enhancement: Move/rotate bones across all keyframes 2012-12-23 22:32:19 +01:00
fgenesis
9eb5b9828a clean out some dead code and some old commented out code 2012-12-19 06:23:51 +01:00
fgenesis
b6ae2a6baa Fix problems intended to fix in (reverted) 8b67ece. 2012-12-15 23:08:59 +01:00
fgenesis
ad4bc9bd21 Revert "Changed a bunch of enums in Entity.h"
This reverts commit 8b67ece907.
2012-12-15 22:46:39 +01:00
fgenesis
0f13f08357 Remove unused stuff
- entity group IDs
- entity node groups (?!)
- WaterFont.[cpp|h]
2012-12-13 19:57:30 +01:00
fgenesis
8b67ece907 Changed a bunch of enums in Entity.h
This simplifies a few things. First, the values of DamageType are now continous,
with the benefit that they can now be stored in a std::bitset.
Second, this repairs entity_getNearestEntity(..., ET_AVATAR) or DT_ENEMY as param,
because these were 0, but the game expected -1 as universal value.
This way, any entity was returned when querying for ET_AVATAR or DT_ENEMY.
Now, 0 is the universal/NONE value, which should avoid mistakes like this.
2012-12-13 19:48:47 +01:00
fgenesis
b242d80c75 Some fixes (...)
- Get colliding hair segment
- drop AnimatedSprite & Interpolator classes
- repair entity_setAutoSkeletalUpdate()
- remove some old code
2012-12-13 18:45:07 +01:00
fgenesis
5d74665323 Faster mousewheel zoom for SceneEditor + reload songbank when reloading a map in the editor 2012-12-13 18:36:13 +01:00
fgenesis
1705b091aa Fix influenced particles not positioned correctly if SpawnLocal = 1 2012-12-13 18:33:58 +01:00
fgenesis
c5700f9c35 Little things to make the world map more user friendly:
- Map markers are now spawned on the player position, not above
- 66% alpha for world map icons, this way some of the stuff below the icon
  can be seen.
- Unified and increased zoom-in distance. This way the view no longer forcefully
  resets to another zoom level when selecting maps of different layers
  (i.e. first an interior map, then zoom in, then select a regular map),
  which was a little jarring. The increased zoom level is useful for
  close-ups on tiny areas like the sun temple.
2012-10-14 03:51:02 +02:00
fgenesis
416c47b4e9 Make world map reveal method configurable via user settings,
and add the possibility for mods to override this setting.
2012-10-14 03:46:47 +02:00
fgenesis
8cad58f0c4 Implement new (optional) world map reveal method.
This one doesn't give the whole map away already just after entering it.
2012-10-13 05:43:47 +02:00
fgenesis
6f05249fdc Fix crash in RenderObjectLayer::moveToBack() 2012-10-09 00:57:34 +02:00