Remove message filtering

This commit is contained in:
Major-
2016-02-11 13:07:02 +00:00
parent c474908163
commit d6ac9eeeaa
13 changed files with 25 additions and 77 deletions
-6
View File
@@ -1,6 +0,0 @@
require 'java'
on :command, :filter do |player, command|
status = player.toggle_message_filter ? 'enabled' : 'disabled'
player.send_message('Your message filter is now ' + status + '.')
end
+1 -2
View File
@@ -9,8 +9,7 @@
<author>xEliqa</author>
</authors>
<scripts>
<script>filter.rb</script>
<script>broadcast.rb</script>
</scripts>
<dependencies />
</plugin>
</plugin>
+2 -2
View File
@@ -27,8 +27,8 @@ class Food < Consumable
player.inventory.add(@replace) unless @replace == -1
player.send_message("You eat the #{name}.", true)
player.send_message('It heals some health.', true) if new_curr > hitpoints_current
player.send_message("You eat the #{name}.")
player.send_message('It heals some health.') if new_curr > hitpoints_current
skill = Skill.new(hitpoints.experience, new_curr, hitpoints.maximum_level)
player.skill_set.set_skill(Skill::HITPOINTS, skill)
+3 -3
View File
@@ -30,12 +30,12 @@ class Potion < Consumable
if index != @doses.length # Consumable removes the old potion for us, so don't do it here.
player.inventory.add(@doses[index])
player.send_message("You drink some of your #{name} potion.", true)
player.send_message("You drink some of your #{name} potion.")
remaining = "You have #{@doses.length - index} dose#{'s' unless index == 3} of potion left."
player.send_message(remaining, true)
player.send_message(remaining)
else
player.send_message('You drink the last of your potion.', true)
player.send_message('You drink the last of your potion.')
player.inventory.add(Constants::EMPTY_VIAL_ID)
end
+1 -1
View File
@@ -35,7 +35,7 @@ class DummyAction < DistancedAction
else
@started = true
mob.send_message('You hit the dummy.', true)
mob.send_message('You hit the dummy.')
mob.turn_to(position)
mob.play_animation(PUNCH_ANIMATION)
end
+2 -2
View File
@@ -27,7 +27,7 @@ class FishingAction < DistancedAction
# Starts the fishing process.
def start_fishing
@started = true
mob.send_message(tool.message, true)
mob.send_message(tool.message)
end
# Executes the action.
@@ -72,7 +72,7 @@ class FishingAction < DistancedAction
inventory.add(fish.id)
name = fish.name
mob.send_message("You catch #{name.end_with?('s') ? 'some' : 'a'} #{name.downcase}.", true)
mob.send_message("You catch #{name.end_with?('s') ? 'some' : 'a'} #{name.downcase}.")
skills.add_experience(Skill::FISHING, fish.experience)
if find_bait == -1
+2 -2
View File
@@ -56,10 +56,10 @@ class HerbIdentificationAction < Action
identified = @herb.item
inventory.add(identified)
article = LanguageUtil.getIndefiniteArticle(identified.definition.name)
player.skill_set.add_experience(Skill::HERBLORE, @herb.experience)
player.send_message("This herb is #{article} #{identified.definition.name}.", true)
player.send_message("This herb is #{article} #{identified.definition.name}.")
end
stop
+1 -1
View File
@@ -153,7 +153,7 @@ class GrindingAction < Action
item = inventory.get(@slot)
name = item.definition.name.downcase
player.send_message("You grind the #{name} to dust.", true)
player.send_message("You grind the #{name} to dust.")
inventory.reset(@slot)
inventory.add(@ingredient.item)
+2 -2
View File
@@ -227,7 +227,7 @@ class UnfinishedMixingAction < MixingAction
created = name.sub(/ leaf$/, '')
message = "You put the #{name} in the water to make an unfinished #{created} potion."
player.send_message(message, true)
player.send_message(message)
@slots.each do |slot, amount|
unless inventory.remove_slot(slot, amount)
@@ -279,7 +279,7 @@ class FinishedMixingAction < MixingAction
ingredient = name_of(@ingredient).downcase
name = @potion.item.definition.name.sub('(3)', '')
player.send_message("You add the #{ingredient} to the mixture to make an #{name}.", true)
player.send_message("You add the #{ingredient} to the mixture to make an #{name}.")
player.skill_set.add_experience(HERBLORE_SKILL_ID, @potion.experience)
inventory = player.inventory
+2 -2
View File
@@ -33,7 +33,7 @@ class MiningAction < DistancedAction
# the ore
def start_mine(pickaxe)
@started = true
mob.send_message('You swing your pick at the rock.', true)
mob.send_message('You swing your pick at the rock.')
mob.play_animation(pickaxe.animation)
@counter = pickaxe.pulses
end
@@ -67,7 +67,7 @@ class MiningAction < DistancedAction
if mob.inventory.add(ore.id)
name = name_of(@ore.id).sub(/ ore$/, '').downcase
mob.send_message("You manage to mine some #{name}.", true)
mob.send_message("You manage to mine some #{name}.")
skills.add_experience(Skill::MINING, ore.exp)
# TODO: expire the rock
end
+1 -1
View File
@@ -44,7 +44,7 @@ class RunecraftingAction < DistancedAction
inventory.add(@rune.id, added)
name = added > 1 ? 'some ' + @rune.name + 's' : 'an ' + @rune.name
@player.send_message("Your craft the rune essence into #{name}.", true)
@player.send_message("You craft the rune essence into #{name}.")
@player.skill_set.add_experience(Skill::RUNECRAFT, removed * @rune.experience)
stop