Also improved the display of features and generally iterated on their manipulation. Characters now fetch the relevant effects directly when making a calculation, simplifying almost everything. Effects now store a reference to their source if they have one. Effect names are now optional, they can be fetched from the source's name if the source exists.
21 lines
640 B
JavaScript
21 lines
640 B
JavaScript
Meteor.publish("singleCharacter", function(characterId, userId){
|
|
//TODO check if this characer can be viewed by this user
|
|
return Characters.find({_id: characterId});
|
|
});
|
|
|
|
Meteor.publish("characterContainers", function(characterId, userId){
|
|
return Containers.find({charId: characterId});
|
|
});
|
|
|
|
Meteor.publish("characterItems", function(characterId, userId){
|
|
return Items.find({charId: characterId});
|
|
});
|
|
|
|
Meteor.publish("characterFeatures", function(characterId, userId){
|
|
return Features.find({charId: characterId});
|
|
});
|
|
|
|
Meteor.publish("characterEffects", function(characterId, userId){
|
|
return Effects.find({charId: characterId});
|
|
});
|