item + loot pool updates
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
4c9cad96f2
commit
b91654d7c3
@ -18,7 +18,7 @@
|
||||
"lootPool" : {
|
||||
"tickets" : [
|
||||
{
|
||||
"itemId" : "Stick",
|
||||
"itemId" : "mat:Stick",
|
||||
"rarity" : 1.0,
|
||||
"minQuantity" : 1,
|
||||
"maxQuantity" : 1
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
"lootPool" : {
|
||||
"tickets" : [
|
||||
{
|
||||
"itemId" : "Rock",
|
||||
"itemId" : "mat:Rock",
|
||||
"rarity" : 1.0,
|
||||
"minQuantity" : 1,
|
||||
"maxQuantity" : 1
|
||||
|
||||
@ -194,10 +194,10 @@
|
||||
"lootPool" : {
|
||||
"tickets" : [
|
||||
{
|
||||
"itemId" : "Log",
|
||||
"itemId" : "mat:Log",
|
||||
"rarity" : 0.8,
|
||||
"minQuantity" : 0,
|
||||
"maxQuantity" : 2
|
||||
"minQuantity" : 2,
|
||||
"maxQuantity" : 5
|
||||
},
|
||||
{
|
||||
"itemId" : "block:wood",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"items" : [
|
||||
{
|
||||
"id" : "Grain",
|
||||
"id" : "mat:Grain",
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
"TARGETABLE"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"items" : [
|
||||
{
|
||||
"id" : "Rock",
|
||||
"id" : "mat:Rock",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
@ -32,7 +32,7 @@
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Copper",
|
||||
"id" : "mat:Copper",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
@ -70,7 +70,7 @@
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Tin",
|
||||
"id" : "mat:Tin",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
@ -101,7 +101,7 @@
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Clay",
|
||||
"id" : "mat:Clay",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"items" : [
|
||||
{
|
||||
"id" : "Log",
|
||||
"id" : "mat:Log",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
@ -32,7 +32,7 @@
|
||||
"iconPath" : "Textures/icons/itemIconItemGeneric.png"
|
||||
},
|
||||
{
|
||||
"id" : "Stick",
|
||||
"id" : "mat:Stick",
|
||||
"maxStack" : 100,
|
||||
"tokens" : [
|
||||
"GRAVITY",
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"craftingTag" : "HAND",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "Log",
|
||||
"itemType": "mat:Log",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"craftingTag" : "HAND",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "Log",
|
||||
"itemType": "mat:Log",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
"craftingTag" : "HAND",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "Stick",
|
||||
"itemType": "mat:Stick",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"itemType": "Rock",
|
||||
"itemType": "mat:Rock",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
@ -25,11 +25,11 @@
|
||||
"craftingTag" : "HAND",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "Stick",
|
||||
"itemType": "mat:Stick",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"itemType": "Rock",
|
||||
"itemType": "mat:Rock",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
@ -45,11 +45,11 @@
|
||||
"craftingTag" : "HAND",
|
||||
"ingredients": [
|
||||
{
|
||||
"itemType": "Stick",
|
||||
"itemType": "mat:Stick",
|
||||
"count": 1
|
||||
},
|
||||
{
|
||||
"itemType": "Rock",
|
||||
"itemType": "mat:Rock",
|
||||
"count": 1
|
||||
}
|
||||
],
|
||||
|
||||
@ -1623,6 +1623,9 @@ Cache busting when physics sync pulls player entity TELEPORT distances
|
||||
Lotta inventory work to bugfix charges, crafting, in-inventory items, etc
|
||||
Collapse client hooks for item usage into main itemusage class
|
||||
Debounce fab placement
|
||||
Blocks stack
|
||||
Item tag adjustments
|
||||
Pine tree loot pool update
|
||||
|
||||
|
||||
|
||||
@ -1661,6 +1664,7 @@ Floating world origin
|
||||
- Separately simulated regions of physics that dynamically merge/unmerge based on chunk loading
|
||||
|
||||
Bug Fixes
|
||||
- Fix characters stored in db not saving items because the items aren't being stored to db
|
||||
- Fix hitbox placement does not scale with entity scale on server
|
||||
- Calculate bounding sphere for meshes by deforming vertices with bone default pose instead of no bone deform
|
||||
- Fix light cluster mapping for foliage shader
|
||||
|
||||
@ -270,6 +270,11 @@ public class ItemUtils {
|
||||
*/
|
||||
public static Entity serverSpawnBasicItem(Realm realm, Vector3d position, String name){
|
||||
Item item = Globals.gameConfigCurrent.getItemMap().getItem(name);
|
||||
|
||||
if(item == null){
|
||||
throw new Error("Failed to resolve item with name " + name);
|
||||
}
|
||||
|
||||
//must correct the position such that it spawns inside the realm
|
||||
Vector3d correctedPosition = ServerEntityUtils.guaranteePositionIsInBounds(realm, position);
|
||||
Entity rVal = EntityCreationUtils.createServerEntity(realm, correctedPosition);
|
||||
@ -509,7 +514,16 @@ public class ItemUtils {
|
||||
if(itemData.getMaxStack() != null){
|
||||
ClientChargeState.attachTree(rVal, itemData.getMaxStack());
|
||||
}
|
||||
rVal.putData(EntityDataStrings.ITEM_ICON,ItemUtils.getItemIcon(item));
|
||||
|
||||
//
|
||||
//icon
|
||||
if(itemData.getIconPath() != null && !itemData.getIconPath().equals("")){
|
||||
rVal.putData(EntityDataStrings.ITEM_ICON,itemData.getIconPath());
|
||||
} else {
|
||||
rVal.putData(EntityDataStrings.ITEM_ICON,AssetDataStrings.UI_TEXTURE_ITEM_ICON_GENERIC);
|
||||
}
|
||||
|
||||
|
||||
rVal.putData(EntityDataStrings.ITEM_EQUIP_CLASS, item.getData(EntityDataStrings.ITEM_EQUIP_CLASS));
|
||||
CommonEntityUtils.setEntityType(rVal, EntityType.ITEM);
|
||||
rVal.putData(EntityDataStrings.ITEM_IS_IN_INVENTORY, true);
|
||||
|
||||
@ -29,6 +29,11 @@ public class Item extends CommonEntityType {
|
||||
*/
|
||||
static final String DEFAULT_ITEM_ICON_PATH = "Textures/icons/itemIconItemGeneric.png";
|
||||
|
||||
/**
|
||||
* Maximum stack of a given block type
|
||||
*/
|
||||
static final int MAX_BLOCK_STACK = 250;
|
||||
|
||||
/**
|
||||
* The array of default tokens for all items
|
||||
*/
|
||||
@ -164,6 +169,9 @@ public class Item extends CommonEntityType {
|
||||
rVal.setSecondaryUsage(usage);
|
||||
rVal.setPrimaryUsage(usage);
|
||||
|
||||
//set stacking data
|
||||
rVal.setMaxStack(MAX_BLOCK_STACK);
|
||||
|
||||
|
||||
//attach common tokens
|
||||
List<String> tokens = new LinkedList<String>(Arrays.asList(DEFAULT_TOKENS));
|
||||
|
||||
@ -27,6 +27,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.net.parser.net.message.SynchronizationMessage;
|
||||
import electrosphere.net.parser.net.message.SynchronizationMessage.SynchronizationMessageType;
|
||||
import electrosphere.net.synchronization.enums.BehaviorTreeIdEnums;
|
||||
import electrosphere.net.synchronization.enums.FieldIdEnums;
|
||||
|
||||
@ -48,7 +49,7 @@ public class ClientSynchronizationManager {
|
||||
/**
|
||||
* The count at which to warn about a message bouncing
|
||||
*/
|
||||
static final int MESSAGE_BOUNCE_WARNING_COUNT = 10;
|
||||
static final int MESSAGE_BOUNCE_WARNING_COUNT = 100;
|
||||
|
||||
/**
|
||||
* Pushes a message into the queue to be processed
|
||||
@ -137,8 +138,12 @@ public class ClientSynchronizationManager {
|
||||
|
||||
//warn if a message has bounced a certain number of times
|
||||
if(messageBounceCount.containsKey(message) && messageBounceCount.get(message) > MESSAGE_BOUNCE_WARNING_COUNT){
|
||||
SynchronizationMessageType type = message.getMessageSubtype();
|
||||
String warningMessage =
|
||||
"A synchronization message has bounced at least " + MESSAGE_BOUNCE_WARNING_COUNT + "times!";
|
||||
"A synchronization message has bounced at least " + MESSAGE_BOUNCE_WARNING_COUNT + "times!\n" +
|
||||
type + "\n" +
|
||||
""
|
||||
;
|
||||
LoggerInterface.loggerNetworking.WARNING(warningMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user