Skip to content

Commit

Permalink
Merge pull request #462 from marcrobledo/CM30-Travel-Medallion
Browse files Browse the repository at this point in the history
Cm30 travel medallion
  • Loading branch information
marcrobledo authored Sep 29, 2024
2 parents 74fa27d + 2cbd45c commit 6de5e0b
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion zelda-totk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,14 @@ <h3 data-translate="Zonai devices">Zonai devices</h3><div id="container-devices"

<!-- TAB: KEY -->
<div id="tab-key">
<h3 data-translate="Key items">Key items</h3><div id="container-key"></div>
<h3 data-translate="Key items">Key items</h3><div id="key-abilities" class="text-center mb-20">
<label><input type="checkbox" id="key-abilities-UltraHand" /> <img src="assets/item_icons/key/Obj_UltraHand.png" class="item-icon" loading="lazy"/></label>
<label><input type="checkbox" id="key-abilities-OneTouchBond" /> <img src="assets/item_icons/key/Obj_OneTouchBond.png" class="item-icon" loading="lazy"/></label>
<label><input type="checkbox" id="key-abilities-Tooreroof" /> <img src="assets/item_icons/key/Obj_Tooreroof.png" class="item-icon" loading="lazy"/></label>
<label><input type="checkbox" id="key-abilities-ReverseRecorder" /> <img src="assets/item_icons/key/Obj_ReverseRecorder.png" class="item-icon" loading="lazy"/></label>
<label><input type="checkbox" id="key-abilities-AutoBuilder" /> <img src="assets/item_icons/key/Obj_AutoBuilder.png" class="item-icon" loading="lazy"/></label>
<label><input type="checkbox" id="key-abilities-AmiiboItem" /> <img src="assets/item_icons/key/Obj_AmiiboItem.png" class="item-icon" loading="lazy"/></label>
</div><div id="container-key"></div>
<div class="text-center">
<button class="btn" onclick="SavegameEditor.addItem('key')"><img src="assets/octicons/octicon_plus_circle.svg" loading="lazy" class="octicon" /> <span data-translate="Add key item">Add key item</span></button>
</div>
Expand Down
11 changes: 9 additions & 2 deletions zelda-totk/zelda-totk.class.item.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
The legend of Zelda: Tears of the Kingdom savegame editor - Item class (last update 2024-01-10)
The legend of Zelda: Tears of the Kingdom savegame editor - Item class (last update 2024-09-29)
by Marc Robledo 2023-2024
item names compiled by Echocolat, Exincracci, HylianLZ and Karlos007
Expand Down Expand Up @@ -165,6 +165,14 @@ Item.KEY_COUNTABLE=[
'Obj_AutoBuilderDraftAssassin_00',
'Item_StableHostelAccommodationCoupon_A'
];
Item.ABILITIES=[
'UltraHand',
'OneTouchBond', /* fusion */
'Tooreroof', /* ascent */
'ReverseRecorder', /* recall */
'AutoBuilder',
'AmiiboItem'
];



Expand Down Expand Up @@ -921,7 +929,6 @@ Item.AVAILABILITY={
'Obj_Photo_Weapon', //Weapon Photo
'Obj_SheikSensor', //Sheikah Sensor
'Obj_SheikSensorLv2', //Sheikah Sensor (Level 2)
'Obj_Warp', //Purah Pad Warp Functionality
]
};

Expand Down
36 changes: 36 additions & 0 deletions zelda-totk/zelda-totk.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,24 @@ SavegameEditor={
variable=new Variable('OwnedCustomizableHorseTack_Reins.'+item.id, 'Bool');
}else if(/^GameRomHorseSaddle_/.test(item.id)){
variable=new Variable('OwnedCustomizableHorseTack_Saddle.'+item.id, 'Bool');
}else if(item.id==='Obj_Camera'){
variable=new Variable('IsGet.Obj_Camera', 'Bool');
var variable2=new Variable('IsGetAnyway.Obj_Camera', 'Bool');
variable2.value=true;
variable2.save();
}else if(item.id==='Obj_WarpDLC'){
variable=new Variable('IsGet.Obj_WarpDLC', 'Bool');
var variable2=new Variable('IsGetAnyway.Obj_WarpDLC', 'Bool');
variable2.value=true;
variable2.save();
variable2=new Variable('IsGet.Obj_Warp', 'Bool');
variable2.value=true;
variable2.save();
variable2=new Variable('IsGetAnyway.Obj_Warp', 'Bool');
variable2.value=true;
variable2.save();
}

if(variable && !variable.value){
variable.value=true;
variable.save();
Expand Down Expand Up @@ -1557,6 +1574,18 @@ SavegameEditor={
);
});

/* abilities */
Item.ABILITIES.forEach(function(abilityId){
document.getElementById('key-abilities-'+abilityId).addEventListener('change', function(){
var variable1=new Variable('IsGet.Obj_'+abilityId, 'Bool');
var variable2=new Variable('IsGetAnyway.Obj_'+abilityId, 'Bool');
variable1.value=this.checked;
variable2.value=this.checked;
variable1.save();
variable2.save();
});
});

/* master editor mini */
$('#button-hash-editor-export').on('click', TOTKMasterEditor.miniExport);
$('#button-hash-editor-import').on('click', function(evt){
Expand Down Expand Up @@ -1652,6 +1681,13 @@ SavegameEditor={
Pouch.updateItemIcon(item);
});

/* abilities */
Item.ABILITIES.forEach(function(abilityId){
var variable1=new Variable('IsGet.Obj_'+abilityId, 'Bool');
var variable2=new Variable('IsGetAnyway.Obj_'+abilityId, 'Bool');
document.getElementById('key-abilities-'+abilityId).checked=variable1.value && variable2.value;
});

/* read pouches */
this.pouches={
weapons:new Pouch('weapons'),
Expand Down

0 comments on commit 6de5e0b

Please sign in to comment.