feat: Add placeholders for party management
This commit is contained in:
parent
7ca8761776
commit
e0c75977d0
7 changed files with 86 additions and 6 deletions
|
@ -293,6 +293,7 @@ set(GAME_HEADERS
|
|||
src/game/object/trigger.h
|
||||
src/game/object/waypoint.h
|
||||
src/game/objectselect.h
|
||||
src/game/party.h
|
||||
src/game/pathfinder.h
|
||||
src/game/player.h
|
||||
src/game/room.h
|
||||
|
@ -352,6 +353,7 @@ set(GAME_SOURCES
|
|||
src/game/object/trigger.cpp
|
||||
src/game/object/waypoint.cpp
|
||||
src/game/objectselect.cpp
|
||||
src/game/party.cpp
|
||||
src/game/pathfinder.cpp
|
||||
src/game/player.cpp
|
||||
src/game/room.cpp
|
||||
|
|
26
src/game/party.cpp
Normal file
26
src/game/party.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright © 2020 Vsevolod Kremianskii
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "party.h"
|
||||
|
||||
namespace reone {
|
||||
|
||||
namespace game {
|
||||
|
||||
} // namespace game
|
||||
|
||||
} // namespace reone
|
29
src/game/party.h
Normal file
29
src/game/party.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright © 2020 Vsevolod Kremianskii
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace reone {
|
||||
|
||||
namespace game {
|
||||
|
||||
class Party {
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
|
||||
} // namespace reone
|
|
@ -117,6 +117,14 @@ private:
|
|||
script::Variable actionCloseDoor(const std::vector<script::Variable> &args, script::ExecutionContext &ctx);
|
||||
|
||||
// END Actions
|
||||
|
||||
// Party
|
||||
|
||||
script::Variable isAvailableCreature(const std::vector<script::Variable> &args, script::ExecutionContext &ctx);
|
||||
script::Variable addAvailableNPCByTemplate(const std::vector<script::Variable> &args, script::ExecutionContext &ctx);
|
||||
script::Variable showPartySelectionGUI(const std::vector<script::Variable> &args, script::ExecutionContext &ctx);
|
||||
|
||||
// END Party
|
||||
};
|
||||
|
||||
#define Routines RoutineManager::instance()
|
||||
|
|
|
@ -338,6 +338,21 @@ Variable RoutineManager::actionCloseDoor(const vector<Variable> &args, Execution
|
|||
return Variable();
|
||||
}
|
||||
|
||||
Variable RoutineManager::isAvailableCreature(const vector<Variable> &args, ExecutionContext &ctx) {
|
||||
// TODO: implement routine
|
||||
return Variable(0);
|
||||
}
|
||||
|
||||
Variable RoutineManager::addAvailableNPCByTemplate(const vector<Variable> &args, ExecutionContext &ctx) {
|
||||
// TODO: implement routine
|
||||
return Variable(0);
|
||||
}
|
||||
|
||||
Variable RoutineManager::showPartySelectionGUI(const vector<Variable> &args, ExecutionContext &ctx) {
|
||||
// TODO: implement routine
|
||||
return Variable();
|
||||
}
|
||||
|
||||
} // namespace game
|
||||
|
||||
} // namespace reone
|
||||
|
|
|
@ -735,8 +735,8 @@ void RoutineManager::addKotorRoutines() {
|
|||
add("SetGlobalLocation", Void, { String, Location });
|
||||
add("AddAvailableNPCByObject", Int, { Int, Object });
|
||||
add("RemoveAvailableNPC", Int, { Int });
|
||||
add("IsAvailableCreature", Int, { Int });
|
||||
add("AddAvailableNPCByTemplate", Int, { Int, String });
|
||||
add("IsAvailableCreature", Int, { Int }, bind(&RoutineManager::isAvailableCreature, this, _1, _2));
|
||||
add("AddAvailableNPCByTemplate", Int, { Int, String }, bind(&RoutineManager::addAvailableNPCByTemplate, this, _1, _2));
|
||||
add("SpawnAvailableNPC", Object, { Int, Location });
|
||||
add("IsNPCPartyMember", Int, { Int });
|
||||
add("ActionBarkString", Void, { Int });
|
||||
|
@ -751,7 +751,7 @@ void RoutineManager::addKotorRoutines() {
|
|||
add("GetNPCSelectability", Int, { Int });
|
||||
add("ClearAllEffects", Void, { });
|
||||
add("GetLastConversation", String, { });
|
||||
add("ShowPartySelectionGUI", Void, { String, Int, Int });
|
||||
add("ShowPartySelectionGUI", Void, { String, Int, Int }, bind(&RoutineManager::showPartySelectionGUI, this, _1, _2));
|
||||
add("GetStandardFaction", Int, { Object });
|
||||
add("GivePlotXP", Void, { String, Int });
|
||||
add("GetMinOneHP", Int, { Object });
|
||||
|
|
|
@ -735,8 +735,8 @@ void RoutineManager::addTslRoutines() {
|
|||
add("SetGlobalLocation", Void, { String, Location });
|
||||
add("AddAvailableNPCByObject", Int, { Int, Object });
|
||||
add("RemoveAvailableNPC", Int, { Int });
|
||||
add("IsAvailableCreature", Int, { Int });
|
||||
add("AddAvailableNPCByTemplate", Int, { Int, String });
|
||||
add("IsAvailableCreature", Int, { Int }, bind(&RoutineManager::isAvailableCreature, this, _1, _2));
|
||||
add("AddAvailableNPCByTemplate", Int, { Int, String }, bind(&RoutineManager::addAvailableNPCByTemplate, this, _1, _2));
|
||||
add("SpawnAvailableNPC", Object, { Int, Location });
|
||||
add("IsNPCPartyMember", Int, { Int });
|
||||
add("ActionBarkString", Void, { Int });
|
||||
|
@ -751,7 +751,7 @@ void RoutineManager::addTslRoutines() {
|
|||
add("GetNPCSelectability", Int, { Int });
|
||||
add("ClearAllEffects", Void, { });
|
||||
add("GetLastConversation", String, { });
|
||||
add("ShowPartySelectionGUI", Void, { String, Int, Int, Int });
|
||||
add("ShowPartySelectionGUI", Void, { String, Int, Int, Int }, bind(&RoutineManager::showPartySelectionGUI, this, _1, _2));
|
||||
add("GetStandardFaction", Int, { Object });
|
||||
add("GivePlotXP", Void, { String, Int });
|
||||
add("GetMinOneHP", Int, { Object });
|
||||
|
|
Loading…
Reference in a new issue