1
0
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:
Weston Rye (Demod) 2017-06-13 23:40:11 -04:00
parent bd6abd9d7b
commit e514aa733f
2 changed files with 22 additions and 0 deletions

View File

@ -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));
}
}

View File

@ -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());