-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
928 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
Assets/Scripts/OpenTS2/Content/DBPF/ObjectFunctionsAsset.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenTS2.Content.DBPF | ||
{ | ||
public struct ObjectFunction | ||
{ | ||
public ushort CheckTree; | ||
public ushort ActionTree; | ||
public static ObjectFunction Default => _default; | ||
private static ObjectFunction _default = new ObjectFunction(0, 0); | ||
|
||
public ObjectFunction(ushort actionTree, ushort checkTree) | ||
{ | ||
ActionTree = actionTree; | ||
CheckTree = checkTree; | ||
} | ||
} | ||
public class ObjectFunctionsAsset : AbstractAsset | ||
{ | ||
public string FileName; | ||
|
||
public enum FunctionNames | ||
{ | ||
Init, | ||
Main, | ||
Load, | ||
Cleanup, | ||
QueueSkipped, | ||
AllowIntersection, | ||
WallAdjacencyChanged, | ||
RoomChanged, | ||
DynamicMultiTileUpdate, | ||
Placement, | ||
Pickup, | ||
UserPlacement, | ||
UserPickup, | ||
LevelInfoRequest, | ||
ServingSurface, | ||
Portal, | ||
Gardening, | ||
WashHands, | ||
Prep, | ||
Cook, | ||
Surface, | ||
Dispose, | ||
Food, | ||
PickupFromSlot, | ||
WashDish, | ||
EatingSurface, | ||
Sit, | ||
Stand, | ||
Clean, | ||
Repair, | ||
UIEvent, | ||
Restock, | ||
WashClothes, | ||
StartLiveMode, | ||
StopLiveMode, | ||
LinkObjects, | ||
MessageHandler, | ||
PreRoute, | ||
PostRoute, | ||
GoalCheck, | ||
ReactionHandler, | ||
AlongRouteCallback, | ||
Awareness, | ||
Reset, | ||
LookAtTarget, | ||
WalkOver, | ||
UtilityStateChange, | ||
SetModelByType, | ||
GetModelType, | ||
Delete, | ||
UserDelete, | ||
JustMovedIn, | ||
PreventPlaceInSlot, | ||
GlobalAwareness, | ||
ObjectUpdatedByDesignMode | ||
} | ||
|
||
public ObjectFunction[] Functions; | ||
|
||
public bool HasFunction(FunctionNames function) | ||
{ | ||
if ((int)function >= Functions.Length) | ||
return false; | ||
return true; | ||
} | ||
|
||
public ObjectFunction GetFunction(FunctionNames function) | ||
{ | ||
if (!HasFunction(function)) | ||
return ObjectFunction.Default; | ||
return Functions[(int)function]; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/Scripts/OpenTS2/Content/DBPF/ObjectFunctionsAsset.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.