Added hiddenBuildItems rule
This commit is contained in:
@@ -901,7 +901,7 @@ public class Blocks implements ContentList{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
mendProjector = new MendProjector("mend-projector"){{
|
mendProjector = new MendProjector("mend-projector"){{
|
||||||
requirements(Category.effect, with(Items.lead, 100, Items.titanium, 25, Items.silicon, 40));
|
requirements(Category.effect, with(Items.lead, 100, Items.titanium, 25, Items.silicon, 40, Items.copper, 50));
|
||||||
consumes.power(1.5f);
|
consumes.power(1.5f);
|
||||||
size = 2;
|
size = 2;
|
||||||
reload = 250f;
|
reload = 250f;
|
||||||
@@ -1645,7 +1645,7 @@ public class Blocks implements ContentList{
|
|||||||
shots = 4;
|
shots = 4;
|
||||||
burstSpacing = 5;
|
burstSpacing = 5;
|
||||||
inaccuracy = 10f;
|
inaccuracy = 10f;
|
||||||
range = 235f;
|
range = 240f;
|
||||||
xRand = 6f;
|
xRand = 6f;
|
||||||
size = 2;
|
size = 2;
|
||||||
health = 300 * size * size;
|
health = 300 * size * size;
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ public class Rules{
|
|||||||
public ObjectSet<Block> revealedBlocks = new ObjectSet<>();
|
public ObjectSet<Block> revealedBlocks = new ObjectSet<>();
|
||||||
/** Unlocked content names. Only used in multiplayer when the campaign is enabled. */
|
/** Unlocked content names. Only used in multiplayer when the campaign is enabled. */
|
||||||
public ObjectSet<String> researched = new ObjectSet<>();
|
public ObjectSet<String> researched = new ObjectSet<>();
|
||||||
|
/** Block containing these items as requirements are hidden. */
|
||||||
|
public ObjectSet<Item> hiddenBuildItems = new ObjectSet<>();
|
||||||
/** Whether ambient lighting is enabled. */
|
/** Whether ambient lighting is enabled. */
|
||||||
public boolean lighting = false;
|
public boolean lighting = false;
|
||||||
/** Whether enemy lighting is visible.
|
/** Whether enemy lighting is visible.
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean unlocked(Block block){
|
boolean unlocked(Block block){
|
||||||
return block.unlockedNow() && block.placeablePlayer;
|
return block.unlockedNow() && block.placeablePlayer && (state.rules.hiddenBuildItems.isEmpty() || !Structs.contains(block.requirements, i -> state.rules.hiddenBuildItems.contains(i.item)));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean hasInfoBox(){
|
boolean hasInfoBox(){
|
||||||
|
|||||||
Reference in New Issue
Block a user