Compare commits

..

No commits in common. "624b538ad82e29c7eff04c2a6cb36bd9fa9e4358" and "d308ce7231263a611237fe62ce7bc74550d1d3db" have entirely different histories.

6 changed files with 26 additions and 33 deletions

View File

@ -2,4 +2,4 @@ compile-common.hxml
-D windowTitle=StoneInAGlasshouse
-lib hlsdl
-hl bin/glasshouse.hl
-hl bin/rewild.hl

View File

@ -1,23 +1,23 @@
.PHONY: watch run
default: bin/glasshouse.hl
default: bin/rewild.hl
SOURCES := $(shell find . -name \*.hx -print)
bin/glasshouse.hl: $(SOURCES)
bin/rewild.hl: $(SOURCES)
haxe compile-hl.hxml
bin/glasshouse.js: $(SOURCES)
bin/rewild.js: $(SOURCES)
haxe compile-js.hxml
debug: $(SOURCES)
haxe --debug compile-hl.hxml
clean:
rm -f bin/glasshouse.hl bin/glasshouse.js
rm -f bin/rewild.hl bin/rewild.js
watch:
@inotifywait --recursive --monitor --event modify,move,create,delete --include '.*.hx$$' ./ | while read changed; do echo $$changed; make debug; done
run:
hl bin/glasshouse.hl
hl bin/rewild.hl

View File

@ -55,16 +55,18 @@ menubutton:active {
flow.dialogue-container {
fill-width: true;
min-height: 20;
height: 20;
layout: vertical;
}
dialogue-box {
fill-width: true;
height: 20;
/* background: tile("ui.png", 5, 5); */
/* background-tile-pos: 1 1; */
background: blue;
padding: 10;
alpha: 0.9;
min-height: 20;
}
dialogue-options {

View File

@ -1,20 +1,16 @@
title: Room:quarters
---
<<declare $roll = 0>>
<<declare $quartersIntroSeen = false>>
<<declare $hangarKeyFound = false>>
<<declare $sleepingMatSetUp = false>>
<<if not $quartersIntroSeen>>
You: It's the crew quarters.
You: Well, it will be. Set-up hasn't started yet.
You: That was meant to be one of my first jobs after defrost...
You: ...but it doesn't exactly seem like a priority now.
<<set $quartersIntroSeen to true>>
<<endif>>
You: Maybe there's something useful here?
-> Search the lockers (perception) <<if not $hangarKeyFound>>
<<set $roll to dice(6)>>
<<if $roll > 0>>
<<if $roll > 2>>
You: Aha! A small piece of paper with the **hangar access code**.
<<room hangar>>
<<set $hangarKeyFound to true>>

View File

@ -69,12 +69,6 @@ class DialogueOptionsComponent extends h2d.Flow implements h2d.domkit.Object {
);
}
}
override function onRemove() {
for (option in this.options)
option.remove();
super.onRemove();
}
}
@:uiComp("dialogue-box")
@ -122,6 +116,7 @@ class DialogueBoxComponent extends h2d.Flow implements h2d.domkit.Object {
function updateText() {
if (textPos == internalText.length) {
timer.stop();
// onReady();
// if (chan != null)
// chan.stop();
return;
@ -141,13 +136,6 @@ class DialogueBoxComponent extends h2d.Flow implements h2d.domkit.Object {
displayedText = internalText.substr(0, textPos);
}
override function onRemove() {
super.onRemove();
// if (chan != null)
// chan.stop();
// timer.stop();
}
public dynamic function onClick() {
if (textPos == internalText.length)
Game.current.globalEventBus.publishEvent(new NextLine());

View File

@ -36,18 +36,25 @@ class DialogueBoxController {
eventBus.subscribe(DialogueComplete, onDialogueComplete);
}
// override function onRemove() {
// super.onRemove();
// // if (chan != null)
// // chan.stop();
// // timer.stop();
// }
public dynamic function onClick() {}
public dynamic function onReady() {}
function onLineShown(event:LineShown) {
if (dialogueBox == null) {
var d = new DialogueBoxComponent(event.line(), this.parent);
style.addObject(d);
dialogueBox = d;
} else {
dialogueBox.internalText = event.line();
if (dialogueBox != null) {
dialogueBox.remove();
}
var d = new DialogueBoxComponent(event.line(), this.parent);
style.addObject(d);
dialogueBox = d;
}
function onOptionsShown(event:OptionsShown) {
@ -62,6 +69,6 @@ class DialogueBoxController {
dialogueBox.remove();
if (dialogueOptions != null)
dialogueOptions.remove();
dialogueBox = null;
}
}