예제 #1
0
 public static MachineUpsert Create(LocationDescriptor location, SVObject machine, MachineState state)
 {
     Entity.SObject?heldObject = null;
     if (machine.TryGetAnyHeldObject(out var machineHeldObject))
     {
         heldObject = Entity.SObject.Create(machineHeldObject);
     }
     return(new(
                location,
                new IntPoint((int)machine.TileLocation.X, (int)machine.TileLocation.Y),
                Entity.SObject.Create(machine),
                heldObject,
                machine.readyForHarvest.Value,
                machine.MinutesUntilReady,
                state
                ));
 }
예제 #2
0
 public MachineUpsert(
     LocationDescriptor location,
     IntPoint tileLocation,
     Entity.SObject machine,
     Entity.SObject?heldObject,
     bool readyForHarvest,
     int minutesUntilReady,
     MachineState state
     )
 {
     this.Location          = location;
     this.TileLocation      = tileLocation;
     this.Machine           = machine;
     this.HeldObject        = heldObject;
     this.ReadyForHarvest   = readyForHarvest;
     this.MinutesUntilReady = minutesUntilReady;
     this.State             = state;
 }