Commit Graph

11 Commits

Author SHA1 Message Date
David Markowitz
731b828c12
properties: fix visiting multiple owned by same person (#1325) 2023-12-01 10:13:01 -06:00
David Markowitz
ae349d6b15
feat: Add isolated and simplified path to add components (#1204)
* Components: Make ComponentType inline

Prevents the next commits ODR violation

* Components: Add new components

* Entity: Add headers

inline script component ComponentType

* Components: Flip constructor argument order

Entity comes first always

* Entity: Add generic AddComponent

Allows for much easier adding of components and is error proof by not allowing the user to add more than 1 of a specific component type to an Entity.

* Entity: Migrate all component constructors

Move all to the new variadic templates AddComponent function to reduce clutter and ways the component map is modified.
The new function makes no assumptions.  Component is assumed to not exist and is checked for with operator[].  This will construct a null component which will then be newed if the component didnt exist, or it will just get the current component if it does already exist.  No new component will be allocated or constructed if the component already exists and the already existing pointer is returned instead.

* Entity: Add placement new

For the case where the component may already exist, use a placement new to construct the component again, it would be constructed again, but would not need to go through the allocator.

* Entity: Add comments on likely new code

* Tests: Fix tests

* Update Entity.cpp

* Update SGCannon.cpp

* Entity: call destructor when re-constructing

* Update Entity.cpp

Update Entity.cpp

---------

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-10-22 20:08:49 -05:00
Aaron Kimbrell
e524b86e12
breakout the component types into a scoped enum (#1002)
* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
2023-03-04 01:16:37 -06:00
Aaron Kimbre
72477e01e2 convert to unix line endings 2022-08-05 22:01:59 -05:00
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05:00
EmosewaMC
1e514a8b61 more specific logging 2022-04-09 18:48:13 -07:00
EmosewaMC
0561f60031 Added negative checks 2022-03-30 21:58:59 -07:00
EmosewaMC
04852ac1d9 Removed const 2022-03-30 16:13:21 -07:00
EmosewaMC
17e9fb0d3c Default time is now the current time rather than 0 2022-03-30 00:20:04 -07:00
EmosewaMC
e244fbccc2 General updates to the property manager
clone id is correctly assigned, reputation now shows up, rejection verdict is sent correctly (not sure about where the reason goes if  it even goes here).
2022-03-29 23:49:04 -07:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00