diff --git a/addons/sourcemod/scripting/rpg_fortress/actor.sp b/addons/sourcemod/scripting/rpg_fortress/actor.sp index 70e8001c6..11589bbb8 100644 --- a/addons/sourcemod/scripting/rpg_fortress/actor.sp +++ b/addons/sourcemod/scripting/rpg_fortress/actor.sp @@ -1474,18 +1474,27 @@ void Actor_EditorMenu(int client) FormatEx(buffer2, sizeof(buffer2), "Cosmetic 1: \"%s\"%s", buffer1, (!buffer1[0] || FileExists(buffer1, true)) ? "" : " {WARNING: Model does not exist}"); menu.AddItem("_wear1", buffer2); + FormatEx(buffer2, sizeof(buffer2), "Cosmetic 1 Scale: %f", ActorKv.GetFloat("wear1_size", 1.0)); + menu.AddItem("_wear1_size", buffer2); + ActorKv.GetString("wear2", buffer1, sizeof(buffer1)); - FormatEx(buffer2, sizeof(buffer2), "Cosmetic 2: \"\"%s\"%s", buffer1, (!buffer1[0] || FileExists(buffer1, true)) ? "" : " {WARNING: Model does not exist}"); + FormatEx(buffer2, sizeof(buffer2), "Cosmetic 2: \"%s\"%s", buffer1, (!buffer1[0] || FileExists(buffer1, true)) ? "" : " {WARNING: Model does not exist}"); menu.AddItem("_wear2", buffer2); + FormatEx(buffer2, sizeof(buffer2), "Cosmetic 2 Scale: %f", ActorKv.GetFloat("wear2_size", 1.0)); + menu.AddItem("_wear2_size", buffer2); + ActorKv.GetString("wear3", buffer1, sizeof(buffer1)); FormatEx(buffer2, sizeof(buffer2), "Cosmetic 3: \"%s\"%s", buffer1, (!buffer1[0] || FileExists(buffer1, true)) ? "" : " {WARNING: Model does not exist}"); menu.AddItem("_wear3", buffer2); - FormatEx(buffer2, sizeof(buffer2), "Bodygroup: %i", ActorKv.GetNum("bodygroup")); + FormatEx(buffer2, sizeof(buffer2), "Cosmetic 3 Scale: %f", ActorKv.GetFloat("wear3_size", 1.0)); + menu.AddItem("_wear3_size", buffer2); + + FormatEx(buffer2, sizeof(buffer2), "Bodygroup: %d", ActorKv.GetNum("bodygroup")); menu.AddItem("_bodygroup", buffer2); - FormatEx(buffer2, sizeof(buffer2), "Skin: %i", ActorKv.GetNum("skin")); + FormatEx(buffer2, sizeof(buffer2), "Skin: %d", ActorKv.GetNum("skin")); menu.AddItem("_skin", buffer2); } @@ -1999,7 +2008,7 @@ static void AdjustOptionsSection(int client, const char[] key) if(StrEqual(key, "delete")) { ActorKv.DeleteThis(); - CurrentSectionEditing[client][0] = 0; + CurrentSubSectionEditing[client][0] = 0; } else { diff --git a/addons/sourcemod/scripting/rpg_fortress/npc/npc_actor.sp b/addons/sourcemod/scripting/rpg_fortress/npc/npc_actor.sp index e066947f6..85a22eb16 100644 --- a/addons/sourcemod/scripting/rpg_fortress/npc/npc_actor.sp +++ b/addons/sourcemod/scripting/rpg_fortress/npc/npc_actor.sp @@ -102,7 +102,7 @@ methodmap NPCActor < CClotBody if(buffer1[0]) { npc.m_iWearable1 = npc.EquipItem("head", buffer1); - SetVariantString("1.0"); + SetVariantFloat(kv.GetFloat("wear1_size", 1.0)); AcceptEntityInput(npc.m_iWearable1, "SetModelScale"); SetEntProp(npc.m_iWearable1, Prop_Send, "m_nSkin", skin); } @@ -111,7 +111,7 @@ methodmap NPCActor < CClotBody if(buffer1[0]) { npc.m_iWearable2 = npc.EquipItem("head", buffer1); - SetVariantString("1.0"); + SetVariantFloat(kv.GetFloat("wear2_size", 1.0)); AcceptEntityInput(npc.m_iWearable2, "SetModelScale"); SetEntProp(npc.m_iWearable2, Prop_Send, "m_nSkin", skin); } @@ -120,7 +120,7 @@ methodmap NPCActor < CClotBody if(buffer1[0]) { npc.m_iWearable3 = npc.EquipItem("head", buffer1); - SetVariantString("1.0"); + SetVariantFloat(kv.GetFloat("wear3_size", 1.0)); AcceptEntityInput(npc.m_iWearable3, "SetModelScale"); SetEntProp(npc.m_iWearable3, Prop_Send, "m_nSkin", skin); } @@ -140,12 +140,18 @@ void NPCActor_TalkStart(int iNPC, int client, float time = 60.0) NPCActor npc = view_as(iNPC); npc.m_iTargetAlly = client; npc.m_flGetClosestTargetTime = GetGameTime(npc.index) + time; + + if(TalkAnim[npc.index][0]) + npc.SetActivity(TalkAnim[npc.index]); } void NPCActor_TalkEnd(int iNPC) { NPCActor npc = view_as(iNPC); npc.m_iTargetAlly = -1; + + if(LeaveAnim[npc.index][0]) + npc.SetActivity(LeaveAnim[npc.index]); float gameTime = GetGameTime(npc.index); if(npc.m_flNextMeleeAttack < gameTime) diff --git a/addons/sourcemod/scripting/rpg_fortress/quests.sp b/addons/sourcemod/scripting/rpg_fortress/quests.sp index 7749fe5b5..0c5dba2e5 100644 --- a/addons/sourcemod/scripting/rpg_fortress/quests.sp +++ b/addons/sourcemod/scripting/rpg_fortress/quests.sp @@ -744,10 +744,19 @@ void Quests_EditorMenu(int client) QuestKv.Rewind(); if(QuestKv.GotoFirstSubKey()) { + bool first = true; + do { QuestKv.GetSectionName(buffer1, sizeof(buffer1)); - menu.AddItem(buffer1, buffer1); + if(first) + { + menu.InsertItem(1, buffer1, buffer1); + } + else + { + menu.AddItem(buffer1, buffer1); + } } while(QuestKv.GotoNextKey()); } diff --git a/addons/sourcemod/scripting/rpg_fortress/spawns.sp b/addons/sourcemod/scripting/rpg_fortress/spawns.sp index da04a7423..f077b1a93 100644 --- a/addons/sourcemod/scripting/rpg_fortress/spawns.sp +++ b/addons/sourcemod/scripting/rpg_fortress/spawns.sp @@ -16,6 +16,7 @@ enum struct SpawnEnum int LowLevelClientAreaCount; + char CustomName[64]; bool Boss; int Level[2]; int Health[2]; @@ -54,6 +55,8 @@ enum struct SpawnEnum this.LowLevelClientAreaCount = 0; this.Index = NPC_GetByPlugin(this.Item1); + + kv.GetString("custom_name", this.CustomName, 64); this.Angle = kv.GetFloat("angle", -1.0); this.Count = kv.GetNum("count", 1); @@ -473,6 +476,9 @@ static void UpdateSpawn(int pos, SpawnEnum spawn, bool start) fl_Extra_Speed[entity] = spawn.ExtraSpeed; fl_Extra_Damage[entity] = spawn.ExtraDamage; + if(spawn.CustomName[0]) + strcopy(c_NpcName[entity], sizeof(c_NpcName[]), spawn.CustomName); + if(spawn.ExtraSize != 1.0) { float scale = GetEntPropFloat(entity, Prop_Send, "m_flModelScale"); @@ -938,6 +944,10 @@ void Spawns_EditorMenu(int client) FormatEx(buffer2, sizeof(buffer2), "Size Multi: %f", kv.GetFloat("extra_size", 1.0)); menu.AddItem("extra_size", buffer2); + kv.GetString("custom_name", buffer1, sizeof(buffer1)); + FormatEx(buffer2, sizeof(buffer2), "Custom Name: \"%s\"", buffer1); + menu.AddItem("custom_name", buffer2); + kv.GetString("drop_name_1", buffer1, sizeof(buffer1)); valid = (!buffer1[0] || TextStore_IsValidName(buffer1)); FormatEx(buffer2, sizeof(buffer2), "Drop 1: \"%s\"%s", buffer1, valid ? "" : " {WARNING: Item does not exist}");