12 public static string fName =
"SubsystemBucketBlockBehavior";
45 int newBucketValue = 0;
54 if (newBucketValue == 0) {
58 if (currentCount > 1) {
61 if (acquireSlot >= 0) {
98 if (currentCount > 1) {
101 if (acquireSlot < 0) {
110 && componentUdder !=
null
111 && componentUdder.
Milk(componentMiner)) {
119 if (componentUdder !=
null
120 && componentUdder.
Milk(componentMiner)) {
135 if (terrainRaycastResult.HasValue) {
137 if (currentCount > 1) {
168 case 245:
return true;
170 case 252:
return true;
174 if (terrainRaycastResult3.HasValue) {
176 int cellValue2 =
SubsystemTerrain.Terrain.GetCellValue(cellFace2.
X, cellFace2.
Y, cellFace2.
Z);
181 Vector3 position = terrainRaycastResult3.
Value.HitPoint();
185 if (value6 != cellValue2) {
208 base.Load(valuesDictionary);
static int GetBlockIndex(string BlockName, bool throwIfNotFound=false)
通过方块名称来获取方块的Index
ComponentBody ComponentBody
virtual void DisplaySmallMessage(string text, Color color, bool blinking, bool playNotificationSound)
static int FindAcquireSlotForItem(IInventory inventory, int value)
ComponentPlayer ComponentPlayer
ComponentCreature ComponentCreature
bool Place(TerrainRaycastResult raycastResult)
virtual object Raycast(Ray3 ray, RaycastMode mode, bool raycastTerrain=true, bool raycastBodies=true, bool raycastMovingBlocks=true, float? Reach=null)
发出射线检测,检测玩家点击到的目标
virtual void DamageActiveTool(int damageCount)
ComponentGui ComponentGui
virtual bool Milk(ComponentMiner milker)
static int GetLevel(int data)
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
static int GetColor(int data)
SubsystemTerrain SubsystemTerrain
override int[] HandledBlocks
int m_magmaBucketBlockIndex
int m_waterBucketBlockIndex
int m_emptyBucketBlockIndex
override bool OnUse(Ray3 ray, ComponentMiner componentMiner)
override void Load(ValuesDictionary valuesDictionary)
int m_milkBucketBlockIndex
SubsystemAudio m_subsystemAudio
SubsystemParticles m_subsystemParticles
Color GetColor(int index)
static int ExtractContents(int value)
static int MakeBlockValue(int contents)
static int ExtractData(int value)
Component FindComponent(Type type, string name, bool throwOnError)
ValuesDictionary ValuesDictionary
int RemoveSlotItems(int slotIndex, int count)
实际移除的数量
int GetSlotCount(int slotIndex)
void AddSlotItems(int slotIndex, int value, int count)
static Vector3 FaceToVector3(int face)