CompatSkills

CompatSkills

8M Downloads

CompatSkills -> Gamestages/OreStages Issue

royalcw opened this issue ยท 1 comments

commented

Moved from Reskillable

So, I have ores hidden with OreStages. I use a reskillable custom trait to unlock copper for the player. OreStages is set to "copper_access" to unhide copper.

What happens: I get the trait and the gamestage "copper_access" is added to the player. The ore is still hidden. If I log out then back in, the ore is unhidden.

If I manually add "/gamestages add @p copper_access" then the screen flickers/updates and the ores are unhidden. This screen flicker/update when GameStageUnlockable is called by compat skills doesn't seem to occur and my ores stay hidden unless I relog

Desire result: When the trait below is taken by the player, have the ores made visible through a reload or some update just like gamestages and functions execute when a stage is given to a player.

My trait: It unlocks the stage correctly but takes a logout/login to actually see the copper ore correctly.
var copper_access = mods.compatskills.GameStageUnlockable.addGameStageUnlockable("copper_access", "copper_access", 2, 0, "reskillable:mining", 1, "stage|stone_age");
copper_access.name = "Copper Explorer";
copper_access.description = "Unlock access to copper resources";

commented

After I finish working on the performance improvements for Requirements I will work on this. (I probably will be done by tomorrow with the Requirement stuff.

Taking a quick look I believe the issue is that after this line https://github.com/Coders-After-Dark/CompatSkills/blob/master/src/main/java/codersafterdark/compatskills/common/compats/gamestages/gamestageunlockable/GameStageUnlockable.java#L44

GameStageHelper.syncPlayer(player); needs to be added. (This is more of a note to myself of how to fix it.)