Merge branch 'develop' of ssh://git.mnml.gg:40022/~/mnml into develop
This commit is contained in:
commit
d270df8abb
@ -36,7 +36,6 @@
|
|||||||
- Strike + SpeedRR -> StrikeSpeed (strike has Y% more speed)
|
- Strike + SpeedRR -> StrikeSpeed (strike has Y% more speed)
|
||||||
- Strike + LifeRR -> StrikeLife (Strike recharges X% of damage as red life)
|
- Strike + LifeRR -> StrikeLife (Strike recharges X% of damage as red life)
|
||||||
|
|
||||||
* equip from shop (buy and equip without putting in your inventory) for bases
|
|
||||||
* move item from one construct to another
|
* move item from one construct to another
|
||||||
|
|
||||||
* ACP
|
* ACP
|
||||||
@ -89,7 +88,6 @@ $$$
|
|||||||
* Highlight (dota) colour
|
* Highlight (dota) colour
|
||||||
* fx colours + styles
|
* fx colours + styles
|
||||||
|
|
||||||
* ??? (PROBS NOT) drag and drop buy / equip / unequip items ???
|
|
||||||
* modules
|
* modules
|
||||||
* troll life -> dmg
|
* troll life -> dmg
|
||||||
* prince of peace
|
* prince of peace
|
||||||
|
|||||||
@ -19,10 +19,16 @@ const addState = connect(
|
|||||||
account,
|
account,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
itemEquip,
|
itemEquip,
|
||||||
|
itemUnequip,
|
||||||
navInstance,
|
navInstance,
|
||||||
|
vboxSelected,
|
||||||
tutorial,
|
tutorial,
|
||||||
} = state;
|
} = state;
|
||||||
|
|
||||||
|
function sendVboxAcceptEquip(constructId) {
|
||||||
|
return ws.sendVboxAcceptEquip(instance.id, vboxSelected[0], vboxSelected[1], constructId);
|
||||||
|
}
|
||||||
|
|
||||||
function sendVboxApply(constructId, i) {
|
function sendVboxApply(constructId, i) {
|
||||||
return ws.sendVboxApply(instance.id, constructId, i);
|
return ws.sendVboxApply(instance.id, constructId, i);
|
||||||
}
|
}
|
||||||
@ -31,15 +37,23 @@ const addState = connect(
|
|||||||
return ws.sendVboxUnequip(instance.id, constructId, item);
|
return ws.sendVboxUnequip(instance.id, constructId, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendVboxUnequipApply(targetConstructId) {
|
||||||
|
return ws.sendVboxUnequipApply(instance.id, itemUnequip[0], itemUnequip[1], targetConstructId);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
instance,
|
instance,
|
||||||
player,
|
player,
|
||||||
account,
|
account,
|
||||||
|
sendVboxAcceptEquip,
|
||||||
|
sendVboxUnequipApply,
|
||||||
sendVboxApply,
|
sendVboxApply,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
itemEquip,
|
itemEquip,
|
||||||
|
itemUnequip,
|
||||||
navInstance,
|
navInstance,
|
||||||
sendUnequip,
|
sendUnequip,
|
||||||
|
vboxSelected,
|
||||||
tutorial,
|
tutorial,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -76,21 +90,24 @@ function Construct(props) {
|
|||||||
construct,
|
construct,
|
||||||
iter,
|
iter,
|
||||||
itemEquip,
|
itemEquip,
|
||||||
|
itemUnequip,
|
||||||
instance,
|
instance,
|
||||||
mobileVisible,
|
mobileVisible,
|
||||||
player,
|
player,
|
||||||
|
vboxSelected,
|
||||||
tutorial,
|
tutorial,
|
||||||
// Static Info
|
// Static Info
|
||||||
itemInfo,
|
itemInfo,
|
||||||
// Function Calls
|
// Function Calls
|
||||||
sendVboxApply,
|
sendVboxApply,
|
||||||
|
sendVboxAcceptEquip,
|
||||||
|
sendVboxUnequipApply,
|
||||||
sendUnequip,
|
sendUnequip,
|
||||||
setActiveConstruct,
|
setActiveConstruct,
|
||||||
setItemUnequip,
|
setItemUnequip,
|
||||||
setItemEquip,
|
setItemEquip,
|
||||||
setInfo,
|
setInfo,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const { vbox } = player;
|
const { vbox } = player;
|
||||||
|
|
||||||
const duplicateSkill = construct.skills.length !== 0 && construct.skills.every(sk => {
|
const duplicateSkill = construct.skills.length !== 0 && construct.skills.every(sk => {
|
||||||
@ -99,14 +116,16 @@ function Construct(props) {
|
|||||||
return sk.skill === vbox.bound[itemEquip];
|
return sk.skill === vbox.bound[itemEquip];
|
||||||
});
|
});
|
||||||
const tutorialDisableEquip = tutorialShouldDisableEquip(tutorial, iter, instance, construct);
|
const tutorialDisableEquip = tutorialShouldDisableEquip(tutorial, iter, instance, construct);
|
||||||
|
|
||||||
function onClick(e) {
|
function onClick(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (duplicateSkill || tutorialDisableEquip) return true;
|
if (duplicateSkill || tutorialDisableEquip) return true;
|
||||||
if (itemEquip !== null) sendVboxApply(construct.id, itemEquip);
|
if (itemEquip !== null) return sendVboxApply(construct.id, itemEquip);
|
||||||
|
if (vboxSelected[0]) return sendVboxAcceptEquip(construct.id);
|
||||||
|
if (itemUnequip.length && itemUnequip[0] !== construct.id) return sendVboxUnequipApply(construct.id);
|
||||||
setItemEquip(null);
|
setItemEquip(null);
|
||||||
return setActiveConstruct(construct);
|
setItemUnequip([]);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hoverInfo(e, info) {
|
function hoverInfo(e, info) {
|
||||||
@ -249,11 +268,13 @@ function Construct(props) {
|
|||||||
class InstanceConstructs extends preact.Component {
|
class InstanceConstructs extends preact.Component {
|
||||||
shouldComponentUpdate(newProps) {
|
shouldComponentUpdate(newProps) {
|
||||||
if (newProps.itemEquip !== this.props.itemEquip) return true;
|
if (newProps.itemEquip !== this.props.itemEquip) return true;
|
||||||
|
if (newProps.itemUnequip !== this.props.itemUnequip) return true;
|
||||||
if (newProps.tutorial !== this.props.tutorial) return true;
|
if (newProps.tutorial !== this.props.tutorial) return true;
|
||||||
if (newProps.navInstance !== this.props.navInstance) return true;
|
if (newProps.navInstance !== this.props.navInstance) return true;
|
||||||
// JSON or Array objects
|
// JSON or Array objects
|
||||||
if (newProps.player !== this.props.player) return true;
|
if (newProps.player !== this.props.player) return true;
|
||||||
if (newProps.instance !== this.props.instance) return true;
|
if (newProps.instance !== this.props.instance) return true;
|
||||||
|
if (newProps.vboxSelected !== this.props.vboxSelected) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,16 +282,20 @@ class InstanceConstructs extends preact.Component {
|
|||||||
const {
|
const {
|
||||||
// Changing state variables
|
// Changing state variables
|
||||||
itemEquip,
|
itemEquip,
|
||||||
|
itemUnequip,
|
||||||
instance,
|
instance,
|
||||||
navInstance,
|
navInstance,
|
||||||
player,
|
player,
|
||||||
tutorial,
|
tutorial,
|
||||||
|
vboxSelected,
|
||||||
// Static data
|
// Static data
|
||||||
itemInfo,
|
itemInfo,
|
||||||
// Function calls
|
// Function calls
|
||||||
setInfo,
|
setInfo,
|
||||||
setActiveConstruct,
|
setActiveConstruct,
|
||||||
sendVboxApply,
|
sendVboxApply,
|
||||||
|
sendVboxAcceptEquip,
|
||||||
|
sendVboxUnequipApply,
|
||||||
setVboxHighlight,
|
setVboxHighlight,
|
||||||
setItemUnequip,
|
setItemUnequip,
|
||||||
setItemEquip,
|
setItemEquip,
|
||||||
@ -288,16 +313,20 @@ class InstanceConstructs extends preact.Component {
|
|||||||
iter: i,
|
iter: i,
|
||||||
construct: player.constructs[i],
|
construct: player.constructs[i],
|
||||||
itemEquip,
|
itemEquip,
|
||||||
|
itemUnequip,
|
||||||
instance,
|
instance,
|
||||||
setItemUnequip,
|
setItemUnequip,
|
||||||
setItemEquip,
|
setItemEquip,
|
||||||
player,
|
player,
|
||||||
sendVboxApply,
|
sendVboxApply,
|
||||||
|
sendVboxAcceptEquip,
|
||||||
|
sendVboxUnequipApply,
|
||||||
setInfo,
|
setInfo,
|
||||||
setActiveConstruct,
|
setActiveConstruct,
|
||||||
itemInfo,
|
itemInfo,
|
||||||
setVboxHighlight,
|
setVboxHighlight,
|
||||||
sendUnequip,
|
sendUnequip,
|
||||||
|
vboxSelected,
|
||||||
tutorial,
|
tutorial,
|
||||||
mobileVisible: navInstance === i + 1,
|
mobileVisible: navInstance === i + 1,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -190,6 +190,7 @@ function registerEvents(store) {
|
|||||||
store.dispatch(actions.setItemEquip(null));
|
store.dispatch(actions.setItemEquip(null));
|
||||||
store.dispatch(actions.setItemUnequip([]));
|
store.dispatch(actions.setItemUnequip([]));
|
||||||
store.dispatch(actions.setVboxHighlight([]));
|
store.dispatch(actions.setVboxHighlight([]));
|
||||||
|
store.dispatch(actions.setVboxSelected([]));
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAccountInstances(v) {
|
function setAccountInstances(v) {
|
||||||
|
|||||||
@ -82,6 +82,11 @@ function createSocket(events) {
|
|||||||
events.clearInstance();
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendVboxAcceptEquip(instanceId, group, index, constructId) {
|
||||||
|
send(['VboxAcceptEquip', { instance_id: instanceId, group, index, construct_id: constructId }]);
|
||||||
|
events.clearInstance();
|
||||||
|
}
|
||||||
|
|
||||||
function sendVboxApply(instanceId, constructId, index) {
|
function sendVboxApply(instanceId, constructId, index) {
|
||||||
send(['VboxApply', { instance_id: instanceId, construct_id: constructId, index }]);
|
send(['VboxApply', { instance_id: instanceId, construct_id: constructId, index }]);
|
||||||
events.clearInstance();
|
events.clearInstance();
|
||||||
@ -92,6 +97,11 @@ function createSocket(events) {
|
|||||||
events.clearInstance();
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sendVboxUnequipApply(instanceId, constructId, target, targetConstructId) {
|
||||||
|
send(['VboxUnequipApply', { instance_id: instanceId, construct_id: constructId, target, target_construct_id: targetConstructId }]);
|
||||||
|
events.clearInstance();
|
||||||
|
}
|
||||||
|
|
||||||
function sendVboxDiscard(instanceId) {
|
function sendVboxDiscard(instanceId) {
|
||||||
send(['VboxDiscard', { instance_id: instanceId }]);
|
send(['VboxDiscard', { instance_id: instanceId }]);
|
||||||
events.clearInstance();
|
events.clearInstance();
|
||||||
@ -99,7 +109,7 @@ function createSocket(events) {
|
|||||||
|
|
||||||
function sendVboxCombine(instanceId, indices) {
|
function sendVboxCombine(instanceId, indices) {
|
||||||
send(['VboxCombine', { instance_id: instanceId, indices }]);
|
send(['VboxCombine', { instance_id: instanceId, indices }]);
|
||||||
events.clearCombiner();
|
events.clearInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendVboxReclaim(instanceId, index) {
|
function sendVboxReclaim(instanceId, index) {
|
||||||
@ -382,11 +392,13 @@ function createSocket(events) {
|
|||||||
sendInstanceChat,
|
sendInstanceChat,
|
||||||
|
|
||||||
sendVboxAccept,
|
sendVboxAccept,
|
||||||
|
sendVboxAcceptEquip,
|
||||||
sendVboxApply,
|
sendVboxApply,
|
||||||
sendVboxReclaim,
|
sendVboxReclaim,
|
||||||
sendVboxCombine,
|
sendVboxCombine,
|
||||||
sendVboxDiscard,
|
sendVboxDiscard,
|
||||||
sendVboxUnequip,
|
sendVboxUnequip,
|
||||||
|
sendVboxUnequipApply,
|
||||||
|
|
||||||
sendItemInfo,
|
sendItemInfo,
|
||||||
|
|
||||||
|
|||||||
@ -473,10 +473,10 @@ impl Instance {
|
|||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_accept(mut self, account: Uuid, group: usize, index: usize) -> Result<Instance, Error> {
|
pub fn vbox_accept(mut self, account: Uuid, group: usize, index: usize, construct_id: Option<Uuid>) -> Result<Instance, Error> {
|
||||||
self.vbox_action_allowed(account)?;
|
self.vbox_action_allowed(account)?;
|
||||||
self.account_player(account)?
|
self.account_player(account)?
|
||||||
.vbox_accept(group, index)?;
|
.vbox_accept(group, index, construct_id)?;
|
||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,10 +501,10 @@ impl Instance {
|
|||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_unequip(mut self, account: Uuid, target: Item, construct_id: Uuid) -> Result<Instance, Error> {
|
pub fn vbox_unequip(mut self, account: Uuid, target: Item, construct_id: Uuid, target_construct_id: Option<Uuid>) -> Result<Instance, Error> {
|
||||||
self.vbox_action_allowed(account)?;
|
self.vbox_action_allowed(account)?;
|
||||||
self.account_player(account)?
|
self.account_player(account)?
|
||||||
.vbox_unequip(target, construct_id)?;
|
.vbox_unequip(target, construct_id, target_construct_id)?;
|
||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -256,8 +256,12 @@ impl Player {
|
|||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_accept(&mut self, group: usize, index: usize) -> Result<&mut Player, Error> {
|
pub fn vbox_accept(&mut self, group: usize, index: usize, construct_id: Option<Uuid>) -> Result<&mut Player, Error> {
|
||||||
self.vbox.accept(group, index)?;
|
self.vbox.accept(group, index, construct_id)?;
|
||||||
|
if construct_id.is_some() {
|
||||||
|
let equip_index = self.vbox.bound.len() - 1;
|
||||||
|
self.vbox_apply(equip_index, construct_id.expect("no construct"))?;
|
||||||
|
}
|
||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,8 +324,8 @@ impl Player {
|
|||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_unequip(&mut self, target: Item, construct_id: Uuid) -> Result<&mut Player, Error> {
|
pub fn vbox_unequip(&mut self, target: Item, construct_id: Uuid, target_construct_id: Option<Uuid>) -> Result<&mut Player, Error> {
|
||||||
if self.vbox.bound.len() >= 9 {
|
if self.vbox.bound.len() >= 9 && !target_construct_id.is_some() {
|
||||||
return Err(err_msg("too many items bound"));
|
return Err(err_msg("too many items bound"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -354,7 +358,12 @@ impl Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.vbox.bound.push(target);
|
self.vbox.bound.push(target);
|
||||||
self.vbox.bound.sort_unstable();
|
|
||||||
|
if target_construct_id.is_some() {
|
||||||
|
let equip_index = self.vbox.bound.len() - 1;
|
||||||
|
self.vbox_apply(equip_index, target_construct_id.expect("no construct"))?;
|
||||||
|
}
|
||||||
|
// self.vbox.bound.sort_unstable();
|
||||||
|
|
||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,10 +112,12 @@ pub enum RpcRequest {
|
|||||||
InstanceChat { instance_id: Uuid, index: usize },
|
InstanceChat { instance_id: Uuid, index: usize },
|
||||||
|
|
||||||
VboxAccept { instance_id: Uuid, group: usize, index: usize },
|
VboxAccept { instance_id: Uuid, group: usize, index: usize },
|
||||||
|
VboxAcceptEquip { instance_id: Uuid, group: usize, index: usize, construct_id: Uuid },
|
||||||
VboxDiscard { instance_id: Uuid },
|
VboxDiscard { instance_id: Uuid },
|
||||||
VboxCombine { instance_id: Uuid, indices: Vec<usize> },
|
VboxCombine { instance_id: Uuid, indices: Vec<usize> },
|
||||||
VboxApply { instance_id: Uuid, construct_id: Uuid, index: usize },
|
VboxApply { instance_id: Uuid, construct_id: Uuid, index: usize },
|
||||||
VboxUnequip { instance_id: Uuid, construct_id: Uuid, target: Item },
|
VboxUnequip { instance_id: Uuid, construct_id: Uuid, target: Item },
|
||||||
|
VboxUnequipApply { instance_id: Uuid, construct_id: Uuid, target: Item, target_construct_id: Uuid },
|
||||||
VboxReclaim { instance_id: Uuid, index: usize },
|
VboxReclaim { instance_id: Uuid, index: usize },
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +236,10 @@ impl Connection {
|
|||||||
Ok(instance_abandon(&mut tx, account, instance_id)?),
|
Ok(instance_abandon(&mut tx, account, instance_id)?),
|
||||||
|
|
||||||
RpcRequest::VboxAccept { instance_id, group, index } =>
|
RpcRequest::VboxAccept { instance_id, group, index } =>
|
||||||
Ok(RpcMessage::InstanceState(vbox_accept(&mut tx, account, instance_id, group, index)?)),
|
Ok(RpcMessage::InstanceState(vbox_accept(&mut tx, account, instance_id, group, index, None)?)),
|
||||||
|
|
||||||
|
RpcRequest::VboxAcceptEquip { instance_id, group, index, construct_id } =>
|
||||||
|
Ok(RpcMessage::InstanceState(vbox_accept(&mut tx, account, instance_id, group, index, Some(construct_id))?)),
|
||||||
|
|
||||||
RpcRequest::VboxApply { instance_id, construct_id, index } =>
|
RpcRequest::VboxApply { instance_id, construct_id, index } =>
|
||||||
Ok(RpcMessage::InstanceState(vbox_apply(&mut tx, account, instance_id, construct_id, index)?)),
|
Ok(RpcMessage::InstanceState(vbox_apply(&mut tx, account, instance_id, construct_id, index)?)),
|
||||||
@ -249,7 +254,10 @@ impl Connection {
|
|||||||
Ok(RpcMessage::InstanceState(vbox_reclaim(&mut tx, account, instance_id, index)?)),
|
Ok(RpcMessage::InstanceState(vbox_reclaim(&mut tx, account, instance_id, index)?)),
|
||||||
|
|
||||||
RpcRequest::VboxUnequip { instance_id, construct_id, target } =>
|
RpcRequest::VboxUnequip { instance_id, construct_id, target } =>
|
||||||
Ok(RpcMessage::InstanceState(vbox_unequip(&mut tx, account, instance_id, construct_id, target)?)),
|
Ok(RpcMessage::InstanceState(vbox_unequip(&mut tx, account, instance_id, construct_id, target, None)?)),
|
||||||
|
|
||||||
|
RpcRequest::VboxUnequipApply { instance_id, construct_id, target, target_construct_id } =>
|
||||||
|
Ok(RpcMessage::InstanceState(vbox_unequip(&mut tx, account, instance_id, construct_id, target, Some(target_construct_id))?)),
|
||||||
|
|
||||||
RpcRequest::MtxConstructSpawn {} =>
|
RpcRequest::MtxConstructSpawn {} =>
|
||||||
Ok(RpcMessage::ConstructSpawn(mtx::new_construct(&mut tx, account)?)),
|
Ok(RpcMessage::ConstructSpawn(mtx::new_construct(&mut tx, account)?)),
|
||||||
|
|||||||
@ -99,8 +99,8 @@ impl Vbox {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn accept(&mut self, i: usize, j: usize) -> Result<&mut Vbox, Error> {
|
pub fn accept(&mut self, i: usize, j: usize, construct_id: Option<Uuid>) -> Result<&mut Vbox, Error> {
|
||||||
if self.bound.len() >= 9 {
|
if self.bound.len() >= 9 && !construct_id.is_some() {
|
||||||
return Err(err_msg("too many items bound"));
|
return Err(err_msg("too many items bound"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ impl Vbox {
|
|||||||
|
|
||||||
pub fn bot_accept(&mut self, i: usize) -> Result<&mut Vbox, Error> {
|
pub fn bot_accept(&mut self, i: usize) -> Result<&mut Vbox, Error> {
|
||||||
let buy_index = self.free[i].iter().position(|item| item.is_some());
|
let buy_index = self.free[i].iter().position(|item| item.is_some());
|
||||||
self.accept(i, buy_index.expect("no valid buys"))
|
self.accept(i, buy_index.expect("no valid buys"), None)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn reclaim(&mut self, i: usize) -> Result<&mut Vbox, Error> {
|
pub fn reclaim(&mut self, i: usize) -> Result<&mut Vbox, Error> {
|
||||||
@ -181,9 +181,9 @@ pub fn vbox_discard(tx: &mut Transaction, account: &Account, instance_id: Uuid)
|
|||||||
return instance_update(tx, instance);
|
return instance_update(tx, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_accept(tx: &mut Transaction, account: &Account, instance_id: Uuid, group: usize, index: usize) -> Result<Instance, Error> {
|
pub fn vbox_accept(tx: &mut Transaction, account: &Account, instance_id: Uuid, group: usize, index: usize, construct_id: Option<Uuid>) -> Result<Instance, Error> {
|
||||||
let instance = instance_get(tx, instance_id)?
|
let instance = instance_get(tx, instance_id)?
|
||||||
.vbox_accept(account.id, group, index)?;
|
.vbox_accept(account.id, group, index, construct_id)?;
|
||||||
return instance_update(tx, instance);
|
return instance_update(tx, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,9 +205,9 @@ pub fn vbox_apply(tx: &mut Transaction, account: &Account, instance_id: Uuid, co
|
|||||||
return instance_update(tx, instance);
|
return instance_update(tx, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vbox_unequip(tx: &mut Transaction, account: &Account, instance_id: Uuid, construct_id: Uuid, target: Item) -> Result<Instance, Error> {
|
pub fn vbox_unequip(tx: &mut Transaction, account: &Account, instance_id: Uuid, construct_id: Uuid, target: Item, target_construct_id: Option<Uuid>) -> Result<Instance, Error> {
|
||||||
let instance = instance_get(tx, instance_id)?
|
let instance = instance_get(tx, instance_id)?
|
||||||
.vbox_unequip(account.id, target, construct_id)?;
|
.vbox_unequip(account.id, target, construct_id, target_construct_id)?;
|
||||||
return instance_update(tx, instance);
|
return instance_update(tx, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user