mirror of
https://github.com/rakion99/shelter-editor.git
synced 2026-09-22 18:12:15 +00:00
Made Skin Recoloring Better
Modified how skin recoloring worked. You can now select the colors from a color pallet.
This commit is contained in:
1 parent
2d71e132bf
commit
700f945e64
2 files changed
+129
-68
No files matched your search
+64
-61
@@ -138,66 +138,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row box" ng-show="section == 'extras'">
|
||||
<div class="col-sm-12 vault_info">
|
||||
<form>
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<label>Hex Color</label><br />
|
||||
<input name="color1" class="jscolor" value="0000FF"> : <span class='value1' ng-bind="colortofos()"></span>
|
||||
<!---Copy this to the Dweller color:--><br />
|
||||
|
||||
<!--<input type="submit" value="Update Color">-->
|
||||
|
||||
<script>
|
||||
{
|
||||
function jscolorFunction()
|
||||
{
|
||||
colortofos();
|
||||
setTimeout(jscolorFunction, 250);
|
||||
}
|
||||
setTimeout(jscolorFunction, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label>New Save</label><br />
|
||||
<button class="btn" onclick="preset('NewSave', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label>All 9999</label><br />
|
||||
<button class="btn" onclick="preset('Stats9999', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label>Super Dwellers</label><br />
|
||||
<button class="btn" onclick="preset('SuperDwellers', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label>Super Hack</label><br />
|
||||
<button class="btn" onclick="preset('SuperHack', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<label title="Savefile names can only be 'Vault1.sav', 'Vault2.sav' or 'Vault3.sav'">Savefile Name: </label> <input type="text" name="presetSaveName" id="presetSaveName" placeholder="Vault1.sav" value="Vault1.sav" ><br>
|
||||
|
||||
<br><center><b><a href="SaveDecrypt.html">Fallout Shelter Save Decryptor</a></b></center>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row box" ng-show="section == 'dwellers'">
|
||||
|
||||
@@ -242,6 +183,8 @@
|
||||
<input type="number" class="form-control" name="maxhealth" ng-model="dweller.health.maxHealth">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4">
|
||||
<label>Radiation</label>
|
||||
<input type="number" class="form-control" name="radiation" ng-model="dweller.health.radiationValue">
|
||||
@@ -254,12 +197,14 @@
|
||||
|
||||
<div class="col-sm-4">
|
||||
<label>Skin Color</label>
|
||||
<input type="number" class="form-control" name="skincolor" ng-model="dweller.skinColor">
|
||||
<input class="form-control jscolor" id="skinColor" name="skincolor" ng-model="skinColor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-4">
|
||||
<label>Hair Color</label>
|
||||
<input type="number" class="form-control" name="hairColor" ng-model="dweller.hairColor">
|
||||
<input class="form-control jscolor" name="hairColor" ng-model="hairColor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -282,7 +227,65 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row box" ng-show="section == 'extras'">
|
||||
<div class="col-sm-12 vault_info">
|
||||
<form>
|
||||
<!--
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="col-sm-12">
|
||||
<label>Hex Color</label><br />
|
||||
<input name="color1" class="jscolor" value="0000FF"> : <span class='value1' ng-bind="colortofos()"></span>
|
||||
|
||||
<script>
|
||||
{
|
||||
function jscolorFunction()
|
||||
{
|
||||
colortofos();
|
||||
setTimeout(jscolorFunction, 250);
|
||||
}
|
||||
setTimeout(jscolorFunction, 1000);
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>--->
|
||||
|
||||
<div class="form-group row">
|
||||
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label>New Save</label><br />
|
||||
<button class="btn" onclick="preset('NewSave', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<label>All 9999</label><br />
|
||||
<button class="btn" onclick="preset('Stats9999', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label>Super Dwellers</label><br />
|
||||
<button class="btn" onclick="preset('SuperDwellers', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<label>Super Hack</label><br />
|
||||
<button class="btn" onclick="preset('SuperHack', document.getElementById('presetSaveName').value)">Activate</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<label title="Savefile names can only be 'Vault1.sav', 'Vault2.sav' or 'Vault3.sav'">Savefile Name: </label> <input type="text" name="presetSaveName" id="presetSaveName" placeholder="Vault1.sav" value="Vault1.sav" ><br>
|
||||
|
||||
<br><center><b><a href="SaveDecrypt.html">Fallout Shelter Save Decryptor</a></b></center>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row tabs">
|
||||
<a href="#" class="tab">Fallout Shelter - Save Editor</a>
|
||||
|
||||
+65
-7
@@ -3,13 +3,38 @@ var iv = sjcl.codec.hex.toBits("7475383967656A693334307438397532");
|
||||
sjcl.beware["CBC mode is dangerous because it doesn't protect message integrity."]();
|
||||
var isLoaded=false;
|
||||
|
||||
var colortofos = function () {
|
||||
var colorhex = document.getElementsByClassName("jscolor")[0].value;
|
||||
function colorHack()
|
||||
{
|
||||
$('.jscolor').each(function() {
|
||||
$(this).focus();
|
||||
});
|
||||
|
||||
$("input").blur();
|
||||
}
|
||||
|
||||
function colorConverter(colorhex, mode)
|
||||
{
|
||||
var mode = ((mode === undefined) ? false : mode);
|
||||
if(mode)
|
||||
{
|
||||
|
||||
var hexColor = colorhex.toString(16).substring(2).toUpperCase();
|
||||
return hexColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
var colorfos;
|
||||
var x = colorhex.substring(0, 0) + "FF" + colorhex.substring(0);
|
||||
colorfos = parseInt(x, 16);
|
||||
$(".value1").html(colorfos);
|
||||
};
|
||||
return colorfos;
|
||||
}
|
||||
}
|
||||
|
||||
function colortofos()
|
||||
{
|
||||
var colorhex = document.getElementsByClassName("jscolor")[0].value;
|
||||
$(".value1").html(colorConverter(colorhex));
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
@@ -173,9 +198,34 @@ app.controller('dwellerController', function ($scope) {
|
||||
|
||||
var _save = {},
|
||||
_lunchboxCount = 0,
|
||||
_handyCount = 0;
|
||||
_petCarrierCount = 0;
|
||||
_starterPackCount = 0;
|
||||
_handyCount = 0,
|
||||
_petCarrierCount = 0,
|
||||
_starterPackCount = 0,
|
||||
_skinColor = null,
|
||||
_hairColor = null;
|
||||
|
||||
|
||||
Object.defineProperty($scope, 'skinColor', {
|
||||
get: function () {
|
||||
return _skinColor
|
||||
},
|
||||
set: function (val) {
|
||||
_skinColor = val;
|
||||
$scope.dweller.skinColor = colorConverter(val);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Object.defineProperty($scope, 'hairColor', {
|
||||
get: function () {
|
||||
return _hairColor
|
||||
},
|
||||
set: function (val) {
|
||||
_hairColor = val;
|
||||
$scope.dweller.hairColor = colorConverter(val);
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty($scope, 'save', {
|
||||
get: function () {
|
||||
return _save
|
||||
@@ -187,6 +237,11 @@ app.controller('dwellerController', function ($scope) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Object.defineProperty($scope, 'lunchboxCount', {
|
||||
get: function () {
|
||||
return _lunchboxCount
|
||||
@@ -235,6 +290,9 @@ app.controller('dwellerController', function ($scope) {
|
||||
|
||||
$scope.editDweller = function (dweller) {
|
||||
$scope.dweller = dweller;
|
||||
_skinColor = colorConverter($scope.dweller.skinColor, true);
|
||||
_hairColor = colorConverter($scope.dweller.hairColor, true);
|
||||
setTimeout(colorHack, 200);
|
||||
};
|
||||
|
||||
$scope.maxhappinessAll = function () {
|
||||
|
||||
Reference in new issue
Block a user