Talk:Gentling mask

Add topic
Revision as of 20:50, 4 December 2020 by Egocarib (talk | contribs) (add the full path to IBondedCompanion for clarity)

Parts.SlaveMask, Parts.DomesticatedSlave, Parts.HasSlaves

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 Parts.SlaveMask, the method reset handles any instance of the mask/cone being separated from the body of the slave by resetting the PartyLeader, Goals, and faction associations of that creature, as well as by removing the DomesticatedSlave part from the creature's GameObject. However, nowhere in Parts.DomesticatedSlave or Parts.SlaveMask are these properties set. Similarly, I can't find any references to the DomesticatedSlave 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? Knotrice (talk) 07:11, 3 December 2020 (UTC)

  • The party leadership details are handled by the IBondedCompanion interface (XRL.World.Parts.IBondedCompanion). You will notice that XRL.World.Parts.DomesticatedSlave extends the IBondedCompanion interface (public class DomesticatedSlave : IBondedCompanion). For this reason it essentially inherits the code from the IBondedCompanion part. IBondedCompanion includes an ObjectCreatedEvent where the companion and faction properties are configured.
    Egocarib (talk) 20:47, 4 December 2020 (UTC)
Return to "Gentling mask" page.