Mission updates

pull/18/head
Wade 2025-04-21 20:21:44 +07:00
parent f83026fa25
commit 36accdff35
34 changed files with 68 additions and 33 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

@ -38,7 +38,7 @@ body {
}
#status {
background-color: #242424;
background-color: #ececf5;
display: flex;
flex-direction: column;
justify-content: center;
@ -52,6 +52,20 @@ body {
margin: auto;
}
#status-splash.show-image--false {
display: none;
}
#status-splash.fullsize--true {
height: 100%;
width: 100%;
object-fit: contain;
}
#status-splash.use-filter--false {
image-rendering: pixelated;
}
#status-progress, #status-notice {
display: none;
}
@ -90,14 +104,14 @@ body {
</noscript>
<div id="status">
<img id="status-splash" src="Starter Kit City Builder.png" alt="">
<img id="status-splash" class="show-image--true fullsize--true use-filter--true" src="Starter Kit City Builder.png" alt="">
<progress id="status-progress"></progress>
<div id="status-notice"></div>
</div>
<script src="Starter Kit City Builder.js"></script>
<script>
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"Starter Kit City Builder","experimentalVK":false,"fileSizes":{"Starter Kit City Builder.pck":14139952,"Starter Kit City Builder.wasm":1620216},"focusCanvas":true,"gdextensionLibs":[]};
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"Starter Kit City Builder","experimentalVK":false,"fileSizes":{"Starter Kit City Builder.pck":20929568,"Starter Kit City Builder.wasm":1625538},"focusCanvas":true,"gdextensionLibs":[]};
const GODOT_THREADS_ENABLED = false;
const engine = new Engine(GODOT_CONFIG);
@ -142,7 +156,7 @@ const engine = new Engine(GODOT_CONFIG);
} else if (typeof err === 'string') {
setStatusNotice(err);
} else {
setStatusNotice('An unknown error occured');
setStatusNotice('An unknown error occurred.');
}
setStatusMode('notice');
initializing = false;
@ -154,9 +168,15 @@ const engine = new Engine(GODOT_CONFIG);
if (missing.length !== 0) {
if (GODOT_CONFIG['serviceWorker'] && GODOT_CONFIG['ensureCrossOriginIsolationHeaders'] && 'serviceWorker' in navigator) {
let serviceWorkerRegistrationPromise;
try {
serviceWorkerRegistrationPromise = navigator.serviceWorker.getRegistration();
} catch (err) {
serviceWorkerRegistrationPromise = Promise.reject(new Error('Service worker registration failed.'));
}
// There's a chance that installing the service worker would fix the issue
Promise.race([
navigator.serviceWorker.getRegistration().then((registration) => {
serviceWorkerRegistrationPromise.then((registration) => {
if (registration != null) {
return Promise.reject(new Error('Service worker already exists.'));
}
@ -166,10 +186,11 @@ const engine = new Engine(GODOT_CONFIG);
new Promise((resolve) => {
setTimeout(() => resolve(), 2000);
}),
]).catch((err) => {
console.error('Error while registering service worker:', err);
}).then(() => {
]).then(() => {
// Reload if there was no error.
window.location.reload();
}).catch((err) => {
console.error('Error while registering service worker:', err);
});
} else {
// Display the message as usual

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

File diff suppressed because one or more lines are too long

@ -17,7 +17,7 @@ structure = ExtResource("2_d0ffl")
script = ExtResource("1_nv6c6")
id = "1"
title = "Census Planning"
description = "As the new city planner, you need to establish a baseline understanding of your growing community. The mayor has requested a comprehensive census to guide future development."
description = "As the new city planner, you need to collect data on two categorical variables: infrastructure types and citizen demographics. Building roads will allow you to collect this data for a two-way frequency table analysis."
objectives = Array[ExtResource("1_yfbrc")]([SubResource("Resource_ywws1")])
rewards = {
"cash": 250

@ -17,7 +17,7 @@ structure = ExtResource("2_em5vq")
script = ExtResource("2_mum3p")
id = "2"
title = "Census Planning"
description = "Now that we have a road, let's build a residential building for our citizens!"
description = "Now that we have roads, we need to collect data on housing preferences. Build residential buildings to gather categorical data on housing types and resident occupations for your two-way table analysis."
objectives = Array[ExtResource("1_dhx01")]([SubResource("Resource_7c02e")])
rewards = {
"cash": 250

@ -15,7 +15,7 @@ completed = false
script = ExtResource("2_b4llw")
id = "3"
title = "Census Planning"
description = "As your city grows, you need to choose the most efficient construction company."
description = "As your city grows, you need to interpret your two-way frequency tables. Increase your population to see relative frequencies and possible associations between resident demographics and infrastructure usage."
objectives = Array[ExtResource("1_l3spi")]([SubResource("Resource_c06be")])
rewards = {
"cash": 500

@ -17,7 +17,7 @@ structure = ExtResource("2_d7dn8")
script = ExtResource("3_viy3t")
id = "4"
title = "Market Research"
description = "Local businesses are interested in setting up shop in your city, but they need data on where to locate for maximum profit."
description = "Local businesses are analyzing your two-way tables to find associations between infrastructure and demographics. Build stores to further explore relationships between these categorical variables."
objectives = Array[ExtResource("1_tcpuf")]([SubResource("Resource_1rxby")])
rewards = {
"cash": 0

@ -17,7 +17,7 @@ structure = ExtResource("2_ktjdq")
script = ExtResource("3_w1cq1")
id = "5"
title = "Market Research"
description = "To support the growing commercial district, you need to improve city infrastructure by adding more roads."
description = "Your two-way tables show an interesting association between road access and commercial success. Add more roads to gather more data on this categorical relationship pattern."
objectives = Array[ExtResource("1_pfd6v")]([SubResource("Resource_a42kn")])
rewards = {
"cash": 300

@ -17,7 +17,7 @@ structure = ExtResource("2_evy85")
script = ExtResource("3_mtrpd")
id = "8"
title = "Grid Growth"
description = "City planners have proposed a grid-based layout for efficient city expansion. Begin implementing this pattern with strategic road placement."
description = "City planners are using scatter plots to visualize how distance from city center relates to property values. Create a grid road layout to represent this bivariate data pattern."
objectives = Array[ExtResource("1_fvshb")]([SubResource("Resource_pj2vg")])
rewards = {
"cash": 300

@ -17,7 +17,7 @@ structure = ExtResource("2_r3vpw")
script = ExtResource("3_mdu3m")
id = "9"
title = "Grid Growth"
description = "Now that you've established your grid pattern, it's time to add residential zones to the grid. This will demonstrate how building placement follows the road network."
description = "Our scatter plots show a clustering pattern between housing density and road network. Add residential buildings to explore this bivariate relationship further."
objectives = Array[ExtResource("1_miqck")]([SubResource("Resource_utswr")])
rewards = {
"cash": 350

@ -17,7 +17,7 @@ structure = ExtResource("2_exdai")
script = ExtResource("3_kexcf")
id = "12"
title = "Traffic Flow Analysis"
description = "The Transportation Department wants to analyze how curved roads affect traffic flow. Add corner roads to create more natural pathways."
description = "The Transportation Department is creating scatter plots showing the relationship between road curvature and traffic speed. Add curved roads to investigate this bivariate relationship pattern."
objectives = Array[ExtResource("1_ajvs5")]([SubResource("Resource_qykcx")])
rewards = {
"cash": 300

@ -17,7 +17,7 @@ structure = ExtResource("2_4a8uo")
script = ExtResource("3_aihyv")
id = "13"
title = "Traffic Flow Analysis"
description = "To better analyze traffic patterns, we need more residents using the road network. Add residential buildings to generate traffic flow."
description = "Our scatter plots reveal interesting associations between residential density and traffic flow. Add more housing to gather data points for our bivariate analysis."
objectives = Array[ExtResource("1_8k2sf")]([SubResource("Resource_fmsjh")])
rewards = {
"cash": 350

@ -15,7 +15,7 @@ completed = false
script = ExtResource("2_x8j3r")
id = "16"
title = "Sustainable Development"
description = "Your city is growing rapidly, but you need to ensure this growth happens sustainably. Model population growth to ensure you can meet everyone's needs."
description = "Our linear model shows a strong association between population size and resource demands. Grow your population to test how closely actual data points fit this predictive line."
objectives = Array[ExtResource("1_40kcw")]([SubResource("Resource_qlixo")])
rewards = {
"cash": 500

@ -17,7 +17,7 @@ structure = ExtResource("2_a71iq")
script = ExtResource("3_38y5t")
id = "20"
title = "Urban Planning"
description = "Good urban planning requires commercial zones strategically placed throughout the city. Plan and build new commercial districts."
description = "Our scatter plots show a linear association between commercial density and economic growth. Build stores to implement a city plan based on this linear relationship model."
objectives = Array[ExtResource("1_fywct")]([SubResource("Resource_wq8mf")])
rewards = {
"cash": 450

@ -17,7 +17,7 @@ structure = ExtResource("2_6f04c")
script = ExtResource("3_7jlc0")
id = "21"
title = "Urban Planning"
description = "Residential zoning is a critical component of urban planning. Create new residential areas to accommodate your growing population."
description = "Our scatter plot suggests a linear association between residential zones and transit usage. Build housing to further test the fit of our linear model."
objectives = Array[ExtResource("1_0s0wv")]([SubResource("Resource_3fy3g")])
rewards = {
"cash": 500

@ -15,7 +15,7 @@ completed = false
script = ExtResource("2_pv8r1")
id = "24"
title = "Economic Forecasting"
description = "Economic models predict substantial growth for your city. Use population data to forecast economic trends and prepare for the future."
description = "Our linear model helps forecast economic needs based on population size. Grow your population to 150 to test real-world predictions from this mathematical model."
objectives = Array[ExtResource("1_cjqfg")]([SubResource("Resource_e2jx7")])
rewards = {
"cash": 700

@ -17,7 +17,7 @@ structure = ExtResource("2_qlnvj")
script = ExtResource("3_4udbq")
id = "27"
title = "Resource Allocation"
description = "Efficient resource allocation starts with housing. Create a residential expansion plan that maximizes land use efficiency."
description = "Using our linear model of housing-to-population growth, build residential zones to see how the rate of change and y-intercept affect real-world outcomes."
objectives = Array[ExtResource("1_1k37f")]([SubResource("Resource_0fxto")])
rewards = {
"cash": 600

@ -17,7 +17,7 @@ structure = ExtResource("2_hh0xb")
script = ExtResource("3_k5ivn")
id = "28"
title = "Resource Allocation"
description = "Commercial resource allocation requires strategic planning. Develop a commercial sector that balances land use with economic benefits."
description = "Our linear model predicts commercial success based on location factors. Build stores to test the real-world predictions from our mathematical model."
objectives = Array[ExtResource("1_vdhxy")]([SubResource("Resource_21csl")])
rewards = {
"cash": 650

@ -19,11 +19,12 @@ var construction_sfx: AudioStreamPlayer
func _ready():
# Load data from a file.
var err = config.load("global://config.cfg")
# If the file didn't load, ignore it.
if err != OK:
return
#var err = config.load("global://config.cfg")
## If the file didn't load, ignore it.
#if err != OK:
#return
# Register SoundManager in the main loop for JavaScript bridge to find
Engine.get_main_loop().set_meta("sound_manager", get_node_or_null("/root/SoundManager"))
@ -38,7 +39,6 @@ func _ready():
if generic_text_panel and intro_text_resource:
print(generic_text_panel.resource_data)
generic_text_panel.apply_resource_data(intro_text_resource)
generic_text_panel.show_panel()

@ -11,7 +11,7 @@ var react_sound_bridge = null # Will be instantiated from a script
var audio_bridge = null # Will be instantiated from a script
# Volume ranges from 0.0 to 1.0
var music_volume: float = 0.0
var music_volume: float = 0.1
var sfx_volume: float = 0.1
# Mute states

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A lush area featuring small trees that provides shade, clean air, and a pleasant atmosphere for nearby residents."
thumbnail = "res://sprites/terrain/grass-trees-tall.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "Some cool trees and grass!"
thumbnail = "res://sprites/terrain/grass-trees.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "Some lush green grass!"
thumbnail = "res://sprites/residential/grass.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A beautiful centerpiece that adds charm to your city while providing citizens with a place to relax and socialize."
thumbnail = "res://sprites/terrain/fountain.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A pedestrian-friendly surface that creates walkable areas and enhances the appearance of your city spaces."
thumbnail = "res://sprites/roads/pavement.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 40.0
selector_scale = 13
unlocked = false
spawn_builder = false
description = "A power-generating facility that produces electricity to keep your city's buildings operational and citizens happy. Produces 40 kW of energy."
thumbnail = "res://sprites/power_plants/coal_power_plant.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A gently curved road section that helps create more natural and flowing city layouts."
thumbnail = "res://sprites/roads/road-corner.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "A crucial junction where roads meet, allowing traffic to flow in multiple directions throughout your city."
thumbnail = "res://sprites/roads/intersection.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
description = "An illuminated road segment that provides safety and visibility for your citizens at night."
thumbnail = "res://sprites/roads/road-straight-lampposts.png"

@ -14,5 +14,6 @@ kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = true
spawn_builder = false
description = "A basic road for connecting parts of your city."
thumbnail = "res://models/road-straight.glb"