In-game campaign, map and block script editors
Mission graph with branches, mission settings and goals, map editor on the 3D view (terrain, places, units, towers, traps, forts, rivals, zones; undo, brush, rectangle, fill, mirror), block editor with palette, nesting, live problems, undo, copy/paste and search; test play with a script debug view; demo campaign and built-in missions as templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
65677504f6
commit
30dd8441b9
10 files changed
+3372
-19
No files matched your search
@@ -291,6 +291,7 @@ enum Btn {
|
||||
BestPick(usize),
|
||||
BestLevel(i32),
|
||||
LangOpen, // the language dropdown field
|
||||
BackToEditor,
|
||||
}
|
||||
|
||||
pub const REPO_URL: &str = "https://git.familie-zink.org/zink/dungeoncraft";
|
||||
@@ -376,6 +377,7 @@ pub enum MenuAction {
|
||||
CampaignStart(usize),
|
||||
OpenRepo,
|
||||
OpenClaudeCode,
|
||||
BackToEditor,
|
||||
OpenOpenCode,
|
||||
Login(String, String),
|
||||
Logout,
|
||||
@@ -412,6 +414,7 @@ pub struct Menu {
|
||||
pub match_ui: MatchUi, // copied state of the multiplayer relay, shown on the Match page
|
||||
pub coop_mission: usize, // co-op campaign mission selected on the Match page
|
||||
pub in_match: bool, // a match is being played; the pause menu changes its shape
|
||||
pub editor_test: bool, // a mission of the editor is being tested: back to the editor
|
||||
pub campaign_doc: CampaignDoc,
|
||||
pub campaign_selected: usize,
|
||||
pub campaign_pending: bool,
|
||||
@@ -447,6 +450,7 @@ impl Menu {
|
||||
match_ui: MatchUi::default(),
|
||||
coop_mission: crate::campaign::coop_mission_indexes().first().copied().unwrap_or(0),
|
||||
in_match: false,
|
||||
editor_test: false,
|
||||
campaign_doc: CampaignDoc::default(),
|
||||
campaign_selected: 0,
|
||||
campaign_pending: false,
|
||||
@@ -699,6 +703,7 @@ impl Menu {
|
||||
Some(Btn::Repo) => MenuAction::OpenRepo,
|
||||
Some(Btn::ClaudeCode) => MenuAction::OpenClaudeCode,
|
||||
Some(Btn::OpenCode) => MenuAction::OpenOpenCode,
|
||||
Some(Btn::BackToEditor) => MenuAction::BackToEditor,
|
||||
Some(Btn::Field(i)) => {
|
||||
self.focus = i;
|
||||
if matches!(self.page, Some(Page::Match { .. })) {
|
||||
@@ -1109,6 +1114,9 @@ impl Menu {
|
||||
let sw = sw();
|
||||
let sh = sh();
|
||||
let mut items = vec![(Btn::Resume, tr("menu.resume"))];
|
||||
if self.editor_test {
|
||||
items.push((Btn::BackToEditor, tr("menu.back_editor")));
|
||||
}
|
||||
if self.mission.is_some() {
|
||||
items.push((Btn::Goals, tr("menu.goals")));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user