Commit graph

215 commits

Author SHA1 Message Date
dd2680abd5
Set the grid scale as well when changing the scale 2021-05-13 01:41:52 +02:00
4807c12387
Fix placing blocks
Most of the removed initialitzers are actually important
Also, the prefab ID was not calculated correctly
Also, the category is 1, not sure why but it is
2021-05-13 00:13:31 +02:00
3432a1ae33
Return block objects based on the group, not a type param
Replaced typeToGroup with GroupToConstructor
The block object's type is determined by the exclusive group instead of a type parameter
Removed the Specialise() method, the API should always return specialised objects

This fixes the not supported exception but not the game crash that follows
2021-05-12 02:33:01 +02:00
7a53e1d32f
Fix command registration 2021-05-12 01:34:40 +02:00
aa12b848d0
Merge branch 'feature-ecs_object_base' 2021-05-12 00:51:56 +02:00
b6b9a29a3c
Convert more things to use EcsObjectBase
Though the major benefit is only for blocks right now (using initializers)
2021-05-12 00:49:01 +02:00
6fedf90380
Remove struct layout stuff
It broke everything using the type
2021-05-12 00:25:07 +02:00
3eef859095
Update gen_csproj script and references 2021-05-11 22:56:36 +02:00
858a5c9b5c
Fix remaining errors, add support for managed entity DB 2021-05-11 00:56:46 +02:00
d238c97906
Remove block info getters and setters
Regex is great

GetBlockInfo\(this, \((\w+) (\w+)\) ?=> ?\2(.+)\);
GetBlockInfo<$1>(this)$3;

SetBlockInfo\(this, \(ref (\w+) (\w+), \w+ (\w+)\) ?=> \2(.*) = \3,\s*value\);
GetBlockInfo<$1>(this)$4 = value;
2021-05-10 23:08:15 +02:00
61184145a9
Start using new extension methods, code cleanup
Removed all of the different block property getter methods
2021-05-10 22:45:07 +02:00
2d99d1d478
Generalize optional references and init data
Added extension methods to query data from ECS objects
Added base class for ECS objects
Added support for representing in-construction ECS objects with an OptionalRef<T>
2021-05-10 02:04:59 +02:00
78ee3b3bcd
Fix block type check on placement 2021-05-10 01:38:15 +02:00
aea3ef3623
Remove AsyncUtils, fix FlyCam and GetThingLookedAt() 2021-05-03 01:25:26 +02:00
62afd3b780
Some file renames that were missing 2021-05-03 00:17:49 +02:00
5172b13b7c
Update readme and version 2021-05-02 02:08:22 +02:00
c914b5b393
Renamed all references of Gamecraft to Techblox
Except those that actually refer to the game's code
2021-05-02 01:56:20 +02:00
a6f52070ee
Rename to TechbloxModdingAPI 2021-05-02 01:08:25 +02:00
807470e289
Add new block types and improve listing them
Now it prints them ordered and mostly suitable to be used in code (it only needs a couple replaces)
2021-05-01 00:38:27 +02:00
df6a2e84e1
Update to Techblox 2021.04.29.18.37 2021-04-30 22:36:54 +02:00
6e03847ab0
FlyCam additions, improve struct
Added property to get the camera from the player
Removed pointer magic
2021-04-27 01:52:54 +02:00
55b38f1678
Start working on FlyCam and create an overcomplicated struct
Just some native code that's totally unnecessary
2021-04-26 03:12:22 +02:00
eb7a09ed22
Fixes, move command patch out of the test class
Removed some command line engines that shouldn't be registered
Fixed registering custom commands - registering it with the existing ones
2021-04-25 02:07:31 +02:00
6a2459b3e7
Attempts to bring console commands back (test) 2021-04-24 03:41:37 +02:00
cc4850a073
Fix fake input 2021-04-20 01:23:39 +02:00
677c8b0907
Add constructor for placing block, remove most PlaceNew args 2021-04-19 19:32:14 +02:00
1f688195af
Add support for flipped blocks and auto-wiring, other fixes 2021-04-19 03:13:00 +02:00
9a4ff858f3
Improve color API and add material API 2021-04-16 01:40:30 +02:00
124ef410c7
Attempt to bring console back and update block ID list 2021-04-13 02:05:16 +02:00
98e00de642
Fix all startup errors 2021-04-12 17:37:51 +02:00
2d41026a05
Turned the rest of the errors into TODOs 2021-04-11 02:36:00 +02:00
a6b69d94c9
Start compatibility with Techblox
Added some TODOs as well
2021-04-10 02:02:47 +02:00
NGnius (Graham)
37e3c6f718 Remove debug FMOD patches 2020-12-28 13:47:08 -05:00
NGnius (Graham)
0ef875b6b2 Document undocumented IMGUI element classes 2020-12-27 18:57:23 -05:00
d954060a5a Add ability to change properties of existing blocks
And not storing custom block data for now
2020-12-27 21:13:49 +01:00
fdc47832f4 Store custom block IDs in save files 2020-12-26 01:59:06 +01:00
NGnius (Graham)
95574a50f8 Merge branch 'master' of https://git.exmods.org/modtainers/GamecraftModdingAPI 2020-12-21 16:57:32 -05:00
NGnius (Graham)
1c014e36ac Add IMGUI styling and initial OOP implementation 2020-12-21 16:31:57 -05:00
879901f4b9 Add new block IDs, a property, 2 tests and fixes 2020-12-20 00:05:02 +01:00
6a90739197 Attempt to use custom cube category 2020-12-19 21:43:49 +01:00
9c5c980c0b Merge pull request 'Add custom block support to the API and update to latest GC version' (#6) from customblocks into master 2020-12-17 21:21:18 +00:00
712ece86db Add custom block registration functionality and a test 2020-12-17 20:20:46 +01:00
a7f6a16231 Update to Gamecraft 2020.12.16.14.19 and custom block stuff
- Fixed the crash on second time start
- Tweaked more stuff about the block

Breaking changes coming from FMOD 2.0:
- Audio[int index] changed to Audio[PARAMETER_ID index]
- Audio.Parameters removed
2020-12-17 02:34:36 +01:00
4e16f251ee Don't use the intended method to create a CubeListData
It adds it with its ID as key but the ID hasn't been set at that point
It works until the second simulation start now
2020-12-13 20:21:46 +01:00
78f0ea0162 Use the intended method to create a CubeListData
The block can be selected but not placed
2020-12-12 23:08:56 +01:00
5dfb01ef0b Use the console block's material again - IT WORKS
It shows up in the inventory but crashes when selected
2020-12-12 16:59:52 +01:00
432d6bcf96 Use the same (physics) componentts and attempt to use custom material 2020-12-12 02:28:42 +01:00
NGnius (Graham)
be7d8ba33a Merge branch 'master' of https://git.exmods.org/modtainers/GamecraftModdingAPI 2020-12-11 12:16:15 -05:00
56a64daa18 Merge branch 'master' into customblocks
# Conflicts:
#	GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs
2020-12-11 17:16:05 +01:00
ab1ae51ece Update to Gamecraft 2020.11.30.16.02 2020-12-11 17:11:24 +01:00