mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-23 06:05:33 +00:00
exclude unused GameMode implementations, format Platform/Common/Tutorial
This commit is contained in:
@@ -4,37 +4,42 @@
|
||||
#include "../../Minecraft.World/Items/ItemInstance.h"
|
||||
#include "UseTileTask.h"
|
||||
|
||||
UseTileTask::UseTileTask(const int tileId, int x, int y, int z, Tutorial *tutorial, int descriptionId,
|
||||
bool enablePreCompletion, std::vector<TutorialConstraint *> *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders)
|
||||
: TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ),
|
||||
x( x ), y( y ), z( z ), tileId( tileId )
|
||||
{
|
||||
useLocation = true;
|
||||
UseTileTask::UseTileTask(const int tileId, int x, int y, int z,
|
||||
Tutorial* tutorial, int descriptionId,
|
||||
bool enablePreCompletion,
|
||||
std::vector<TutorialConstraint*>* inConstraints,
|
||||
bool bShowMinimumTime, bool bAllowFade,
|
||||
bool bTaskReminders)
|
||||
: TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints,
|
||||
bShowMinimumTime, bAllowFade, bTaskReminders),
|
||||
x(x),
|
||||
y(y),
|
||||
z(z),
|
||||
tileId(tileId) {
|
||||
useLocation = true;
|
||||
}
|
||||
|
||||
UseTileTask::UseTileTask(const int tileId, Tutorial *tutorial, int descriptionId,
|
||||
bool enablePreCompletion, std::vector<TutorialConstraint *> *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders)
|
||||
: TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ),
|
||||
tileId( tileId )
|
||||
{
|
||||
useLocation = false;
|
||||
UseTileTask::UseTileTask(const int tileId, Tutorial* tutorial,
|
||||
int descriptionId, bool enablePreCompletion,
|
||||
std::vector<TutorialConstraint*>* inConstraints,
|
||||
bool bShowMinimumTime, bool bAllowFade,
|
||||
bool bTaskReminders)
|
||||
: TutorialTask(tutorial, descriptionId, enablePreCompletion, inConstraints,
|
||||
bShowMinimumTime, bAllowFade, bTaskReminders),
|
||||
tileId(tileId) {
|
||||
useLocation = false;
|
||||
}
|
||||
|
||||
bool UseTileTask::isCompleted()
|
||||
{
|
||||
return bIsCompleted;
|
||||
}
|
||||
bool UseTileTask::isCompleted() { return bIsCompleted; }
|
||||
|
||||
void UseTileTask::useItemOn(Level *level, std::shared_ptr<ItemInstance> item, int x, int y, int z,bool bTestUseOnly)
|
||||
{
|
||||
if(bTestUseOnly) return;
|
||||
void UseTileTask::useItemOn(Level* level, std::shared_ptr<ItemInstance> item,
|
||||
int x, int y, int z, bool bTestUseOnly) {
|
||||
if (bTestUseOnly) return;
|
||||
|
||||
if( !enablePreCompletion && !bHasBeenActivated) return;
|
||||
if (!enablePreCompletion && !bHasBeenActivated) return;
|
||||
|
||||
if( !useLocation || ( x == this->x && y == this->y && z == this->z ) )
|
||||
{
|
||||
int t = level->getTile(x, y, z);
|
||||
if( t == tileId )
|
||||
bIsCompleted = true;
|
||||
}
|
||||
if (!useLocation || (x == this->x && y == this->y && z == this->z)) {
|
||||
int t = level->getTile(x, y, z);
|
||||
if (t == tileId) bIsCompleted = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user