« first day (7 days earlier)      last day (206 days later) » 

22:00
No, I'm asking how to update my local copy.
With changes others have made.
Errr
It's a complicated process
I think you manually have to merge
Locally if it screws something up
How would I do that?
You see why I don't want collisions? ^^^^ :D
@EthanBierlein errrrmmm.... it takes like ten minutes to explain
And an hour to master
Just give me a command, and I'll figure it out.
Basically, Git spits out a long file with lots of >>>>>> and <<<<s that you have to manually edit out
@EthanBierlein not sure
I think if you just git pull that it will automatically give you the "combined file"
22:02
With other user's commits in it?
Yes. Just google it
@Ethan I thought you were talking about something else
It's just git pull
Well, goody then. Nice and simple.
And git push to upload
Pull only gives you stuff that you don't have, push gives your new commits to the server.
Commit with git commit -m "My message here!"
Yup, ik.
Damn, Python3 is taking forever to install.
Holy shit. We've had over 400 visits to the project alone today!
And six unique visitors!
@EthanBierlein most of those are probably us :P
If not all
22:11
6 unique visitors? I think not. All of us have probalby visited the repo, which means we're not unique. That means that we are getting slightly more attention though...
def find_by_name(self, name: str):
    for index, map_position in enumerate(self.data):
        if self.game._conditional_lower(name.lower()) == name:
            return index
    return -1  # Element not found
That code always returns 0. Any ideas? (@Ethan)
@EthanBierlein is it new, unique visitors?
Oh nevermind
Well, first off, add a docstring to that. Second off, I have no idea why it returns 0.
Ah, fixed it
YEAH
It works!
Ack, let me clean a few things up and we'll have a commit
22:19
W00T! L33T C0D3!
R3ADY T0 C0MM1T?
D:
Scared penguin
Is the L33TSP3AK too much for you?
@EthanBierlein yes
22:23
@Ethan github.com/ShearOfDoom/Cactus/pull/28 can you review the changes?
Yup.
Any pull request that you create can be merged as long as they work, are cleanly written, and have docstrings and such.
That's the new "policy" with pull requests. ^^
I know, I just want a review since it is so big
@AnnonomusPenguin Oof. Can you explain the event handling to me?
@EthanBierlein question closed as too broad by Annonomus Penguin ♦ 5 seconds ago
22:30
Ahm, okay...
:D
That's a really broad question
Like the naming?
The functions involved?
Tortilla chips and queso?
No, I'm talking about stuff like self._handle_event("intro_msg.b"). What do the things that look like "something.something" do?
@EthanBierlein Ooh.
That's the event that the user "binds" a function to
22:34
Hmm, okay. Can I have a simple example?
So, in the context of MainGame
It calls the function game.intro_mesage.b that's defined by the user
The b/a stand for before/after
For example:
Say I want to run a function when the command left is called in start.
Hmm, okay. Maybe you should change b and a to before and after. After all, we do want clarity here.
True. I'll do that in a second. Let me finish here
I would, in the main game file, add to the dictionary passed the entry "map_position.command.left.a": myFunction
And then that function will run after the other processing is done when that command is called
Make sense?
Oooh, so, essentially running functions when the user types a command, right?
In this case, yes
There's a ton of other ones that we can add
It's more of a framework now so we can just add a "tag" when we would want that function to run (if the user wants) and the user can "bind" to that "tag"
Does that make sense?
22:38
Okay. I think I sort of get this now, but for just a little more clarity, explain what "map_position.right.enter.a" does in "pseudo-code".
@EthanBierlein that's a string literal, not a function call
I assume you mean:
I know it's a string literal, I just want an explanation of what the string represents.
self._handle_event("map_position.right.enter.a")
@EthanBierlein oh
That's when, in the context of the map position with the name right, the user enters that room
After the native processing is handled
Wow. You really did a ton. I get it now. Thanks!
@EthanBierlein are you sure you get it?
It's cool when you understand
@EthanBierlein let me push when I finish the requested modifications
22:41
> Change event_handlers to event_handlers: dict.
And then we can merge the PR
Yup. Gonna make a few more comments on the PR.
Hmm... I also have another mod I want to make to this
> Change event_handlers to event_handlers: dict.
@AnnonomusPenguin I've added some comments to the PR.
Mostly just nit-picky things, but, still somewhat important.
22:44
@EthanBierlein why I wanted a review
:P
@Ethan I was thinking about just moving all of the event_handlers to the MainGame() instance. Yea or nay?
@AnnonomusPenguin Yea
You can do that
It'll make it clearer too
Also: should we rename use_lowercase_sensitive? Also: does that apply to the "location links" or the commands or both?
If yes, please make an issue while I fix the other stuff
@EthanBierlein let me work on that
@AnnonomusPenguin One last question, I'm going to merge the current PR, and you can make changes in another, is that okay?
@EthanBierlein wait
22:49
It's going to be cleaner if I commit now
almost finished
Okay.
@QPaysTaxes I can take over issue #6 for you if it makes life easier.
Test and then push
Figures. The change broke it :P
22:57
Yeah. I just did git pull and tried to play the test. Kept giving me input when the function was exit though
Should I sync it now?
Yeah
Merge first
[ShearOfDoom/Cactus] Annonomus-Penguin pushed commit 3de1173a to master: Adds flexible event handler
[ShearOfDoom/Cactus] Annonomus-Penguin pushed commit dfda3ce6 to master: Fixes requested things
23:01
Now git pull
Merge pull request #28 from Annonomus-Penguin/6-7-15-event-handler

Adds flexible event handler
14 mins ago, by Annonomus Penguin
Also: should we rename use_lowercase_sensitive? Also: does that apply to the "location links" or the commands or both?
Yes, and it applies to location links, and commands.
23:02
OK
Thanks!
Does the event handler make sense now?
Traceback (most recent call last):
  File "C:\Users\Ethan Micah Sophie\Desktop\Cactus\test.py", line 16, in <module>
    {}
TypeError: __init__() takes 5 positional arguments but 6 were given
@AnnonomusPenguin ^^
And yes, the event hanlder makes sense.
For some reason the test didn't get committed
One second will be right back
For now:
from sys import exit
from CactusSource.map_position import MapPosition
from CactusSource.game_map import GameMap
from CactusSource.main_game import MainGame


GAME_MAP = GameMap([
MapPosition(
"Start",
"Welcome to the start!",
"Now leaving the start.",
{
"left": 1,
"right": 2,
}
),
MapPosition(
"Left",
"You took the left path and died.",
"",
{}
),
MapPosition(
"Right",
"You took the right path and lived!",
"",
{}
),
])


MAIN_GAME = MainGame(
"Test Game",
"Welcome to the simple test game.",
"> ",
Mkay. I fixed test.py. Going to commit now.
23:08
@EthanBierlein okay, thanks
@EthanBierlein I have the formatting if you want me to do it
Chat stripped leading whitespace
Okay. It should have commited now.
I gotta go too. Time for dinner.
[ShearOfDoom/Cactus] ShearOfDoom pushed commit e50c997f to master: Fixed issues with test.py
23:10
brb
[ShearOfDoom/Cactus] Annonomus-Penguin removed label feedback/ideas wanted from issue [#18: [Brainstorming] How can we make the syntax easier externally](github.com/ShearOfDoom/Cactus/issues/18)
> - Liberally apply `_conditional_lower()` to functions
- Rename `should_lower_text` to `case_sensitive`
> If on pages, we should disable the wiki here (to avoid confusion)
[ShearOfDoom/Cactus] Annonomus-Penguin pushed commit a5d00e09 to master: Now all double quotes; PEP 8 compliant (ish)
Merge pull request #32 from Annonomus-Penguin/6-7-15-double-quotes-and-pep-8

Now all double quotes; PEP 8 compliant (ish)
[ShearOfDoom/Cactus] Annonomus-Penguin pushed commit 7292d454 to master: Updated to include double quotes; other small fixes
> We should have the option for a user to add global commands, like `quit`.

We should have them integrated into the "fabric mesh," so a user can have one for going to a saved home, or to an inventory/other menu.

As usual, they should be able to bind to these commands.

« first day (7 days earlier)      last day (206 days later) »