diff --git a/CoreScripts/Character/BlobCharacter.as b/CoreScripts/Character/BlobCharacter.as index 21fdc97..a915b9a 100644 --- a/CoreScripts/Character/BlobCharacter.as +++ b/CoreScripts/Character/BlobCharacter.as @@ -1,8 +1,14 @@ #include "CharacterCore" -/// Characters but for blobs -/// Add's stuff like names -/// Character portrait/border +////////////////////// +/// +/// BlobCharacter +/// +/// This class is attached to a blob that wants the Character class +/// This lets us do special stuff with the blob class +/// - Adding a potrait based on the head currently equiped +/// - Emoting +/// And some other stuff that i forgot about class BlobCharacter : Character { diff --git a/CoreScripts/Character/CharacterCore.as b/CoreScripts/Character/CharacterCore.as index ad60544..0f44009 100644 --- a/CoreScripts/Character/CharacterCore.as +++ b/CoreScripts/Character/CharacterCore.as @@ -1,3 +1,13 @@ +////////////////////// +/// +/// CharacterCore +/// +/// This holds the core class to character talking. +/// Currently not stable, everything is subject to change. +/// +/// The class is a mixin, which means another class can inherit everything from it +/// This is useful in this case so we can write less code + #include "EmotesCommon" @@ -204,7 +214,7 @@ mixin class Character } } - // TODO: Clean, fix some 'hacky/temp' stuff + // TODO: Clean up, its pretty ugly and prone to breaking (sorry) void UpdateText(bool skip = false) { string chars = CurrentText.substr(TextRenderLength, 1); @@ -228,7 +238,6 @@ mixin class Character } else if (chars == '{') // Emote/Custom text logic { - // TODO -> Make more pretty? string insides = ""; for (int a = TextRenderLength + 1; a < CurrentText.length; a++) @@ -253,6 +262,7 @@ mixin class Character string action = insides.substr(0, 2); string content = insides.substr(2, insides.length); + // Emote (TODO: Move to BlobHandler) if (action == "E_") { if (OwnerBlob is null) @@ -260,16 +270,16 @@ mixin class Character else set_emote(OwnerBlob, Emotes::names.find(content)); } - else if (action == "S_") + else if (action == "S_") // Write speed { WriteSpeed = parseInt(content); chars = ""; } - else if (action == "R_") + else if (action == "R_") // Add a new response to the queue { AddToResponseQueue(content); } - else if (action == "F_") + else if (action == "F_") // Execute a function (TODO: change funcdef for non blobs) { CallbackButtonFunc@ func = getFunction(content); if (func is null) @@ -288,18 +298,16 @@ mixin class Character CurrentRenderOutput += chars; TextRenderLength += chars.length; - // Need to fix (tokens excluding colours will make this invalid) if (TextRenderLength == CurrentText.length) FinishedWriting = true; } - // TEMP + // TEMP, this was a gay temp work around bool isSpecialChar(string input) { return (input == "{" || input == "}" || input == "$"); } - // Maybe set velocity to 0? void LockMovement(CBlob@ blob) { blob.DisableKeys(KEYS_TO_TAKE); diff --git a/CoreScripts/Character/InteractableCharacter.as b/CoreScripts/Character/InteractableCharacter.as index f4b9bd5..2412be2 100644 --- a/CoreScripts/Character/InteractableCharacter.as +++ b/CoreScripts/Character/InteractableCharacter.as @@ -1,4 +1,9 @@ -/// This script handles how we can interact with a class (by using buttons currently) +////////////////////// +/// +/// InteractableCharacter +/// +/// This is added to any new blob when used with MapsCore addCharacterToBlob +/// Code in this is subject to change, buttons were used just as a quick and simple way to test the code // TODO -> Create Token diff --git a/CoreScripts/Events/EventSector.as b/CoreScripts/Events/EventSector.as index 3acaf73..9bd597b 100644 --- a/CoreScripts/Events/EventSector.as +++ b/CoreScripts/Events/EventSector.as @@ -1,4 +1,10 @@ +////////////////////// +/// +/// EventSectors +/// +/// This script will allow you to set up sectors and do events +/// Check Test.as for use examples #include "EventCore" diff --git a/CoreScripts/Rules/CharacterHandler.as b/CoreScripts/Rules/CharacterHandler.as index e3758a0..a93c892 100644 --- a/CoreScripts/Rules/CharacterHandler.as +++ b/CoreScripts/Rules/CharacterHandler.as @@ -1,14 +1,16 @@ +////////////////////// +/// +/// CharacterHandler +/// +/// This script is added into gamemode.cfg +/// It handles rendering, ticking and clearing BlobCharacterHandler +/// This may change later on, as I'd like this to render all other 'Character' type classes (if we ever do that) + #include "BlobCharacter" #include "RunnerTextures" BlobCharacterHandler@ Handler; -Vertex[] PortraitVertex; -int id = 0; - -const string temp_texture_name = "ok_cool"; -const string texture_head = "ok_not_cool"; - // In localhost, this executes before CMap onInit does void onInit(CRules@ this) { diff --git a/Maps/CommonScripts/MapsCore.as b/Maps/CommonScripts/MapsCore.as index 0e1f0da..17d5f7e 100644 --- a/Maps/CommonScripts/MapsCore.as +++ b/Maps/CommonScripts/MapsCore.as @@ -1,3 +1,7 @@ +////////////////////// +/// +/// MapsCore +/// /// Used so there's less duplicate code with adding a map level #include "BlobCharacter" @@ -106,6 +110,10 @@ BlobCharacter@ addCharacterToBlob(CBlob@ blob, string &in characterName, string } + +/// TODO: MOVE TO A NEW FILE + + // Basic 0 to 255 (70 heads) // Flags 256 to 511 (78 heads) // Fantasy 512 to 767 (18 heads) @@ -136,24 +144,4 @@ void SetRandomKnightHelm(CBlob@ blob) { blob.setHeadNum(Heads::KNIGHT_WITH_HELMS[XORRandom(Heads::KNIGHT_WITH_HELMS.length)]); LoadHead(blob.getSprite(), blob.getHeadNum()); - /*switch(XORRandom(10)) - { - // DLC 1 - case 0: - - break; - - // DLC 2 - case 1: - break; - - // DLC 3 - case 2: - - break; - - default: - //blob.setHeadNum(1); - break; - }*/ } diff --git a/Maps/KnightShowcase/KnightShowcase.as b/Maps/KnightShowcase/KnightShowcase.as index 9e5beb3..d8f36d8 100644 --- a/Maps/KnightShowcase/KnightShowcase.as +++ b/Maps/KnightShowcase/KnightShowcase.as @@ -1,3 +1,10 @@ +////////////////////// +/// +/// KnightShowcase map +/// +/// This is a test level with blobs talking +/// Will clean when everything becomes more stable + #include "MapsCore" #include "FireCommon" diff --git a/Maps/Test/Test.as b/Maps/Test/Test.as index 56fb1b1..9bf14e8 100644 --- a/Maps/Test/Test.as +++ b/Maps/Test/Test.as @@ -1,6 +1,9 @@ ////////////////////// +/// /// TEST MAP -/// THIS CODE MAY OR MAY NOT WORK +/// +/// This is a test with sector events. +/// This may break in the future #include "EventSector" diff --git a/Sprites/Framed_TransStone.png b/Sprites/Framed_TransStone.png new file mode 100644 index 0000000000000000000000000000000000000000..bc87dbf2d044862bde82c247c0f2f9bfb9188468 GIT binary patch literal 755 zcme7R@N?(olHy`uVBq!ia0y~yU~m9o4mJh`hE5-S6Uh@rXzl%SMldNrH|dM}m}Qs6`#&*f;C!to8}9)9>;M<*-V3H?(FvUj0En zL;HpnN0U-V#1HNoQ=x0tZXF(TQoq&BnOQv3lKG#Dqxqa;iUvN{{f;G1-1)QBadY zIdfBTyla0}Pr7_#_lu{q zuI=Vu$ZN58MdnLci`y+9_Ab47Yx@<2%k$43I?c)QeBooMDDl;if7cY(u&*qwT%>*D zZgbsD`KVt^cSX~Gtqpvn#=yY9S>O>_%)r3)0fZTy)|kv-U|`hpba4!+V0=4!Bkv&t z5f@n($L1Cn_9Rw~7YV&OO-CdqMzokNSll4HVA&GplM{m@+Jmg$U%Ihx$%ngu?VYlJ zmVfwthB~)|_ZNRzuwJ+_d5i0sqt1K%*JZ5n!Y+bu&7Q<97Ph-X<+opyKF9=f1 zRBO1h?Nb(0h?dG(mI=4Q;(QytT9?dZ2)cc0HD|!e2`0i0S<#iIj9Q|T(wIDQwb!dT zEOjEm(6zIr&-nhIz47FJ?Y}+$S*@6+bw}!KUg`aQ%lm(sdY2|IHe7k?^5fbgJb(W3 ZbKDSVxwK8_9|HpegQu&X%Q~loCICjOS