Permalink
Browse files

Evict Excavators

  • Loading branch information...
1 parent ddf1117 commit a0bac977581c28f3f5659f4d230aa33f2cec8110 @lemming552 lemming552 committed Mar 6, 2012
Showing with 57 additions and 0 deletions.
  1. +40 −0 moduleParliament.js
  2. +17 −0 smd.js
View
@@ -288,6 +288,25 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
].join('');
Event.on("proposeMembersColonizeSubmit", "click", this.ColonizeOnly, this, true);
}
+ if(this.building.level >= 20) {
+ opts[opts.length] = '<option value="proposeMembersExcavation">Members Only Excavation</option>';
+ dis[dis.length] = [
+ ' <div id="proposeMembersExcavation" class="proposeOption" style="display:none;">',
+ ' Allow only members to excavate on bodies under this stations jurisdiction.<br />',
+ ' <button type="button" id="proposeMembersExcavationSubmit">Propose</button>',
+ ' </div>'
+ ].join('');
+ Event.on("proposeMembersExcavationSubmit", "click", this.ExcavationOnly, this, true);
+ }
+ if(this.building.level >= 21) {
+ opts[opts.length] = '<option value="proposeEvictMining">Evict Excavator</option>';
+ dis[dis.length] = [
+ ' <div id="proposeEvictMining" class="proposeOption" style="display:none;">',
+ ' <label>Excavator:</label><select id="proposeEvictExcavatorJurisdiction"></select><br />',
+ ' <button type="button" id="proposeEvictExcavatorSubmit">Propose Eviction</button>',
+ ' </div>'
+ ].join('');
+ }
if(this.building.level >= 25) {
opts[opts.length] = '<option value="proposeFireBfg">Fire BFG</option>';
dis[dis.length] = [
@@ -594,6 +613,27 @@ if (typeof YAHOO.lacuna.modules.Parliament == "undefined" || !YAHOO.lacuna.modul
scope:this
});
},
+ ExcavationOnly : function(e) {
+ var btn = Event.getTarget(e);
+ btn.disabled = true;
+
+ this.service.propose_members_only_excavation({
+ session_id : Game.GetSession(''),
+ building_id : this.building.id
+ },
+ {
+ success : function(o) {
+ this.rpcSuccess(o);
+ this.proposeMessage.innerHTML = "Proposal for Members Only Excavation successful.";
+ Lib.fadeOutElm(this.proposeMessage);
+ btn.disabled = false;
+ },
+ failure : function(o) {
+ btn.disabled = false;
+ },
+ scope:this
+ });
+ },
ProposeWrit : function(e) {
var btn = Event.getTarget(e);
btn.disabled = true;
View
17 smd.js
@@ -3604,6 +3604,23 @@ if (typeof YAHOO.lacuna.SMD == "undefined" || !YAHOO.lacuna.SMD) {
],
"returns":{"type":"object"}
},
+ "propose_members_only_excavation" : {
+ "description": "",
+ "parameters": [
+ {"name":"session_id", "type":"string", "optional":false},
+ {"name":"building_id", "type":"string", "optional":false}
+ ],
+ "returns":{"type":"object"}
+ },
+ "propose_evict_excavator" : {
+ "description": "",
+ "parameters": [
+ {"name":"session_id", "type":"string", "optional":false},
+ {"name":"building_id", "type":"string", "optional":false},
+ {"name":"platform_id", "type":"string", "optional":false}
+ ],
+ "returns":{"type":"object"}
+ },
"propose_members_only_colonization" : {
"description": "",
"parameters": [

0 comments on commit a0bac97

Please sign in to comment.