MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / setNetArmorSecret

Method setNetArmorSecret

source/game/StarPlayer.cpp:1994–2000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1992}
1993
1994void Player::setNetArmorSecret(EquipmentSlot slot, ArmorItemPtr const& armor) {
1995 String const& slotName = EquipmentSlotNames.getRight(slot);
1996 setSecretProperty(strf("armorWearer.{}.data", slotName), itemSafeDescriptor(armor).diskStore());
1997 if (m_armorSecretNetVersions.empty())
1998 setSecretProperty("armorWearer.replicating", true);
1999 setSecretProperty(strf("armorWearer.{}.version", slotName), ++m_armorSecretNetVersions[slot]);
2000}
2001
2002void Player::setNetArmorSecrets(bool includeEmpty) {
2003 if (m_clientContext && m_clientContext->netCompatibilityRules().version() < 9) {

Callers

nothing calls this directly

Calls 4

strfFunction · 0.85
itemSafeDescriptorFunction · 0.85
diskStoreMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected