Skip to content

Commit

Permalink
Two more TODOs gone
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Sep 13, 2024
1 parent 07e9d25 commit 4243c13
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 30 deletions.
3 changes: 3 additions & 0 deletions scripts/api/entity/shiptemplatebasedobject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function Entity:setTemplate(template_name)
crew.components.internal_repair_crew = {}
end
end
if comp.shields and template.__type ~= "station" then
comp.shields.frequency = irandom(0, 20)
end
return self
end
--- [DEPRECATED]
Expand Down
6 changes: 3 additions & 3 deletions src/script/enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ template<> struct Convert<ScanState::State> {
}
static ScanState::State fromLua(lua_State* L, int idx) {
string str = string(luaL_checkstring(L, idx)).lower();
if (str == "none")
if (str == "none" || str == "notscanned" || str == "not")
return ScanState::State::NotScanned;
else if (str == "fof")
else if (str == "fof" || str == "friendorfoeidentified")
return ScanState::State::FriendOrFoeIdentified;
else if (str == "simple")
else if (str == "simple" || str == "simplescan")
return ScanState::State::SimpleScan;
else if (str == "full" || str == "fullscan")
return ScanState::State::FullScan;
Expand Down
17 changes: 0 additions & 17 deletions src/spaceObjects/spaceObject.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
/*TODO
template<> void convert<ScanState::State>::param(lua_State* L, int& idx, ScanState::State& ss)
{
ss = ScanState::State::NotScanned;
if (!lua_isstring(L, idx))
return;
string str = string(luaL_checkstring(L, idx++)).lower();
if (str == "notscanned" || str == "not")
ss = ScanState::State::NotScanned;
else if (str == "friendorfoeidentified")
ss = ScanState::State::FriendOrFoeIdentified;
else if (str == "simple" || str == "simplescan")
ss = ScanState::State::SimpleScan;
else if (str == "full" || str == "fullscan")
ss = ScanState::State::FullScan;
}
*/
10 changes: 0 additions & 10 deletions src/spaceObjects/spaceship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
#include <SDL_assert.h>


/*TODO
SpaceShip::SpaceShip(string multiplayerClassName, float multiplayer_significant_range)
: ShipTemplateBasedObject(50, multiplayerClassName, multiplayer_significant_range)
{
auto shields = entity.getComponent<Shields>();
if (shields)
shields->frequency = irandom(0, BeamWeaponSys::max_frequency);
}
*/

/*TODO
void SpaceShip::draw3DTransparent()
{
Expand Down

0 comments on commit 4243c13

Please sign in to comment.