@@ -121,7 +121,7 @@ public BotObject(Vector2 tileLocation, GameLocation location = null) : base(tile
121
121
}
122
122
123
123
private void PerformOtherPlayerAction ( ) {
124
- var farmer = Game1 . getFarmerMaybeOffline ( owner . Value ) ;
124
+ var farmer = Game1 . GetPlayer ( owner . Value ) ; // getFarmerMaybeOffline(owner.Value);
125
125
var name = farmer . Name ;
126
126
Game1 . addHUDMessage ( new HUDMessage ( $ "{ Name } belongs to { name } .", HUDMessage . error_type ) ) ;
127
127
}
@@ -233,9 +233,9 @@ public bool Harvest() {
233
233
ModEntry . instance . Monitor . Log ( "Harvesting: TerrainFeature" ) ;
234
234
235
235
var origPlayer = Game1 . player ;
236
- Game1 . player = farmer ;
236
+ // ToDo, something like: Game1.player = farmer;
237
237
bool result = feature . performUseAction ( tileLocation ) ;
238
- Game1 . player = origPlayer ;
238
+ // ToDo, something like: Game1.player = origPlayer;
239
239
return result ;
240
240
} else if ( loc . isObjectAtTile ( tileLocation . GetIntX ( ) , tileLocation . GetIntY ( ) ) ) {
241
241
ModEntry . instance . Monitor . Log ( "Harvesting: Tile" ) ;
@@ -388,7 +388,7 @@ public bool doBotHarvestFromObject(StardewValley.Object what) {
388
388
389
389
what . AttemptAutoLoad ( who ) ;
390
390
}
391
- MachineData ? machineData = what . GetMachineData ( ) ;
391
+ MachineData machineData = what . GetMachineData ( ) ;
392
392
if ( machineData != null && MachineDataUtility . TryGetMachineOutputRule ( what , machineData , MachineOutputTrigger . OutputCollected , what . getOne ( ) , null , what . Location , out MachineOutputRule outputCollectedRule , out _ , out _ , out _ ) )
393
393
what . OutputMachine ( machineData , outputCollectedRule , what . lastInputItem . Value , null , what . Location , false ) ;
394
394
return true ;
@@ -677,10 +677,10 @@ public void PickUpDebris(Farmtronics.Bot.BotFarmer farmer, GameTime gameTime) {
677
677
for ( int i = loc . debris . Count - 1 ; i >= 0 ; i -- ) {
678
678
Debris d = loc . debris [ i ] ;
679
679
680
- if ( d == null || string . IsNullOrEmpty ( d . itemId ) || d . timeSinceDoneBouncing <= 0 )
680
+ if ( d == null || string . IsNullOrEmpty ( d . itemId . Value ) || d . timeSinceDoneBouncing <= 0 )
681
681
continue ; // Skip null or invalid debris
682
682
683
- Item item = ItemRegistry . Create ( d . itemId , 1 , d . itemQuality ) ;
683
+ Item item = ItemRegistry . Create ( d . itemId . Value , 1 , d . itemQuality ) ;
684
684
685
685
if ( item == null || ! farmer . couldInventoryAcceptThisItem ( item ) )
686
686
continue ; // Skip if item is null or farmer can't accept it
0 commit comments