Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld f1825862-d…

Core

The one module every slice of Crystal Isle reads, and the one thing they agree through.

by◐Hijisou·posted 20d ago
What it does

crystal_isle.Core

The one module every slice of Crystal Isle reads, and the one thing they agree through.

What it holds

  • ISLAND — the plateau's radius, the walkable half-width, the top's height.
  • POS — where Crystal Haven stands and where a player arrives.
  • CRYSTALS — the mining rule: a cluster breaks in 2 to 5 hits, how many shards a hit and a break are worth, how far off a crystal is visible, how near one raises your staff, how long a mined cluster takes to grow back, and how many clusters the island carries.
  • PICKAXES — the four staffs, cheapest first: cost, hits per crystal, shardsPerHit, shardsOnBreak, the beam colour, and a line of flavour.
  • DRESSES — the five outfits, each with a cost, a blurb and the colors its mesh is built from.
  • PALETTE — the whole island's colours, so every screen and material stays in one evening.

The live state

Kept as attributes on the entity crystal_isle_state — a LOCAL entity, so every peer keeps its own shard purse and its own wardrobe while standing on the same island:

Attribute
shardsnumberhow many crystal shards you carry
pickaxenumberwhich PICKAXES entry you hold (1-based)
dressstringthe DRESSES id worn
ownedstringcomma-separated ids of every dress owned

Who consumes it

Every slice: ci_mining mines through M.addShards, ci_shop buys through M.buyPickaxe / M.buyDress / M.equipDress, ci_hero dresses the body from M.dress(), ci_screens draws the HUD from M.shards() and subscribes with M.subscribe, ci_island lays the island out from M.ISLAND and M.POS.

The rule

Nothing writes those four attributes except this module. Mining calls M.addShards; the shop calls M.spend / M.buyPickaxe / M.buyDress / M.equipDress. That is what keeps the two halves of the game — what you dig up and what you spend it on — agreeing with each other.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Crystal Isle — the game's shared constants, catalogues and rules.

stateEntity(create: ?) → void

argtypedescription
create?

emit( ) → void

boot( ) → void

Create the state entity if the scene has not, so any caller can start the game.

state( ) → void

Everything the game agrees on: shards, the pickaxe held, the dress worn, the dresses owned.

shards( ) → void

How many shards the player is carrying.

pickaxe( ) → void

The pickaxe tier table the player is holding.

hitsForPickaxe( ) → void

How many hits THIS pickaxe needs on a crystal — always within 2 and 5.

dress( ) → void

The dress table worn right now.

dressById(id: ?) → void

Look a dress up by its id.

argtypedescription
id?

pickaxeById(id: ?) → void

Look a pickaxe up by its id.

argtypedescription
id?

addShards(n: ?) → void

Mine in shards — the ONLY way the count goes up.

argtypedescription
n?

canAfford(cost: ?) → void

Whether the player can afford something.

argtypedescription
cost?

spend(cost: ?) → void

Pay for something. Answers false when the shards are not there; nothing is taken on a false.

argtypedescription
cost?

buyPickaxe(index: ?) → void

Buy the pickaxe at this index. Answers ok, message.

argtypedescription
index?

owns(dressId: ?) → void

Whether a dress is owned.

argtypedescription
dressId?

buyDress(dressId: ?) → void

Buy a dress by id. Answers ok, message.

argtypedescription
dressId?

equipDress(dressId: ?) → void

Put on a dress already owned. Answers ok, message.

argtypedescription
dressId?

subscribe(fn: ?) → void

Hear about every change to the shared state. Answers a handle for `unsubscribe`.

argtypedescription
fn?

unsubscribe(h: ?) → void

Stop hearing about changes.

argtypedescription
h?

dresses( ) → void

The dress catalogue, for a shop screen to lay out.

pickaxes( ) → void

The pickaxe catalogue, for a shop screen to lay out.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

3items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · crystal_isle/Core.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.