Skip to content

Commit

Permalink
add HasMineBuilt to lua
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnTW committed Sep 22, 2024
1 parent cb24574 commit 6448ef4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion M2TWEOP Code/M2TWEOP library/types/campaign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,7 @@ namespace campaignHelpers
@tfield getResourceValue getResourceValue
@tfield getResourceHasMine getResourceHasMine
@tfield getResourceImage getResourceImage
@tfield hasMineBuilt hasMineBuilt
@table tradeResource
*/
Expand Down Expand Up @@ -1669,7 +1670,7 @@ namespace campaignHelpers
*/
typeAll.tradeResource.set_function("getResourceValue", &resourceStruct::getResourceCost);
/***
Check if the resource has a mine.
Check if the resource can have a mine.
@function tradeResource:getResourceHasMine
@treturn int hasMine 0=no mine, 1=mine
@usage
Expand All @@ -1679,6 +1680,16 @@ namespace campaignHelpers
*/
typeAll.tradeResource.set_function("getResourceHasMine", &resourceStruct::getResourceHasMine);
/***
Check if the resource has a mine built.
@function tradeResource:hasMineBuilt
@treturn bool built
@usage
if tradeResource:hasMineBuilt() then
--do stuff
end
*/
typeAll.tradeResource.set_function("hasMineBuilt", &resourceStruct::hasMineBuilt);
/***
Get the resource's image (icon) relative path.
@function tradeResource:getResourceImage
@treturn string imagePath
Expand Down

0 comments on commit 6448ef4

Please sign in to comment.