Merge branch 'remove-categories' of ssh://cryps.gg:40022/~/cryps into remove-categories
This commit is contained in:
commit
9cac638d59
@ -6,7 +6,6 @@ export const setVboxHighlight = value => ({ type: 'SET_VBOX_HIGHLIGHT', value })
|
|||||||
export const setInstances = value => ({ type: 'SET_INSTANCES', value });
|
export const setInstances = value => ({ type: 'SET_INSTANCES', value });
|
||||||
export const setNav = value => ({ type: 'SET_NAV', value });
|
export const setNav = value => ({ type: 'SET_NAV', value });
|
||||||
export const setInstance = value => ({ type: 'SET_INSTANCE', value });
|
export const setInstance = value => ({ type: 'SET_INSTANCE', value });
|
||||||
export const setPlayer = value => ({ type: 'SET_PLAYER', value });
|
|
||||||
export const setPing = value => ({ type: 'SET_PING', value });
|
export const setPing = value => ({ type: 'SET_PING', value });
|
||||||
export const setGame = value => ({ type: 'SET_GAME', value });
|
export const setGame = value => ({ type: 'SET_GAME', value });
|
||||||
export const setResolution = value => ({ type: 'SET_RESOLUTION', value });
|
export const setResolution = value => ({ type: 'SET_RESOLUTION', value });
|
||||||
|
|||||||
@ -12,9 +12,11 @@ function Info(args) {
|
|||||||
|
|
||||||
combiner,
|
combiner,
|
||||||
instance,
|
instance,
|
||||||
player,
|
account,
|
||||||
} = args;
|
} = args;
|
||||||
|
|
||||||
|
const player = instance.players.find(p => p.id === account.id);
|
||||||
|
|
||||||
function Info() {
|
function Info() {
|
||||||
if (!info) return false;
|
if (!info) return false;
|
||||||
const fullInfo = itemInfo.items.find(i => i.item === info) || INFO[info];
|
const fullInfo = itemInfo.items.find(i => i.item === info) || INFO[info];
|
||||||
@ -93,6 +95,7 @@ function Info(args) {
|
|||||||
|
|
||||||
function Combos() {
|
function Combos() {
|
||||||
if (!player) return false;
|
if (!player) return false;
|
||||||
|
if (combiner.every(c => !c)) return false;
|
||||||
|
|
||||||
if (!(combiner.every(u => u === null))) {
|
if (!(combiner.every(u => u === null))) {
|
||||||
const filteredCombos = itemInfo.combos
|
const filteredCombos = itemInfo.combos
|
||||||
|
|||||||
@ -11,7 +11,7 @@ const addState = connect(
|
|||||||
info,
|
info,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
instance,
|
instance,
|
||||||
player,
|
account,
|
||||||
} = state;
|
} = state;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -20,7 +20,7 @@ const addState = connect(
|
|||||||
info,
|
info,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
instance,
|
instance,
|
||||||
player,
|
account,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@ -10,13 +10,14 @@ const actions = require('../actions');
|
|||||||
|
|
||||||
const addState = connect(
|
const addState = connect(
|
||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
const { ws, instance, player } = state;
|
const { ws, instance, account } = state;
|
||||||
|
const player = instance.players.find(p => p.id === account.id);
|
||||||
|
|
||||||
function sendInstanceReady() {
|
function sendInstanceReady() {
|
||||||
return ws.sendInstanceReady(instance.id);
|
return ws.sendInstanceReady(instance.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { instance, player, sendInstanceReady };
|
return { player, instance, sendInstanceReady };
|
||||||
},
|
},
|
||||||
|
|
||||||
function receiveDispatch(dispatch) {
|
function receiveDispatch(dispatch) {
|
||||||
|
|||||||
@ -8,7 +8,8 @@ const actions = require('../actions');
|
|||||||
|
|
||||||
const addState = connect(
|
const addState = connect(
|
||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
const { ws, instance, player, account, itemInfo, itemEquip, activeCryp } = state;
|
const { ws, instance, account, itemInfo, itemEquip, activeCryp } = state;
|
||||||
|
const player = instance.players.find(p => p.id === account.id);
|
||||||
|
|
||||||
function sendInstanceReady() {
|
function sendInstanceReady() {
|
||||||
return ws.sendInstanceReady(instance.id);
|
return ws.sendInstanceReady(instance.id);
|
||||||
@ -128,6 +129,7 @@ function Cryp(props) {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={i}
|
key={i}
|
||||||
|
disabled={!skill && !itemEquip}
|
||||||
className={classes}
|
className={classes}
|
||||||
onClick={skillClick}
|
onClick={skillClick}
|
||||||
onDblClick={skillDblClick}
|
onDblClick={skillDblClick}
|
||||||
|
|||||||
@ -8,7 +8,8 @@ const { convertItem, SPECS } = require('./../utils');
|
|||||||
|
|
||||||
const addState = connect(
|
const addState = connect(
|
||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
const { player, activeCryp, itemInfo, info, ws, instance, itemUnequip } = state;
|
const { account, activeCryp, itemInfo, info, ws, instance, itemUnequip } = state;
|
||||||
|
const player = instance.players.find(p => p.id === account.id);
|
||||||
|
|
||||||
function sendUnequip(crypId, item) {
|
function sendUnequip(crypId, item) {
|
||||||
return ws.sendVboxUnequip(instance.id, crypId, item);
|
return ws.sendVboxUnequip(instance.id, crypId, item);
|
||||||
|
|||||||
@ -17,8 +17,6 @@ const addState = connect(
|
|||||||
} = state;
|
} = state;
|
||||||
|
|
||||||
function sendInstanceState(instance) {
|
function sendInstanceState(instance) {
|
||||||
ws.clearGameStateTimeout();
|
|
||||||
ws.clearInstanceStateTimeout();
|
|
||||||
return ws.sendInstanceState(instance.id);
|
return ws.sendInstanceState(instance.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,16 @@ const addState = connect(
|
|||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
const {
|
const {
|
||||||
ws,
|
ws,
|
||||||
|
account,
|
||||||
instance,
|
instance,
|
||||||
player,
|
|
||||||
combiner,
|
combiner,
|
||||||
reclaiming,
|
reclaiming,
|
||||||
vboxHighlight,
|
vboxHighlight,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
} = state;
|
} = state;
|
||||||
|
|
||||||
|
const player = instance.players.find(p => p.id === account.id);
|
||||||
|
|
||||||
function sendVboxDiscard() {
|
function sendVboxDiscard() {
|
||||||
return ws.sendVboxDiscard(instance.id);
|
return ws.sendVboxDiscard(instance.id);
|
||||||
}
|
}
|
||||||
@ -34,7 +36,6 @@ const addState = connect(
|
|||||||
return ws.sendVboxReclaim(instance.id, i);
|
return ws.sendVboxReclaim(instance.id, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
combiner,
|
combiner,
|
||||||
instance,
|
instance,
|
||||||
|
|||||||
@ -17,24 +17,24 @@ function registerEvents(store) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// cryp animations
|
// // cryp animations
|
||||||
function crypAnimations() {
|
// function crypAnimations() {
|
||||||
const cryps = document.querySelectorAll('img');
|
// const cryps = document.querySelectorAll('img');
|
||||||
if (!cryps.length) return window.requestAnimationFrame(crypAnimations);
|
// if (!cryps.length) return window.requestAnimationFrame(crypAnimations);
|
||||||
return anime({
|
// return anime({
|
||||||
targets: 'img',
|
// targets: 'img',
|
||||||
translateX: () => anime.random(-20, 20),
|
// translateX: () => anime.random(-20, 20),
|
||||||
translateY: () => anime.random(0, -40),
|
// translateY: () => anime.random(0, -40),
|
||||||
rotate: () => anime.random(-15, 15),
|
// rotate: () => anime.random(-15, 15),
|
||||||
duration: () => anime.random(5000, 6000),
|
// duration: () => anime.random(5000, 6000),
|
||||||
delay: () => anime.random(0, 1000),
|
// delay: () => anime.random(0, 1000),
|
||||||
direction: 'alternate',
|
// direction: 'alternate',
|
||||||
easing: 'linear',
|
// easing: 'linear',
|
||||||
loop: true,
|
// loop: true,
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
setInterval(crypAnimations, 10000);
|
// setInterval(crypAnimations, 10000);
|
||||||
crypAnimations();
|
// crypAnimations();
|
||||||
|
|
||||||
function setPing(ping) {
|
function setPing(ping) {
|
||||||
store.dispatch(actions.setPing(ping));
|
store.dispatch(actions.setPing(ping));
|
||||||
@ -141,8 +141,6 @@ function registerEvents(store) {
|
|||||||
|
|
||||||
function setInstance(v) {
|
function setInstance(v) {
|
||||||
const { account, ws } = store.getState();
|
const { account, ws } = store.getState();
|
||||||
const player = v.players.find(p => p.id === account.id);
|
|
||||||
if (player) store.dispatch(actions.setPlayer(player));
|
|
||||||
if (v) ws.startInstanceStateTimeout(v.id);
|
if (v) ws.startInstanceStateTimeout(v.id);
|
||||||
return store.dispatch(actions.setInstance(v));
|
return store.dispatch(actions.setInstance(v));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,6 @@ module.exports = {
|
|||||||
itemUnequip: createReducer(null, 'SET_ITEM_UNEQUIP'),
|
itemUnequip: createReducer(null, 'SET_ITEM_UNEQUIP'),
|
||||||
nav: createReducer(null, 'SET_NAV'),
|
nav: createReducer(null, 'SET_NAV'),
|
||||||
ping: createReducer(null, 'SET_PING'),
|
ping: createReducer(null, 'SET_PING'),
|
||||||
player: createReducer(null, 'SET_PLAYER'),
|
|
||||||
reclaiming: createReducer(false, 'SET_RECLAIMING'),
|
reclaiming: createReducer(false, 'SET_RECLAIMING'),
|
||||||
resolution: createReducer(null, 'SET_RESOLUTION'),
|
resolution: createReducer(null, 'SET_RESOLUTION'),
|
||||||
showLog: createReducer(false, 'SET_SHOW_LOG'),
|
showLog: createReducer(false, 'SET_SHOW_LOG'),
|
||||||
|
|||||||
@ -928,11 +928,11 @@ impl Skill {
|
|||||||
Skill::StrikeII => Skill::Strike.speed(),
|
Skill::StrikeII => Skill::Strike.speed(),
|
||||||
Skill::StrikeIII => Skill::Strike.speed(),
|
Skill::StrikeIII => Skill::Strike.speed(),
|
||||||
|
|
||||||
Skill::SiphonTick => Item::from(Skill::Siphon).speed(),
|
Skill::SiphonTick => Skill::Siphon.speed(),
|
||||||
Skill::DecayTick => Item::from(Skill::Decay).speed(),
|
Skill::DecayTick => Skill::Decay.speed(),
|
||||||
Skill::TriageTick => Item::from(Skill::Triage).speed(),
|
Skill::TriageTick => Skill::Triage.speed(),
|
||||||
Skill::StrangleTick => Item::from(Skill::Strangle).speed(),
|
Skill::StrangleTick => Skill::Strangle.speed(),
|
||||||
Skill::CorruptionTick => Item::from(Skill::Corrupt).speed(),
|
Skill::CorruptionTick => Skill::Corrupt.speed(),
|
||||||
|
|
||||||
_ => Item::from(*self).speed(),
|
_ => Item::from(*self).speed(),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user