Skip to content

Commit

Permalink
Merge pull request #34 from AresMUSH/dev
Browse files Browse the repository at this point in the history
Beta 34
  • Loading branch information
lynnfaraday authored Dec 3, 2018
2 parents d36a8b4 + 3458931 commit f307634
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/create_test_user
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export ARES_INSTALL_TEXT="<\033[0;32mINSTALL\033[0m>"

echo -e "${ARES_INSTALL_TEXT} Create an ares test user"

export ARES_USERNAME="arestest
export ARES_USERNAME="arestest"

sudo adduser --disabled-password --gecos "" ${ARES_USERNAME}

Expand Down
2 changes: 1 addition & 1 deletion engine/aresmush/commands/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def on_command(client, cmd)
end # with error handling
end # each
if (!@handled)
trimmed_cmd = (cmd.raw || "")[0,20]
trimmed_cmd = (cmd.raw || "")[0,25]
client.emit_ooc t('dispatcher.huh', :command => trimmed_cmd)
end
end # with error handling
Expand Down
1 change: 1 addition & 0 deletions engine/aresmush/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def telnet_debug(part)
1 => "REQ",
42 => "CHARSET",
31 => "NAWS",
24 => "TTYPE",
'\r'.ord => "CR",
'\n'.ord => "LF",
20 => "_"
Expand Down
5 changes: 5 additions & 0 deletions engine/aresmush/telnet_negotiation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def initialize(connection)

CHARSET = 42 # x2A
NAWS = 31 # x1f
TTYPE = 24 # x18
SGA = 3 # x3 Suppress Go Ahead

def handle_input(data)
chars = data.split("")
Expand Down Expand Up @@ -51,6 +53,9 @@ def handle_input(data)
elsif (chars[0].ord == WONT)
chars.shift # Ditch the won't code
op = chars.shift.ord
elsif (chars[0].ord == DO)
chars.shift # Ditch the do code
op = chars.shift.ord
elsif (chars[0].ord == NOP)
# Do nothing
chars.shift
Expand Down
6 changes: 6 additions & 0 deletions install/game.distr/config/chargen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ chargen:
hooks: hook
hook/delete: hook/remove
hook/add: hook/set
app_review_commands:
- "app %{name}"
- "profile %{name}"
- "bg %{name}"
- "hooks %{name}"
- "sheet %{name}"
stages:
start:
tutorial: chargen.md
Expand Down
18 changes: 18 additions & 0 deletions install/migrations/0019_beta34_update.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module AresMUSH
module Migrations
class MigrationBeta34Update
def require_restart
false
end

def migrate
Global.logger.debug "Adding app review commandst."
default_config = DatabaseMigrator.read_distr_config_file("chargen.yml")
config = DatabaseMigrator.read_config_file("chargen.yml")
config['chargen']['app_review_commands'] = default_config['chargen']['app_review_commands']
DatabaseMigrator.write_config_file("chargen.yml", config)

end
end
end
end
9 changes: 5 additions & 4 deletions plugins/chargen/commands/app_review_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ def handle
return
end

Global.dispatcher.queue_command(client, Command.new("app #{model.name}"))
Global.dispatcher.queue_command(client, Command.new("profile #{model.name}"))
Global.dispatcher.queue_command(client, Command.new("bg #{model.name}"))
Global.dispatcher.queue_command(client, Command.new("sheet #{model.name}"))
commands = Global.read_config("chargen", "app_review_commands") || []
commands.each do |command|
command_text = command % { name: model.name }
Global.dispatcher.queue_command(client, Command.new(command_text))
end

desc = Describe.desc_template(model, enactor)
client.emit desc.render
Expand Down
2 changes: 2 additions & 0 deletions plugins/chargen/locales/locale_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ en:

review_summary: "%xrRed%xn issues will probably hold up your app.%R%xyYellow%xn may be OK if it suits your character."

background_title: "Background for %{name}"

not_started: "You haven't starget chargen yet. Use chargen/start first."
cant_go_back: "You are already on the first stage of Chargen."
chargen_complete: "You have completed Chargen!"
Expand Down
2 changes: 1 addition & 1 deletion plugins/chargen/templates/bg.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= header %>
<%= char.name %> -- <%= approval_status %>
<%= t('chargen.background_title', :name => char.name) %> -- <%= approval_status %>
<%= divider %>
<%= background %>
<%= footer %>
2 changes: 1 addition & 1 deletion plugins/forum/commands/forum_scan_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def handle
return
end

list = unread.map { |u| "#{u.reference_str} #{u.bbs_category.name} - #{u.subject}"}
list = unread.map { |u| "#{u.reference_str} #{u.bbs_board.name} - #{u.subject}"}


template = BorderedListTemplate.new list, t('forum.scan_title')
Expand Down
2 changes: 1 addition & 1 deletion plugins/login/help/en/notices.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ toc: Miscellaneous
summary: Notices and commands on login.
aliases:
- aconnect
- onstartup
- motd
- onconnect
---

You always see the notices screen when you connect, which shows you a summary of important messages and what's new to read on the game (like mail or forum posts).
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.33
0.34

0 comments on commit f307634

Please sign in to comment.