Skip to content

Commit d01bb7f

Browse files
committed
Format
Signed-off-by: Evangelos Lamprou <vagos@lamprou.xyz>
1 parent b7ffbe0 commit d01bb7f

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

include/Room.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef ROOM_HPP
22
#define ROOM_HPP
33

4-
#include "thing/Thing.hpp"
54
#include "thing/Networked.hpp"
5+
#include "thing/Thing.hpp"
66
#include <algorithm>
77
#include <cstdint>
88
#include <filesystem>
@@ -17,12 +17,11 @@ class Player;
1717
class RoomInspectable;
1818

1919
// TODO: Implement this so rooms are saved to DB
20-
class RoomNetworked : Networked
20+
class RoomNetworked : Networked
2121
{
2222
public:
2323
void doDatabaseLoad(std::shared_ptr<Thing> owner) override;
2424
const std::string doDatabaseSave(std::shared_ptr<Thing> owner) override;
25-
2625
};
2726

2827
class Room : public Thing

include/script/ScriptedNetworked.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ class ScriptedNetworked : public Networked
2828
const auto& L = ScriptedThing::L;
2929

3030
lua_getglobal(L, owner->name.c_str());
31-
3231
lua_getfield(L, -1, "doDatabaseSave");
33-
3432
if (!lua_isfunction(L, -1))
3533
return "";
36-
3734
lua_pushlightuserdata(L, owner.get());
3835

3936
CheckLua(L, lua_pcall(L, 1, 1, 0));
40-
4137
assert(lua_isstring(L, -1));
4238

4339
return std::string(lua_tostring(L, -1));

src/Room.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ const std::string Room::onInspect(std::shared_ptr<Thing> owner, std::shared_ptr<
9999
"Other things here:");
100100
}
101101

102-
inspect << "\n\n" << "(" << x << ", " << y << ")\n\n";
102+
inspect << "\n\n"
103+
<< "(" << x << ", " << y << ")\n\n";
103104

104105
return inspect.str();
105106
}

src/player/PlayerPhysical.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void PlayerPhysical::doMove(std::shared_ptr<Thing> owner, int x, int y)
188188
{
189189
if (current_room)
190190
current_room->removePlayer(owner);
191-
191+
192192
Log("Moving player " << owner->name << " to room " << x << " " << y);
193193
current_room = Room::get(x, y);
194194
current_room->addPlayer(owner);

src/thing/Attackable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void Attackable::onDeath(const std::shared_ptr<Thing>& owner)
4141
// Drop items on death.
4242
for (auto& item : owner->physical()->inventory)
4343
{
44-
owner->physical()->current_room->addThing(item);
44+
owner->physical()->current_room->addThing(item);
4545
}
4646

4747
// owner -> physical -> current_room -> removeThing( owner );

0 commit comments

Comments
 (0)