Collision Class (#1579)

* First Commit

* Make ScriptCollision class

* Fix typo

* Return correct types

* Use NO_HEIGHT

* Implement GetSurfaceMaterial

* Add enums

* Added death, climbable wall, monkeybar

* FIx angle

* Revise things

* Make "Collision" script module; add IsOutOfBounds() method

* Rename IsOutOfBounds()

* Allow getting floor or ceiling material type

* Don't need IsWall()

* Update Collision.cpp

* Restore IsWall()

* Rename class to "Probe"; start docs; make steepness inquirers return an optional

* Update Probe.cpp

* Update class name in doc

* Update Probe.cpp

* add GetRoomName

* UpdateEnums

* Update MaterialType enum; make room name getting more local

* Revise constructors; update doc

* Update Probe.cpp

* Generate html docs

* Slightly clearer doc comments

* Convert spaces to tabs

* Update Probe.cpp

* Update Probe.cpp

* Rename parameters

* Update Probe.cpp

* ScriptProbe -> Probe

* ExposeGetRoom

* Register Collision.MaterialType table; Enable ClimbWall again.

* Cleanup

* Docs revision

* Update CHANGELOG.md

* Moved names to script reserved names

* Fixed incorrect namespace for probe

* Use consistent names; cleanup

* Make argument optional; fix doc

* Update Probe.cpp

* Add missing includes

* Add Preview() method; update docs

* Add constant

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
This commit is contained in:
TrainWrack 2025-03-05 03:13:48 -05:00 committed by GitHub
parent d3d885e78f
commit d19d56acee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1563 additions and 4 deletions

View file

@ -2,6 +2,7 @@
#include "Scripting/Include/ScriptInterfaceState.h"
#include "Scripting/Internal/ReservedScriptNames.h"
#include "Scripting/Internal/TEN/Collision/Probe.h"
#include "Scripting/Internal/TEN/Effects/EffectsFunctions.h"
#include "Scripting/Internal/TEN/Flow/FlowHandler.h"
#include "Scripting/Internal/TEN/Input/InputHandler.h"
@ -55,6 +56,7 @@ void ScriptInterfaceState::Init(const std::string& assetsDir)
// Misc. handlers not assigned above.
TEN::Scripting::InventoryHandler::Register(&SolState, RootTable);
TEN::Scripting::Collision::Register(&SolState, RootTable);
TEN::Scripting::Effects::Register(&SolState, RootTable);
TEN::Scripting::Input::Register(&SolState, RootTable);
TEN::Scripting::Sound::Register(&SolState, RootTable);