public void AddThought(Thought.ThoughtType type) { if (!HasThought(type)) { AddThought(Thought.CreateStandardThought(type, PlayState.Time.CurrentDate), true); } }
public static Body GenerateTestMoleman(Vector3 position) { CreatureDef dwarfDef = ContentPaths.LoadFromJson <CreatureDef>(ContentPaths.Entities.Moleman.moleman); Creature toReturn = new Creature(position, dwarfDef, "Moleman Miner", 0, "Molemen"); toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, PlayState.Time.CurrentDate), false); return(toReturn.Physics); }
public static Body GenerateTestSeketon(WorldManager world, Vector3 position) { CreatureDef dwarfDef = ContentPaths.LoadFromJson <CreatureDef>(ContentPaths.Entities.Skeleton.skeleton); Creature toReturn = new Creature(world.ComponentManager, position, dwarfDef, "Skeleton", 0, "Undead"); toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, world.Time.CurrentDate), false); return(toReturn.Physics); }
public static GameComponent GenerateDwarf(Vector3 position, ComponentManager componentManager, ContentManager content, GraphicsDevice graphics, ChunkManager chunkManager, Camera camera, Faction faction, PlanService planService, string allies, EmployeeClass dwarfClass, int level) { CreatureStats stats = new CreatureStats(dwarfClass, level); Dwarf toReturn = new Dwarf(stats, allies, planService, faction, "Dwarf", chunkManager, graphics, content, dwarfClass, position); toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, PlayState.Time.CurrentDate), false); return(toReturn.Physics); }
public static GameComponent GenerateDwarf( Vector3 Position, ComponentManager Manager, string Allies, EmployeeClass DwarfClass, int Level, Gender gender, int seed) { Dwarf toReturn = new Dwarf(Manager, new CreatureStats(DwarfClass, Level) { Gender = gender, RandomSeed = seed, VoicePitch = CreatureStats.GetRandomVoicePitch(gender) }, Allies, Manager.World.PlanService, Manager.World.PlayerFaction, "Dwarf", DwarfClass, Position); toReturn.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, Manager.World.Time.CurrentDate), false); return(toReturn.Physics); }
/// <summary> Add a standard thought to the creature. </summary> public void AddThought(Thought.ThoughtType type) { if (!HasThought(type)) { var thought = Thought.CreateStandardThought(type, Manager.World.Time.CurrentDate); AddThought(thought, true); if (thought.HappinessModifier > 0.01) { Creature.NoiseMaker.MakeNoise("Pleased", Position, true); } else { Creature.NoiseMaker.MakeNoise("Tantrum", Position, true); } } }