Jump to content

Thimble Reed inverted water requirement


Vilda
  • Known Issue

Thimble Reed has no problem growing without water but when sufficiently submerged it actually states it is Beached.

20170319181416_1.jpg

20170319181433_1.jpg


Steps to Reproduce
Plant some Reed



User Feedback


this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", false); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", true); });

Looking over it some more that is correct. true is for being safe.

It's SubmersionMonitor expects more than 20% of water.
It sends the DryingOut if it fails and EnteredWetArea if true.

Haven't found where it's flipped yet.
 

Edited by Risu

Share this comment


Link to comment
Share on other sites

I can understand it would not be okay with too much water, but presenting it as Beached - "This plant must be submerged in liquid to grow" -is not right :)

Share this comment


Link to comment
Share on other sites

I guess it should be:

this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", true); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", false); });

Share this comment


Link to comment
Share on other sites

Looking further into it, I think it might be the checking for water that might be bugged.
A lot of cell looping and adding of positions. Doesn't explain why it's fine with being nowhere near water.
 

Share this comment


Link to comment
Share on other sites

Ummmmm. Vilda did you happen to save and reload?

It actually ignores the current position of the plant and uses only the partitionerEntry field,
which is only set when it moves (spawns). This field isn't serialized so it goes poof on reload.
 

Edited by Risu

Share this comment


Link to comment
Share on other sites

Hmm, when exactly? I think there was a crash between planting and drowning it, but one reload after that kept them Beached.

Changing the state it got seems to be wonky in general, generator is fine with standing in 60 kg of water but if flooded after that it needs to be rid of the water almost entirely.

Share this comment


Link to comment
Share on other sites

@Risu If you remove water from plant or add water if it didnt had any it will update its status.

Just its in reverse.

This causes DryingOut state if the plant gets EnteredWetArea:

this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", false); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", true); });

It should be:

this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", true); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", false); });

Share this comment


Link to comment
Share on other sites

2 minutes ago, Blas88 said:

@Risu If you remove water from plant or add water if it didnt had any it will update its status.

Just its in reverse.

This causes DryingOut state if the plant gets EnteredWetArea:

this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", false); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", true); });

It should be:

this.Subscribe(GameHashes.DryingOut, delegate(object data) { this.SetCondition("DryingOut", true); });
this.Subscribe(GameHashes.EnteredWetArea, delegate(object data) { this.SetCondition("DryingOut", false); });

It having true condition means that it is fine though. Everything is set to true at spawn.
Will have to look around some more. It doesn't look wrong but it clearly is.
 

Share this comment


Link to comment
Share on other sites

Reading the names "humanlike" it probably should be as Blass88 says. Without farther context it reads like "IF this object is wet, set dry condition true"

Share this comment


Link to comment
Share on other sites

17 minutes ago, Vilda said:

Reading the names "humanlike" it probably should be as Blass88 says. Without farther context it reads like "IF this object is wet, set dry condition true"

if (!flag)
{
	if (!this.dry)
	{
		this.dry = true;
		this.Trigger(GameHashes.DryingOut, null);
		this.selectable.AddStatusItem(Db.Get().CreatureStatusItems.DryingOut, null);
	}
	if (this.stamina <= 0f && !this.incapacitated)
	{
		this.Trigger(GameHashes.DriedOut, null);
		this.SetIncapacitated(true);
	}
}
else
{
	if (this.dry)
	{
		this.dry = false;
		this.Trigger(GameHashes.EnteredWetArea, null);
	}
	this.selectable.RemoveStatusItem(Db.Get().CreatureStatusItems.DryingOut);
}

flag is from IsCellSafe which checks if there is liquid present.
 

Share this comment


Link to comment
Share on other sites

I compared CheckDrowning and CheckDry.

CheckDry is the exact copy of CheckDrowning but they get different flag value because both uses the  this.IsCellSafe(cell) which returns false if there are liquid and returns true if there are none.

So somewhere need to reverse either the flag or the resulting functions.

Share this comment


Link to comment
Share on other sites

3 minutes ago, Blas88 said:

So somewhere need to reverse either the flag or the resulting functions.

That's how I read this piece too.

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...