Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAS Global Entity Implementation #101

Open
wants to merge 5 commits into
base: master
from

Conversation

@darshan3
Copy link
Member

commented Jul 30, 2019

This pull request adds a global entity to store global game data like scores of both teams.

How to test:
Play the game and test various cases of scoring points through players in both the teams.

Expected outcome:
Points should be awarded correctly.

@darshan3 darshan3 added this to In progress in GSOC 2019: Light & Shadows Aug 5, 2019

@iaronaraujo
Copy link
Contributor

left a comment

The code lgtm but it would be nice to have some javadoc!

import org.terasology.ligthandshadow.componentsystem.components.LASTeamComponent;
import org.terasology.ligthandshadow.componentsystem.components.RedFlagComponent;
import org.terasology.ligthandshadow.componentsystem.components.WinConditionCheckOnActivateComponent;
import org.terasology.ligthandshadow.componentsystem.components.*;

This comment has been minimized.

Copy link
@iaronaraujo

iaronaraujo Aug 8, 2019

Contributor

Star import

This comment has been minimized.

Copy link
@darshan3

darshan3 Aug 11, 2019

Author Member

Done.

@darshan3

This comment has been minimized.

Copy link
Member Author

commented Aug 10, 2019

@skaldarnar should I make the globalEntity variable in LASGlobalSystem as final?

@darshan3 darshan3 force-pushed the LASGlobalEntity branch from f37f72b to c6f4ed4 Aug 11, 2019

@darshan3

This comment has been minimized.

Copy link
Member Author

commented Aug 11, 2019

Rebased.

@skaldarnar

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

😢 Saw this while spinning up a new hosting game. Also, there's no HUD or anything...

21:11:29.799 [main] ERROR o.t.e.e.internal.PojoEntityManager - Adding a component (class org.terasology.logic.location.LocationComponent) over an existing component for entity 577
21:11:30.004 [main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.NullPointerException: null
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystem.setHealthHUD(ClientSkinSystem.java:123)
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystem.onAwaitedLocalCharacterSpawnEvent(ClientSkinSystem.java:70)
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystemMethodAccess.invoke(Unknown Source)
        at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:531)
        at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:291)
        at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:282)
        at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:205)
        at org.terasology.engine.modes.loadProcesses.AwaitCharacterSpawn.step(AwaitCharacterSpawn.java:50)
        at org.terasology.engine.modes.StateLoading.update(StateLoading.java:252)
        at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:463)
        at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:426)
        at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:402)
        at org.terasology.engine.Terasology.main(Terasology.java:156)
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.terasology.ligthandshadow.componentsystem.components;

This comment has been minimized.

Copy link
@skaldarnar

skaldarnar Aug 21, 2019

Contributor

I never noticed that awkward type in the package name 😱

org.terasology.ligthandshadow.componentsystem.components;

This comment has been minimized.

Copy link
@darshan3

darshan3 Aug 24, 2019

Author Member

Will fix it in a separate pr

@darshan3

This comment has been minimized.

Copy link
Member Author

commented Aug 24, 2019

Saw this while spinning up a new hosting game. Also, there's no HUD or anything...

21:11:29.799 [main] ERROR o.t.e.e.internal.PojoEntityManager - Adding a component (class org.terasology.logic.location.LocationComponent) over an existing component for entity 577
21:11:30.004 [main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.NullPointerException: null
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystem.setHealthHUD(ClientSkinSystem.java:123)
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystem.onAwaitedLocalCharacterSpawnEvent(ClientSkinSystem.java:70)
        at org.terasology.ligthandshadow.componentsystem.controllers.ClientSkinSystemMethodAccess.invoke(Unknown Source)
        at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:531)
        at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:291)
        at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:282)
        at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:205)
        at org.terasology.engine.modes.loadProcesses.AwaitCharacterSpawn.step(AwaitCharacterSpawn.java:50)
        at org.terasology.engine.modes.StateLoading.update(StateLoading.java:252)
        at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:463)
        at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:426)
        at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:402)
        at org.terasology.engine.Terasology.main(Terasology.java:156)

I will test it out again, it is probably due to name change of Health hud.

@Cervator

This comment has been minimized.

Copy link
Member

commented Sep 7, 2019

Is the ClientSkinSystem issue gone? Health refactor should be all set and done now. I just found and fixed a similar issue in GooeyDefence but it appears like it might have already been fixed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.