Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyCommandCenter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Starcraft AI Course
PyCommandCenter
Commits
3893c70c
Commit
3893c70c
authored
5 years ago
by
Ludvig Fors
Browse files
Options
Downloads
Patches
Plain Diff
Changed tabs to 4 spaces. Added documentation in docs/ for IDAbot.send_chat
parent
054598a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Added chat functionallity making the bot able to send messages to the game...
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/idabot.rst
+4
-0
4 additions, 0 deletions
docs/idabot.rst
python-api-src/library.cpp
+1
-1
1 addition, 1 deletion
python-api-src/library.cpp
src/IDABot.cpp
+1
-1
1 addition, 1 deletion
src/IDABot.cpp
src/IDABot.h
+1
-1
1 addition, 1 deletion
src/IDABot.h
with
7 additions
and
3 deletions
docs/idabot.rst
+
4
−
0
View file @
3893c70c
...
...
@@ -55,6 +55,10 @@ IDABot
Returns the players race, useful if you play Race.Random
.. method:: IDABot.send_chat(self, message)
Sends the string 'message' to the game chat
Attributes:
.. autoattribute:: minerals
...
...
This diff is collapsed.
Click to expand it.
python-api-src/library.cpp
+
1
−
1
View file @
3893c70c
...
...
@@ -74,7 +74,7 @@ PYBIND11_MODULE(library, m)
.
def
(
py
::
init
())
.
def
(
"on_game_start"
,
&
IDABot
::
OnGameStart
)
.
def
(
"on_step"
,
&
IDABot
::
OnStep
)
.
def
(
"send_chat"
,
&
IDABot
::
SendChat
,
"Send a message to the game chat"
,
"message"
_a
)
.
def
(
"send_chat"
,
&
IDABot
::
SendChat
,
"Send a message to the game chat"
,
"message"
_a
)
.
def
(
"get_all_units"
,
&
IDABot
::
GetAllUnits
,
"Returns a list of all units"
)
.
def
(
"get_my_units"
,
&
IDABot
::
GetMyUnits
,
"Returns a list of all units beloning to the player"
)
.
def
(
"get_player_race"
,
&
IDABot
::
GetPlayerRace
)
...
...
This diff is collapsed.
Click to expand it.
src/IDABot.cpp
+
1
−
1
View file @
3893c70c
...
...
@@ -202,7 +202,7 @@ BuildingPlacer & IDABot::GetBuildingPlacer()
void
IDABot
::
SendChat
(
const
std
::
string
&
message
)
{
Actions
()
->
SendChat
(
message
);
Actions
()
->
SendChat
(
message
);
}
const
TypeData
&
IDABot
::
Data
(
const
UnitType
&
type
)
const
...
...
This diff is collapsed.
Click to expand it.
src/IDABot.h
+
1
−
1
View file @
3893c70c
...
...
@@ -46,7 +46,7 @@ public:
CCPosition
GetStartLocation
()
const
;
BuildingPlacer
&
GetBuildingPlacer
();
void
SendChat
(
const
std
::
string
&
message
);
void
SendChat
(
const
std
::
string
&
message
);
int
GetCurrentFrame
()
const
;
int
GetMinerals
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment