} // Empty constructor required for deserialization public PacketToolAction(VoxelActionEnum type, long charEntId, float scale, Vector3D origin) { ActionType = type; CharEntId = charEntId; Scale = scale; Origin = origin; }
} // Empty constructor required for deserialization public PacketVoxelAction(VoxelActionEnum actionType, long voxelEntId, float scale, Vector3D origin, Quaternion orientation, long charEntId) { ActionType = actionType; VoxelEntId = voxelEntId; Scale = scale; Origin = origin; Orientation = orientation; CharEntId = charEntId; }
public static MyFixedPoint GetAmmoUsage(VoxelActionEnum type, float scale) { switch (type) { case VoxelActionEnum.ADD_VOXEL: return((MyFixedPoint)Math.Ceiling(ConcreteToolMod.CONCRETE_PLACE_USE * (scale * scale * scale))); case VoxelActionEnum.PAINT_VOXEL: return((MyFixedPoint)Math.Ceiling(ConcreteToolMod.CONCRETE_PAINT_USE * (scale * scale * scale))); default: return(0); } }