Skip to content

Commit

Permalink
Merge pull request #126 from AresMUSH/dev
Browse files Browse the repository at this point in the history
Beta 95
  • Loading branch information
lynnfaraday authored Apr 10, 2021
2 parents f23fdea + 48b1a36 commit 43febe0
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion engine/aresmush/find_result.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module AresMUSH
class FindResult
attr_accessor :found, :target, :error
attr_accessor :target, :error
def initialize(target, error = nil)
@target = target
@error = error
Expand Down
4 changes: 4 additions & 0 deletions engine/styles/ares.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ JOBS SCREEN
margin: 0px;
}

.preset-responses {
margin: 5px 0px 15px 0px;
}

/* -------------------------
OTHER
------------------------- */
Expand Down
6 changes: 6 additions & 0 deletions plugins/achievements/achievement_config_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ def initialize

def validate
@validator.require_hash("achievements")

Achievements.all_achievements.keys.each do |a|
if (a !~ /^[a-z0-9\-\_ ]+$/)
@validator.add_error "Invalid achievement key: #{a} - lowercase letters, numbers, _ and - only."
end
end
@validator.errors
end
end
Expand Down
5 changes: 3 additions & 2 deletions plugins/chargen/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def self.build_app_review_info(char, enactor)

custom_review = Chargen.custom_app_review(char)
custom_app = custom_review ? MushFormatter.format(custom_review) : nil

{
abilities: abilities_app,
demographics: demographics_app,
Expand All @@ -224,7 +224,8 @@ def self.build_app_review_info(char, enactor)
id: char.id,
job: char.approval_job ? char.approval_job.id : nil,
custom: custom_app,
allow_web_submit: (char == enactor) && Global.read_config("chargen", "allow_web_submit")
allow_web_submit: (char == enactor) && Global.read_config("chargen", "allow_web_submit"),
preset_responses: Jobs.preset_job_responses_for_web
}
end
end
Expand Down
5 changes: 3 additions & 2 deletions plugins/describe/public/describe_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ def self.get_web_descs_for_display(model)

def self.save_web_descs(model, data)
model.update(description: Website.format_input_for_mush(data['current']))

if (model.kind_of?(Character))
outfits = {}
(data['outfits'] || []).each do |name, desc|
outfits[name.titlecase] = Website.format_input_for_mush(desc)
end
model.update(outfits: outfits)
model.update(shortdesc: data['short'])
end
details = {}
(data['details'] || []).each do |name, desc|
Expand All @@ -71,7 +71,8 @@ def self.build_web_profile_data(char, viewer)
details: char.details.map { |name, desc| {
name: name,
desc: Website.format_markdown_for_html(desc)
}}
}},
shortdesc: Website.format_markdown_for_html(char.shortdesc)
}
end

Expand Down
4 changes: 3 additions & 1 deletion plugins/events/locales/locale_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ en:

event_updated_change: "%{title} updated."
event_deleted_change: "%{title} deleted."
event_created_change: "%{title} created."
event_created_change: "%{title} created."

content_warning: "Content Warning:"
3 changes: 3 additions & 0 deletions plugins/events/templates/event_detail.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
%xh<%= t('events.tags_title') %>%xn <%= event.tags.join(" ") %>
<%= event.description %>
<% if !event.content_warning.blank? %>

%xh%xr<%= t('events.content_warning') %>%xn <%= event.content_warning %>
<% end %>
%ld
%xh<%= t('events.signups')%>%xn

Expand Down
1 change: 0 additions & 1 deletion plugins/fs3skills/help/en/xp.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Experience Points (XP) are gained periodically to reflect what your character ha
`learn <ability>` - Spends XP to learn an ability.
`xp` - Shows your progress towards the next rating level.
`xp/costs` - Reviews XP costs.

> **Tip:** If you ever mess up an XP spend, like by typing the wrong skill name, an admin can help you reset it.
2 changes: 1 addition & 1 deletion plugins/idle/public/idle_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def self.save_web_profile_data(char, enactor, args)
char.update(roster_notes: Website.format_input_for_mush(roster_fields['notes']))
char.update(roster_contact: roster_fields['contact'])
char.update(roster_played: (roster_fields['played'] || "").to_bool)
char.update(roster_restricted: (roster_fields['played'] || "").to_bool)
char.update(roster_restricted: (roster_fields['restricted'] || "").to_bool)
end
return nil
end
Expand Down
9 changes: 9 additions & 0 deletions plugins/jobs/public/jobs_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,14 @@ def self.categories
def self.status_vals
Global.read_config("jobs", "status").keys
end

def self.preset_job_responses_for_web
responses = Global.read_config('jobs', 'responses') || []
responses.map { |r| {
name: r["name"],
value: Website.format_input_for_html(r["text"])
}
}
end
end
end
5 changes: 1 addition & 4 deletions plugins/jobs/web/job_request_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ def handle(request)
id: c.id,
name: c.name
}},
responses: (Global.read_config('jobs', 'responses') || []).map { |r| {
name: r["name"],
value: Website.format_input_for_html(r["text"])
}}
responses: Jobs.preset_job_responses_for_web
}
end
end
Expand Down
3 changes: 3 additions & 0 deletions plugins/scenes/helpers/scene_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def self.set_scene_location(scene, location, enactor = nil)
matched_rooms = Room.find_by_name_and_area location
area = nil
vistas = {}
details = {}

if (matched_rooms.count == 1)
room = matched_rooms.first
Expand All @@ -83,6 +84,7 @@ def self.set_scene_location(scene, location, enactor = nil)
description = "%xh#{room.name}%xn%R#{room.description}"
area = room.area
vistas = room.vistas
details = room.details
end
else
description = location
Expand All @@ -96,6 +98,7 @@ def self.set_scene_location(scene, location, enactor = nil)
scene.room.update(description: description)
scene.room.update(area: area)
scene.room.update(vistas: vistas)
scene.room.update(details: details)
end

data = Scenes.build_location_web_data(scene).to_json
Expand Down
2 changes: 1 addition & 1 deletion plugins/scenes/web/get_scene_locations_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def handle(request)
end

Room.all.select { |r| r.room_type == "IC" }
.sort_by { |r| [(r.area_name == area_name) ? 0 : 1, r.name] }
.sort_by { |r| [(r.area_name == area_name) ? 0 : 1, r.name_and_area] }
.map { |r| r.name_and_area }

end
Expand Down
2 changes: 1 addition & 1 deletion plugins/website/templates/scene_list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@



<p>{{scene.summary}}</p>
{{{scene.summary}}}
</td>
<td>
{{#each scene.participant_names as |participant|}}
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.94
0.95

0 comments on commit 43febe0

Please sign in to comment.