cleanup: warnings
parent
a205bad00f
commit
ecc9a7a99f
|
|
@ -2,7 +2,6 @@ package xyz.valnet.engine.scenegraph;
|
|||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.NotSerializableException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
package xyz.valnet.engine.sound;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.PointerBuffer;
|
||||
import static org.lwjgl.openal.AL10.*;
|
||||
|
||||
import static org.lwjgl.stb.STBVorbis.*;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@ import java.io.InputStream;
|
|||
import java.util.List;
|
||||
import java.lang.Math;
|
||||
|
||||
import org.yaml.snakeyaml.TypeDescription;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
|
||||
public class Names {
|
||||
|
||||
|
|
@ -32,11 +30,6 @@ public class Names {
|
|||
private void load() {
|
||||
InputStream fileStream = null;
|
||||
try {
|
||||
// Constructor constructor = new Constructor();
|
||||
// TypeDescription typeDescription = new TypeDescription(NameYaml.class);
|
||||
// // typeDescription.putListPropertyType("things", ConfigurableThing.class);
|
||||
// constructor.addTypeDescription(typeDescription);
|
||||
|
||||
Yaml yaml = new Yaml();
|
||||
fileStream = new FileInputStream("res/names.yaml");
|
||||
var loaded = yaml.loadAs(fileStream, NamesYaml.class).names;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package xyz.valnet.hadean.designation;
|
||||
|
||||
import xyz.valnet.hadean.gameobjects.ui.tabs.BuildTab;
|
||||
import xyz.valnet.hadean.gameobjects.worldobjects.items.Item;
|
||||
import xyz.valnet.hadean.interfaces.BuildableMetadata;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,14 +4,13 @@ import xyz.valnet.engine.math.Vector4f;
|
|||
import xyz.valnet.engine.math.Vector4i;
|
||||
import xyz.valnet.hadean.gameobjects.Tile;
|
||||
import xyz.valnet.hadean.interfaces.BuildableMetadata;
|
||||
import xyz.valnet.hadean.interfaces.ISelectable;
|
||||
import xyz.valnet.hadean.util.Action;
|
||||
import xyz.valnet.hadean.util.Assets;
|
||||
import xyz.valnet.hadean.util.Layers;
|
||||
import xyz.valnet.hadean.util.detail.Detail;
|
||||
|
||||
@BuildableMetadata(category = "Zones", name = "Farm Plot")
|
||||
public class FarmPlot extends Buildable implements ISelectable {
|
||||
public class FarmPlot extends Buildable {
|
||||
|
||||
@Override
|
||||
public void renderAlpha() {
|
||||
|
|
|
|||
|
|
@ -4,13 +4,11 @@ import xyz.valnet.engine.math.Vector2i;
|
|||
import xyz.valnet.engine.math.Vector4f;
|
||||
import xyz.valnet.hadean.gameobjects.Job;
|
||||
import xyz.valnet.hadean.gameobjects.JobBoard;
|
||||
import xyz.valnet.hadean.gameobjects.Tile;
|
||||
import xyz.valnet.hadean.gameobjects.worldobjects.Buildable;
|
||||
import xyz.valnet.hadean.gameobjects.worldobjects.items.Item;
|
||||
import xyz.valnet.hadean.gameobjects.worldobjects.items.Log;
|
||||
import xyz.valnet.hadean.interfaces.BuildableMetadata;
|
||||
import xyz.valnet.hadean.interfaces.IItemReceiver;
|
||||
import xyz.valnet.hadean.interfaces.ISelectable;
|
||||
import xyz.valnet.hadean.interfaces.IWorkable;
|
||||
import xyz.valnet.hadean.util.Action;
|
||||
import xyz.valnet.hadean.util.Assets;
|
||||
|
|
@ -21,7 +19,7 @@ import xyz.valnet.hadean.util.detail.ObjectDetail;
|
|||
import xyz.valnet.hadean.util.detail.PercentDetail;
|
||||
|
||||
@BuildableMetadata(category = "Furniture", name = "Bed", type = BuildableMetadata.Type.SINGLE)
|
||||
public class Bed extends Buildable implements IItemReceiver, IWorkable, ISelectable {
|
||||
public class Bed extends Buildable implements IItemReceiver, IWorkable {
|
||||
|
||||
private int logs = 0;
|
||||
private float work = 0;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import xyz.valnet.hadean.gameobjects.worldobjects.items.Item;
|
|||
import xyz.valnet.hadean.interfaces.BuildableMetadata;
|
||||
import xyz.valnet.hadean.interfaces.IItemReceiver;
|
||||
import xyz.valnet.hadean.interfaces.IPingable;
|
||||
import xyz.valnet.hadean.interfaces.ISelectable;
|
||||
import xyz.valnet.hadean.interfaces.IWorkable;
|
||||
import xyz.valnet.hadean.util.Action;
|
||||
import xyz.valnet.hadean.util.Assets;
|
||||
|
|
@ -25,7 +24,7 @@ import xyz.valnet.hadean.util.detail.ObjectDetail;
|
|||
import xyz.valnet.hadean.util.detail.PercentDetail;
|
||||
|
||||
@BuildableMetadata(category = "Structure", name = "Wall", type = BuildableMetadata.Type.SINGLE)
|
||||
public class Wall extends Buildable implements IItemReceiver, IWorkable, ISelectable, IPingable {
|
||||
public class Wall extends Buildable implements IItemReceiver, IWorkable, IPingable {
|
||||
|
||||
private int boulders = 0;
|
||||
private float work = 0;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import xyz.valnet.hadean.util.detail.PercentDetail;
|
|||
|
||||
public class Pawn extends Agent {
|
||||
|
||||
private static int pawnCount = 0;
|
||||
private String name = Names.getRandomName();
|
||||
private Needs needs = new Needs();
|
||||
|
||||
|
|
@ -40,8 +39,6 @@ public class Pawn extends Agent {
|
|||
private transient List<Activity> activities = new ArrayList<Activity>();
|
||||
private Activity currentActivity = null;
|
||||
|
||||
private Item heldItem = null;
|
||||
|
||||
public void pickupItemByPredicate(IItemPredicate itemPredicate) {
|
||||
Item item = getTile().pickupByItemPredicate(itemPredicate);
|
||||
inventory.add(item);
|
||||
|
|
@ -100,7 +97,7 @@ public class Pawn extends Agent {
|
|||
|
||||
activities.add(new JobActivity(this, get(JobBoard.class)));
|
||||
activities.add(new SleepActivity(needs, get(Clock.class)));
|
||||
activities.add(new WanderActivity(this, needs, get(Terrain.class)));
|
||||
activities.add(new WanderActivity(get(Terrain.class)));
|
||||
}
|
||||
|
||||
protected void create() {
|
||||
|
|
|
|||
|
|
@ -3,20 +3,16 @@ package xyz.valnet.hadean.gameobjects.worldobjects.pawn;
|
|||
import xyz.valnet.engine.math.Vector2i;
|
||||
import xyz.valnet.hadean.gameobjects.Terrain;
|
||||
import xyz.valnet.hadean.gameobjects.Tile;
|
||||
import xyz.valnet.hadean.gameobjects.worldobjects.agents.Agent;
|
||||
|
||||
// TODO actually implement this activity.
|
||||
public class WanderActivity extends Activity {
|
||||
|
||||
private Agent agent;
|
||||
|
||||
// TODO implement fun?
|
||||
// private Needs needs;
|
||||
|
||||
private Terrain terrain;
|
||||
|
||||
public WanderActivity(Agent agent, Needs needs, Terrain terrain) {
|
||||
// this.needs = needs;
|
||||
this.agent = agent;
|
||||
public WanderActivity(Terrain terrain) {
|
||||
this.terrain = terrain;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue