Merge branch 'well-nerfing' into 'master'

Wells nerfed

See merge request 2009scape/2009scape!79
This commit is contained in:
Ceikry
2021-07-01 21:42:33 +00:00
2 changed files with 16 additions and 0 deletions
@@ -1,5 +1,6 @@
package core.game.interaction.item.withobject; package core.game.interaction.item.withobject;
import api.ContentAPI;
import core.plugin.Initializable; import core.plugin.Initializable;
import org.rs09.consts.Items; import org.rs09.consts.Items;
import core.game.interaction.NodeUsageEvent; import core.game.interaction.NodeUsageEvent;
@@ -11,6 +12,7 @@ import core.game.node.object.Scenery;
import core.game.system.task.Pulse; import core.game.system.task.Pulse;
import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Animation;
import core.plugin.Plugin; import core.plugin.Plugin;
import rs09.game.system.SystemLogger;
/** /**
* Represents the plugin used to fill a bucket. * Represents the plugin used to fill a bucket.
@@ -40,6 +42,9 @@ public final class WaterSourcePlugin extends UseWithHandler {
@Override @Override
public Plugin<Object> newInstance(Object arg) throws Throwable { public Plugin<Object> newInstance(Object arg) throws Throwable {
for (int i : OBJECTS) { for (int i : OBJECTS) {
if(ContentAPI.sceneryDefinition(i).getName().toLowerCase().contains("well")){
continue;
}
addHandler(i, OBJECT_TYPE, this); addHandler(i, OBJECT_TYPE, this);
} }
return this; return this;
+11
View File
@@ -1,6 +1,7 @@
package api package api
import core.cache.def.impl.ItemDefinition import core.cache.def.impl.ItemDefinition
import core.cache.def.impl.SceneryDefinition
import core.game.component.Component import core.game.component.Component
import core.game.content.dialogue.FacialExpression import core.game.content.dialogue.FacialExpression
import core.game.node.Node import core.game.node.Node
@@ -994,4 +995,14 @@ object ContentAPI {
fun getQP(player: Player): Int{ fun getQP(player: Player): Int{
return player.questRepository.points return player.questRepository.points
} }
/**
* Gets a scenery definition from the given ID
* @param id the ID of the scenery to get the definition for.
* @return the scenery definition
*/
@JvmStatic
fun sceneryDefinition(id: Int): SceneryDefinition{
return SceneryDefinition.forId(id)
}
} }