akarnokd / ThePlanetCrafterMods

BepInEx+Harmony mods for the Unity/Steam game The Planet Crafter
Apache License 2.0
46 stars 28 forks source link

Alias / Override in [(Cheat) Machines Deposit Into Remote Containers 1.0.0.22] is not working #83

Closed realhagie closed 5 months ago

realhagie commented 5 months ago

I tried adding Alias to different Ore and WaterBottle without success.


## Is the mod enabled?
# Setting type: Boolean
# Default value: true
Enabled = true

## Produce detailed logs? (chatty)
# Setting type: Boolean
# Default value: false
DebugMode = true

## A comma separated list of resourceId:aliasForId, for example, Iron:A,Cobalt:B,Uranim:C
# Setting type: String
# Default value: 
Aliases = Iron:A

I call one of my Storage A , just to be as easy as possible. No Ore is put in the Storage:


[Info   :(Cheat) Machines Deposit Into Remote Containers] GenerateAnObject start
[Info   :(Cheat) Machines Deposit Into Remote Containers]     begin ore search
[Info   :(Cheat) Machines Deposit Into Remote Containers]     ore: Iron
[Info   :(Cheat) Machines Deposit Into Remote Containers]     No suitable inventory found, ore ignored
[Info   :(Cheat) Machines Deposit Into Remote Containers] GenerateAnObject end

If I name the Storage *Iron it works

akarnokd commented 5 months ago

Thanks for the report. Indeed it doesn't seem to work with aliases.

I'll fix it shortly.

realhagie commented 5 months ago

btw would it be possible to put it into the Ore Drill storage if no suitable storage is found - or make this as option ?

akarnokd commented 5 months ago

Machines can't use their own inventory because they would seize up when that inventory gets full.

akarnokd commented 5 months ago

I reproduced your issue once but then it never happened again. Not sure why.

I've uploaded an update for a different issue and with additional logging. Could you please try that version and post the full log if it still doesn't work?

realhagie commented 5 months ago

tried it and it works !!

[Info   :(Cheat) Machines Deposit Into Remote Containers] GenerateAnObject start
[Info   :(Cheat) Machines Deposit Into Remote Containers]     begin ore search
[Info   :(Cheat) Machines Deposit Into Remote Containers]     ore: Iron
[Info   :(Cheat) Machines Deposit Into Remote Containers]     Ore Iron -> Alias a
[Info   :(Cheat) Machines Deposit Into Remote Containers]     Found Inventory: 32 "A"
[Info   :(Cheat) Machines Deposit Into Remote Containers] GenerateAnObject end

Thanks !

akarnokd commented 5 months ago

Nice.