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