Skip to content

Commit

Permalink
Rename commands, update to latest TS++
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivDero committed Sep 18, 2024
1 parent 863e03e commit 5c41eaa
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 60 deletions.
88 changes: 44 additions & 44 deletions src/extensions/command/commandext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,27 +439,27 @@ bool ManualPlaceCommandClass::Process()
*
* @author: CCHyper (based on research by dkeeton)
*/
const char *JustBuiltBuildingCommandClass::Get_Name() const
const char *RepeatLastBuildingCommandClass::Get_Name() const
{
return "JustBuiltBuilding";
return "RepeatLastBuildingCommandClass";
}

const char *JustBuiltBuildingCommandClass::Get_UI_Name() const
const char *RepeatLastBuildingCommandClass::Get_UI_Name() const
{
return "Reproduce Last Building";
return "Repeat Last Building";
}

const char *JustBuiltBuildingCommandClass::Get_Category() const
const char *RepeatLastBuildingCommandClass::Get_Category() const
{
return Text_String(TXT_INTERFACE);
}

const char *JustBuiltBuildingCommandClass::Get_Description() const
const char *RepeatLastBuildingCommandClass::Get_Description() const
{
return "Reproduce the last structure that was built.";
return "Queue the last structure that was built.";
}

bool JustBuiltBuildingCommandClass::Process()
bool RepeatLastBuildingCommandClass::Process()
{
if (!PlayerPtr) {
return false;
Expand All @@ -470,7 +470,7 @@ bool JustBuiltBuildingCommandClass::Process()
* done to make sure the house still has a factory.
*/
if (!PlayerPtr->Factory_Count(RTTI_BUILDING)) {
DEV_DEBUG_WARNING("JustBuiltBuildingCommandClass - Unable to fetch primary factory!\n");
DEV_DEBUG_WARNING("RepeatLastBuildingCommandClass - Unable to fetch primary factory!\n");
return false;
}

Expand Down Expand Up @@ -501,9 +501,9 @@ bool JustBuiltBuildingCommandClass::Process()
return false;
}

DEBUG_INFO("JustBuiltBuildingCommandClass - \"%s\"\n", buildingtype->Full_Name());
DEBUG_INFO("RepeatLastBuildingCommandClass - \"%s\"\n", buildingtype->Full_Name());

OutList.Add(EventClass(PlayerPtr->ID, EventType::PRODUCE, RTTI_BUILDINGTYPE, building));
OutList.Add(EventClass(PlayerPtr->ID, EVENT_PRODUCE, RTTI_BUILDINGTYPE, building));

return true;
}
Expand All @@ -516,27 +516,27 @@ bool JustBuiltBuildingCommandClass::Process()
*
* @author: CCHyper (based on research by dkeeton)
*/
const char *JustBuiltInfantryCommandClass::Get_Name() const
const char *RepeatLastInfantryCommandClass::Get_Name() const
{
return "JustBuiltInfantry";
return "RepeatLastInfantry";
}

const char *JustBuiltInfantryCommandClass::Get_UI_Name() const
const char *RepeatLastInfantryCommandClass::Get_UI_Name() const
{
return "Reproduce Last Infantry";
return "Repeat Last Infantry";
}

const char *JustBuiltInfantryCommandClass::Get_Category() const
const char *RepeatLastInfantryCommandClass::Get_Category() const
{
return Text_String(TXT_INTERFACE);
}

const char *JustBuiltInfantryCommandClass::Get_Description() const
const char *RepeatLastInfantryCommandClass::Get_Description() const
{
return "Reproduce the last infantry that was built.";
return "Queue the last infantry that was built.";
}

bool JustBuiltInfantryCommandClass::Process()
bool RepeatLastInfantryCommandClass::Process()
{
if (!PlayerPtr) {
return false;
Expand All @@ -547,7 +547,7 @@ bool JustBuiltInfantryCommandClass::Process()
* done to make sure the house still has a factory.
*/
if (!PlayerPtr->Factory_Count(RTTI_INFANTRY)) {
DEV_DEBUG_WARNING("JustBuiltInfantryCommandClass - Unable to fetch primary factory!\n");
DEV_DEBUG_WARNING("RepeatLastInfantryCommandClass - Unable to fetch primary factory!\n");
return false;
}

Expand Down Expand Up @@ -578,9 +578,9 @@ bool JustBuiltInfantryCommandClass::Process()
return false;
}

DEBUG_INFO("JustBuiltInfantryCommandClass - \"%s\"\n", infantrytype->Full_Name());
DEBUG_INFO("RepeatLastInfantryCommandClass - \"%s\"\n", infantrytype->Full_Name());

OutList.Add(EventClass(PlayerPtr->ID, EventType::PRODUCE, RTTI_INFANTRYTYPE, infantry));
OutList.Add(EventClass(PlayerPtr->ID, EVENT_PRODUCE, RTTI_INFANTRYTYPE, infantry));

return true;
}
Expand All @@ -593,27 +593,27 @@ bool JustBuiltInfantryCommandClass::Process()
*
* @author: CCHyper (based on research by dkeeton)
*/
const char *JustBuiltUnitCommandClass::Get_Name() const
const char *RepeatLastUnitCommandClass::Get_Name() const
{
return "JustBuiltUnit";
return "RepeatLastUnit";
}

const char *JustBuiltUnitCommandClass::Get_UI_Name() const
const char *RepeatLastUnitCommandClass::Get_UI_Name() const
{
return "Reproduce Last Vehicle";
return "Repeat Last Vehicle";
}

const char *JustBuiltUnitCommandClass::Get_Category() const
const char *RepeatLastUnitCommandClass::Get_Category() const
{
return Text_String(TXT_INTERFACE);
}

const char *JustBuiltUnitCommandClass::Get_Description() const
const char *RepeatLastUnitCommandClass::Get_Description() const
{
return "Reproduce the last vehicle that was built.";
return "Queue the last vehicle that was built.";
}

bool JustBuiltUnitCommandClass::Process()
bool RepeatLastUnitCommandClass::Process()
{
if (!PlayerPtr) {
return false;
Expand All @@ -624,7 +624,7 @@ bool JustBuiltUnitCommandClass::Process()
* done to make sure the house still has a factory.
*/
if (!PlayerPtr->Factory_Count(RTTI_UNIT)) {
DEV_DEBUG_WARNING("JustBuiltUnitCommandClass - Unable to fetch primary factory!\n");
DEV_DEBUG_WARNING("RepeatLastUnitCommandClass - Unable to fetch primary factory!\n");
return false;
}

Expand Down Expand Up @@ -655,9 +655,9 @@ bool JustBuiltUnitCommandClass::Process()
return false;
}

DEBUG_INFO("JustBuiltUnitCommandClass - \"%s\"\n", unittype->Full_Name());
DEBUG_INFO("RepeatLastUnitCommandClass - \"%s\"\n", unittype->Full_Name());

OutList.Add(EventClass(PlayerPtr->ID, EventType::PRODUCE, RTTI_UNITTYPE, unit));
OutList.Add(EventClass(PlayerPtr->ID, EVENT_PRODUCE, RTTI_UNITTYPE, unit));

return true;
}
Expand All @@ -670,27 +670,27 @@ bool JustBuiltUnitCommandClass::Process()
*
* @author: CCHyper (based on research by dkeeton)
*/
const char *JustBuiltAircraftCommandClass::Get_Name() const
const char *RepeatLastAircraftCommandClass::Get_Name() const
{
return "JustBuiltAircraft";
return "RepeatLastAircraft";
}

const char *JustBuiltAircraftCommandClass::Get_UI_Name() const
const char *RepeatLastAircraftCommandClass::Get_UI_Name() const
{
return "Reproduce Last Aircraft";
return "Repeat Last Aircraft";
}

const char *JustBuiltAircraftCommandClass::Get_Category() const
const char *RepeatLastAircraftCommandClass::Get_Category() const
{
return Text_String(TXT_INTERFACE);
}

const char *JustBuiltAircraftCommandClass::Get_Description() const
const char *RepeatLastAircraftCommandClass::Get_Description() const
{
return "Reproduce the last aircraft that was built.";
return "Queue the last aircraft that was built.";
}

bool JustBuiltAircraftCommandClass::Process()
bool RepeatLastAircraftCommandClass::Process()
{
if (!PlayerPtr) {
return false;
Expand All @@ -701,7 +701,7 @@ bool JustBuiltAircraftCommandClass::Process()
* done to make sure the house still has a factory.
*/
if (!PlayerPtr->Factory_Count(RTTI_AIRCRAFT)) {
DEV_DEBUG_WARNING("JustBuiltAircraftCommand - Unable to fetch primary factory!\n");
DEV_DEBUG_WARNING("RepeatLastAircraftCommandClass - Unable to fetch primary factory!\n");
return false;
}

Expand Down Expand Up @@ -732,9 +732,9 @@ bool JustBuiltAircraftCommandClass::Process()
return false;
}

DEBUG_INFO("JustBuiltAircraftCommand - \"%s\"\n", aircrafttype->Full_Name());
DEBUG_INFO("RepeatLastAircraftCommandClass - \"%s\"\n", aircrafttype->Full_Name());

OutList.Add(EventClass(PlayerPtr->ID, EventType::PRODUCE, RTTI_AIRCRAFTTYPE, aircraft));
OutList.Add(EventClass(PlayerPtr->ID, EVENT_PRODUCE, RTTI_AIRCRAFTTYPE, aircraft));

return true;
}
Expand Down
24 changes: 12 additions & 12 deletions src/extensions/command/commandext.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ class ManualPlaceCommandClass : public ViniferaCommandClass
/**
* Reproduces the last structure that was built.
*/
class JustBuiltBuildingCommandClass : public ViniferaCommandClass
class RepeatLastBuildingCommandClass : public ViniferaCommandClass
{
public:
JustBuiltBuildingCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~JustBuiltBuildingCommandClass() {}
RepeatLastBuildingCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~RepeatLastBuildingCommandClass() {}

virtual const char *Get_Name() const override;
virtual const char *Get_UI_Name() const override;
Expand All @@ -123,11 +123,11 @@ class JustBuiltBuildingCommandClass : public ViniferaCommandClass
/**
* Reproduces the last infantry that was built.
*/
class JustBuiltInfantryCommandClass : public ViniferaCommandClass
class RepeatLastInfantryCommandClass : public ViniferaCommandClass
{
public:
JustBuiltInfantryCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~JustBuiltInfantryCommandClass() {}
RepeatLastInfantryCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~RepeatLastInfantryCommandClass() {}

virtual const char *Get_Name() const override;
virtual const char *Get_UI_Name() const override;
Expand All @@ -142,11 +142,11 @@ class JustBuiltInfantryCommandClass : public ViniferaCommandClass
/**
* Reproduces the last unit that was built.
*/
class JustBuiltUnitCommandClass : public ViniferaCommandClass
class RepeatLastUnitCommandClass : public ViniferaCommandClass
{
public:
JustBuiltUnitCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~JustBuiltUnitCommandClass() {}
RepeatLastUnitCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~RepeatLastUnitCommandClass() {}

virtual const char *Get_Name() const override;
virtual const char *Get_UI_Name() const override;
Expand All @@ -161,11 +161,11 @@ class JustBuiltUnitCommandClass : public ViniferaCommandClass
/**
* Reproduces the last aircraft that was built.
*/
class JustBuiltAircraftCommandClass : public ViniferaCommandClass
class RepeatLastAircraftCommandClass : public ViniferaCommandClass
{
public:
JustBuiltAircraftCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~JustBuiltAircraftCommandClass() {}
RepeatLastAircraftCommandClass() : ViniferaCommandClass() { IsDeveloper = false; }
virtual ~RepeatLastAircraftCommandClass() {}

virtual const char *Get_Name() const override;
virtual const char *Get_UI_Name() const override;
Expand Down
8 changes: 4 additions & 4 deletions src/extensions/command/commandext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,16 @@ void Init_Vinifera_Commands()
cmdptr = new ManualPlaceCommandClass;
Commands.Add(cmdptr);

cmdptr = new JustBuiltBuildingCommandClass;
cmdptr = new RepeatLastBuildingCommandClass;
Commands.Add(cmdptr);

cmdptr = new JustBuiltInfantryCommandClass;
cmdptr = new RepeatLastInfantryCommandClass;
Commands.Add(cmdptr);

cmdptr = new JustBuiltUnitCommandClass;
cmdptr = new RepeatLastUnitCommandClass;
Commands.Add(cmdptr);

cmdptr = new JustBuiltAircraftCommandClass;
cmdptr = new RepeatLastAircraftCommandClass;
Commands.Add(cmdptr);

cmdptr = new PrevThemeCommandClass;
Expand Down

0 comments on commit 5c41eaa

Please sign in to comment.