Talk:Gentling mask: Difference between revisions

48 bytes added ,  20:50, 4 December 2020
m
add the full path to IBondedCompanion for clarity
No edit summary
m (add the full path to IBondedCompanion for clarity)
Line 2: Line 2:
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)
* The party leadership details are handled by the IBondedCompanion interface (<code>XRL.World.Parts.IBondedCompanion</code>). 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)