match prior case convention for swap and trash slots
This commit is contained in:
parent
7eb1cd8dd9
commit
8aeed2baa8
@ -12,17 +12,17 @@ LuaValue LuaConverter<InventorySlot>::from(LuaEngine& engine, InventorySlot k) {
|
|||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
else if (k.is<SwapSlot>())
|
else if (k.is<SwapSlot>())
|
||||||
return engine.createString("Swap");
|
return engine.createString("swap");
|
||||||
else if (k.is<TrashSlot>())
|
else if (k.is<TrashSlot>())
|
||||||
return engine.createString("Trash");
|
return engine.createString("trash");
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const& v) {
|
Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const& v) {
|
||||||
if (auto str = v.ptr<LuaString>()) {
|
if (auto str = v.ptr<LuaString>()) {
|
||||||
auto string = str->toString();
|
auto string = str->toString();
|
||||||
if (string.equalsIgnoreCase("Swap"))
|
if (string.equalsIgnoreCase("swap"))
|
||||||
return SwapSlot();
|
return SwapSlot();
|
||||||
else if (string.equalsIgnoreCase("Trash"))
|
else if (string.equalsIgnoreCase("trash"))
|
||||||
return TrashSlot();
|
return TrashSlot();
|
||||||
else if (auto equipment = EquipmentSlotNames.leftPtr(str->toString()))
|
else if (auto equipment = EquipmentSlotNames.leftPtr(str->toString()))
|
||||||
return *equipment;
|
return *equipment;
|
||||||
|
Loading…
Reference in New Issue
Block a user