mirror of
https://github.com/demodude4u/Factorio-FBSR.git
synced 2024-11-27 08:20:57 +02:00
Added programmable speaker
This commit is contained in:
parent
bd6abd9d7b
commit
e514aa733f
@ -0,0 +1,21 @@
|
||||
package com.demod.fbsr.render;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.demod.factorio.DataTable;
|
||||
import com.demod.factorio.prototype.EntityPrototype;
|
||||
import com.demod.fbsr.BlueprintEntity;
|
||||
import com.demod.fbsr.RenderUtils;
|
||||
import com.demod.fbsr.Renderer;
|
||||
import com.demod.fbsr.Renderer.Layer;
|
||||
import com.demod.fbsr.WorldMap;
|
||||
|
||||
public class ProgrammableSpeakerRendering extends TypeRendererFactory {
|
||||
@Override
|
||||
public void createRenderers(Consumer<Renderer> register, WorldMap map, DataTable dataTable, BlueprintEntity entity,
|
||||
EntityPrototype prototype) {
|
||||
List<Sprite> sprites = RenderUtils.getSpritesFromAnimation(prototype.lua().get("sprite"));
|
||||
register.accept(RenderUtils.spriteRenderer(Layer.ENTITY3, sprites, entity, prototype));
|
||||
}
|
||||
}
|
@ -121,6 +121,7 @@ public class TypeRendererFactory {
|
||||
byType.put("pipe", new PipeRendering());
|
||||
byType.put("pipe-to-ground", new PipeToGroundRendering());
|
||||
byType.put("power-switch", new PowerSwitchRendering());
|
||||
byType.put("programmable-speaker", new ProgrammableSpeakerRendering());
|
||||
byType.put("pump", new PumpRendering());
|
||||
byType.put("radar", new RadarRendering());
|
||||
byType.put("rail-chain-signal", new RailChainSignalRendering());
|
||||
|
Loading…
Reference in New Issue
Block a user