@@ -259,17 +259,17 @@ func (cache *FleetCache) PeaceDeal() (){
259259 cache .SetLocationToPlanet (cache .GetOwner ().GetPlanet ())
260260}
261261
262- func (cache * FleetCache ) BuildInitiateReadiness (structure * types.Struct , structType * types. StructType , ambit types.Ambit , ambitSlot uint64 ) (error ) {
262+ func (cache * FleetCache ) BuildInitiateReadiness (structure * types.Struct , structType * StructTypeCache , ambit types.Ambit , ambitSlot uint64 ) (error ) {
263263 if structure .GetOwner () != cache .GetOwnerId () {
264- return types .NewStructOwnershipError (structure .Id , cache .GetOwnerId (), structure .GetOwner ()).WithLocation ("fleet" , cache .GetFleetId ())
264+ return types .NewStructOwnershipError (structure .GetStructId () , cache .GetOwnerId (), structure .GetOwner ()).WithLocation ("fleet" , cache .GetFleetId ())
265265 }
266266
267267 if cache .IsAway () {
268268 return types .NewFleetStateError (cache .GetFleetId (), "away" , "build" )
269269 }
270270
271271
272- if structType .Type != types .CommandStruct {
272+ if structType .GetStructType (). Type != types .CommandStruct {
273273 if ! cache .HasCommandStruct () {
274274 return types .NewFleetCommandError (cache .GetFleetId (), "no_command_struct" )
275275 }
@@ -279,7 +279,7 @@ func (cache *FleetCache) BuildInitiateReadiness(structure *types.Struct, structT
279279 }
280280 }
281281
282- if (structType .Category != types .ObjectType_fleet ) {
282+ if (structType .GetStructType (). Category != types .ObjectType_fleet ) {
283283 return types .NewStructLocationError (structType .GetId (), ambit .String (), "outside_planet" )
284284 }
285285
@@ -288,7 +288,7 @@ func (cache *FleetCache) BuildInitiateReadiness(structure *types.Struct, structT
288288 return types .NewStructLocationError (structType .GetId (), ambit .String (), "invalid_ambit" )
289289 }
290290
291- if structType .Type == types .CommandStruct {
291+ if structType .GetStructType (). Type == types .CommandStruct {
292292 if cache .HasCommandStruct () {
293293 return types .NewStructBuildError (structType .GetId (), "fleet" , cache .GetFleetId (), "command_exists" )
294294 }
0 commit comments