From 89a50e0d9e5e33fde5ca97a5f93a352bb4a91589 Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Fri, 11 Nov 2022 03:27:57 +0100 Subject: [PATCH 1/6] First commit Created a database for units and a UI for loading selecting them --- content/Gamemode/RTS/Siege.Unit.cs | 56 ++++++++ .../Gamemode/RTS/Units/unit.rifleman.hjson | 14 ++ content/Gamemode/Siege.GUI.cs | 135 ++++++++++++++++-- 3 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 content/Gamemode/RTS/Siege.Unit.cs create mode 100644 content/Gamemode/RTS/Units/unit.rifleman.hjson diff --git a/content/Gamemode/RTS/Siege.Unit.cs b/content/Gamemode/RTS/Siege.Unit.cs new file mode 100644 index 0000000..8f12dac --- /dev/null +++ b/content/Gamemode/RTS/Siege.Unit.cs @@ -0,0 +1,56 @@ +using Keg.Extensions; +using TC2.Base.Components; + +namespace TC2.Siege +{ + public partial interface IUnit: IAsset2 + { + static void IAsset2.OnUpdate(IUnit.Definition definition, ref IUnit.Data data_new) + { + + } + + static void IAsset2.OnInit(out string prefix, out string[] extensions, out int capacity_world, out int capacity_region, out int capacity_local) + { + prefix = "unit."; + extensions = new string[] + { + ".hjson" + }; + + capacity_world = 64; + capacity_region = 64; + capacity_local = 64; + } + + [Serializable] + public partial struct Data + { + public string name; + public string desc; + public Sprite icon; + + public int price; + public int reward; + + public Prefab.Handle creature; + + public Prefab.Handle[] items; + public Prefab.Handle[] equipment; + public (string,int)[] material; + + public Data(string name, string desc, Sprite icon, int price, int reward, Prefab.Handle creature, Prefab.Handle[] items, Prefab.Handle[] equipment, (string, int)[] material) + { + this.name = name; + this.desc = desc; + this.icon = icon; + this.price = price; + this.reward = reward; + this.creature = creature; + this.items = items; + this.equipment = equipment; + this.material = material; + } + } + } +} diff --git a/content/Gamemode/RTS/Units/unit.rifleman.hjson b/content/Gamemode/RTS/Units/unit.rifleman.hjson new file mode 100644 index 0000000..9a12b20 --- /dev/null +++ b/content/Gamemode/RTS/Units/unit.rifleman.hjson @@ -0,0 +1,14 @@ +{ + name: "Rifleman" + desc: "a kobold with a rifle" + icon: + { + texture: "rifle" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["rifle"] + equipment: ["armor.00", "helmet.00"] + material: [["ammo_hc.hv", 50]] +} \ No newline at end of file diff --git a/content/Gamemode/Siege.GUI.cs b/content/Gamemode/Siege.GUI.cs index 6053677..f0d8a0d 100644 --- a/content/Gamemode/Siege.GUI.cs +++ b/content/Gamemode/Siege.GUI.cs @@ -91,25 +91,141 @@ public static void OnGUIDefender(Entity entity, [Source.Owned] in Player.Data pl } #endif + + [IComponent.Data(Net.SendType.Unreliable)] + public partial struct WaveDesigner: IComponent + { + public FixedArray32 units = new FixedArray32(); + + public WaveDesigner() + { + + } + } + + public partial struct AddUnitRPC: Net.IRPC + { + public IUnit.Handle unit; + +#if SERVER + public void Invoke(ref NetConnection connection, Entity entity, ref Siege.WaveDesigner wave) + { + for (int i = 0; i < wave.units.Length; i++) + { + if (wave.units[i].IsNull()) + { + wave.units[i] = this.unit; + } + } + wave.Sync(entity); + } +#endif + } + + [IComponent.Data(Net.SendType.Unreliable)] + public partial struct ControllerData: IComponent + { + public int money; + + public ControllerData(int money) + { + this.money = money; + } + } + + public partial struct ChangeMoney: Net.IRPC + { + public int change; + +#if SERVER + public void Invoke(ref NetConnection connection, Entity entity, ref Siege.ControllerData data) + { + data.money += this.change; + data.Sync(entity); + } +#endif + } + #if CLIENT public partial struct SiegeAttackerGUI: IGUICommand { public Siege.Gamemode g_siege; public Siege.Gamemode.State g_siege_state; + public Entity entity; + public static List unit_indices = new List(64); + public static float scale = 2; public void Draw() { - var window_pos = (GUI.CanvasSize * new Vector2(0.50f, 0.00f)) + new Vector2(100, 48); - using (var window = GUI.Window.Standalone("Siege2", position: window_pos, size: new Vector2(100, 100), pivot: new Vector2(0.50f, 0.00f))) + + using (var widget = Sidebar.Widget.New("attacker_build", "Recruit", "ui_icon_build", new Vector2(300, 600), lockable: false)) { - this.StoreCurrentWindowTypeID(); - if (window.show) + if (widget.show) { - ref var region = ref Client.GetRegion(); - ref var world = ref Client.GetWorld(); - ref var game_info = ref Client.GetGameInfo(); + GUI.Title("Purchase units"); + using (GUI.Scrollbox.New("attacker_unitshop", GUI.GetAvailableSize())) + { + using (var grid = GUI.Grid.New(size: GUI.GetRemainingSpace())) + { + unit_indices.Clear(); + var recipes = IUnit.Database.GetAssets(); + foreach (var d_recipe in recipes) + { + ref var recipe = ref d_recipe.GetData(); + if (recipe.IsNotNull()) + { + unit_indices.Add(d_recipe.id); + } + } + + foreach (var pair in unit_indices) + { + //GUI.Text($"{pair.rank}"); + + ref var recipe = ref IUnit.Database.GetData(pair); + if (recipe.IsNotNull()) + { + var frame_size = recipe.icon.GetFrameSize(scale); + frame_size += new Vector2(8, 8); + frame_size = frame_size.ScaleToNearestMultiple(new Vector2(48, 48)); - GUI.Title($"{this.g_siege_state.faction_defenders.id}"); + grid.Push(frame_size); + using (var button = GUI.CustomButton.New(recipe.name, frame_size, sound: GUI.sound_select, sound_volume: 0.10f)) + { + GUI.Draw9Slice(GUI.tex_slot_simple, new Vector4(4), button.bb); + GUI.DrawSpriteCentered(recipe.icon, button.bb, scale: scale); + + if (button.pressed) + { + var rpc = new Siege.AddUnitRPC + { + unit = new IUnit.Handle(pair), + }; + rpc.Send(this.entity); + + var rpc1 = new Siege.ChangeMoney + { + change = -recipe.price, + }; + rpc1.Send(this.entity); + } + } + if (GUI.IsItemHovered()) + { + using (GUI.Tooltip.New()) + { + using (GUI.Wrap.Push(325)) + { + GUI.Title(recipe.name); + GUI.Text(recipe.desc, color: GUI.font_color_default); + GUI.DrawMoney(recipe.price, new Vector2(8, 8)); + } + } + } + } + } + } + } } } } @@ -123,7 +239,8 @@ public static void OnGUIAttacker(Entity entity, [Source.Owned] in Player.Data pl var gui = new SiegeAttackerGUI() { g_siege = g_siege, - g_siege_state = g_siege_state + g_siege_state = g_siege_state, + entity = entity, }; gui.Submit(); } From 3da8492aebc28bfd79e7d5d7996f56dc05060505 Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Sun, 13 Nov 2022 02:09:06 +0100 Subject: [PATCH 2/6] Recruitment GUI is usable --- content/Gamemode/Siege.GUI.cs | 250 ++++++++++++++++++++++-------- content/Gamemode/Siege.Planner.cs | 136 +++++++++++++++- content/Gamemode/Siege.cs | 1 - 3 files changed, 317 insertions(+), 70 deletions(-) diff --git a/content/Gamemode/Siege.GUI.cs b/content/Gamemode/Siege.GUI.cs index f0d8a0d..604b9af 100644 --- a/content/Gamemode/Siege.GUI.cs +++ b/content/Gamemode/Siege.GUI.cs @@ -5,6 +5,7 @@ namespace TC2.Siege { public static partial class Siege { + #if CLIENT public partial struct SiegeDefenderGUI: IGUICommand { @@ -92,59 +93,6 @@ public static void OnGUIDefender(Entity entity, [Source.Owned] in Player.Data pl #endif - [IComponent.Data(Net.SendType.Unreliable)] - public partial struct WaveDesigner: IComponent - { - public FixedArray32 units = new FixedArray32(); - - public WaveDesigner() - { - - } - } - - public partial struct AddUnitRPC: Net.IRPC - { - public IUnit.Handle unit; - -#if SERVER - public void Invoke(ref NetConnection connection, Entity entity, ref Siege.WaveDesigner wave) - { - for (int i = 0; i < wave.units.Length; i++) - { - if (wave.units[i].IsNull()) - { - wave.units[i] = this.unit; - } - } - wave.Sync(entity); - } -#endif - } - - [IComponent.Data(Net.SendType.Unreliable)] - public partial struct ControllerData: IComponent - { - public int money; - - public ControllerData(int money) - { - this.money = money; - } - } - - public partial struct ChangeMoney: Net.IRPC - { - public int change; - -#if SERVER - public void Invoke(ref NetConnection connection, Entity entity, ref Siege.ControllerData data) - { - data.money += this.change; - data.Sync(entity); - } -#endif - } #if CLIENT public partial struct SiegeAttackerGUI: IGUICommand @@ -154,6 +102,8 @@ public partial struct SiegeAttackerGUI: IGUICommand public Entity entity; public static List unit_indices = new List(64); public static float scale = 2; + public Region.Data region; + public Player.Data player; public void Draw() { @@ -162,8 +112,19 @@ public void Draw() { if (widget.show) { + var time_left = MathF.Max(this.g_siege_state.t_next_wave - this.g_siege_state.t_match_elapsed, 0.00f); + GUI.Title("Purchase units"); - using (GUI.Scrollbox.New("attacker_unitshop", GUI.GetAvailableSize())) + GUI.NewLine(8); + GUI.DrawMoney(GetMoney(ref region), new Vector2(64, 16)); + GUI.SameLine(8); + GUI.TitleCentered($"Next wave {(time_left):0} s", size: 16, color: time_left > 10.00f ? GUI.font_color_title : GUI.font_color_yellow); + GUI.NewLine(26); + GUI.Title("Catalog"); + GUI.SameLine(100); + GUI.Title("Queued"); + GUI.NewLine(); + using (GUI.Scrollbox.New("attacker_unitshop", GUI.GetAvailableSize() / 2)) { using (var grid = GUI.Grid.New(size: GUI.GetRemainingSpace())) { @@ -194,20 +155,10 @@ public void Draw() { GUI.Draw9Slice(GUI.tex_slot_simple, new Vector4(4), button.bb); GUI.DrawSpriteCentered(recipe.icon, button.bb, scale: scale); - - if (button.pressed) + + if (button.pressed && GetMoney(ref region) >= recipe.price) { - var rpc = new Siege.AddUnitRPC - { - unit = new IUnit.Handle(pair), - }; - rpc.Send(this.entity); - - var rpc1 = new Siege.ChangeMoney - { - change = -recipe.price, - }; - rpc1.Send(this.entity); + PurchaseUnit(ref region, new IUnit.Handle(pair)); } } if (GUI.IsItemHovered()) @@ -226,13 +177,174 @@ public void Draw() } } } + GUI.SameLine(); + using (GUI.Scrollbox.New("attacker_wavelist", GUI.GetAvailableSize())) + { + FixedArray32 units = GetUnits(ref region); + using (var grid = GUI.Grid.New(size: GUI.GetRemainingSpace())) + { + for (int i = 0; i < units.Length; i++) + { + if (units[i].id != 0) + { + IUnit.Data unit = units[i].GetData(); + var frame_size = unit.icon.GetFrameSize(scale); + frame_size += new Vector2(8, 8); + frame_size = frame_size.ScaleToNearestMultiple(new Vector2(48, 48)); + grid.Push(frame_size); + + using (var button = GUI.CustomButton.New(unit.name + i, frame_size, sound: GUI.sound_select, sound_volume: 0.10f)) + { + GUI.Draw9Slice(GUI.tex_slot_simple, new Vector4(4), button.bb); + GUI.DrawSpriteCentered(unit.icon, button.bb, scale: scale); + + if (button.pressed) + { + RemoveUnit(ref region, i); + } + + } + if (GUI.IsItemHovered()) + { + using (GUI.Tooltip.New()) + { + using (GUI.Wrap.Push(325)) + { + GUI.Title("Remove: " + unit.name); + GUI.Text(unit.desc, color: GUI.font_color_default); + GUI.DrawMoney(unit.price, new Vector2(8, 8)); + } + } + } + } + } + } + } } } } } + [Query] + public delegate void GetPlannnerQuery(ISystem.Info info, Entity entity, [Source.Owned] ref Siege.Planner planner); + + private struct PurchaseUnitArgs + { + public IUnit.Handle unit_id; + + public PurchaseUnitArgs(IAsset2.Handle unit_id) + { + this.unit_id = unit_id; + } + } + + public static void PurchaseUnit(ref Region.Data region, IUnit.Handle unit) + { + var arg = new PurchaseUnitArgs(unit); + region.Query(Func).Execute(ref arg); + static void Func(ISystem.Info info, Entity ent_planner, [Source.Owned] ref Siege.Planner planner) + { + ref var arg = ref info.GetParameter(); + if (!arg.IsNull()) + { + var rpc = new Siege.BuyUnitRPC + { + unit = arg.unit_id, + }; + rpc.Send(ent_planner); + } + } + } + + [Query] + public delegate void GetPlannnerUnitsQuery(ISystem.Info info, Entity entity, [Source.Owned] ref Siege.Planner planner); + + private struct GetUnitArgs + { + public FixedArray32 units = new FixedArray32.Handle>(); + + public GetUnitArgs() + { + } + } + + public static FixedArray32 GetUnits(ref Region.Data region) + { + var arg = new GetUnitArgs() + { + units = new FixedArray32() + }; + region.Query(Func).Execute(ref arg); + static void Func(ISystem.Info info, Entity ent_planner, [Source.Owned] ref Siege.Planner planner) + { + ref var arg = ref info.GetParameter(); + if (!arg.IsNull()) + { + arg.units = planner.orderedUnits; + } + } + return arg.units; + } + + [Query] + public delegate void GetPlannnerMoneyQuery(ISystem.Info info, Entity entity, [Source.Owned] ref Siege.Planner planner); + + private struct GetMoneyArgs + { + public int money = 0; + + public GetMoneyArgs() + { + } + } + + public static int GetMoney(ref Region.Data region) + { + var arg = new GetMoneyArgs(); + region.Query(Func).Execute(ref arg); + static void Func(ISystem.Info info, Entity ent_planner, [Source.Owned] ref Siege.Planner planner) + { + ref var arg = ref info.GetParameter(); + if (!arg.IsNull()) + { + arg.money = planner.money; + } + } + return arg.money; + } + + [Query] + public delegate void RemovePlannnerUnitQuery(ISystem.Info info, Entity entity, [Source.Owned] ref Siege.Planner planner); + + private struct RemoveUnitArgs + { + public int index; + + public RemoveUnitArgs(int index) + { + this.index = index; + } + } + + public static void RemoveUnit(ref Region.Data region, int index) + { + var arg = new RemoveUnitArgs(index); + region.Query(Func).Execute(ref arg); + static void Func(ISystem.Info info, Entity ent_planner, [Source.Owned] ref Siege.Planner planner) + { + ref var arg = ref info.GetParameter(); + if (!arg.IsNull()) + { + var rpc = new RemoveUnitRPC + { + index = arg.index, + }; + rpc.Send(ent_planner); + } + } + } [ISystem.EarlyGUI(ISystem.Mode.Single), HasTag("local", true, Source.Modifier.Owned)] - public static void OnGUIAttacker(Entity entity, [Source.Owned] in Player.Data player, [Source.Global] in Siege.Gamemode g_siege, [Source.Global] in Siege.Gamemode.State g_siege_state) + public static void OnGUIAttacker(Entity entity, ISystem.Info info, [Source.Owned] in Player.Data player, [Source.Global] in Siege.Gamemode g_siege, [Source.Global] in Siege.Gamemode.State g_siege_state) { if (player.IsLocal() && player.faction_id == g_siege_state.faction_attackers) { @@ -241,6 +353,8 @@ public static void OnGUIAttacker(Entity entity, [Source.Owned] in Player.Data pl g_siege = g_siege, g_siege_state = g_siege_state, entity = entity, + player = player, + region = info.GetRegion(), }; gui.Submit(); } diff --git a/content/Gamemode/Siege.Planner.cs b/content/Gamemode/Siege.Planner.cs index 5374ff2..fc09a50 100644 --- a/content/Gamemode/Siege.Planner.cs +++ b/content/Gamemode/Siege.Planner.cs @@ -40,12 +40,54 @@ public enum Status: uint [Save.Ignore, Net.Ignore] public float next_search; //[Save.Ignore, Net.Ignore] public float next_wave; + [Save.Ignore] public FixedArray32 orderedUnits = new FixedArray32(); + [Save.Ignore] public int money = 100; + public Planner() { } } + public partial struct BuyUnitRPC: Net.IRPC + { + public IUnit.Handle unit; + +#if SERVER + public void Invoke(ref NetConnection connection, Entity entity, ref Siege.Planner planner) + { + for (int i = 0; i < planner.orderedUnits.Length; i++) + { + if (planner.orderedUnits[i].id == 0) + { + planner.orderedUnits[i] = this.unit; + planner.money -= this.unit.GetData().price; + break; + } + } + planner.Sync(entity); + } +#endif + } + + public partial struct RemoveUnitRPC: Net.IRPC + { + public int index; + +#if SERVER + public void Invoke(ref NetConnection connection, Entity entity, ref Siege.Planner planner) + { + if (planner.orderedUnits[this.index].id != 0) + { + var unit = planner.orderedUnits[this.index].GetData(); + planner.money += unit.price; + planner.orderedUnits[this.index] = 0; + } + planner.Sync(entity); + } +#endif + } + #if SERVER public static void SetKoboldLoadout(Entity ent_kobold, float weapon_mult = 1.00f, float armor_mult = 1.00f) { @@ -331,13 +373,77 @@ public static void SetKoboldLoadout(Entity ent_kobold, float weapon_mult = 1.00f } } + public static void SetKoboldLoadoutManual(Entity ent_kobold, IUnit.Handle unit) + { + var random = XorRandom.New(); + var loadout = new Loadout.Data(); + var bounty = new Siege.Bounty.Data(); + + ref var shipment = ref loadout.shipments[0]; + shipment.flags.SetFlag(Shipment.Flags.Unpack, true); + + var items_span = shipment.items.AsSpan(); + var rewards_span = bounty.rewards.AsSpan(); + + var d_unit = unit.GetData(); + + foreach (var equipment in d_unit.equipment) + { + items_span.Add(Shipment.Item.Prefab(equipment, flags: Shipment.Item.Flags.Equip | Shipment.Item.Flags.Despawn)); + } + foreach (var item in d_unit.items) + { + items_span.Add(Shipment.Item.Prefab(item, flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + } + + foreach (var material in d_unit.material) + { + items_span.Add(Shipment.Item.Resource(material.Item1, material.Item2)); + } + + + rewards_span.Add(Crafting.Product.Money(d_unit.reward)); + + + + ref var loadout_new = ref ent_kobold.GetOrAddComponent(sync: false, ignore_mask: true); + if (!loadout_new.IsNull()) + { + loadout_new = loadout; + } + + ref var bounty_new = ref ent_kobold.GetOrAddComponent(sync: false, ignore_mask: true); + if (!bounty_new.IsNull()) + { + bounty_new = bounty; + //App.WriteLine($"add bounty {bounty_new.rewards[0].type} {bounty_new.rewards[0].amount}"); + } + + ref var ai = ref ent_kobold.GetComponent(); + if (!ai.IsNull()) + { + ai.stance = AI.Stance.Aggressive; + } + + foreach (var h_inventory in ent_kobold.GetInventories()) + { + h_inventory.Flags |= Inventory.Flags.Unlimited | Inventory.Flags.No_Drop; + } + + ref var marker = ref ent_kobold.GetOrAddComponent(sync: true); + if (!marker.IsNull()) + { + marker.sprite = new Sprite("ui_icons_minimap", 16, 16, 0, 0); + } + } + [ISystem.Event(ISystem.Mode.Single)] public static void OnSpawn(ISystem.Info info, Entity entity, ref Spawner.SpawnEvent data, [Source.Owned] ref Spawner.Data spawner, [Source.Global] in Siege.Gamemode g_siege, [Source.Global] in Siege.Gamemode.State g_siege_state) { var weapon_mult = 1.00f; var armor_mult = 1.00f; - + armor_mult = g_siege_state.difficulty * 0.04f; //App.WriteLine($"spawn event {data.ent_target}"); @@ -582,6 +688,34 @@ static void Func2(ISystem.Info info, Entity entity, [Source.Owned] in Commandabl if (TryFindNearestSpawn(ref region, faction.id, target_position, out var ent_spawn, out var pos_spawn)) { + + for (uint i = 0; i < region.GetConnectedPlayerCount(); i++) + { + var player = region.GetConnectedPlayerByIndex(i); + if (player.faction_id == g_siege_state.faction_attackers.id) + { + var group_size_tmp2 = 1 + random.NextIntRange(0, 2); + for (int i2 = 0; i2 < group_size_tmp2 && total_count + i2 < g_siege.max_npc_count; i2++) + { + for (int o = 0; o < planner.orderedUnits.Length; o++) + { + if (planner.orderedUnits[i].id != 0) + { + var unit = planner.orderedUnits[i].GetData(); + + region.SpawnPrefab(unit.creature, pos_spawn + new Vector2(random.NextFloatRange(-2, 2), 0.00f), faction_id: faction.id).ContinueWith((ent) => + { + SetKoboldLoadoutManual(ent, unit); + }); + + break; + } + } + } + return; + } + } + var weapon_mult = 1.00f; var armor_mult = 1.00f; diff --git a/content/Gamemode/Siege.cs b/content/Gamemode/Siege.cs index 3481be6..7f5935a 100644 --- a/content/Gamemode/Siege.cs +++ b/content/Gamemode/Siege.cs @@ -95,7 +95,6 @@ public partial struct State: IGlobal [Save.Ignore] public float t_next_wave; [Save.Ignore, Net.Ignore] public float t_next_restart; [Save.Ignore, Net.Ignore] public float t_last_notification; - public State() { From 587cc99faa1ee82f0ffb37ed545165aa8780b6a0 Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Sun, 13 Nov 2022 16:23:10 +0100 Subject: [PATCH 3/6] Seems to be working now --- content/Gamemode/RTS/Siege.Unit.cs | 23 ++--- .../Gamemode/RTS/Units/unit.rifleman.hjson | 8 +- content/Gamemode/Siege.GUI.cs | 32 +++++- content/Gamemode/Siege.Planner.cs | 99 +++++++++++++------ 4 files changed, 112 insertions(+), 50 deletions(-) diff --git a/content/Gamemode/RTS/Siege.Unit.cs b/content/Gamemode/RTS/Siege.Unit.cs index 8f12dac..61860ed 100644 --- a/content/Gamemode/RTS/Siege.Unit.cs +++ b/content/Gamemode/RTS/Siege.Unit.cs @@ -37,20 +37,15 @@ public partial struct Data public Prefab.Handle[] items; public Prefab.Handle[] equipment; - public (string,int)[] material; - - public Data(string name, string desc, Sprite icon, int price, int reward, Prefab.Handle creature, Prefab.Handle[] items, Prefab.Handle[] equipment, (string, int)[] material) - { - this.name = name; - this.desc = desc; - this.icon = icon; - this.price = price; - this.reward = reward; - this.creature = creature; - this.items = items; - this.equipment = equipment; - this.material = material; - } + [Save.NewLine] + public IUnit.ResourceStruct[] resource; + } + [Serializable] + public struct ResourceStruct + { + public string material; + public int quantity; } + } } diff --git a/content/Gamemode/RTS/Units/unit.rifleman.hjson b/content/Gamemode/RTS/Units/unit.rifleman.hjson index 9a12b20..7adac10 100644 --- a/content/Gamemode/RTS/Units/unit.rifleman.hjson +++ b/content/Gamemode/RTS/Units/unit.rifleman.hjson @@ -10,5 +10,11 @@ creature: kobold.male items: ["rifle"] equipment: ["armor.00", "helmet.00"] - material: [["ammo_hc.hv", 50]] + resource: + [ + { + material: "ammo_hc" + quantity: 50 + } + ] } \ No newline at end of file diff --git a/content/Gamemode/Siege.GUI.cs b/content/Gamemode/Siege.GUI.cs index 604b9af..cbb7580 100644 --- a/content/Gamemode/Siege.GUI.cs +++ b/content/Gamemode/Siege.GUI.cs @@ -144,7 +144,9 @@ public void Draw() //GUI.Text($"{pair.rank}"); ref var recipe = ref IUnit.Database.GetData(pair); - if (recipe.IsNotNull()) + var unit = new IUnit.Handle(pair); + + if (new IUnit.Handle(pair).id != 0) { var frame_size = recipe.icon.GetFrameSize(scale); frame_size += new Vector2(8, 8); @@ -158,7 +160,7 @@ public void Draw() if (button.pressed && GetMoney(ref region) >= recipe.price) { - PurchaseUnit(ref region, new IUnit.Handle(pair)); + PurchaseUnit(ref region, unit); } } if (GUI.IsItemHovered()) @@ -169,7 +171,31 @@ public void Draw() { GUI.Title(recipe.name); GUI.Text(recipe.desc, color: GUI.font_color_default); - GUI.DrawMoney(recipe.price, new Vector2(8, 8)); + GUI.NewLine(10); + GUI.DrawMoney(recipe.price, new Vector2(32, 8)); + GUI.NewLine(10); + GUI.Text("Inventory"); + foreach (var item in recipe.items) + { + var itemIcon = item.GetPrefab().GetIcon(); + GUI.DrawSprite(itemIcon); + GUI.SameLine(); + } + GUI.NewLine(); + foreach (var item in recipe.equipment) + { + var itemIcon = item.GetPrefab().GetIcon(); + GUI.DrawSprite(itemIcon); + GUI.SameLine(); + } + GUI.NewLine(); + foreach (var item in recipe.resource) + { + var itemIcon = IMaterial.Database.GetData(item.material).icon; + GUI.DrawSprite(itemIcon); + GUI.SameLine(); + } + } } } diff --git a/content/Gamemode/Siege.Planner.cs b/content/Gamemode/Siege.Planner.cs index fc09a50..5e0b0b1 100644 --- a/content/Gamemode/Siege.Planner.cs +++ b/content/Gamemode/Siege.Planner.cs @@ -373,7 +373,7 @@ public static void SetKoboldLoadout(Entity ent_kobold, float weapon_mult = 1.00f } } - public static void SetKoboldLoadoutManual(Entity ent_kobold, IUnit.Handle unit) + public static void SetKoboldLoadoutManual(Entity ent_kobold, ref IUnit.Handle unit) { var random = XorRandom.New(); var loadout = new Loadout.Data(); @@ -385,7 +385,7 @@ public static void SetKoboldLoadoutManual(Entity ent_kobold, IUnit.Handle unit) var items_span = shipment.items.AsSpan(); var rewards_span = bounty.rewards.AsSpan(); - var d_unit = unit.GetData(); + ref var d_unit = ref unit.GetData(); foreach (var equipment in d_unit.equipment) { @@ -396,9 +396,11 @@ public static void SetKoboldLoadoutManual(Entity ent_kobold, IUnit.Handle unit) items_span.Add(Shipment.Item.Prefab(item, flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); } - foreach (var material in d_unit.material) + ref var resources = ref d_unit.resource; + + foreach (var material in resources) { - items_span.Add(Shipment.Item.Resource(material.Item1, material.Item2)); + items_span.Add(Shipment.Item.Resource(material.material, material.quantity)); } @@ -554,6 +556,8 @@ public static void OnUpdate(ISystem.Info info, Entity entity, [Source.Owned] ref var time = g_siege_state.t_match_elapsed; if (g_siege_state.wave_current != planner.last_wave) { + planner.money += (int)g_siege_state.difficulty * 50; + planner.Sync(entity); planner.last_wave = g_siege_state.wave_current; //planner.next_wave = time + planner.wave_interval + Maths.Clamp(difficulty * 10.00f, 0.00f, 120.00f); @@ -599,6 +603,65 @@ public static void OnUpdate(ISystem.Info info, Entity entity, [Source.Owned] ref case Siege.Planner.Status.Dispatching: { + //Controller spawn + if ((g_siege_state.t_next_wave - time) >= 30.00f) + { + if (time >= planner.next_search) + { + if (TryFindTarget(ref region, entity, faction.id, transform.position, out var ent_target, out var target_position)) + { + planner.ref_target.Set(ent_target); + } + else + { + + } + + planner.next_search = time + random.NextFloatRange(10.00f, 15.00f); + } + } + + var target_position1 = transform.position; + if (planner.ref_target.IsAlive() && planner.ref_target.TryGetHandle(out var h_target_transform1)) + { + target_position1 = h_target_transform1.data.position; + } + if (TryFindNearestSpawn(ref region, faction.id, target_position1, out var ent_spawn1, out var pos_spawn1)) + { + for (uint i = 0; i < region.GetConnectedPlayerCount(); i++) + { + var player = region.GetConnectedPlayerByIndex(i); + if (player.faction_id == g_siege_state.faction_attackers.id) + { + if (time >= planner.next_spawn) + { + planner.next_spawn = time + random.NextFloatRange(2.00f, 4.00f); + var group_size_tmp2 = 1 + random.NextIntRange(0, 2); + for (int i2 = 0; i2 < group_size_tmp2; i2++) + { + for (int o = 0; o < planner.orderedUnits.Length; o++) + { + if (planner.orderedUnits[o].id != 0) + { + var unit = planner.orderedUnits[o]; + + region.SpawnPrefab(unit.GetData().creature, pos_spawn1 + new Vector2(random.NextFloatRange(-2, 2), 0.00f), faction_id: faction.id).ContinueWith((ent) => + { + SetKoboldLoadoutManual(ent, ref unit); + }); + + planner.orderedUnits[o] = 0; + planner.Sync(entity); + break; + } + } + } + } + return; + } + } + } + //Normal spawn if ((g_siege_state.t_next_wave - time) >= 30.00f) { if (time >= planner.next_search) @@ -688,34 +751,6 @@ static void Func2(ISystem.Info info, Entity entity, [Source.Owned] in Commandabl if (TryFindNearestSpawn(ref region, faction.id, target_position, out var ent_spawn, out var pos_spawn)) { - - for (uint i = 0; i < region.GetConnectedPlayerCount(); i++) - { - var player = region.GetConnectedPlayerByIndex(i); - if (player.faction_id == g_siege_state.faction_attackers.id) - { - var group_size_tmp2 = 1 + random.NextIntRange(0, 2); - for (int i2 = 0; i2 < group_size_tmp2 && total_count + i2 < g_siege.max_npc_count; i2++) - { - for (int o = 0; o < planner.orderedUnits.Length; o++) - { - if (planner.orderedUnits[i].id != 0) - { - var unit = planner.orderedUnits[i].GetData(); - - region.SpawnPrefab(unit.creature, pos_spawn + new Vector2(random.NextFloatRange(-2, 2), 0.00f), faction_id: faction.id).ContinueWith((ent) => - { - SetKoboldLoadoutManual(ent, unit); - }); - - break; - } - } - } - return; - } - } - var weapon_mult = 1.00f; var armor_mult = 1.00f; From 183cca6daaff7dcf9c1348a9e1899c975b2c2c9b Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Sun, 13 Nov 2022 18:22:36 +0100 Subject: [PATCH 4/6] New units --- .../{RTS => Controller}/Siege.Unit.cs | 0 .../Controller/Units/Battlerifleman.png | Bin 0 -> 658 bytes .../Controller/Units/Battlerifleman_Armor.png | Bin 0 -> 724 bytes .../Gamemode/Controller/Units/Bazooker.png | Bin 0 -> 620 bytes .../Controller/Units/Bazooker_Armor.png | Bin 0 -> 690 bytes content/Gamemode/Controller/Units/Driller.png | Bin 0 -> 664 bytes .../Controller/Units/Driller_Armor.png | Bin 0 -> 719 bytes .../Gamemode/Controller/Units/Grenadier.png | Bin 0 -> 679 bytes .../Controller/Units/Grenadier_Armor.png | Bin 0 -> 716 bytes content/Gamemode/Controller/Units/Knight.png | Bin 0 -> 652 bytes .../Controller/Units/Knight_Armor.png | Bin 0 -> 714 bytes .../Gamemode/Controller/Units/Rifleman.png | Bin 0 -> 620 bytes .../Controller/Units/Rifleman_Armor.png | Bin 0 -> 697 bytes .../Gamemode/Controller/Units/Shotgunner.png | Bin 0 -> 651 bytes .../Controller/Units/Shotgunner_Armor.png | Bin 0 -> 701 bytes content/Gamemode/Controller/Units/Tank.png | Bin 0 -> 664 bytes .../Gamemode/Controller/Units/Tank_Armor.png | Bin 0 -> 749 bytes .../Units/unit.battlerifleman.hjson | 25 ++++++++++++++++++ .../Units/unit.battlerifleman_armor.hjson | 25 ++++++++++++++++++ .../Controller/Units/unit.bazooker.hjson | 24 +++++++++++++++++ .../Units/unit.bazooker_armored.hjson | 24 +++++++++++++++++ .../Controller/Units/unit.driller.hjson | 17 ++++++++++++ .../Controller/Units/unit.driller_armor.hjson | 17 ++++++++++++ .../Controller/Units/unit.grenadier.hjson | 24 +++++++++++++++++ .../Units/unit.grenadier_armored.hjson | 24 +++++++++++++++++ .../Controller/Units/unit.knight.hjson | 17 ++++++++++++ .../Units/unit.knight_armored.hjson | 17 ++++++++++++ .../Units/unit.rifleman.hjson | 4 +-- .../Units/unit.rifleman_armor.hjson | 20 ++++++++++++++ .../Controller/Units/unit.shotgunner.hjson | 24 +++++++++++++++++ .../Units/unit.shotgunner_armored.hjson | 24 +++++++++++++++++ .../Gamemode/Controller/Units/unit.tank.hjson | 17 ++++++++++++ .../Controller/Units/unit.tank_armored.hjson | 17 ++++++++++++ content/Gamemode/Siege.GUI.cs | 8 +++--- 34 files changed, 322 insertions(+), 6 deletions(-) rename content/Gamemode/{RTS => Controller}/Siege.Unit.cs (100%) create mode 100644 content/Gamemode/Controller/Units/Battlerifleman.png create mode 100644 content/Gamemode/Controller/Units/Battlerifleman_Armor.png create mode 100644 content/Gamemode/Controller/Units/Bazooker.png create mode 100644 content/Gamemode/Controller/Units/Bazooker_Armor.png create mode 100644 content/Gamemode/Controller/Units/Driller.png create mode 100644 content/Gamemode/Controller/Units/Driller_Armor.png create mode 100644 content/Gamemode/Controller/Units/Grenadier.png create mode 100644 content/Gamemode/Controller/Units/Grenadier_Armor.png create mode 100644 content/Gamemode/Controller/Units/Knight.png create mode 100644 content/Gamemode/Controller/Units/Knight_Armor.png create mode 100644 content/Gamemode/Controller/Units/Rifleman.png create mode 100644 content/Gamemode/Controller/Units/Rifleman_Armor.png create mode 100644 content/Gamemode/Controller/Units/Shotgunner.png create mode 100644 content/Gamemode/Controller/Units/Shotgunner_Armor.png create mode 100644 content/Gamemode/Controller/Units/Tank.png create mode 100644 content/Gamemode/Controller/Units/Tank_Armor.png create mode 100644 content/Gamemode/Controller/Units/unit.battlerifleman.hjson create mode 100644 content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson create mode 100644 content/Gamemode/Controller/Units/unit.bazooker.hjson create mode 100644 content/Gamemode/Controller/Units/unit.bazooker_armored.hjson create mode 100644 content/Gamemode/Controller/Units/unit.driller.hjson create mode 100644 content/Gamemode/Controller/Units/unit.driller_armor.hjson create mode 100644 content/Gamemode/Controller/Units/unit.grenadier.hjson create mode 100644 content/Gamemode/Controller/Units/unit.grenadier_armored.hjson create mode 100644 content/Gamemode/Controller/Units/unit.knight.hjson create mode 100644 content/Gamemode/Controller/Units/unit.knight_armored.hjson rename content/Gamemode/{RTS => Controller}/Units/unit.rifleman.hjson (77%) create mode 100644 content/Gamemode/Controller/Units/unit.rifleman_armor.hjson create mode 100644 content/Gamemode/Controller/Units/unit.shotgunner.hjson create mode 100644 content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson create mode 100644 content/Gamemode/Controller/Units/unit.tank.hjson create mode 100644 content/Gamemode/Controller/Units/unit.tank_armored.hjson diff --git a/content/Gamemode/RTS/Siege.Unit.cs b/content/Gamemode/Controller/Siege.Unit.cs similarity index 100% rename from content/Gamemode/RTS/Siege.Unit.cs rename to content/Gamemode/Controller/Siege.Unit.cs diff --git a/content/Gamemode/Controller/Units/Battlerifleman.png b/content/Gamemode/Controller/Units/Battlerifleman.png new file mode 100644 index 0000000000000000000000000000000000000000..557d8f4711dff962eee0ac513b2d6c20963c2ddc GIT binary patch literal 658 zcmV;D0&V??P)Px%Oi4sRR5*>*lFLpLaTLaXQ(AhPQp&Wp9dsxuF|{EQf3mjHN}YMw@D*dmOb~A(c*|mMZ{g2YP>bQapBcM$2xqSE?{6hIqNO#e+xp z$z~J)wu^gx-Rl9e8HMN1ULZ^Px%j!8s8R5*=olF3g~Q51*23vFrNd%RlvnhumHRjl)bW865CxYop_EB^uAyLYKe z6Jp#LhowW*#D#`9KtKryC|D_U;1xR;%9B19O&=oM)j2o6^WAgL`3W{TisCQaVTQvRLCwd3NCyD%-$mXHjgU^{Ht5Cw#j+|w_J36Clf)O;i} zI&*WGO}nr)f-6U(JRhF{VE5j=q>^clojA_9^QSEFo7eBn`~6SWL9FD$zHTN9h8YO@ z85^Adz^i!x2n78AjEzoEDwWp(ngM#cysQdAJe9kpFJyRn?GmbF<5xmwzu(PVJV``q zW>=e6I8_%3J-@yKMR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m3)v?PG ziY(#xcu8k8QmM?YE}Cka(W5=Qn4Je8(%;W=dWE6kW1K#7+yuXxcxT)jdsHW49?l*N zGnXwJs^3R!CJunxqX3}#eE`H};^gy%Isq#{cc+`G5G0q^Z)-m@Jic}wS!&|Pl19|$ zB9%1D@)o&y#t5CW*iwffLl>moS&z)yp7i>5pv7iIy3~p-N_G3>t#Mo zeWhogDn7>&e>1Sl66uTvz{tsSjDPva?DrH}PUqCjeE_`9Rt^sjlFn!(*Rn>fxd04+ zn^!NO$|_?M&sodrD6#|_MS9!a0KA-ABoOe>x4)b5*YC;aOQKCt3;`G;S1$AL!4uk) zozOzTAOMME^8Z^iS11@HkxXI=M55uHq^B2%M8m|U7r1!oL<8~J(>Fw-VY)g)+_-*+ zItKu4io$>@6Hlb6SS=>8ufszhTh zE+iXHdkfzdR|S9t5CNald>o^L9RT!qwzJn|!Qzn`#;BC4CSKIK*PIx72_e}i7b`Tk zG*Kuuqbe4%S`GlKY!};=GHERj{PP!T;}|Y4dO^qD0^5dF07kA*#Bg~5s8+XF{zC@% Y4Mf=Em2j4$asU7T07*qoM6N<$g2j(BT>t<8 literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Driller.png b/content/Gamemode/Controller/Units/Driller.png new file mode 100644 index 0000000000000000000000000000000000000000..a36a1236769205d8a8879525b2dd87ae113b5a48 GIT binary patch literal 664 zcmV;J0%!e+P)Px%Qb|NXR5*>*kQ=Xm+uNpsoUT3x^~nnd^N% zX4WM2dY=!cxdqF~CNc;6Os{XMd-+3we?|Z}>$K3+*vNjNpz03c@z7p zBoznhr3-G_Ee4)XeMZR@85|B04o3+N^fNa4>{xiRtOx*gqFAr$8XI^$v!Xp3O?qzJ zy2{<#4+#YPL?dN2m&d{M~;@{gj8eS?e1nfv5KxvFO+^2N&b+l1hzJ@@=q=4n>kSO y80(9a)Dyx%QKuT~iPx%iAh93R5*=olFd&OQ5400Q)r_zlfkBiwuq%oQ&S`;F7Shxz(P%kVTBr9lIUNc ziHULHLU6-Q6CxW!T)4p%MvaZLiVQNwZz~y!V;PrU`n3`14^+K6I1;F8ei*-RDkzTo*UCi;U`vQts z$$T=)F;5j*B1K57;K)Ijuus`fGP_#tK$ab5OLGG*r;}GBqa3fTVLZ89HtV(42EG*y zK2LlnQtuVMOf75+cxn%rTML_>o2QUB=(^N_s>bN(Y@@ID(azmjqg2YW!*nVlnzo9j zm8?mMo$l*bxOL+`?d`3^W=h?HVLva2-!V0*BFmDg>jl9Ec8mD@^&nv2+ze1Ul_3$= z2!=~}2nGCfbhgny&_may4(bDSrVXHfpohk$$YyuZvbmI7=Hk^(VlxW_!+xti6sRK@ z_H(cIW+?{`A3Pxv36h9w6!Jx!ibym%x@+#Cr^BdfjA(S!+KUY!5(yF=8DloSKudE2 z%lRVh?X9@nPCk7cM^$6QW)`?}yAQx3>v};DWLYvBnCBQP{15k;|BfGcRP_J=002ovPDHLkV1mS< BOAi15 literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Grenadier.png b/content/Gamemode/Controller/Units/Grenadier.png new file mode 100644 index 0000000000000000000000000000000000000000..981be3aa89a745e8d898c8543d5a19b6fa2b10cb GIT binary patch literal 679 zcmV;Y0$BZtP)Px%VM#5l1on$VHAd+Z`#t9wsgwSD@oG?HQ10MA!0%_YK+mPiAY@VH~bZ@ z{2Ru-8W+YyNeq%mK`4P@z4SJvblT4JLTSfE(<0(R&*tP!&UwCb&iBGU#%dyA{+U-3 z2~+x4z~5pqnH2v87`*$kox+g`;P;I73p(&TG$NJ@$3w_s zGAV`tt<@%<(OFrD^Li&^t}Mif`D7HQhjOzH?^0A7Z9trvKmc5dDR>+X>aCV3wc**) z9bWDp@M`lb@rc59u1q|lV7J@EUbW7rFW-j{0kAk1<*;Iy(MS-js^jeR@OwsyDq}pE zzXrh5^^d&Isst66D3*;OWH5nwV}6Q&GRjuELcUNzKQi!poRsQK`nPa${niEEd^q5w z+Y_HtKLL;cqLJX4=Go~G?r|5TdXsoWAs$g^+9bBp6=biQVp$s=QUcJbI%>JW%#@Fs zVX%=Z5Dxk1*`ZW#P_tVJhkWD<6|}03$7KgVmgW98)(nGhc^v>%>!NBk_OrFVMh8_t z=LuPs&EXBgez)my*-^DFckkV1cP9P8#m*ha`F;q*?S=C+ZnHqkrj zkT2<{J_!5WgK5p4%}dj0;2P=BGcBUokxbV}hn~&bZ|Jr}p;#WS_Y2?C3cM;W8SVf8 N002ovPDHLkV1n3(M*08% literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Grenadier_Armor.png b/content/Gamemode/Controller/Units/Grenadier_Armor.png new file mode 100644 index 0000000000000000000000000000000000000000..920d93f701d834470ef505c13243cc6f1163ee90 GIT binary patch literal 716 zcmV;-0yF)IP)Px%hDk(0R5*=|lFLsMQ5eO4)5lQS>2ylp1ra3>M5qu%0vm%yAaP@&5VyE=uNxEp z0T-@axpkpSBf$kb5=Eo5@~8+_dA9}nfKnLfbQ!osup?w6bMopZi>;S4B>EEGi+ zfv_e5VNEECEG8on0q}R7j6{UxEOK3)myp*-M`Jwz%iDSQwS7vcFB+9B|B@Z5ot2d| zJGlbu=@cQakM(p4WN$^?z+@yMOhz+ut)+5txxF2mtkBcj$AgEXJbC&UfEQiOryNK| zGZ48zJg19bD8Ni?9srNm4L~py;Q5};z|tb)7aQq|MkT|I1kl{z!D+J*U&#o7H>0T?d@beonm<> zCk$~(QDiaH-^aNcCqXsH%lB{D$rW&`cE}#k8ukD%9#2qL=cTQwnX!pUc6Sd?1{f~f zs-4Vo8sV~6GP>3Bc_&xEeRxb}{{YqJ>-GUOz>g|FK4FdI9N5eL#$K*3wYpU}7=D>*(@nl~R#A9ZgIn zl5{utnMx#C&16aEijw42ZKAC<0Km7^O^!@9{F<3$<`}^}NT`B`YKE-e=N>&&9 ydj%Y_PDz-hecdD+vQEkBDie;2(#GaiCEgzgN%}0B=AIk?0000Px%MoC0LR5*>5(#ua1Q547VZ%ZG-bfoQ+J|>8eCR#>_F*OhqT^Kh00mc>og>m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@DLVP$_C5={wNb8jkXJP< wrXppdR>&7?42!8qx!$oOC~XNFiBtvf7pQFp0D4&JEdT%j07*qoM6N<$f<-PoaR2}S literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Rifleman.png b/content/Gamemode/Controller/Units/Rifleman.png new file mode 100644 index 0000000000000000000000000000000000000000..188d123843165028ee7c1784809909de55c694ed GIT binary patch literal 620 zcmV-y0+aoTP)Px%CP_p=R5*>*l1on$VHAd+Z|p#awzOsFg(23O5`)D^2#UsNqVX>nR`3sC>0fZ8 z3tbw2fom6tER2aJnn2XZMKHzEKri4hZKp%8^m9Q8wDX!ylyRmCEsnp@wgZnIOZu9!vPm+etde$Uq==Aog;z!A5 zc`efoxHS>um*vQq5usSBpf%fse0{|9ejZNV0O0Y;C*JSv6VW}QU^=Ie&Ia<%WP-5X z$7;$Vm$#@KI)r>02X>W{EHrN49bxIiHm&2f`0{-h00kgsM7oB@N27QLJRI0nl7>#w z(5b2lt0{|s-%G(P$}S7n#$s}OG|J1xwSPXN3!v;c?BpuAm17cPW6aIZl1gV-c=e9C z`PnlEQ|Sy(9z914_Pgb9zz@Lnc$j;M0B=)8E(TSWwoFDs{VZjyGa)=Lkyasm0%=iQ)5fj;pi)0000Px%b4f%&R5*==lFLt1Q4oi}Q`$;zZ*M7WX$#0BRe~U|C<4X}z7yB7W8of_?p?Xj zf55mP?p)}~s6zA)C`H()(O2ho@`env~&);BH>ab z0v<2%q)IfJEZc?o&>6ba%A1810NOh`SdS;@8|dfyjVmSb`-xA+v#}RPAf@1DXERG_ z-S7u|%+D7&1y#g6#y+wZuW&>ZGG#3x{>7Ny*nt9nbnv|m(NLb zElyCXpsmg=Dis?sb^B-svTQYayU*cvxd^YUVAG3u9TE+0h5Hx!0C+U@mD!xm_nDux zHu}Yn`N-cH*cFL*QU&1d)mw~De`6sOMa|^6HuoF=ufxX0fga*Xm9BcsEF!V%uS`oPHOaM{FAIKtzHPY@oZ(x|I)0?^x3!(gzA$!h$#AfxR9kSXk96Xwz}34nlC<`4qla5ci- zIvH&jZO?+=Wy0nRvJqRrWVVQ6K_{+ePXGXnqQyyG%VD?b6padz*G-1qs#CNa%t`F; fi1ox~>5G2=cBkxBWV17n00000NkvXXu0mjfwf;e2 literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Shotgunner.png b/content/Gamemode/Controller/Units/Shotgunner.png new file mode 100644 index 0000000000000000000000000000000000000000..5047c96ed98fc61634ec9139e2517e2e519e577f GIT binary patch literal 651 zcmV;60(AX}P)Px%MM*?KR5*>*lFLpLaTLaXGo8|wwsgwSD@oG?HQ10KA!1@QYK+mPiAY@V8a@RZ zeGm6|S-8=K0TL195-8S7Z&OOA)0ticu{>+x}Ew{#)^BEeArW)c&Ud3wsL_v;q~ltE&&I}~#k%L^Ia?dHVtLWXo$Me_xz zwi>MNABlRiBk>O;fNN=upw~;I-4=2OUN1gmb^nOBTR+GoHFgSBGD!`O$1NSy8?1l- zby48MQMb^mO=hOTn6}O4UWr6JjN^eyqlxKJNW{YwOErwTMbPg7 zKvh+t0GPJT&!Po@ZuHO%lf%5(udzV4F5O>MRWaN_A`%cmzX#pu@#ygb_II-YEWUWc z*5(1vpWVA8uy~bCaaU{d~+Cy!rO~QnTW;d3xh2YdM{p=_qSCoxD-! z*lbJE#F$siOvV7%&X+lpy+lQ#bLjj4w2WUf4la+>&$FrC71f{~!?w45k&1J4DNF;veba2$$6A%ECX= l#c_xFgkD=Jm8(O0e*wbg`Y=X)#bW>f002ovPDHLkV1jDPFjxQp literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Shotgunner_Armor.png b/content/Gamemode/Controller/Units/Shotgunner_Armor.png new file mode 100644 index 0000000000000000000000000000000000000000..9359ee30ca8aa0fcf2f4fb58571506dd4a2a46f1 GIT binary patch literal 701 zcmV;u0z&Px%cS%G+R5*=|l1oohQ51#0(--aS<+hi;r6Ptv5J4b{h%qs!2#FIDg*f#`ICt)k zAkG}%P(#FofyP9U2v%Mqq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^{#a(CIn>B?Vm+5hW{LmxUrWygm;j=g(CtdH0_A53+O^05HqeMhYU2 yqi&b7StAv8EvBPx7rjvN-OVll)NKvJ5YlgLQ}dx7JBOJ70000Px%r%6OXR5*=olFLg}VHn1LXVfE}b38iEh%@44L=+7ZWhk?fvipTFqU-_@LbPcU zQJZMtB3xCQ{(v?uB5Kt|Bch2wQ-**IJa|hB)=Au)6H-9KD^KGd*1K; zBsMvkCJO*nR{%)GO_Is9v{~qQB8$i9s zK{TBv8Zr1fI?l76<6Pd^NWrRw*P###1_5YmZ>6=dgVx3lrYB~9kDzI?*w)gB!)_-y zHATVNI;DjQRSun--ZlVE`99(se8TY1X8?S@L3(f9mvT4OwGdeX;LN_m4169TFgeFk z!esyG(%e{ z-2h-Rm>D4#VBp`BgzW|?Jza_MspzHj}3?P|IODZvR#B($7he0&;!{$W1=UB7^~jcCOM`JCI;%!9MX05IYvQNzgo z!iI(#0FJhKX{xKwj${Ln6qyxk6@PFM|9prSS1$q(n3`d1$d42=vxfd*KVuW$vUM&% zj!lw&D6$BrEgp>oxR>^`)l<&wd>EUakN#cG8k*|ri5f<>mH^zP8i3dk3+>gAUL=uP zC6&&@Ww)_P0WNnLM^Eg@BzgXx;UT~DCjdaK=M`b4OjLP|b&(@kYc`?EYb2};-{G_a f5RDillPT#ZJr4^tn`Xb&00000NkvXXu0mjfR_#%) literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/unit.battlerifleman.hjson b/content/Gamemode/Controller/Units/unit.battlerifleman.hjson new file mode 100644 index 0000000..1141905 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.battlerifleman.hjson @@ -0,0 +1,25 @@ +{ + name: "Battlerifleman" + desc: "a kobold with a battlerifle" + icon: + { + texture: "Battlerifleman" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["battle_rifle"] + equipment: [] + resource: + [ + { + material: "ammo_hc.hv" + quantity: 50 + } + { + material: "ammo_hc.hv" + quantity: 50 + } + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson b/content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson new file mode 100644 index 0000000..1f07005 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson @@ -0,0 +1,25 @@ +{ + name: "Armored battlerifleman" + desc: "a kobold with a battlerifle and armor" + icon: + { + texture: "Battlerifleman_Armor" + } + price: 40 + reward: 40 + creature: kobold.male + items: ["battle_rifle"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_hc.hv" + quantity: 50 + } + { + material: "ammo_hc.hv" + quantity: 50 + } + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.bazooker.hjson b/content/Gamemode/Controller/Units/unit.bazooker.hjson new file mode 100644 index 0000000..7f586a2 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.bazooker.hjson @@ -0,0 +1,24 @@ +{ + name: "Bazooker" + desc: "a kobold with a bazooka" + icon: + { + texture: "Bazooker" + } + price: 60 + reward: 60 + creature: kobold.male + items: ["bazooka"] + equipment: [] + resource: + [ + { + material: "ammo_rocket.hv" + quantity: 4 + } + { + material: "ammo_rocket.hv" + quantity: 4 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.bazooker_armored.hjson b/content/Gamemode/Controller/Units/unit.bazooker_armored.hjson new file mode 100644 index 0000000..deb85c0 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.bazooker_armored.hjson @@ -0,0 +1,24 @@ +{ + name: "Armored bazooker" + desc: "a kobold with a bazooka and armor" + icon: + { + texture: "Bazooker_Armor" + } + price: 70 + reward: 70 + creature: kobold.male + items: ["bazooka"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_rocket.hv" + quantity: 4 + } + { + material: "ammo_rocket.hv" + quantity: 4 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.driller.hjson b/content/Gamemode/Controller/Units/unit.driller.hjson new file mode 100644 index 0000000..02785fd --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.driller.hjson @@ -0,0 +1,17 @@ +{ + name: "driller" + desc: "a kobold with a drill" + icon: + { + texture: "Driller" + } + price: 40 + reward: 40 + creature: kobold.male + items: ["drill"] + equipment: [] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.driller_armor.hjson b/content/Gamemode/Controller/Units/unit.driller_armor.hjson new file mode 100644 index 0000000..b93555f --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.driller_armor.hjson @@ -0,0 +1,17 @@ +{ + name: "Armored driller" + desc: "a kobold with a drill and armor" + icon: + { + texture: "Driller_Armor" + } + price: 50 + reward: 50 + creature: kobold.male + items: ["drill"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.grenadier.hjson b/content/Gamemode/Controller/Units/unit.grenadier.hjson new file mode 100644 index 0000000..325edd2 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.grenadier.hjson @@ -0,0 +1,24 @@ +{ + name: "Grenadier" + desc: "a kobold with a grenade launcher" + icon: + { + texture: "Grenadier" + } + price: 50 + reward: 50 + creature: kobold.male + items: ["pump_shotgun"] + equipment: [] + resource: + [ + { + material: "ammo_sg.grenade" + quantity: 24 + } + { + material: "ammo_sg.grenade" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.grenadier_armored.hjson b/content/Gamemode/Controller/Units/unit.grenadier_armored.hjson new file mode 100644 index 0000000..6ddd1a4 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.grenadier_armored.hjson @@ -0,0 +1,24 @@ +{ + name: "Armored grenadier" + desc: "a kobold with a grenade launcher and armor" + icon: + { + texture: "Grenadier_Armor" + } + price: 60 + reward: 60 + creature: kobold.male + items: ["pump_shotgun"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_sg.grenade" + quantity: 24 + } + { + material: "ammo_sg.grenade" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.knight.hjson b/content/Gamemode/Controller/Units/unit.knight.hjson new file mode 100644 index 0000000..575b7e6 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.knight.hjson @@ -0,0 +1,17 @@ +{ + name: "knight" + desc: "a kobold with a longsword" + icon: + { + texture: "Knight" + } + price: 10 + reward: 10 + creature: kobold.male + items: ["longsword"] + equipment: [] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.knight_armored.hjson b/content/Gamemode/Controller/Units/unit.knight_armored.hjson new file mode 100644 index 0000000..c55a26e --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.knight_armored.hjson @@ -0,0 +1,17 @@ +{ + name: "Armored knight" + desc: "a kobold with a longsword and armor" + icon: + { + texture: "Knight_Armor" + } + price: 15 + reward: 15 + creature: kobold.male + items: ["longsword"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/RTS/Units/unit.rifleman.hjson b/content/Gamemode/Controller/Units/unit.rifleman.hjson similarity index 77% rename from content/Gamemode/RTS/Units/unit.rifleman.hjson rename to content/Gamemode/Controller/Units/unit.rifleman.hjson index 7adac10..af4c142 100644 --- a/content/Gamemode/RTS/Units/unit.rifleman.hjson +++ b/content/Gamemode/Controller/Units/unit.rifleman.hjson @@ -3,13 +3,13 @@ desc: "a kobold with a rifle" icon: { - texture: "rifle" + texture: "Rifleman" } price: 20 reward: 20 creature: kobold.male items: ["rifle"] - equipment: ["armor.00", "helmet.00"] + equipment: [] resource: [ { diff --git a/content/Gamemode/Controller/Units/unit.rifleman_armor.hjson b/content/Gamemode/Controller/Units/unit.rifleman_armor.hjson new file mode 100644 index 0000000..fcdc992 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.rifleman_armor.hjson @@ -0,0 +1,20 @@ +{ + name: "Armored rifleman" + desc: "a kobold with a rifle and armor" + icon: + { + texture: "Rifleman_Armor" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["rifle"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_hc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.shotgunner.hjson b/content/Gamemode/Controller/Units/unit.shotgunner.hjson new file mode 100644 index 0000000..b22f67f --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.shotgunner.hjson @@ -0,0 +1,24 @@ +{ + name: "Shotgunner" + desc: "a kobold with a shotgun" + icon: + { + texture: "Shotgunner" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["pump_shotgun"] + equipment: [] + resource: + [ + { + material: "ammo_sg.buck" + quantity: 24 + } + { + material: "ammo_sg.buck" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson b/content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson new file mode 100644 index 0000000..ebc8a50 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson @@ -0,0 +1,24 @@ +{ + name: "Armored shotgunner" + desc: "a kobold with a shotgun and armor" + icon: + { + texture: "Shotgunner_Armor" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["pump_shotgun"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_sg.buck" + quantity: 24 + } + { + material: "ammo_sg.buck" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.tank.hjson b/content/Gamemode/Controller/Units/unit.tank.hjson new file mode 100644 index 0000000..86c7eab --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.tank.hjson @@ -0,0 +1,17 @@ +{ + name: "Tank" + desc: "a kobold with a shield" + icon: + { + texture: "Tank" + } + price: 40 + reward: 40 + creature: kobold.male + items: ["shield.heavy"] + equipment: [] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.tank_armored.hjson b/content/Gamemode/Controller/Units/unit.tank_armored.hjson new file mode 100644 index 0000000..2771305 --- /dev/null +++ b/content/Gamemode/Controller/Units/unit.tank_armored.hjson @@ -0,0 +1,17 @@ +{ + name: "Armored tank" + desc: "a kobold with a shield and armor" + icon: + { + texture: "Tank_Armor" + } + price: 50 + reward: 50 + creature: kobold.male + items: ["shield.heavy"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Siege.GUI.cs b/content/Gamemode/Siege.GUI.cs index cbb7580..41e3df4 100644 --- a/content/Gamemode/Siege.GUI.cs +++ b/content/Gamemode/Siege.GUI.cs @@ -101,14 +101,14 @@ public partial struct SiegeAttackerGUI: IGUICommand public Siege.Gamemode.State g_siege_state; public Entity entity; public static List unit_indices = new List(64); - public static float scale = 2; + public static float scale = 4; public Region.Data region; public Player.Data player; public void Draw() { - using (var widget = Sidebar.Widget.New("attacker_build", "Recruit", "ui_icon_build", new Vector2(300, 600), lockable: false)) + using (var widget = Sidebar.Widget.New("attacker_build", "Recruit", "Rifleman_Armor", new Vector2(440, 600), lockable: false)) { if (widget.show) { @@ -121,10 +121,10 @@ public void Draw() GUI.TitleCentered($"Next wave {(time_left):0} s", size: 16, color: time_left > 10.00f ? GUI.font_color_title : GUI.font_color_yellow); GUI.NewLine(26); GUI.Title("Catalog"); - GUI.SameLine(100); + GUI.SameLine(170); GUI.Title("Queued"); GUI.NewLine(); - using (GUI.Scrollbox.New("attacker_unitshop", GUI.GetAvailableSize() / 2)) + using (GUI.Scrollbox.New("attacker_unitshop", new Vector2(GUI.GetAvailableWidth() / 2, GUI.GetAvailableHeight()))) { using (var grid = GUI.Grid.New(size: GUI.GetRemainingSpace())) { From 9ff32b2a17afc997192727f8be09aa313c4b79fa Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Fri, 18 Nov 2022 06:38:13 +0100 Subject: [PATCH 5/6] New units, preventing kobolds from spawning normally --- content/Gamemode/Controller/Siege.Unit.cs | 5 +-- content/Gamemode/Siege.Planner.cs | 30 ++++++++++++++-- content/Gamemode/Siege.Scenario.cs | 5 +-- .../Controller => }/Units/Battlerifleman.png | Bin .../Units/Battlerifleman_Armor.png | Bin .../Units/Bazooker.png => Units/Bazooka.png} | Bin .../Bazooka_Armor.png} | Bin content/Units/Bazooker.png | Bin 0 -> 620 bytes content/Units/Bazooker_Armor.png | Bin 0 -> 690 bytes .../Controller => }/Units/Driller.png | Bin .../Controller => }/Units/Driller_Armor.png | Bin .../Controller => }/Units/Grenadier.png | Bin .../Controller => }/Units/Grenadier_Armor.png | Bin content/Units/Gunman.png | Bin 0 -> 614 bytes content/Units/Gunman_Armored.png | Bin 0 -> 689 bytes content/Units/Hoob_Artillery.png | Bin 0 -> 1379 bytes content/Units/Hoob_Autogunner.png | Bin 0 -> 1463 bytes content/Units/Hoob_Crankgunner.png | Bin 0 -> 1374 bytes content/Units/Hoob_Machinegunner.png | Bin 0 -> 1417 bytes .../Controller => }/Units/Knight.png | Bin .../Controller => }/Units/Knight_Armor.png | Bin content/Units/Machinegunman.png | Bin 0 -> 638 bytes content/Units/Machinegunman_Armored.png | Bin 0 -> 699 bytes content/Units/Musketeer.png | Bin 0 -> 662 bytes content/Units/Musketeer_Armored.png | Bin 0 -> 721 bytes .../Controller => }/Units/Rifleman.png | Bin .../Controller => }/Units/Rifleman_Armor.png | Bin content/Units/Rifleman_Armor_Mamut.png | Bin 0 -> 689 bytes content/Units/Rifleman_Mamut.png | Bin 0 -> 637 bytes content/Units/Shieldbearer.png | Bin 0 -> 685 bytes content/Units/Shieldbearer_Armored.png | Bin 0 -> 746 bytes .../Controller => }/Units/Shotgunner.png | Bin .../Units/Shotgunner_Armor.png | Bin content/Units/Submachinegunner.png | Bin 0 -> 656 bytes content/Units/Submachinegunner_Armored.png | Bin 0 -> 725 bytes .../{Gamemode/Controller => }/Units/Tank.png | Bin .../Controller => }/Units/Tank_Armor.png | Bin content/Units/Wrecker.png | Bin 0 -> 666 bytes content/Units/Wrecker_Armored.png | Bin 0 -> 722 bytes .../Units/unit.battlerifleman.hjson | 0 .../Units/unit.battlerifleman_armor.hjson | 0 .../Controller => }/Units/unit.bazooker.hjson | 0 .../Units/unit.bazooker_armored.hjson | 0 .../Controller => }/Units/unit.driller.hjson | 0 .../Units/unit.driller_armor.hjson | 0 .../Units/unit.grenadier.hjson | 0 .../Units/unit.grenadier_armored.hjson | 0 content/Units/unit.gunman.hjson | 20 +++++++++++ content/Units/unit.gunman_armored.hjson | 20 +++++++++++ content/Units/unit.hoob_artillery.hjson | 24 +++++++++++++ content/Units/unit.hoob_autogunner.hjson | 24 +++++++++++++ content/Units/unit.hoob_crankgunner.hjson | 28 +++++++++++++++ content/Units/unit.hoob_machinegunner.hjson | 24 +++++++++++++ .../Controller => }/Units/unit.knight.hjson | 0 .../Units/unit.knight_armored.hjson | 0 content/Units/unit.machinegunman.hjson | 24 +++++++++++++ .../Units/unit.machinegunman_armored.hjson | 24 +++++++++++++ content/Units/unit.musketeer.hjson | 20 +++++++++++ content/Units/unit.musketeer_armored.hjson | 20 +++++++++++ .../Controller => }/Units/unit.rifleman.hjson | 0 .../unit.rifleman_armored.hjson} | 0 content/Units/unit.rifleman_mamut.hjson | 32 ++++++++++++++++++ .../Units/unit.rifleman_mamut_armored.hjson | 32 ++++++++++++++++++ content/Units/unit.shieldbearer.hjson | 17 ++++++++++ content/Units/unit.shieldbearer_armored.hjson | 17 ++++++++++ .../Units/unit.shotgunner.hjson | 0 .../Units/unit.shotgunner_armored.hjson | 0 content/Units/unit.submachinegunner.hjson | 28 +++++++++++++++ .../Units/unit.submachinegunner_armored.hjson | 28 +++++++++++++++ .../Controller => }/Units/unit.tank.hjson | 0 .../Units/unit.tank_armored.hjson | 0 content/Units/unit.wrecker.hjson | 17 ++++++++++ content/Units/unit.wrecker_armored.hjson | 17 ++++++++++ 73 files changed, 449 insertions(+), 7 deletions(-) rename content/{Gamemode/Controller => }/Units/Battlerifleman.png (100%) rename content/{Gamemode/Controller => }/Units/Battlerifleman_Armor.png (100%) rename content/{Gamemode/Controller/Units/Bazooker.png => Units/Bazooka.png} (100%) rename content/{Gamemode/Controller/Units/Bazooker_Armor.png => Units/Bazooka_Armor.png} (100%) create mode 100644 content/Units/Bazooker.png create mode 100644 content/Units/Bazooker_Armor.png rename content/{Gamemode/Controller => }/Units/Driller.png (100%) rename content/{Gamemode/Controller => }/Units/Driller_Armor.png (100%) rename content/{Gamemode/Controller => }/Units/Grenadier.png (100%) rename content/{Gamemode/Controller => }/Units/Grenadier_Armor.png (100%) create mode 100644 content/Units/Gunman.png create mode 100644 content/Units/Gunman_Armored.png create mode 100644 content/Units/Hoob_Artillery.png create mode 100644 content/Units/Hoob_Autogunner.png create mode 100644 content/Units/Hoob_Crankgunner.png create mode 100644 content/Units/Hoob_Machinegunner.png rename content/{Gamemode/Controller => }/Units/Knight.png (100%) rename content/{Gamemode/Controller => }/Units/Knight_Armor.png (100%) create mode 100644 content/Units/Machinegunman.png create mode 100644 content/Units/Machinegunman_Armored.png create mode 100644 content/Units/Musketeer.png create mode 100644 content/Units/Musketeer_Armored.png rename content/{Gamemode/Controller => }/Units/Rifleman.png (100%) rename content/{Gamemode/Controller => }/Units/Rifleman_Armor.png (100%) create mode 100644 content/Units/Rifleman_Armor_Mamut.png create mode 100644 content/Units/Rifleman_Mamut.png create mode 100644 content/Units/Shieldbearer.png create mode 100644 content/Units/Shieldbearer_Armored.png rename content/{Gamemode/Controller => }/Units/Shotgunner.png (100%) rename content/{Gamemode/Controller => }/Units/Shotgunner_Armor.png (100%) create mode 100644 content/Units/Submachinegunner.png create mode 100644 content/Units/Submachinegunner_Armored.png rename content/{Gamemode/Controller => }/Units/Tank.png (100%) rename content/{Gamemode/Controller => }/Units/Tank_Armor.png (100%) create mode 100644 content/Units/Wrecker.png create mode 100644 content/Units/Wrecker_Armored.png rename content/{Gamemode/Controller => }/Units/unit.battlerifleman.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.battlerifleman_armor.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.bazooker.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.bazooker_armored.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.driller.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.driller_armor.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.grenadier.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.grenadier_armored.hjson (100%) create mode 100644 content/Units/unit.gunman.hjson create mode 100644 content/Units/unit.gunman_armored.hjson create mode 100644 content/Units/unit.hoob_artillery.hjson create mode 100644 content/Units/unit.hoob_autogunner.hjson create mode 100644 content/Units/unit.hoob_crankgunner.hjson create mode 100644 content/Units/unit.hoob_machinegunner.hjson rename content/{Gamemode/Controller => }/Units/unit.knight.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.knight_armored.hjson (100%) create mode 100644 content/Units/unit.machinegunman.hjson create mode 100644 content/Units/unit.machinegunman_armored.hjson create mode 100644 content/Units/unit.musketeer.hjson create mode 100644 content/Units/unit.musketeer_armored.hjson rename content/{Gamemode/Controller => }/Units/unit.rifleman.hjson (100%) rename content/{Gamemode/Controller/Units/unit.rifleman_armor.hjson => Units/unit.rifleman_armored.hjson} (100%) create mode 100644 content/Units/unit.rifleman_mamut.hjson create mode 100644 content/Units/unit.rifleman_mamut_armored.hjson create mode 100644 content/Units/unit.shieldbearer.hjson create mode 100644 content/Units/unit.shieldbearer_armored.hjson rename content/{Gamemode/Controller => }/Units/unit.shotgunner.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.shotgunner_armored.hjson (100%) create mode 100644 content/Units/unit.submachinegunner.hjson create mode 100644 content/Units/unit.submachinegunner_armored.hjson rename content/{Gamemode/Controller => }/Units/unit.tank.hjson (100%) rename content/{Gamemode/Controller => }/Units/unit.tank_armored.hjson (100%) create mode 100644 content/Units/unit.wrecker.hjson create mode 100644 content/Units/unit.wrecker_armored.hjson diff --git a/content/Gamemode/Controller/Siege.Unit.cs b/content/Gamemode/Controller/Siege.Unit.cs index 61860ed..6c97201 100644 --- a/content/Gamemode/Controller/Siege.Unit.cs +++ b/content/Gamemode/Controller/Siege.Unit.cs @@ -3,9 +3,10 @@ namespace TC2.Siege { + [IAsset.Hjson(prefix: "unit.", capacity_world: 512, capacity_region: 256, capacity_local: 0)] public partial interface IUnit: IAsset2 { - static void IAsset2.OnUpdate(IUnit.Definition definition, ref IUnit.Data data_new) + /*static void IAsset2.OnUpdate(IUnit.Definition definition, ref IUnit.Data data_new) { } @@ -21,7 +22,7 @@ public partial interface IUnit: IAsset2 capacity_world = 64; capacity_region = 64; capacity_local = 64; - } + }*/ [Serializable] public partial struct Data diff --git a/content/Gamemode/Siege.Planner.cs b/content/Gamemode/Siege.Planner.cs index 5e0b0b1..3d2445c 100644 --- a/content/Gamemode/Siege.Planner.cs +++ b/content/Gamemode/Siege.Planner.cs @@ -1,7 +1,6 @@ using Keg.Engine.Game; using Keg.Extensions; using TC2.Base.Components; - namespace TC2.Siege { public static partial class Siege @@ -41,7 +40,7 @@ public enum Status: uint //[Save.Ignore, Net.Ignore] public float next_wave; [Save.Ignore] public FixedArray32 orderedUnits = new FixedArray32(); - [Save.Ignore] public int money = 100; + [Save.Ignore] public int money = 0; public Planner() { @@ -556,7 +555,15 @@ public static void OnUpdate(ISystem.Info info, Entity entity, [Source.Owned] ref var time = g_siege_state.t_match_elapsed; if (g_siege_state.wave_current != planner.last_wave) { - planner.money += (int)g_siege_state.difficulty * 50; + for (uint i = 0; i < region.GetConnectedPlayerCount(); i++) + { + var player = region.GetConnectedPlayerByIndex(i); + if (player.faction_id == g_siege_state.faction_attackers.id) + { + planner.money += (int)g_siege_state.difficulty * 50; + } + } + planner.Sync(entity); planner.last_wave = g_siege_state.wave_current; @@ -788,6 +795,23 @@ static void Func2(ISystem.Info info, Entity entity, [Source.Owned] in Commandabl } } } + + [ISystem.Update(ISystem.Mode.Single, interval: 0.10f)] + public static void SetSpawner(ISystem.Info info, Entity entity, [Source.Owned] ref Transform.Data transform, [Source.Owned] ref Spawner.Data spawner, + [Source.Owned] ref Siege.Planner planner, [Source.Global] in Siege.Gamemode g_siege, [Source.Global] in Siege.Gamemode.State g_siege_state, [Source.Owned, Optional] in Faction.Data faction) + { + ref var region = ref info.GetRegion(); + for (uint i = 0; i < region.GetConnectedPlayerCount(); i++) + { + var player = region.GetConnectedPlayerByIndex(i); + if (player.faction_id == g_siege_state.faction_attackers.id) + { + spawner.max_count = 0; + return; + } + } + spawner.max_count = 4; + } #endif } } diff --git a/content/Gamemode/Siege.Scenario.cs b/content/Gamemode/Siege.Scenario.cs index 388bacf..1ba0d2c 100644 --- a/content/Gamemode/Siege.Scenario.cs +++ b/content/Gamemode/Siege.Scenario.cs @@ -3,9 +3,10 @@ namespace TC2.Siege { + [IAsset.Hjson(prefix: "scenario.", capacity_world: 512, capacity_region: 256, capacity_local: 0)] public partial interface IScenario: IAsset2 { - static void IAsset2.OnUpdate(IScenario.Definition definition, ref IScenario.Data data_new) + /*static void IAsset2.OnUpdate(IScenario.Definition definition, ref IScenario.Data data_new) { } @@ -21,7 +22,7 @@ public partial interface IScenario: IAsset2 capacity_world = 64; capacity_region = 0; capacity_local = 0; - } + }*/ [Serializable] public partial struct Data diff --git a/content/Gamemode/Controller/Units/Battlerifleman.png b/content/Units/Battlerifleman.png similarity index 100% rename from content/Gamemode/Controller/Units/Battlerifleman.png rename to content/Units/Battlerifleman.png diff --git a/content/Gamemode/Controller/Units/Battlerifleman_Armor.png b/content/Units/Battlerifleman_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Battlerifleman_Armor.png rename to content/Units/Battlerifleman_Armor.png diff --git a/content/Gamemode/Controller/Units/Bazooker.png b/content/Units/Bazooka.png similarity index 100% rename from content/Gamemode/Controller/Units/Bazooker.png rename to content/Units/Bazooka.png diff --git a/content/Gamemode/Controller/Units/Bazooker_Armor.png b/content/Units/Bazooka_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Bazooker_Armor.png rename to content/Units/Bazooka_Armor.png diff --git a/content/Units/Bazooker.png b/content/Units/Bazooker.png new file mode 100644 index 0000000000000000000000000000000000000000..24fbcb5b0651b6898f99f5b480a8564b30aa6156 GIT binary patch literal 620 zcmV-y0+aoTP)Px%CP_p=R5*>*lFLq0VHAbGzfejqhxTwh^nz_57==Po2@#FaXyROB;$^}c7>7Q9 zV<-9;#(~iZUPeY8n1GQ8axs*qMcZ0WFPxs<+uwl{sl*3xkM?A({q40k{P!ig&8_)K zLOzdNPGp!042$(lUIOTf3xJv6F|pTZ@bJ}Ak3oO8Dc0(w6J-|Wqr6;C$c6bRW2z6$ zsbEx17B}OvRH+O8DgkhEOhXwQ#H`h%tqzZFTw!rD&Wq1GL_->1z8geC8V-kDd@Y$Q zttER6&d)~pS+Haz^P=Zh{fb z#p-r}bf!Q#Z=owra%Pp^Sva|H`2?@u$7!`Y;?u@105(8wC5#?%Y%+jn*iFu?5)ElY zLmE}Pjn(Y}KCg$YQIr5aRh0seH*a6($>XQ^R26_oI1E5CmHOxTBH=K}REh(G>DV{` zYb!fU$HrM(+2QK7OGkvypS@u^HqOLYgu8d{(?hV2#p%Eh8_6`SKHGtCX4KC{GEHs3 zedLT1AgFtgl?HxIC2JHob8d>aACt_SQmL6Onr5A>Q9!r`P}~l-5{Br8D31G;KOZ?e z3P82mWW;MDU$odwWO}By8f|fyfS~T7OCl=`glm9iy@lP;kJYdfP;KnxOaS_Z+@jNJ zlFpTZL$BOjM|yQCRt2{MIPx%Y)M2xR5*=olgm#NQ5eO4w}m3pcFLr!okCk_hy*EEhz}$&G4Z)DYFvOzELMc3Gm3)v?PG ziY(#xcu8k8QmM?YE}Cka(W5=Qn4Je8(%;W=dWE6kW1K#7+yuXxcxT)jdsHW49?l*N zGnXwJs^3R!CJunxqX3}#eE`H};^gy%Isq#{cc+`G5G0q^Z)-m@Jic}wS!&|Pl19|$ zB9%1D@)o&y#t5CW*iwffLl>moS&z)yp7i>5pv7iIy3~p-N_G3>t#Mo zeWhogDn7>&e>1Sl66uTvz{tsSjDPva?DrH}PUqCjeE_`9Rt^sjlFn!(*Rn>fxd04+ zn^!NO$|_?M&sodrD6#|_MS9!a0KA-ABoOe>x4)b5*YC;aOQKCt3;`G;S1$AL!4uk) zozOzTAOMME^8Z^iS11@HkxXI=M55uHq^B2%M8m|U7r1!oL<8~J(>Fw-VY)g)+_-*+ zItKu4io$>@6Hlb6SS=>8ufszhTh zE+iXHdkfzdR|S9t5CNald>o^L9RT!qwzJn|!Qzn`#;BC4CSKIK*PIx72_e}i7b`Tk zG*Kuuqbe4%S`GlKY!};=GHERj{PP!T;}|Y4dO^qD0^5dF07kA*#Bg~5s8+XF{zC@% Y4Mf=Em2j4$asU7T07*qoM6N<$g2j(BT>t<8 literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Driller.png b/content/Units/Driller.png similarity index 100% rename from content/Gamemode/Controller/Units/Driller.png rename to content/Units/Driller.png diff --git a/content/Gamemode/Controller/Units/Driller_Armor.png b/content/Units/Driller_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Driller_Armor.png rename to content/Units/Driller_Armor.png diff --git a/content/Gamemode/Controller/Units/Grenadier.png b/content/Units/Grenadier.png similarity index 100% rename from content/Gamemode/Controller/Units/Grenadier.png rename to content/Units/Grenadier.png diff --git a/content/Gamemode/Controller/Units/Grenadier_Armor.png b/content/Units/Grenadier_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Grenadier_Armor.png rename to content/Units/Grenadier_Armor.png diff --git a/content/Units/Gunman.png b/content/Units/Gunman.png new file mode 100644 index 0000000000000000000000000000000000000000..e9fa4d505b5055f1e7caba33df6a79f06094632c GIT binary patch literal 614 zcmV-s0-61ZP)Px%AW1|)R5*>*lG{!bQ51&1U1ppPZ8=R#%Um=y6;q3Z7z`St3C342Uhx_}g*W;v z#(;WdA~7V8m~d8$0}(pV4%2oz^hmcCrN!zK_+PE;?Dg$`t^LD)FVQPrEMzdp!g9m1 zxs#X>yY{&Rh((40xH}aUm1dLIAJzu|O0Ou@8|1AjOAA@v?^<$cAxmm}3`39L)I65= z4`lhGA^1xI;C9L&5)9(i>oU-QH_xB3ynn#T=1;Pw!On?8)-=#GReUddtZyF;0v_E< zQgnTpG~<-YRrFSeSY()_F~ZCF2LQadP947w={b;3=F?0X!))bT^0rI$ z+$R>%DR?!yyU=;Oc#Ds#2edCc;_Kco00IC>Gd|Efmq`$w2vP8AWKDytX;4!GY~@_W zM#I>pmK+%2{!CKNWfHtwJp@1tssJRW;sDtB(|^9tDY{gvzEA)vzRzL4iWXE^eEN`^ z)5-qDbSg>CIwGCAKFe80EWiE4+Lw*4gQ-|pMnW2ux`Gx|2VQoHE&wyLnLc29a}VI! zK~K{oDwTSRS+&WJLIsT)MsyqiH*XQY(Os$;4f4%$1Y8AaC?JIAHza_5oh?p^b&RNv zQ*?>w-3)o{2D(uCf$EI_AOR-z5CF%eGODKFH&qhj0rb%{XD2%Z6jgNEE%JpbeFuNQ zq}^7i`4@yVg^nB&fb{$Z<>oP{qsYrT_Ej^$Z>~1s0$G+K0ssI207*qoM6N<$g7XOt A(EtDd literal 0 HcmV?d00001 diff --git a/content/Units/Gunman_Armored.png b/content/Units/Gunman_Armored.png new file mode 100644 index 0000000000000000000000000000000000000000..da819d03e9f7d2e0a38891c416d22736767175e4 GIT binary patch literal 689 zcmV;i0#5yjP)Px%Ye_^wR5*=ol1on$Q5c4w12b)BI-OG6LW^1<4Ftg|1{Fv&@$SO4?)?$&-TNbm zI~Te#ULtOcBnGh&L%1y<6-qBmvA3B5Ep%KUEd|c%oGt09L7j zX;#H)+7m%dbJ*w31qcU%3`ZjXtp6?ZEj~*&RXCv+$3MGu6{}Rit*iKSm2e7p$|$y0plJ^K`tU{kJ|BtIRg_wtphqR**LglN3c$jw)fNsMxZdvmV=2znH*jbA05Gg!};?8D@eraA0eBg33O;~}Jn zn3#M|zEr{IRWXX&40ihg_`ICJn2vL)ub-)z#bygfp%HZ_08W?OGQ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S*=V&%eA3$nr|_a@+NVIDJ8CE6lP@CP*Ge_zMq2k)BO0_gJ^n?9>TRV`bG1#jc^ago zz?zpMiRK~zdC*)4YhI5052>@)!^a)J;T#EOT>Xj#4^mlP4r=8(!trUWx&p?caR9nU zClvtI#d&hI7Ya&%MK-HJiUL)|d02G@!tn_T1tr#kBI@)Blb+E(B?%OTf)ced@!c2* z_^2^ksMBZTpMFT8;FoUokFJVD3W0EZns9uAv1pv0(MiUN<8qW$#d&m(PBIV}$EriN gfgzdnyb`Oyzp$!1xKikJwg3PC07*qoM6N<$g69d73;+NC literal 0 HcmV?d00001 diff --git a/content/Units/Hoob_Machinegunner.png b/content/Units/Hoob_Machinegunner.png new file mode 100644 index 0000000000000000000000000000000000000000..985e9fbb4cae83f86185eb493065c88e344a94d5 GIT binary patch literal 1417 zcmV;41$O$0P)Px)LrFwIR9J=OmtSmCbri=x-Nx2(yRO~6tlc`gva-<(Hs)X>5(ol1TzDZd(L~{a z1oZ{*LE?ixsEHvl5=?}b#TX+HH8BJeqQqekA|Z-%!NF$3=r&4AyY=36y=&KP%B~Nk zmvw&}EAh#bG{4;6?|Xjd`#b0S&hHfd?_zjd;1{Zo|7LT3Mo`l4r1P(vfqILC$afueZ4iSK%yZr!k_J(wC{AUCJjvv@X zXK#ovuifIE^OxDzTu)bjm>xyOUbOs)2;?mW=;-zX;EO1{ym=kls;lriM5GddZPiss z=H={Z@@jjUyjm^<{xx>?3ae(bEQi=6hg)0d=oz4O?J73bIe~NtHr6@m>I9`XyOV6xh+JBGLLJ^G(Yw+KdDX^K4<+1m3A&`}XW^PW*mtq^3bqzE3J{XMabE0I+I_d1Wh2|AGhA7#x#+i~xBnpfP+KXH`e+7U@IGuza96iFx6Q?mLko z>}We{>%9Q<-1L!OV;A3hYiBJ^tC8Jn%W11~;wdS_A0A~e9K-8fg(TV7-nyBmHmoH! z8t3Yj>-6^expVt2k?;^zo=QGz|C;z{5>*}JqYv9L8jI$Pzg)XPbXeAZdI;9L?3zt5 zX0eSWCm79JHs=%>R~~u$bq4wZoc-p)9L#Lj&mJ@Ghlh2*KN7>kqxgkJ(>aiDHu4}b z!Jft%R@s*E@lUWhm3VEdN! znrKUV;OF1_=71g~6aZv(!T?}43tGmVg2f6zDmjiCkL6Z~GDQf|6|K>3r>VLeuS3Ka zQRwOqbJc$@Yx9|H8l?LM-;lCo0tEnx#FWA3yRT15wSoq)yKO7Gfj5qwnpfE+TJ$#| zaO@PmA!Vud7w(9>4w0d|{Zy1m3o6gV6i6BbkY^&FHVG&x-~+Y5+J z{!OV6)h-VVFNs7J0W~#=nu;@$OmTB~jFGaGe#-i?V!DUN7?ekGOXwH~=%h2ASc?1u XGU!b45#M|o00000NkvXXu0mjf3fQX( literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Knight.png b/content/Units/Knight.png similarity index 100% rename from content/Gamemode/Controller/Units/Knight.png rename to content/Units/Knight.png diff --git a/content/Gamemode/Controller/Units/Knight_Armor.png b/content/Units/Knight_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Knight_Armor.png rename to content/Units/Knight_Armor.png diff --git a/content/Units/Machinegunman.png b/content/Units/Machinegunman.png new file mode 100644 index 0000000000000000000000000000000000000000..089d5c6ddcbac147d7ae434c269056572da36db5 GIT binary patch literal 638 zcmV-^0)hRBP)Px%I7vi7R5*>*lFLpLaTLaX|AEq$p|o=;Erpbl8Y~qTgn*Z5f^p&6#IR!H#y8+8 z+-UR-bn6-~TU}^ig)Kw0v>2qVbf!RO=nXn9NGCy_z_a@D<(yx>b8_InFVPn(OBoW8 z5qGmxVK%Oc?TY0BL_@;>%#G{fq|@QW$Bj#X!M-?ZwJDcuR+qAT*e#Uk+k$^e0L-K`LV*B{R?C&z@bbw+)^~P!zf~lg(8wQ{WD^>Gzfb%)Zm^O2 zbs2DXK1r?axXDC}qhp(3w?{NIOi~+VZQ&LG&o{sF`S%}Unk=fO<3aif-1`e@#GxIyY`+$ZZ*(Z`+QL02)pkRh4->6X)H^BO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wmpuHI@CePE=EoBvJTTuCV*# zbQmyyKTN)8m|-nIsa(a;?&4RRgw;`A#vTChI=;>3d6s}G3zxbvfb=ggAH}8_SDox7 zidI&Zu&j7FhgtY+Us*`u`ci7ne#l1)n*O*MM zQYWgZL^YMVXkjl=#N&2xsh7;55KHAMS>1)|^Rl=!$NI(=dcFuiU9X|%i>N*?xr7dY zP4+M$drUoFynZ391(*oASdXV!T$@t_+~kr=bc1Z=%fyAm9ybOGpH@Ng=`X|eW?i{`UqwOi>lI#i4%iY!qvnm9zO zkW7~t002a3P)Zc<1hg_#j3!1)B?_;rwLbucAB3HfcLCEjw@0wlFP2H#= w+uC%^5ux6;n6j-+S9JFlt{Ot-QXiQ80o>~Ip)TgYbN~PV07*qoM6N<$g1RI%R{#J2 literal 0 HcmV?d00001 diff --git a/content/Units/Musketeer_Armored.png b/content/Units/Musketeer_Armored.png new file mode 100644 index 0000000000000000000000000000000000000000..0d18061df3639839c2a2fb38593c3b511935d205 GIT binary patch literal 721 zcmV;?0xtcDP)Px%i%CR5R5*=ol1on$VHAd+kG9ixI-N3hDlIo9jfg0UK?Mv8QBV`snz-~Q7~|f( zKf#4Dap6L?h6oW8jll~MLqH$_D@6*-loon{w$O3WFjD2LzVGC`mz?tojwnTuEC8P> z1CZO!lg$>zQM3Ow6-BZd8+9Ujh|Xv;0P)QX?oxKI?yy4`=3 zrel7d4!@;B=t5Iv*ecLo9|Yjde2m6MopYyJ85#d*Uql=ZjYm?r*5AXs@d=V<%3fsB zOxX)PTuC!ku@UxFNC4cS<6P_SVQ%gxZEYmF)UH|nlLCRYF; zvsb_?oOYOmu6is0m)lM?e(eMl*U01wPx%Ye_^wR5*=&kL_gF9Px#0TIOCvm9w=uFP~DvJSO1Z|2Rl?s}-Lf1ykL z1Fb{X*6P%nE)LeEY1zz~nmUw#Km!6nehKn+a8M@eIlX)Lem>9hd|yG8G8ohnKyT6k zurRLxprz%P00;!EvKm)`-ENm0xzZ=^-5HgEfK`r-UX>14oh*Z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qFl)(qG>a~3)e5WYg+l-URnuJ*{?6f2stw^XR<`#Fidl1Qa9jTL_Z X@Qd%WB)JCV00000NkvXXu0mjf=^-h< literal 0 HcmV?d00001 diff --git a/content/Units/Shieldbearer.png b/content/Units/Shieldbearer.png new file mode 100644 index 0000000000000000000000000000000000000000..c3610a811ca3c9f7aac638757fe4d9d74bc2d966 GIT binary patch literal 685 zcmV;e0#f~nP)Px%XGugsR5*>*k~>dR0T_m#UZGcdXrZOS(n7SgAwg&Y!Gt&%W7OTj_zz5sqk|?m zyEyn0+zgA0adVMMVo{?)xs;aELtA>Gw{v=x9tWgA;vevv-h9dXrky$ zqk4X)KNa`qLwFrlHI~Y8)ibQw%pIu!BQ`StpR#$vlM`(0?E|Q?+|gVBR9bDaDVc}! zVLoi8)Q9t7{DK3g$;Q1mD?GTh#QU`vO0A32H45ZaS?*|b09X7@jx`#N+O6faoh;98 zUneSNc>Qsmc(H)2RT(tf2n2(?eDxf`X{TCgav)`2=m3I&5h`+1^?BX&v=H4E`F-3Y z;`b0OmbkMJA(=Vk$~`cjiLqcdEI}_WwN<4Ga(PwVGD(N^Fj)1(XV|Sxaqne;JV_`NVCC&QWVxf!0F1kB9QRb! zW*NY3G;!Ez;`6!@Gl%F0^@vg#i`|T1HzP?^oGyVxFho;nU@>;-sX9%wt5q$=EPx%q)9|UR5*=olS@n!Q51&1X{QBd+9^#71%qHALd6Fl2@NDfB2huz>cY6urEXjp zV`4P8c4MNhU68mjY)p(KE?AgASP%(DL=X#YDUVK>KBg@U&~brOK?VM$NC0HhIdt6+j>`RS)8Vk2H8ozUy%n@J)B+G$&+uhplGRx9zkK2FWm%EP zrgO-Ogj7?NV8Y{%x@mi^E|zyW3mo54O|S*1_A)ADRBW2(A+1 znfw7{<6~covH#>QVi90?WVDDa8BxI{?Y_JZa%e70Pfyoj8zAbsAymnBlT?mmDu>_e zA*3cKKknts$wr1pMv1Ivh^Vom^!bG_p}Fus1pwt`CG?$d;&y8b*WV1HrE?@S4SsNyW0)A#@LIeVS66zXO0B3pGz((F+vtUx8l<=^(n|D(`h-)c)f`v#rO>=!6 zlT));tRjJcpP~03&~-x)0BU?rb_%BHluPj0%UCt?)E@H@j;$h=iiD$D@sAE0NdTy> zZ~zqT>2%kDu|g)hN!GAY<+c!0Ge=J6{sI7I!R8{L%^};jD413uzhyCH`xXV8i)=a$ caA27J0B*}3;BX3>5&!@I07*qoM6N<$f;$^n#Q*>R literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Shotgunner.png b/content/Units/Shotgunner.png similarity index 100% rename from content/Gamemode/Controller/Units/Shotgunner.png rename to content/Units/Shotgunner.png diff --git a/content/Gamemode/Controller/Units/Shotgunner_Armor.png b/content/Units/Shotgunner_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Shotgunner_Armor.png rename to content/Units/Shotgunner_Armor.png diff --git a/content/Units/Submachinegunner.png b/content/Units/Submachinegunner.png new file mode 100644 index 0000000000000000000000000000000000000000..8ee2aec0369947227c8cb81dffc6414babf7e280 GIT binary patch literal 656 zcmV;B0&o3^P)Px%N=ZaPR5*>*k-KYCaU8`z_ckH#Hpxwz_6nh(lo|^~DiuUg5eEl1aq8?Y=wIMt zai~&35S#=DC!s@p45gq$vBg5)^pRLinl!n&N$$N(ZqnxGP@7sOSHII)&f$DN2mbq$ z4#n+}0o0&h%%*dk?g>lFxsm{g2D|_a_C};?qruaUGsglPhoW4!*-o2`jwJZ7oED=a z3Hm}o6i)!HW{_On6qQ|D;;)kc`uh|DZZ}4~E@T^?-MU6{b(8n=DH5u}QdT3OD!5!u zX{}-~v$%CU;KJEBMcoo{HAcB&;%T;s2E4?TPVNt%2jI!=4RiWmTS=i7CcKOL`WpV6+8P2SC|;R{FF z2Cb;`;^iY=Js9J9zd}lHvR{xfwhWV{CGX)!ae#J44-Ar6MkB?Izip z$=h!k02VTNOw*D89J*CUvv(z@%OUcO14Bx00+21%0Z2|vVOTaL+afbpq0{e{iq-lN z#NMbMpiQ=E?-36BFf1FRCQu?Ff?X;**(GF$Q)=xs*)Etz5dT<2w47Zu8oL;lO-po0 qa)&G$R+(HwfU^s+Unlq54DbsDBm!Z&C_+B~0000Px%k4Z#9R5*=wl1oTbaTvvacV6ke*K6}?X4K4(#7xuZX#`gde9<2=-V3vecO=#* zRdopfMUw%rl4(pcC#}`H>Qhx+qN2h_$mgf2x)OlMREoDsoow{jPiX zc|P@gqjpnJ`rJ3N?17@m#0(vP(}#}ny!#{JpQGrhG>3a10^lzxW>@nLVuns6krYeA zB~^8a<1PEy=qce&`)d{nowzj_X0p_kc>#DaFib^-kNPb&Jb&}Pun}n~G~g^4H)$mP z-PV6g0thNDF=w}-czgsy0WMrT3&79e5uSB)a^lp%0-(BTF*yq9 zWtqxajP=Z*sYQ~J%q)8l@~Z%1Np?OvhsUFkva+OR1zw+<^`&J@M8nt|PHAB-PfRzL zbMTj;V!>HTE|(@{Wmyn*$!52SoHb26C%{>Xn9mUZ0|xjF?GX(b7!bs_00000NkvXX Hu0mjfYHvzI literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/Tank.png b/content/Units/Tank.png similarity index 100% rename from content/Gamemode/Controller/Units/Tank.png rename to content/Units/Tank.png diff --git a/content/Gamemode/Controller/Units/Tank_Armor.png b/content/Units/Tank_Armor.png similarity index 100% rename from content/Gamemode/Controller/Units/Tank_Armor.png rename to content/Units/Tank_Armor.png diff --git a/content/Units/Wrecker.png b/content/Units/Wrecker.png new file mode 100644 index 0000000000000000000000000000000000000000..3089559657fe4dc95cc164ac8c0e7dc324cbf234 GIT binary patch literal 666 zcmV;L0%iS)P)Px%R7pfZR5*>5leZ@# z7ZYQQgMDTsf>2W{~5HQ4N``+aJ<$0bjFZ_oB zy$)kI8ZrXC4r6y_J8nsmA_jn}s=ziQu^`Le6kIN+;Scz*90wR1PaD^7Tn6C5!@K7E z>64cLdw^S`NhGh!$mGimhWjkD<#hvKp}x()DTyD`S2Ia!s35tTyJlsbHL6;JiRsq>^t-z`;q?&r*$>390z{?I-({InS!OsH z#?|Mfsx?VTeo~U3rrmnvFIfRfG=y-p{}mX6os zLK8XwIeGIiU{{%ZnN0CFX=#A&Zabi_@% literal 0 HcmV?d00001 diff --git a/content/Units/Wrecker_Armored.png b/content/Units/Wrecker_Armored.png new file mode 100644 index 0000000000000000000000000000000000000000..544ba23ef4a1815e7f8853a37aa3cb2887f0039c GIT binary patch literal 722 zcmV;@0xkWCP)Px%j7da6R5*=olS@w%VHAd+fl}zSoieoC3zQJBppqsHLNr9th*4w0#!F0Gn7CtY zjK9Dbm&Ual7j8^ks6kn{FkVR`rqGnArBH5#V%upurBm8*p{)WvtM5zBdGns<%@L?j z7K>2_FiRo;8AT3;t z>2IG|?{YbHVgImM63HkkW=TYrL~L>^=P#WE;LhF2a_{|nj{qnOTsh|ERUo9BB@tIw z4;$-IPK}K){rWu}U2V+!gB(8U#_jGV7+fs>%L3zr-7F}1y`{C8d4CW9yF(_g6#!5a z{-KLu^9DHuZNBXD=ktBkEdS}S5#!1$W}7T zK${(aHw$5U8sq~U3;9i(TbP$p%iAaoYhaDlQ zB1Bvk+w&EX4g;9HCEV)6z6fzT3jAAJZ(6{*n*z)W~^kAMK+Y_?J;>blijOS92LRLj!Y z*39x+6hobX-JM-hnH>4tE)$+!X2P3%TaNxarb1B%AeG7SBc1?b3(IR!Qkfhp>ly$} zZ3ATo|FbacbE6k)Y-~i=FdOp}^=bjoQ<)q|ZM7oE-^djL{Co>rumAu607*qoM6N<$ Ef}<%uC;$Ke literal 0 HcmV?d00001 diff --git a/content/Gamemode/Controller/Units/unit.battlerifleman.hjson b/content/Units/unit.battlerifleman.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.battlerifleman.hjson rename to content/Units/unit.battlerifleman.hjson diff --git a/content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson b/content/Units/unit.battlerifleman_armor.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.battlerifleman_armor.hjson rename to content/Units/unit.battlerifleman_armor.hjson diff --git a/content/Gamemode/Controller/Units/unit.bazooker.hjson b/content/Units/unit.bazooker.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.bazooker.hjson rename to content/Units/unit.bazooker.hjson diff --git a/content/Gamemode/Controller/Units/unit.bazooker_armored.hjson b/content/Units/unit.bazooker_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.bazooker_armored.hjson rename to content/Units/unit.bazooker_armored.hjson diff --git a/content/Gamemode/Controller/Units/unit.driller.hjson b/content/Units/unit.driller.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.driller.hjson rename to content/Units/unit.driller.hjson diff --git a/content/Gamemode/Controller/Units/unit.driller_armor.hjson b/content/Units/unit.driller_armor.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.driller_armor.hjson rename to content/Units/unit.driller_armor.hjson diff --git a/content/Gamemode/Controller/Units/unit.grenadier.hjson b/content/Units/unit.grenadier.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.grenadier.hjson rename to content/Units/unit.grenadier.hjson diff --git a/content/Gamemode/Controller/Units/unit.grenadier_armored.hjson b/content/Units/unit.grenadier_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.grenadier_armored.hjson rename to content/Units/unit.grenadier_armored.hjson diff --git a/content/Units/unit.gunman.hjson b/content/Units/unit.gunman.hjson new file mode 100644 index 0000000..88ba841 --- /dev/null +++ b/content/Units/unit.gunman.hjson @@ -0,0 +1,20 @@ +{ + name: "Gunman" + desc: "a kobold with an pistol" + icon: + { + texture: "Gunman" + } + price: 10 + reward: 10 + creature: kobold.male + items: ["pistol"] + equipment: [] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.gunman_armored.hjson b/content/Units/unit.gunman_armored.hjson new file mode 100644 index 0000000..04147d0 --- /dev/null +++ b/content/Units/unit.gunman_armored.hjson @@ -0,0 +1,20 @@ +{ + name: "Armored gunman" + desc: "a kobold with an pistol and armor" + icon: + { + texture: "Gunman_Armored" + } + price: 15 + reward: 15 + creature: kobold.male + items: ["pistol"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.hoob_artillery.hjson b/content/Units/unit.hoob_artillery.hjson new file mode 100644 index 0000000..e484f18 --- /dev/null +++ b/content/Units/unit.hoob_artillery.hjson @@ -0,0 +1,24 @@ +{ + name: "Hoob artillery" + desc: "a hoob with a cannon" + icon: + { + texture: "Hoob_Artillery" + } + price: 500 + reward: 500 + creature: hoob + items: ["cannon.short"] + equipment: [] + resource: + [ + { + material: "ammo_shell" + quantity: 5 + } + { + material: "ammo_shell" + quantity: 5 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.hoob_autogunner.hjson b/content/Units/unit.hoob_autogunner.hjson new file mode 100644 index 0000000..954a033 --- /dev/null +++ b/content/Units/unit.hoob_autogunner.hjson @@ -0,0 +1,24 @@ +{ + name: "Hoob autogunner" + desc: "a hoob with an autocannon" + icon: + { + texture: "Hoob_Autogunner" + } + price: 350 + reward: 350 + creature: hoob + items: ["autocannon"] + equipment: [] + resource: + [ + { + material: "ammo_ac" + quantity: 50 + } + { + material: "ammo_ac" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.hoob_crankgunner.hjson b/content/Units/unit.hoob_crankgunner.hjson new file mode 100644 index 0000000..1d13791 --- /dev/null +++ b/content/Units/unit.hoob_crankgunner.hjson @@ -0,0 +1,28 @@ +{ + name: "Hoob crankgunner" + desc: "a hoob with a crankgun" + icon: + { + texture: "Hoob_Crankgunner" + } + price: 200 + reward: 200 + creature: hoob + items: ["crankgun"] + equipment: [] + resource: + [ + { + material: "ammo_hc" + quantity: 250 + } + { + material: "ammo_hc" + quantity: 250 + } + { + material: "ammo_hc" + quantity: 250 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.hoob_machinegunner.hjson b/content/Units/unit.hoob_machinegunner.hjson new file mode 100644 index 0000000..424b653 --- /dev/null +++ b/content/Units/unit.hoob_machinegunner.hjson @@ -0,0 +1,24 @@ +{ + name: "Hoob machinegunner" + desc: "a hoob with a machinegun" + icon: + { + texture: "Hoob_Machinegunner" + } + price: 250 + reward: 250 + creature: hoob + items: ["machine_gun"] + equipment: [] + resource: + [ + { + material: "ammo_mg" + quantity: 250 + } + { + material: "ammo_mg" + quantity: 250 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.knight.hjson b/content/Units/unit.knight.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.knight.hjson rename to content/Units/unit.knight.hjson diff --git a/content/Gamemode/Controller/Units/unit.knight_armored.hjson b/content/Units/unit.knight_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.knight_armored.hjson rename to content/Units/unit.knight_armored.hjson diff --git a/content/Units/unit.machinegunman.hjson b/content/Units/unit.machinegunman.hjson new file mode 100644 index 0000000..738dafc --- /dev/null +++ b/content/Units/unit.machinegunman.hjson @@ -0,0 +1,24 @@ +{ + name: "Machinegunman" + desc: "a kobold with an machine pistol" + icon: + { + texture: "Machinegunman" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["machine_pistol"] + equipment: [] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.machinegunman_armored.hjson b/content/Units/unit.machinegunman_armored.hjson new file mode 100644 index 0000000..56d262d --- /dev/null +++ b/content/Units/unit.machinegunman_armored.hjson @@ -0,0 +1,24 @@ +{ + name: "Armored machinegunman" + desc: "a kobold with an machine pistol and armor" + icon: + { + texture: "Machinegunman_Armored" + } + price: 25 + reward: 25 + creature: kobold.male + items: ["machine_pistol"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.musketeer.hjson b/content/Units/unit.musketeer.hjson new file mode 100644 index 0000000..3f8c903 --- /dev/null +++ b/content/Units/unit.musketeer.hjson @@ -0,0 +1,20 @@ +{ + name: "Musketeer" + desc: "a kobold with a musket" + icon: + { + texture: "Musketeer" + } + price: 15 + reward: 15 + creature: kobold.male + items: ["musket"] + equipment: [] + resource: + [ + { + material: "ammo_musket.shot" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.musketeer_armored.hjson b/content/Units/unit.musketeer_armored.hjson new file mode 100644 index 0000000..b27e58b --- /dev/null +++ b/content/Units/unit.musketeer_armored.hjson @@ -0,0 +1,20 @@ +{ + name: "Armored musketeer" + desc: "a kobold with a musket and armor" + icon: + { + texture: "Musketeer_Armored" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["musket"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_musket.shot" + quantity: 24 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.rifleman.hjson b/content/Units/unit.rifleman.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.rifleman.hjson rename to content/Units/unit.rifleman.hjson diff --git a/content/Gamemode/Controller/Units/unit.rifleman_armor.hjson b/content/Units/unit.rifleman_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.rifleman_armor.hjson rename to content/Units/unit.rifleman_armored.hjson diff --git a/content/Units/unit.rifleman_mamut.hjson b/content/Units/unit.rifleman_mamut.hjson new file mode 100644 index 0000000..ff69d4a --- /dev/null +++ b/content/Units/unit.rifleman_mamut.hjson @@ -0,0 +1,32 @@ +{ + name: "Mamut rifleman" + desc: "a kobold with a rifle (chambered in autocannon calibre)" + icon: + { + texture: "Rifleman_Mamut" + } + price: 50 + reward: 50 + creature: kobold.male + items: ["bp.mamut.b738"] + equipment: [] + resource: + [ + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.rifleman_mamut_armored.hjson b/content/Units/unit.rifleman_mamut_armored.hjson new file mode 100644 index 0000000..b6ea2fe --- /dev/null +++ b/content/Units/unit.rifleman_mamut_armored.hjson @@ -0,0 +1,32 @@ +{ + name: "Armored mamut rifleman" + desc: "a kobold with a rifle (chambered in autocannon calibre) and armor" + icon: + { + texture: "Rifleman_Armor_Mamut" + } + price: 60 + reward: 60 + creature: kobold.male + items: ["bp.mamut.b738"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + { + material: "ammo_ac" + quantity: 10 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.shieldbearer.hjson b/content/Units/unit.shieldbearer.hjson new file mode 100644 index 0000000..4c1a3ac --- /dev/null +++ b/content/Units/unit.shieldbearer.hjson @@ -0,0 +1,17 @@ +{ + name: "Shieldbearer" + desc: "a kobold with a shield" + icon: + { + texture: "Shieldbearer" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["shield"] + equipment: [] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Units/unit.shieldbearer_armored.hjson b/content/Units/unit.shieldbearer_armored.hjson new file mode 100644 index 0000000..dccaa5c --- /dev/null +++ b/content/Units/unit.shieldbearer_armored.hjson @@ -0,0 +1,17 @@ +{ + name: "Armored Shieldbearer" + desc: "a kobold with a shield and armor" + icon: + { + texture: "Shieldbearer_Armored" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["shield"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.shotgunner.hjson b/content/Units/unit.shotgunner.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.shotgunner.hjson rename to content/Units/unit.shotgunner.hjson diff --git a/content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson b/content/Units/unit.shotgunner_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.shotgunner_armored.hjson rename to content/Units/unit.shotgunner_armored.hjson diff --git a/content/Units/unit.submachinegunner.hjson b/content/Units/unit.submachinegunner.hjson new file mode 100644 index 0000000..e9e8b95 --- /dev/null +++ b/content/Units/unit.submachinegunner.hjson @@ -0,0 +1,28 @@ +{ + name: "Submachinegunner" + desc: "a kobold with an smg" + icon: + { + texture: "Submachinegunner" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["smg"] + equipment: [] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Units/unit.submachinegunner_armored.hjson b/content/Units/unit.submachinegunner_armored.hjson new file mode 100644 index 0000000..6a85f13 --- /dev/null +++ b/content/Units/unit.submachinegunner_armored.hjson @@ -0,0 +1,28 @@ +{ + name: "Armored submachinegunner" + desc: "a kobold with an smg and armor" + icon: + { + texture: "Submachinegunner_Armored" + } + price: 30 + reward: 30 + creature: kobold.male + items: ["smg"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + { + material: "ammo_lc" + quantity: 50 + } + ] +} \ No newline at end of file diff --git a/content/Gamemode/Controller/Units/unit.tank.hjson b/content/Units/unit.tank.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.tank.hjson rename to content/Units/unit.tank.hjson diff --git a/content/Gamemode/Controller/Units/unit.tank_armored.hjson b/content/Units/unit.tank_armored.hjson similarity index 100% rename from content/Gamemode/Controller/Units/unit.tank_armored.hjson rename to content/Units/unit.tank_armored.hjson diff --git a/content/Units/unit.wrecker.hjson b/content/Units/unit.wrecker.hjson new file mode 100644 index 0000000..d465544 --- /dev/null +++ b/content/Units/unit.wrecker.hjson @@ -0,0 +1,17 @@ +{ + name: "Wrecker" + desc: "a kobold with a sledgehammer" + icon: + { + texture: "Wrecker" + } + price: 20 + reward: 20 + creature: kobold.male + items: ["Sledgehammer"] + equipment: [] + resource: + [ + + ] +} \ No newline at end of file diff --git a/content/Units/unit.wrecker_armored.hjson b/content/Units/unit.wrecker_armored.hjson new file mode 100644 index 0000000..116bdfe --- /dev/null +++ b/content/Units/unit.wrecker_armored.hjson @@ -0,0 +1,17 @@ +{ + name: "Armored wrecker" + desc: "a kobold with a sledgehammer and armor" + icon: + { + texture: "Wrecker_Armored" + } + price: 25 + reward: 25 + creature: kobold.male + items: ["Sledgehammer"] + equipment: ["helmet.00", "armor.00"] + resource: + [ + + ] +} \ No newline at end of file From 110a55bea699baa06e2006a3f727644c1ef8fbf6 Mon Sep 17 00:00:00 2001 From: nuclearmayhem1 <53118215+nuclearmayhem1@users.noreply.github.com> Date: Fri, 18 Nov 2022 06:51:44 +0100 Subject: [PATCH 6/6] readded missing sethoobloadout after conflict resolution --- content/Gamemode/Siege.Planner.cs | 123 ++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/content/Gamemode/Siege.Planner.cs b/content/Gamemode/Siege.Planner.cs index b2632d2..86c5abc 100644 --- a/content/Gamemode/Siege.Planner.cs +++ b/content/Gamemode/Siege.Planner.cs @@ -374,6 +374,129 @@ public static void SetKoboldLoadout(Entity ent_kobold, float weapon_mult = 1.00f } } + public static void SetHoobLoadout(Entity ent_hoob, float weapon_mult = 1.00f, float armor_mult = 1.00f) + { + var random = XorRandom.New(); + var loadout = new Loadout.Data(); + var bounty = new Siege.Bounty.Data(); + + ref var shipment = ref loadout.shipments[0]; + shipment.flags.SetFlag(Shipment.Flags.Unpack, true); + + var items_span = shipment.items.AsSpan(); + var rewards_span = bounty.rewards.AsSpan(); + + // TODO: add proper .hjson loot tables + + var num = random.NextIntRange(0, 3); + //num = 10; + + switch (num) + { + // Heavy + case 0: + case 1: + case 2: + { + if (random.NextBool(0.40f)) + { + items_span.Add(Shipment.Item.Prefab("machine_gun", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_mg", 100)); + rewards_span.Add(Crafting.Product.Money(1000)); + } + else if (random.NextBool(0.40f)) + { + items_span.Add(Shipment.Item.Prefab("crankgun", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_hc.hv", 100)); + rewards_span.Add(Crafting.Product.Money(600)); + } + else if (random.NextBool(0.30f)) + { + items_span.Add(Shipment.Item.Prefab("bp.hyperbobus", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_ac", 40)); + rewards_span.Add(Crafting.Product.Money(1500)); + } + else if (random.NextBool(0.40f)) + { + items_span.Add(Shipment.Item.Prefab("cannon.short", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_shell.shrapnel", 10)); + rewards_span.Add(Crafting.Product.Money(1500)); + } + else if (random.NextBool(0.30f)) + { + items_span.Add(Shipment.Item.Prefab("autocannon", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_ac", 40)); + rewards_span.Add(Crafting.Product.Money(800)); + } + else + { + items_span.Add(Shipment.Item.Prefab("slugthrower", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_musket", 100)); + rewards_span.Add(Crafting.Product.Money(400)); + } + + rewards_span.Add(Crafting.Product.Money(2500)); + } + break; + + // Artillery + default: + { + if (random.NextBool(0.50f)) + { + items_span.Add(Shipment.Item.Prefab("cannon.short", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_shell", 10)); + rewards_span.Add(Crafting.Product.Money(1500)); + } + else + { + items_span.Add(Shipment.Item.Prefab("bp.smrtec.a24", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + items_span.Add(Shipment.Item.Resource("ammo_sg.grenade", 40)); + rewards_span.Add(Crafting.Product.Money(1000)); + } + //else + //{ + // items_span.Add(Shipment.Item.Prefab("autocannon", flags: Shipment.Item.Flags.Pickup | Shipment.Item.Flags.Despawn)); + // items_span.Add(Shipment.Item.Resource("ammo_ac.he", 40)); + // rewards_span.Add(Crafting.Product.Money(1000)); + //} + + rewards_span.Add(Crafting.Product.Money(1500)); + } + break; + } + + ref var loadout_new = ref ent_hoob.GetOrAddComponent(sync: false, ignore_mask: true); + if (!loadout_new.IsNull()) + { + loadout_new = loadout; + } + + ref var bounty_new = ref ent_hoob.GetOrAddComponent(sync: false, ignore_mask: true); + if (!bounty_new.IsNull()) + { + bounty_new = bounty; + //App.WriteLine($"add bounty {bounty_new.rewards[0].type} {bounty_new.rewards[0].amount}"); + } + + ref var ai = ref ent_hoob.GetComponent(); + if (!ai.IsNull()) + { + ai.stance = AI.Stance.Aggressive; + } + + foreach (var h_inventory in ent_hoob.GetInventories()) + { + h_inventory.Flags |= Inventory.Flags.Unlimited | Inventory.Flags.No_Drop; + } + + ref var marker = ref ent_hoob.GetOrAddComponent(sync: true); + if (!marker.IsNull()) + { + marker.sprite = new Sprite("ui_icons_minimap", 16, 16, 0, 0); + } + } + public static void SetKoboldLoadoutManual(Entity ent_kobold, ref IUnit.Handle unit) { var random = XorRandom.New();