Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
bug fix in versioning where the version wasn't updated
  • Loading branch information
uriele committed Sep 11, 2024
1 parent bb679a9 commit cc1a215
Show file tree
Hide file tree
Showing 17 changed files with 250 additions and 174 deletions.
140 changes: 76 additions & 64 deletions Delta Green 2/deltagreen.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion Delta Green 2/src/js/sheetworkers.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ var definesanroll = function definesanroll(san, sold, bnew, bold, sanflags, char

setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
startRoll("".concat(rollValue, " {{isSkill=[[").concat(_isSkill, "]]}}"), function (results) {
var sanity_old = results.results.sanity_old.result;
var sanity_new = results.results.sanity_new.result;
Expand Down Expand Up @@ -170,6 +172,7 @@ var setBondsLocalVariables = function setBondsLocalVariables() {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log('Bonds updated on open');
});
});
Expand Down
5 changes: 3 additions & 2 deletions Delta Green 2/src/js/sheetworkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const definesanroll=(san,sold,bnew,bold,sanflags,character_name,San2_disorder={}
}

setAttrs(update, {silent:true},()=>{

console.info('update',update)
});

startRoll(`${rollValue} {{isSkill=[[${_isSkill}]]}}`, (results)=> {
Expand Down Expand Up @@ -134,7 +134,8 @@ const setBondsLocalVariables = () => {
console.log('inside repeating section');

setAttrs(update,{silent:true},()=>{
console.log('Bonds updated on open');
console.info('update',update);
console.log('Bonds updated on open');
});
});
});
Expand Down
1 change: 1 addition & 0 deletions Delta Green 2/src/js/sheetworkers_handlersheet.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var update_repeating_agents = function update_repeating_agents(repsecid, charact
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log("Updated ".concat(repsecid, " with ").concat(character_identification));
});
finishRoll(results.rollId);
Expand Down
1 change: 1 addition & 0 deletions Delta Green 2/src/js/sheetworkers_handlersheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const update_repeating_agents = (repsecid,character_identification) => {
const bpmax=parseInt(results.results.breaking_point_max.result)||0;
update[`${repsecid}_has_breaking_points`]=bp<bpmax;
setAttrs(update,{silent:true},()=>{
console.info('update',update);
console.log(`Updated ${repsecid} with ${character_identification}`);
});
finishRoll(results.rollId);
Expand Down
54 changes: 42 additions & 12 deletions Delta Green 2/src/js/sheetworkers_onchange.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ arrays['_colored_derivative'].forEach(function (vitality) {
update["".concat(vitality, "_points")] = value;
setAttrs(update, {
silent: false
}, function () {});
}, function () {
console.info('update', update);
});
});
});
});
Expand All @@ -66,7 +68,9 @@ _skill_percent.forEach(function (_skill_sec_percent) {

setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
}

if (isInNumericalForm) {
Expand All @@ -79,7 +83,9 @@ _skill_percent.forEach(function (_skill_sec_percent) {

setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
}

if (isInLinkingForm) {
Expand All @@ -94,7 +100,9 @@ _skill_percent.forEach(function (_skill_sec_percent) {

setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
}

Expand All @@ -117,7 +125,9 @@ _only_number.forEach(function (_sect_object) {
update[input] = number;
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
});
});
Expand All @@ -140,7 +150,9 @@ _number_or_roll.forEach(function (_sect_object) {
update[input] = number;
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
});
});
Expand All @@ -158,6 +170,7 @@ arrays['_sanity_loss'].forEach(function (sanity) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.info("Sanity points updated");
});
});
Expand Down Expand Up @@ -195,6 +208,7 @@ _shotgun_or_blast_radius.forEach(function (main) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log('Shotgun or Blast Radius updated');
});
});
Expand Down Expand Up @@ -225,6 +239,7 @@ arrays['_settings_wp'].forEach(function (wp_setting) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log('Willpower Settings updated');
});
});
Expand All @@ -237,6 +252,7 @@ on("change:repeating_skills:rank", function (eventInfo) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log('Repeating Skills updated on change');
});
});
Expand All @@ -260,6 +276,7 @@ on("change:unnatural", function (eventInfo) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
console.log('Sanity points updated');
});
});
Expand Down Expand Up @@ -327,7 +344,9 @@ on("change:breaking_point_reset", function (eventInfo) {
update['breaking_point_reset'] = Math.min(Math.max(0, breaking_point_reset), 99);
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
});
on("clicked:breaking_point_resets", function () {
Expand All @@ -341,7 +360,9 @@ on("change:global_modifier_number", function () {
};
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
});
on("change:repeating_skills remove:repeating_skills", function () {
Expand All @@ -353,7 +374,9 @@ on("change:repeating_weapons:armor_piercing", function () {
update_armor_piercing(values.repeating_weapons_armor_piercing, update);
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
});
on("change:repeating_weapons:ammo_total remove:repeating_weapons", function (values) {
Expand All @@ -364,15 +387,19 @@ on("change:repeating_weapons:ammo_total remove:repeating_weapons", function (val
update["repeating_weapons_hasammo"] = ammo_total > 0 ? 'active' : '0';
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
on("change:repeating_weapons:ammo", function (values) {
var ammo = Math.max(0, parseInt(values.newValue) || 0);
var update = {};
update["repeating_weapons_ammo"] = ammo;
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});

_bond_attributes.forEach(function (attrName) {
Expand Down Expand Up @@ -405,6 +432,7 @@ arrays['_adaptation'].forEach(function (adaptation) {
setAttrs(update, {
silent: true
}, function () {
console.info('update', update);
update["".concat(adaptation, "_adapted")] == 1 ? console.log("".concat(adaptation, " adapted")) : console.log("".concat(adaptation, " not adapted"));
});
});
Expand All @@ -428,7 +456,9 @@ on("change:useKey", function () {
console.log("useKey: ".concat(val));
setAttrs(update, {
silent: true
}, function () {});
}, function () {
console.info('update', update);
});
});
}); // === Update repeating skills on change

Expand Down
39 changes: 25 additions & 14 deletions Delta Green 2/src/js/sheetworkers_onchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ arrays['_colored_derivative'].forEach(vitality => {
update[`${vitality}_points`]=value;

setAttrs(update, {silent:false}, ()=>{

console.info('update',update);
});
});
});
Expand All @@ -51,7 +51,7 @@ arrays['_colored_derivative'].forEach(vitality => {
update[input]=0;
if (section !=='skills') {update[skillspan]=update[input];}
setAttrs(update,{silent:true},()=>{

console.info('update',update);
});
}

Expand All @@ -60,7 +60,7 @@ arrays['_colored_derivative'].forEach(vitality => {
update[input]=number;
if (section !=='skills') {update[skillspan]=update[input];}
setAttrs(update,{silent:true},()=>{

console.info('update',update);
});
}

Expand All @@ -71,7 +71,7 @@ arrays['_colored_derivative'].forEach(vitality => {
const number= setMinMax(values[skillname]);
if (section !=='skills') {update[skillspan]=number;}
setAttrs(update,{silent:true},()=>{

console.info('update',update);
});
});
};
Expand All @@ -91,6 +91,7 @@ _only_number.forEach(_sect_object => {
const number=setMinMax(value[input]);
update[input]=number;
setAttrs(update,{silent:true},()=>{
console.info('update',update);
});
});
});
Expand All @@ -113,6 +114,7 @@ _number_or_roll.forEach(_sect_object => {
const number=parseRoll(value[input]);
update[input]=number;
setAttrs(update,{silent:true},()=>{
console.info('update',update);
});
});
});
Expand All @@ -127,6 +129,7 @@ arrays['_sanity_loss'].forEach(sanity => {
const update={};
update[sanity]=value;
setAttrs(update, {silent:true}, () => {
console.info('update',update);
console.info(`Sanity points updated`);
});
});
Expand Down Expand Up @@ -161,7 +164,8 @@ _shotgun_or_blast_radius.forEach(main => {
}

setAttrs(update,{silent:true},()=>{
console.log('Shotgun or Blast Radius updated');
console.info('update',update);
console.log('Shotgun or Blast Radius updated');

});
});
Expand All @@ -187,7 +191,8 @@ arrays['_settings_wp'].forEach(wp_setting => {
}

setAttrs(update, {silent:true}, () => {
console.log('Willpower Settings updated');
console.info('update',update);
console.log('Willpower Settings updated');
});
});
});
Expand All @@ -199,7 +204,8 @@ on(`change:repeating_skills:rank`, (eventInfo) => {
update[eventInfo.sourceAttribute]=newValue;

setAttrs(update,{silent:true},()=>{
console.log('Repeating Skills updated on change');
console.info('update',update);
console.log('Repeating Skills updated on change');
});
});

Expand All @@ -218,6 +224,7 @@ on(`change:unnatural`, function(eventInfo) {
update={sanity_points_max: 99-newvalue, unnatural: newvalue};

setAttrs(update,{silent:true},()=>{
console.info('update',update);
console.log('Sanity points updated');
});
});
Expand Down Expand Up @@ -285,7 +292,7 @@ on(`change:breaking_point_reset`,(eventInfo)=>{
const update = {};
update['breaking_point_reset'] = Math.min(Math.max(0,breaking_point_reset),99);
setAttrs(update, {silent:true}, () => {

console.info('update',update);
});
});
});
Expand All @@ -299,7 +306,7 @@ on(`change:global_modifier_number`, () => {
const modifier = parseInt(values['global_modifier_number']) || 0;
const update = {global_modifier_number:modifier};
setAttrs(update, {silent:true}, () => {

console.info('update',update);
});
});
});
Expand All @@ -310,9 +317,10 @@ on(`change:repeating_skills remove:repeating_skills`, () => {

on(`change:repeating_weapons:armor_piercing`, () => {
getAttrs(['repeating_weapons_armor_piercing'], (values) => {
const update = {};
update_armor_piercing(values.repeating_weapons_armor_piercing,update);
setAttrs(update, {silent:true}, () => {
const update = {};
update_armor_piercing(values.repeating_weapons_armor_piercing,update);
setAttrs(update, {silent:true}, () => {
console.info('update',update);
});
});
});
Expand All @@ -324,6 +332,7 @@ on(`change:repeating_weapons:ammo_total remove:repeating_weapons`, (values) => {
update[`repeating_weapons_hasammo`] = ammo_total > 0 ? 'active' : '0';

setAttrs(update, {silent:true}, () => {
console.info('update',update);
});
});

Expand All @@ -332,6 +341,7 @@ on(`change:repeating_weapons:ammo`, (values) => {
const update = {};
update[`repeating_weapons_ammo`] = ammo;
setAttrs(update, {silent:true}, () => {
console.info('update',update)
});
});

Expand Down Expand Up @@ -363,7 +373,8 @@ arrays['_adaptation'].forEach(adaptation => {
const update={};
update[`${adaptation}_adapted`]= value===2 ? 1 : 0;
setAttrs(update, {silent:true}, () => {
update[`${adaptation}_adapted`] == 1 ? console.log(`${adaptation} adapted`) : console.log(`${adaptation} not adapted`);
console.info('update',update);
update[`${adaptation}_adapted`] == 1 ? console.log(`${adaptation} adapted`) : console.log(`${adaptation} not adapted`);
});
});
});
Expand All @@ -382,7 +393,7 @@ on(`change:useKey`, () => {


setAttrs(update, {silent:true}, () => {

console.info('update',update);
});
});
});
Expand Down
Loading

0 comments on commit cc1a215

Please sign in to comment.