diff --git a/CoreScripts/Character/InteractableCharacter.as b/CoreScripts/Character/InteractableCharacter.as index 0b347d1..b1806b8 100644 --- a/CoreScripts/Character/InteractableCharacter.as +++ b/CoreScripts/Character/InteractableCharacter.as @@ -12,8 +12,6 @@ void onInit(CBlob@ this) this.RemoveScript("InteractableCharacter"); return; } - - this.addCommandID("TalkingTo"); } void GetButtonsFor(CBlob@ this, CBlob@ caller) @@ -22,22 +20,17 @@ void GetButtonsFor(CBlob@ this, CBlob@ caller) if (caller is null || this.hasTag("dead")) return; - CButton@ button = caller.CreateGenericButton("$trade$", Vec2f_zero, this, this.getCommandID("TalkingTo"), "Test"); + CButton@ button = caller.CreateGenericButton("$trade$", Vec2f_zero, this, TryingToTalk, "Test"); } -// Todo -> Clean up talking to and the button -void onCommand(CBlob@ this, u8 cmd, CBitStream@ params) +void TryingToTalk(CBlob@ this, CBlob@ caller) { - if (cmd == this.getCommandID("TalkingTo")) - { - BlobCharacter@ char = getCharacter(this); - char.ButtonPress(); + BlobCharacter@ char = getCharacter(this); + char.ButtonPress(); - // Now force our current target to be talked to - CBitStream cbs = CBitStream(); - cbs.write_u16(this.getNetworkID()); - getRules().SendCommand(getRules().getCommandID("character_force_talk"), cbs); - } + CBitStream cbs = CBitStream(); + cbs.write_u16(this.getNetworkID()); + getRules().SendCommand(getRules().getCommandID("character_force_talk"), cbs); } diff --git a/TutorialMain.as b/TutorialMain.as index 335e420..f7ad091 100644 --- a/TutorialMain.as +++ b/TutorialMain.as @@ -16,6 +16,8 @@ void onInit(CRules@ this) // TEMP, PUT IN DIFFERENT FILE AddColorToken("$T_D$", color_white); AddColorToken("$T_0$", SColor(255, 25, 140, 255)); + + GUI::LoadFont("test123", CFileMatcher("uni0553.ttf").getFirst(), 26, true); } void onRestart(CRules@ this) @@ -108,7 +110,6 @@ bool mousePressed = false; void onTick(CRules@ this) { - GUI::LoadFont("test123", CFileMatcher("uni0553.ttf").getFirst(), 16, true); // TODO: DISABLE BOXES AND OTHER JUNK THAT WE DONT NEED FOR NOW if (g_debug != 0) {