Allow building multiple docks per station.
(cherry picked from commit 0110c4a35d383e0be2cbb53cbe9cbe6784abb3e9) # Conflicts: # src/station_cmd.cpp
This commit is contained in:

committed by
Jonathan G Rennison

parent
d486d58d86
commit
1d3cf59d8a
@@ -24,6 +24,7 @@
|
||||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "../station_base.h"
|
||||
#include "../dock_base.h"
|
||||
#include "../thread/thread.h"
|
||||
#include "../town.h"
|
||||
#include "../network/network.h"
|
||||
@@ -1344,6 +1345,7 @@ static size_t ReferenceToInt(const void *obj, SLRefType rt)
|
||||
case REF_STORAGE: return ((const PersistentStorage*)obj)->index + 1;
|
||||
case REF_LINK_GRAPH: return ((const LinkGraph*)obj)->index + 1;
|
||||
case REF_LINK_GRAPH_JOB: return ((const LinkGraphJob*)obj)->index + 1;
|
||||
case REF_DOCKS: return ((const Dock*)obj)->index + 1;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
}
|
||||
@@ -1409,6 +1411,10 @@ static void *IntToReference(size_t index, SLRefType rt)
|
||||
if (RoadStop::IsValidID(index)) return RoadStop::Get(index);
|
||||
SlErrorCorrupt("Referencing invalid RoadStop");
|
||||
|
||||
case REF_DOCKS:
|
||||
if (Dock::IsValidID(index)) return Dock::Get(index);
|
||||
SlErrorCorrupt("Referencing invalid Dock");
|
||||
|
||||
case REF_ENGINE_RENEWS:
|
||||
if (EngineRenew::IsValidID(index)) return EngineRenew::Get(index);
|
||||
SlErrorCorrupt("Referencing invalid EngineRenew");
|
||||
|
Reference in New Issue
Block a user