This commit is contained in:
Anuken
2020-10-11 09:02:20 -04:00
parent bcb248907c
commit 65d9978fa1
7 changed files with 21 additions and 9 deletions
+3 -1
View File
@@ -193,6 +193,8 @@ public class Block extends UnlockableContent{
public BuildPlaceability buildPlaceability = BuildPlaceability.always;
/** Multiplier for speed of building this block. */
public float buildCostMultiplier = 1f;
/** Multiplier for cost of research in tech tree. */
public float researchCostMultiplier = 1;
/** Whether this block has instant transfer.*/
public boolean instantTransfer = false;
/** Whether you can rotate this block with Keybind rotateplaced + Scroll Wheel. */
@@ -619,7 +621,7 @@ public class Block extends UnlockableContent{
public ItemStack[] researchRequirements(){
ItemStack[] out = new ItemStack[requirements.length];
for(int i = 0; i < out.length; i++){
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20, 10);
int quantity = 40 + Mathf.round(Mathf.pow(requirements[i].amount, 1.25f) * 20 * researchCostMultiplier, 10);
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
}