Terasology / LightAndShadow

Light & Shadow is an experimental game type set in a quirky Alice in Wonderland inspired setting
Apache License 2.0
8 stars 22 forks source link

update to new particle system - load particle prefab from resources #53

Closed skaldarnar closed 7 years ago

skaldarnar commented 7 years ago

Requires https://github.com/Terasology/LightAndShadowResources/pull/19

I've added a TODO item for an outstanding issue regarding the particle texture. Again, might be an easy thing for @MaxBorsch.

Part of https://github.com/MovingBlocks/Terasology/issues/2941

skaldarnar commented 7 years ago

Hm, seems like I need to revert some of the changes, i.e.,

Should be an easy fix ;-)

Cervator commented 7 years ago

Merging updated version, thanks for the extra tweaks :-)

Works better now, could still provoke one problem that results in some noise in the log but no apparent functional issues - probably just some failure to clean up or trigger more particles:

22:05:37.741 [main] INFO  o.t.ligthandshadow.logic.CardSystem - current health: 1
22:05:38.124 [main] INFO  o.t.ligthandshadow.logic.CardSystem - current health: 0
22:05:38.125 [main] ERROR o.t.e.event.internal.EventSystemImpl - Failed to invoke event
java.lang.IllegalStateException: Entity EntityRef{id = 1693, netId = 0, prefab = 'LightAndShadowResources:spadesAceBlock'} is not a registered entity
    at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
    at org.terasology.particles.updating.ParticleUpdaterImpl.dispose(ParticleUpdaterImpl.java:88)
    at org.terasology.particles.ParticleSystemManagerImpl.onEmitterDeactivated(ParticleSystemManagerImpl.java:91)

I also noted the icons in the toolbar went kinda funny, three of them ended up looking the same in the toolbar, but placing correctly as a particular suit. In any case L&S needs more work so this isn't much of a concern.

Thanks!

skaldarnar commented 7 years ago

Uh, I must have messed it up when tweaking the prefabs... probably my regex search-and-replace was not as complete as I thought... I'll push an update for that directly to master 😉