furniture data scaffolding
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
9c3b619be5
commit
5394ab7765
@ -1486,6 +1486,7 @@ Cull unused assets
|
||||
Update default texture
|
||||
Sound effect on swinging fists/weapons
|
||||
Queue loading audio file on creating virtual spatial source
|
||||
Scaffold grid alignment data for entities
|
||||
|
||||
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ import electrosphere.game.data.creature.type.rotator.RotatorSystem;
|
||||
import electrosphere.game.data.foliage.type.AmbientAudio;
|
||||
import electrosphere.game.data.foliage.type.GrowthModel;
|
||||
import electrosphere.game.data.graphics.GraphicsTemplate;
|
||||
import electrosphere.game.data.grident.GridAlignedData;
|
||||
import electrosphere.game.data.particle.ParticleEmitter;
|
||||
|
||||
/**
|
||||
@ -150,6 +151,11 @@ public class CommonEntityType {
|
||||
*/
|
||||
InteractionData buttonInteraction;
|
||||
|
||||
/**
|
||||
* Data for grid alignment
|
||||
*/
|
||||
GridAlignedData gridAlignedData;
|
||||
|
||||
/**
|
||||
* Gets the id for this creature type
|
||||
* @return The id
|
||||
@ -390,7 +396,13 @@ public class CommonEntityType {
|
||||
this.buttonInteraction = interaction;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the grid aligned data
|
||||
* @return The grid aligned data
|
||||
*/
|
||||
public GridAlignedData getGridAlignedData() {
|
||||
return gridAlignedData;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package electrosphere.game.data.grident;
|
||||
|
||||
/**
|
||||
* Data for aligning this entity with the block grid
|
||||
*/
|
||||
public class GridAlignedData {
|
||||
|
||||
/**
|
||||
* The width in blocks to occupy on the block grid
|
||||
*/
|
||||
int width;
|
||||
|
||||
/**
|
||||
* The length in blocks to occupy on the block grid
|
||||
*/
|
||||
int length;
|
||||
|
||||
/**
|
||||
* The height in blocks to occupy on the block grid
|
||||
*/
|
||||
int height;
|
||||
|
||||
/**
|
||||
* Gets the height in blocks to occupy on the block grid
|
||||
* @return The height in blocks to occupy on the block grid
|
||||
*/
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the length in blocks to occupy on the block grid
|
||||
* @return The length in blocks to occupy on the block grid
|
||||
*/
|
||||
public int getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the width in blocks to occupy on the block grid
|
||||
* @return The width in blocks to occupy on the block grid
|
||||
*/
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
}
|
||||
@ -84,7 +84,7 @@ public class Item extends CommonEntityType {
|
||||
|
||||
|
||||
Item rVal = new Item();
|
||||
rVal.setId(objectData.getId());
|
||||
rVal.setId("spawn:" + objectData.getId());
|
||||
|
||||
|
||||
if(description.getItemIcon() != null){
|
||||
@ -118,7 +118,7 @@ public class Item extends CommonEntityType {
|
||||
*/
|
||||
public static Item createBlockItem(BlockType blockType){
|
||||
Item rVal = new Item();
|
||||
rVal.setId(blockType.getName());
|
||||
rVal.setId("block:" + blockType.getName());
|
||||
|
||||
|
||||
if(blockType.getTexture() != null){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user