L26.P2: rework practice to be about a case where we actually load strings that need conversion to int
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 56/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- godot
调研方向
Start by locating the L26.P2 practice and the related issues #1416 and #1425. Review how the current spin box supplies values and how the lesson handles shop item data; then shape the practice around a dictionary loaded from CSV, with a string price to convert to an integer. Done means the exercise presents that realistic conversion task and its expected result.
由索引模型根据 Issue 内容生成。
描述
This issue follows and will eventually encompass #1416 and #1425
So, while it's absolutely possible to patch the practice to address the mentioned bugs, a problem remains that, unlike what we say in the practice, the spin box gives us a float and you can directly assign a float to a variable expecting an int in GDScript. So, you don't really need to do a type conversion in practice here, but also, this is not a real case where we would read a string from the user interface.
Instead, a relevant case that still relates to the idea of a shop we have in this lesson is something like designers writing spreadsheets where they put the item data that we load into the game, but because it comes from a spreadsheet, it's all text that we need to parse and convert to integer where relevant. So an idea is to give people a dictionary representing data loaded from a CSV file where the user needs to convert a string value representing the price into an int
- 主要语言
- GDScript
- 星标
- 2.8k
- 派生
- 237
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GDQuest/learn-gdscript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
GDQuest/learn-gdscript#1446 ·
-
user experience
难度 2/5 1-3 小时 新手友好度 66/100
GDQuest/learn-gdscript#1438 ·
-
user experience
难度 2/5 1-3 小时 新手友好度 64/100
GDQuest/learn-gdscript#1420 ·
-
难度 3/5 半天 新手友好度 50/100
GDQuest/learn-gdscript#1445 ·
-
bug
难度 3/5 1-3 小时 新手友好度 52/100
GDQuest/learn-gdscript#1444 · 1 条评论 ·