Skip to content

Commit

Permalink
More work on settlement page
Browse files Browse the repository at this point in the history
- Innovations added
- Locations added (With custom location support)
- Principles added (With custom principle support)
  • Loading branch information
LupusUmbrae committed Mar 15, 2016
1 parent 417608e commit a19bfad
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 4 deletions.
42 changes: 38 additions & 4 deletions static/javascript/kdm.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,46 @@

// NEMISIS MONSTERS

// INNOCATIONS

// SETTLEMENT LOCATIONS
// INNOVATIONS 22
var innovations = [];
for(var i =0; i < 22; i++) {
innovations.push("");
}
innovations[0] = "Language"
kdm.innovations = innovations;

// SETTLEMENT LOCATIONS - 18
var locations = [];
locations.push({name : "Lantern Hoard", owned : true, disabled: true});
locations.push({name : "Bone Smith", disabled: true});
locations.push({name : "Skinnery", disabled: true});
locations.push({name : "Organ Grinder", disabled: true});
locations.push({name : "Catarium", disabled: true});
locations.push({name : "Weapon Crafter", disabled: true});
locations.push({name : "Leather Worker", disabled: true});
locations.push({name : "Stone Circle", disabled: true});
locations.push({name : "Barber Surgeon", disabled: true});
locations.push({name : "Plumery", disabled: true});
locations.push({name : "Blacksmith", disabled: true});
locations.push({name : "Mask Maker", disabled: true});
for(var i = 0; i < 8; i++) {
locations.push({ name : ""})
}
kdm.locations = locations;

// PRINCIPLES

var principles = [];

principles.push({name : "New Life", left : "Protect the Young", right: "Survival of the Fittest", disabled:true});
principles.push({name : "Death", left : "Cannibalize", right: "Graves", disabled:true});
principles.push({name : "Society", left : "Collective Toil", right: "Accept Darkness", disabled:true});
principles.push({name : "Conviction", left : "Barbaric", right: "Romantic", disabled:true});

principles.push({name : "", left : "", right: ""});
principles.push({name : "", left : "", right: ""});

kdm.principles = principles;

// QUARRIES

// STORAGE
Expand Down
3 changes: 3 additions & 0 deletions static/templates/settlement.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<div class="row">
<div class="col-xs-8">
<ng-include src="'static/templates/settlement/name.html'"></ng-include>
<ng-include src="'static/templates/settlement/innovations.html'"></ng-include>
<ng-include src="'static/templates/settlement/principles.html'"></ng-include>
</div>
<div class="col-xs-4">
<ng-include src="'static/templates/settlement/death.html'"></ng-include>
<ng-include src="'static/templates/settlement/locations.html'"></ng-include>
</div>
</div>
<div class="row">
Expand Down
26 changes: 26 additions & 0 deletions static/templates/settlement/innovations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="row element">
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12">
<big>Innovations</big><br />
<small>The settlement's innovations (including weapon masteries).</small>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="row" ng-repeat="innovation in kdm.innovations | limitTo:11:0 track by $index">
<div class="col-xs-12">
<input type="text" class="underlined fullwidth left-align" ng-model="kdm.innovations[$index]">
</div>
</div>
</div>
<div class="col-md-6">
<div class="row" ng-repeat="innovation in kdm.innovations | limitTo:11:11 track by $index">
<div class="col-xs-12">
<input type="text" class="underlined fullwidth left-align" ng-model="kdm.innovations[$index+11]">
</div>
</div>
</div>
</div>
</div>
</div>
39 changes: 39 additions & 0 deletions static/templates/settlement/locations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div class="row element">
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12">
<big>Settlement Locations</big><br />
<small>Locations in your settlement.</small>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="row" ng-repeat="location in kdm.locations | limitTo:9:0 track by $index">
<div class="col-xs-2">
<label>
<input type="checkbox" ng-model="location.owned" class="mini">
<span></span>
</label>
</div>
<div class="col-xs-10">
<input type="text" ng-readonly="location.disabled" class="underlined fullwidth left-align" ng-model="location.name">
</div>
</div>
</div>
<div class="col-md-6">
<div class="row" ng-repeat="location in kdm.locations | limitTo:9:9 track by $index">
<div class="col-xs-2">
<label>
<input type="checkbox" ng-model="location.owned" class="mini">
<span></span>
</label>
</div>
<div class="col-xs-10">
<input type="text" ng-readonly="location.disabled" class="underlined fullwidth left-align" ng-model="location.name">
</div>
</div>
</div>

</div>
</div>
</div>
30 changes: 30 additions & 0 deletions static/templates/settlement/principles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="row element">
<div class="col-xs-12">
<div class="row">
<div class="col-xs-12">
<big>Principles</big><br />
<small>The settlement's established principles.</small>
</div>
</div>
<div class="row" ng-repeat="principle in kdm.principles track by $index">
<div class="col-xs-3">
<input type="text" ng-readonly="principle.disabled" class="underlined fullwidth left-align" ng-model="principle.name">
</div>
<div class="col-xs-1">
<label class="radio-inline"><input type="radio" name="{{principle.name}}" value="{{principle.left}}" ng-model="principle.choice" class="radio-box"><span></span></label>
</div>
<div class="col-xs-3">
<input type="text" ng-readonly="principle.disabled" class="underlined left-align" ng-model="principle.left">
</div>
<div class="col-xs-1">
<small>or</small>
</div>
<div class="col-xs-1">
<label class="radio-inline"><input type="radio" name="{{principle.name}}" value="{{principle.right}}" ng-model="principle.choice" class="radio-box"><span></span></label>
</div>
<div class="col-xs-3">
<input type="text" ng-readonly="principle.disabled" class="underlined left-align" ng-model="principle.right">
</div>
</div>
</div>
</div>

0 comments on commit a19bfad

Please sign in to comment.