-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Build Mode Test Scene #57
base: master
Are you sure you want to change the base?
Conversation
Changes: Build Mode Lot Camera 3D Build Cursor Catalog (early) Add Terrain Tools (with cheat) Add Foundation Tool Add Wall tool Add Floor tool Add Pond Tool Add Build Mode HUD Elements Refactor
…veling to respect elevations of floors beneath this one.
fixelevations.mp4Fixed bug mentioned in initial comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, thank you! I did notice some inconsistent naming though - some private variables start with uppercase, others don't, some have the _ prefix but others don't etc.
That could be cleaned up.
My apologies I will have that cleaned up in the next commit and respond back. Thanks! |
Sync Master Branch
This is the file that is used by the OBJM in order to map "save type"s to object guids so that their state can be loaded
…ller and basic room calculation
Changes: Build Mode Lot Camera 3D Build Cursor Catalog (early) Add Terrain Tools (with cheat) Add Foundation Tool Add Wall tool Add Floor tool Add Pond Tool Add Build Mode HUD Elements Refactor
…veling to respect elevations of floors beneath this one.
…ller and basic room calculation
Build Mode Test Scene
This pull request implements the features detailed below in service of a build mode test scene environment allowing basic construction.
Loading Lot Architecture
This scene is based on the pre-existing work of loading a lot from file, with the advantage of now being able to edit the
LotArchitecture
on the fly through using build tools.These changes are now in a new class called LotLoad.cs
LotLoad.cs allows for a lot to be loaded into the current scene as easily as:
Which will perform the behind the scenes tasks of:
ContentProvider
LotArchitecture
instance from the lot packageGameObjects
for that architecture instanceBuild Mode HUD
The Build Mode HUD has been implemented with a controller (LotBuildModeHUD.cs).
The Build Mode HUD currently has the ability to perform the following tasks:
Build Mode Server
Since all of the tools listed below make direct changes to the LotArchitecture instance supplied by
LotLoad
-- a build mode server has been added as a pipeline to modify the lot. The Build Mode Server has a constructor that takes the currentLotLoad
instance for modification.For clarity, each tool below has its relative function signature(s) on the
BuildModeServer
attached for reference.Wall Tool
walltool.mp4
This tool (mainly) uses the following functions:
This method creates walls by doing the following:
WallGraph
on the floor given (this also creates the layer ID)WallMap
WallLayer
with the wallpaper givenIt also uses functionality on the Build Mode Server such as:
(this is how foundations are made)
These functions utilize the same logic as above but in reverse.
Deleting walls can be done diagonally and also by Room as well (hold shift)
Invoke the delete function by holding Ctrl :)
Floor Tool
FLOORtool.mp4
This tool (mainly) uses the following functions:
This function will ensure the pattern is added to the
FloorMap
. You can also use this function for wallpaper as well.This function adds floors to the
FloorPatterns
on theLotArchitecture
.It will also do the following:
This is done using the original game's implementation, it will poll the elevation at the NE corner of the tile the cursor originates and levels the region of terrain under the floor you placed.
This function uses the
CreateFloors()
method, but sets theFloorPattern
to be empty.Foundation Tool
The foundation tool uses both of these functions above together.
It will do the following:
Terrain Tool
terraintool.mp4
The terrain tool has three sizes matching the original games. The sizes are found in the enum
TerrainBrushSizes
:It uses the following function:
This function supports the following: Raise, Lower, Water. In the future it can also support: Smooth and Terrain paint.
This function also supports the
constrainfloorelevation
cheat I added as well by using theIsFloorAt()
function.Note: This function will modify Elevation data for any floor provided, so walls, foundations, etc. can be modified.
The flatten lot function is also implemented, but should be revisited to remove all the stuff on the lot (there also is no confirmation message yet -- be careful)
Quick note on Cheats
Added the
SimpleProperty
, which can be used with theRegisterProperty
function in the Cheat System. I almost reimplemented the whole cheat system until I saw it already existed! Anyway, this can be used to create properties like CFE which are a simple toggle on/off.Final note
This is still proof of concept and help/feedback is welcome. If this pr is merged, I would highly recommend doing so to a dedicated branch as the features can be a little buggy right now.