8,290
edits
imported>Knotrice (created page, question about functionality of gentling mask/cone) |
No edit summary |
||
Line 1: | Line 1: | ||
==<code>Parts.SlaveMask</code>, <code>Parts.DomesticatedSlave</code>, <code>Parts.HasSlaves</code>== | ==<code>Parts.SlaveMask</code>, <code>Parts.DomesticatedSlave</code>, <code>Parts.HasSlaves</code>== | ||
Hi. The three sections of code in the title are those that control the initialisation, spawning, and emancipation of [[newfather]] slaves. One thing I can't figure out, though, is where in this code the enslaved creatures are added to the newfather's party. In <code>Parts.SlaveMask</code>, the method <code>reset</code> handles any instance of the mask/cone being separated from the body of the slave by resetting the <code>PartyLeader</code>, <code>Goals</code>, and faction associations of that creature, as well as by removing the <code>DomesticatedSlave</code> part from the creature's <code>GameObject</code>. However, nowhere in <code>Parts.DomesticatedSlave</code> or <code>Parts.SlaveMask</code> are these properties set. Similarly, I can't find any references to the <code>DomesticatedSlave</code> part elsewhere in the game's code that would set these properties. Does anybody know how the party relationship between the newfather and their slaves is initialised? [[User:Knotrice|Knotrice]] ([[User talk:Knotrice|talk]]) 07:11, 3 December 2020 (UTC) | Hi. The three sections of code in the title are those that control the initialisation, spawning, and emancipation of [[newfather]] slaves. One thing I can't figure out, though, is where in this code the enslaved creatures are added to the newfather's party. In <code>Parts.SlaveMask</code>, the method <code>reset</code> handles any instance of the mask/cone being separated from the body of the slave by resetting the <code>PartyLeader</code>, <code>Goals</code>, and faction associations of that creature, as well as by removing the <code>DomesticatedSlave</code> part from the creature's <code>GameObject</code>. However, nowhere in <code>Parts.DomesticatedSlave</code> or <code>Parts.SlaveMask</code> are these properties set. Similarly, I can't find any references to the <code>DomesticatedSlave</code> part elsewhere in the game's code that would set these properties. Does anybody know how the party relationship between the newfather and their slaves is initialised? [[User:Knotrice|Knotrice]] ([[User talk:Knotrice|talk]]) 07:11, 3 December 2020 (UTC) | ||
* The party leadership details are handled by the IBondedCompanion interface. You will notice that <code>XRL.World.Parts.DomesticatedSlave</code> extends the IBondedCompanion interface (<code>public class DomesticatedSlave : IBondedCompanion</code>). For this reason it essentially inherits the code from the IBondedCompanion part. IBondedCompanion includes an ObjectCreatedEvent where the companion and faction properties are configured.<br>[[User:Egocarib|Egocarib]] ([[User talk:Egocarib|talk]]) 20:47, 4 December 2020 (UTC) |