chore: tidy
This commit is contained in:
parent
05ec420e5e
commit
7691ff0f19
|
@ -34,7 +34,6 @@ export default () => {
|
||||||
// Track room.
|
// Track room.
|
||||||
case Room.resourceId: {
|
case Room.resourceId: {
|
||||||
flecks.set('$humus/app.room', created);
|
flecks.set('$humus/app.room', created);
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
created.universe = synchronizer.synchronized(7, 0);
|
created.universe = synchronizer.synchronized(7, 0);
|
||||||
setRoom(created);
|
setRoom(created);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -5,13 +5,11 @@ export const selfEntitySelector = ({selfEntity}) => selfEntity;
|
||||||
const slice = createSlice({
|
const slice = createSlice({
|
||||||
name: 'humus/self-entity',
|
name: 'humus/self-entity',
|
||||||
initialState: null,
|
initialState: null,
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
reducers: {
|
reducers: {
|
||||||
setSelfEntity: (state, {payload}) => payload,
|
setSelfEntity: (state, {payload}) => payload,
|
||||||
},
|
},
|
||||||
extraReducers: {
|
extraReducers: {
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
|
|
@ -14,7 +14,6 @@ export default (flecks) => class Vulnerable extends Trait {
|
||||||
$$isNotHarmedBy = [];
|
$$isNotHarmedBy = [];
|
||||||
|
|
||||||
async acceptHarm(harm) {
|
async acceptHarm(harm) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
harm.from = this.entity.list
|
harm.from = this.entity.list
|
||||||
? await Promise.race([
|
? await Promise.race([
|
||||||
this.entity.list.waitForEntity(harm.from),
|
this.entity.list.waitForEntity(harm.from),
|
||||||
|
|
|
@ -13,7 +13,6 @@ export default () => class RoomWaterPacket extends Packet {
|
||||||
|
|
||||||
static pack(data) {
|
static pack(data) {
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
data[i].amount = Math.floor(data[i].amount);
|
data[i].amount = Math.floor(data[i].amount);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
|
|
@ -79,7 +79,6 @@ export default (flecks) => class Receptacle extends decorate(Trait) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Set wielder.
|
// Set wielder.
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
item.wielder = this.entity;
|
item.wielder = this.entity;
|
||||||
this.addListenersForItem(item);
|
this.addListenersForItem(item);
|
||||||
this.slotItems[slotNumber] = item;
|
this.slotItems[slotNumber] = item;
|
||||||
|
|
|
@ -51,7 +51,6 @@ export const hooks = {
|
||||||
const {universe} = flecks.get('$humus/universe');
|
const {universe} = flecks.get('$humus/universe');
|
||||||
const {user} = handshake;
|
const {user} = handshake;
|
||||||
if (0 !== user.id) {
|
if (0 !== user.id) {
|
||||||
// eslint-disable-next-line no-param-reassign
|
|
||||||
handshake.entity = await universe.loadOrCreateEntity(user);
|
handshake.entity = await universe.loadOrCreateEntity(user);
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|
|
@ -28,12 +28,10 @@ const slice = createSlice({
|
||||||
room: null,
|
room: null,
|
||||||
selfEntityUuid: -1,
|
selfEntityUuid: -1,
|
||||||
},
|
},
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
extraReducers: {
|
extraReducers: {
|
||||||
},
|
},
|
||||||
reducers: {
|
reducers: {
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
slice.reducer.subscription = slice.reducer;
|
slice.reducer.subscription = slice.reducer;
|
||||||
|
|
|
@ -30,12 +30,10 @@ const slice = createSlice({
|
||||||
title: 'random universe',
|
title: 'random universe',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/* eslint-disable no-param-reassign */
|
|
||||||
extraReducers: {
|
extraReducers: {
|
||||||
},
|
},
|
||||||
reducers: {
|
reducers: {
|
||||||
},
|
},
|
||||||
/* eslint-enable no-param-reassign */
|
|
||||||
});
|
});
|
||||||
|
|
||||||
slice.reducer.subscription = slice.reducer;
|
slice.reducer.subscription = slice.reducer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user