What we fix in this lecture

Just a note as I was a bit worried I’d missed something, as Sam only talks about dropping item bugs and not inventory slot bugs. We fix:

  1. Dropping items in the world losing their item count
  2. Incorrect item counts being dragged between inventory slots
    Then later on:
  3. Item count on dropped items not persisting in the save / load system

PS. Sam talking about ‘dropping hats’ makes me smile every time as it’s a colloquial phrase round these parts to, ahem, break wind.

PPS. May I have a little moan about the use of the word ‘number’ instead of ‘count’? Number doesn’t really give many clues about what it’s representing. Count is used widely across the .NET framework e.g. on IEnumerables as a method or Lists as a property… Though of course arrays for some reason use the .Length property…

(Sorry, just something that’s come out of doing one too many pull request reviews this week :wink: )

2 Likes

lol dropping hat, I’ll have to remember that.

Honestly this section is a LITTLE harder for me to follow, just since we’re not coding along. But I’m trying to take it as a challlenge to practice learning how to read someone else’s code even if the way they explain/word/name things is a little confusing. When I was doing the Core Combat/Movement course, tbh I’d just rename a LOT of stuff and that alone made things a lot more clear to me (plus some of my own refactoring, ect). A lot of the naming Sam uses in this course especially makes things a lot harder to follow imo.

1 Like

Privacy & Terms