diff --git a/CoreScripts/Character/CharacterCore.as b/CoreScripts/Character/CharacterCore.as index 5a4c86c..ee00d99 100644 --- a/CoreScripts/Character/CharacterCore.as +++ b/CoreScripts/Character/CharacterCore.as @@ -9,58 +9,9 @@ //// /////////////////////////////////////////////////////////// -Character@ char; - -void onInit(CRules@ this) -{ - //AddColorToken("$RED$", SColor(255, 105, 25, 5)); - //AddColorToken("$GREEN$", SColor(255, 5, 105, 25)); - //AddColorToken("$GREY$", SColor(255, 195, 195, 195)); // MOVE TO CORRECT PLACE - AddColorToken("$WHITE$", SColor(255, 255, 255, 255)); - AddColorToken("$RED2$", SColor(255, 255, 0, 0)); - AddIconToken("$KAG_ANGRY$", "kag_angry.png", Vec2f(16, 16), 0); - onRestart(this); -} - -void onRestart(CRules@ this) -{ - onReload(this); -} - -void onTick(CRules@ this) -{ - if (char is null || char.currentText == "" ) - return; - - char.UpdateText(); -} - -void onRender(CRules@ this) -{ - if (char is null || char.currentText == "") - return; - - char.RenderBox(); - char.TempCharacterBind(); -} - -void onReload(CRules@ this) -{ - Setup(); - getMap().RemoveAllSectors(); - @char = Character(); - shitflute(null); -} - -void shitflute(CBlob@ caller) +mixin class Character { - char.AddResponse("ok", "Say what you will about the $RED2$Archer$WHITE$ class, but I for one am glad they exist. I was born with a disability that means I only have 1 finger on each hand. THD was extremely considerate to provide a class I can win with even with this disability, very inclusive. \n\nOh also my disability left me blind and with only 3 brain cells but Archer allows me to get a high kdr rank. Thank you THD for caring for the disabled like me"); - char.SetCurrentResponse("ok", 2); -} - -class Character -{ - dictionary responseMap; + dictionary responseMap = dictionary(); string preferedFont = "Menu"; string characterName = ""; @@ -72,11 +23,9 @@ class Character Vertex[] char_box; - Character(string name) + void SetName(string name) { characterName = name; - responseMap = dictionary(); - currentRenderText = ""; } void AddResponse(string eventName, string text) @@ -129,7 +78,7 @@ class Character } } } - else if (char != ' ') + else if (char != ' ') // TODO -> Set custom audio and sort out what we are doing with audio { Sound::Play("Archer_blip" + (XORRandom(1) == 0 ? "_2" : "")); } @@ -138,8 +87,7 @@ class Character } } - //void Character() {} - + // TODO -> Sort this junk out, clear our sHeight and sWidth n stuff void RenderBox() { GUI::SetFont(preferedFont); @@ -155,6 +103,17 @@ class Character GUI::DrawRectangle(Vec2f(leftX, topY), Vec2f(leftX + hardValue + 500, topY + hardValue), SColor(150,0,0,0)); GUI::DrawText(currentRenderText, Vec2f(leftX + 25, topY + 10), Vec2f(leftX + hardValue + 475, topY + hardValue), SColor(255, 255, 255, 255), false, false, false); } +} + + +class BlobCharacter : Character +{ + CBlob@ ourBlob; + BlobCharacter(CBlob@ owner, string name) + { + @ourBlob = owner; + SetName(name); + } void TempCharacterBind() { @@ -164,7 +123,14 @@ class Character int leftX = sWidth / 6; int topY = sHeight - (sHeight / 2.5); int hardValue = 100; - //GUI::DrawIcon(test_name, 0, Vec2f(12,12), Vec2f(leftX + 5,topY + 5), 3.8f, SColor(150, 255, 255, 255)); - + GUI::DrawIcon("GetiTest.png", 0, Vec2f(12,12), Vec2f(leftX + 5,topY + 5), 3.8f, SColor(150, 255, 255, 255)); } +} + + +// Chat box used for global chat +// Not in use yet, will finish later on +class GlobalCharacter : Character +{ + } \ No newline at end of file diff --git a/gamemode.cfg b/gamemode.cfg index c2c8cdd..35d3b48 100644 --- a/gamemode.cfg +++ b/gamemode.cfg @@ -4,7 +4,6 @@ gamemode_info = Two teams spawn and fight each other to the death scripts = KAG.as; - CharacterCore.as; TutorialMain.as; RequestSpawnOnDeath.as; ChatCommands.as;