File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/kitten-scientists/source/ui Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { isNil , mustExist } from "@oliversalzburg/js-utils/lib/nil.js" ;
2
2
import { UserScript , ksVersion } from "../UserScript.js" ;
3
3
import { Icons } from "../images/Icons.js" ;
4
+ import { cwarn } from "../tools/Log.js" ;
4
5
import { BonfireSettingsUi } from "./BonfireSettingsUi.js" ;
5
6
import { EngineSettingsUi } from "./EngineSettingsUi.js" ;
6
7
import { InternalsUi } from "./InternalsUi.js" ;
@@ -73,6 +74,7 @@ export class UserInterface extends UiComponent {
73
74
const optionsListElement = $ ( "<ul/>" ) ;
74
75
optionsListElement . append ( this . _engineUi . element ) ;
75
76
this . _sections . forEach ( section => optionsListElement . append ( section . element ) ) ;
77
+ ks . append ( optionsListElement ) ;
76
78
77
79
// Make _engineUI's expando button hide/show the other option groups
78
80
const expando = this . _engineUi . expando ;
@@ -114,9 +116,13 @@ export class UserInterface extends UiComponent {
114
116
115
117
$ ( "#clearLog" ) . prepend ( this . showActivity ) ;
116
118
117
- // add the options above the game log
119
+ // Add Kitten Scientists above the game log.
118
120
const right = $ ( "#rightColumn" ) ;
119
- right . prepend ( ks . append ( optionsListElement ) ) ;
121
+ if ( right . attr ( "id" ) === undefined ) {
122
+ cwarn ( "Unable to find right column to inject UI into. Running headless." ) ;
123
+ } else {
124
+ right . prepend ( ks ) ;
125
+ }
120
126
121
127
this . element = ks ;
122
128
}
You can’t perform that action at this time.
0 commit comments