Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Aethyr
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aethyr
Aethyr
Commits
358def61
Commit
358def61
authored
5 years ago
by
Jeffrey Phillips Freeman
Browse files
Options
Downloads
Patches
Plain Diff
fixed rehydration for observers.
parent
3cecd2ac
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/aethyr/core/components/storage.rb
+3
-3
3 additions, 3 deletions
lib/aethyr/core/components/storage.rb
lib/aethyr/core/objects/game_object.rb
+7
-7
7 additions, 7 deletions
lib/aethyr/core/objects/game_object.rb
with
10 additions
and
10 deletions
lib/aethyr/core/components/storage.rb
+
3
−
3
View file @
358def61
...
...
@@ -306,6 +306,7 @@ class StorageMachine
end
end
object
.
rehydrate
(
nil
)
game_objects
<<
object
...
...
@@ -354,9 +355,8 @@ class StorageMachine
object
=
Marshal
.
load
(
gd
[
id
])
log
"Loaded
#{
object
}
"
,
Logger
::
Ultimate
unless
object
.
nil?
or
(
not
include_players
and
object
.
is_a?
Player
)
if
object
.
is_a?
Observable
fix_observers
object
end
object
.
rehydrate
(
nil
)
game_objects
<<
object
objects
<<
object
...
...
This diff is collapsed.
Click to expand it.
lib/aethyr/core/objects/game_object.rb
+
7
−
7
View file @
358def61
...
...
@@ -12,6 +12,13 @@ class GameObject < Publisher
include
Observable
include
Pronoun
@@volatile
=
[]
def
self
.
volatile
(
*
attrs
)
@@volatile
+=
attrs
@@volatile
.
uniq!
end
attr_reader
:short_desc
,
:game_object_id
,
:alt_names
,
:generic
,
:article
,
:sex
,
:show_in_look
,
:actions
,
:balance
,
:admin
,
:manager
attr_accessor
:container
,
:show_in_look
,
:actions
,
:pose
,
:visible
,
:comment
,
:movable
,
:quantity
,
:info
attr_writer
:plural
...
...
@@ -20,13 +27,6 @@ class GameObject < Publisher
alias
:goid
:game_object_id
volatile
:@observer_peers
@@volatile
=
[]
def
self
.
volatile
(
*
attrs
)
@@volatile
+=
attrs
@@volatile
.
uniq!
end
#Creates a new GameObject. Most of this long list of parameters is simply ignored at creation time,
#because they can all be set later.
def
initialize
(
game_object_id
=
nil
,
container
=
nil
,
name
=
""
,
alt_names
=
Array
.
new
,
short_desc
=
"Nothing interesting here."
,
long_desc
=
""
,
generic
=
""
,
sex
=
"n"
,
article
=
"a"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment