space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.18k stars 2.91k forks source link

Corn throws a sprite error when growing to stage-6 #28254

Open ShadowCommander opened 2 months ago

ShadowCommander commented 2 months ago

Description

[ERRO] go.comp.sprite: State 'stage-6' does not exist in set RSI (/Textures/Objects/Specific/Hydroponics/corn.rsi). Trace:
   at System.Environment.get_StackTrace()
   at Robust.Client.GameObjects.SpriteComponent.Layer.SetRsi(RSI rsi) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameObjects/Components/Renderable/SpriteComponent.cs:line 1832
   at Robust.Client.GameObjects.SpriteComponent.LayerSetRSI(Int32 layer, ResPath rsiPath) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameObjects/Components/Renderable/SpriteComponent.cs:line 1061
   at Content.Client.Botany.PlantHolderVisualizerSystem.OnAppearanceChange(EntityUid uid, PlantHolderVisualsComponent component, AppearanceChangeEvent& args) in /home/runner/work/space-station-14/space-station-14/Content.Client/Botany/PlantHolderVisualizerSystem.cs:line 26
   at Robust.Shared.GameObjects.EntityEventBus.DispatchOrderedEvents(Unit& eventArgs, ValueList`1& found) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Ordering.cs:line 47
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalOrdered(EntityUid uid, Type eventType, EventData subs, Unit& unitRef, Boolean broadcast) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Ordering.cs:line 40
   at Robust.Shared.GameObjects.EntityEventBus.RaiseLocalEvent[TEvent](EntityUid uid, TEvent& args, Boolean broadcast) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Shared/GameObjects/EntityEventBus.Directed.cs:line 198
   at Robust.Client.GameObjects.AppearanceSystem.FrameUpdate(Single frameTime) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameObjects/EntitySystems/AppearanceSystem.cs:line 120
   at Robust.Shared.GameObjects.EntitySystemManager.FrameUpdate(Single frameTime) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Shared/GameObjects/EntitySystemManager.cs:line 333
   at Robust.Client.GameController.Update(FrameEventArgs frameEventArgs) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameController/GameController.cs:line 595
   at Robust.Shared.Timing.GameLoop.Run() in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Shared/Timing/GameLoop.cs:line 135
   at Robust.Client.GameController.ContinueStartupAndLoop(DisplayMode mode) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameController/GameController.Standalone.cs:line 162
   at Robust.Client.GameController.GameThreadMain(DisplayMode mode) in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameController/GameController.Standalone.cs:line 147
   at Robust.Client.GameController.<>c__DisplayClass100_0.<Run>b__0() in /home/runner/work/RobustToolbox/RobustToolbox/Robust.Client/GameController/GameController.Standalone.cs:line 106
   at System.Threading.Thread.StartCallback()

Reproduction

Lamrr commented 1 month ago

Cannot reproduce locally - no error is made while growing corn. Was it a special type of corn?

Tayrtahn commented 1 month ago

Huh. The corn seed prototype is set to 3 growth stages, so it definitely shouldn't be getting to 6.

It might have something to do with 6 being the default number of growth stages for a seed prototype?

ShadowCommander commented 1 month ago

I'm not able to reproduce it on local either with default corn. This was on Lizard. I was growing some corn and the other two botanists were growing one corn. Mine were regular seeds. I'm not sure what they were doing.

Tayrtahn commented 1 month ago

Not sure if this is related or even an actual problem, but it seems odd to me that the calculation for current growth stage isn't capped to the maximum stage of the seed:

https://github.com/space-wizards/space-station-14/blob/bec21d443ffd6737fecf8612391466a7c38a0b4f/Content.Server/Botany/Systems/PlantHolderSystem.cs#L75-L84