@crowdedkingdoms/crowdyjs 18.12.0-dev.1 → 18.13.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +25 -0
- package/README.md +7 -1
- package/dist/generated/graphql-schema.d.ts +4 -4
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/index.d.ts +2 -0
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +2 -0
- package/dist/kit/kit.d.ts +40 -1
- package/dist/kit/kit.d.ts.map +1 -1
- package/dist/kit/kit.js +71 -1
- package/dist/kit/modules/market.d.ts +159 -0
- package/dist/kit/modules/market.d.ts.map +1 -0
- package/dist/kit/modules/market.js +141 -0
- package/dist/kit/modules/player.d.ts +264 -0
- package/dist/kit/modules/player.d.ts.map +1 -0
- package/dist/kit/modules/player.js +258 -0
- package/dist/kit/protocol.d.ts +2 -0
- package/dist/kit/protocol.d.ts.map +1 -1
- package/dist/kit/protocol.js +2 -0
- package/dist/kit/runtime.d.ts.map +1 -1
- package/dist/kit/runtime.js +6 -1
- package/dist/live-coding/assets/browser-authoring-index.json +1 -1
- package/dist/live-coding/assets/manifest.json +1 -1
- package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
- package/dist/live-coding/browser-authoring-index.generated.js +1474 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
|
|
|
4
4
|
"rustVersion": "1.97.1",
|
|
5
5
|
"sdkVersion": "0.1.0",
|
|
6
6
|
"abiVersion": 0,
|
|
7
|
-
"contentHash": "
|
|
7
|
+
"contentHash": "ee2ede452d216671472b089bc9d6e43b5afcc9debe4d8e9ea2be4f041a282485",
|
|
8
8
|
"crates": [
|
|
9
9
|
{
|
|
10
10
|
"name": "alloc",
|
|
@@ -13,8 +13,8 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "ckx-sdk",
|
|
16
|
-
"version": "0.
|
|
17
|
-
"sourceHash": "
|
|
16
|
+
"version": "0.12.1",
|
|
17
|
+
"sourceHash": "d286cb4b12326cbaf7c78c10a593f393d28cbdaa248a3507a179c5c4843ce5aa"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "core",
|
|
@@ -1384,7 +1384,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
|
|
|
1384
1384
|
"name": "Receipts::record",
|
|
1385
1385
|
"kind": "method",
|
|
1386
1386
|
"signature": "pub fn record(&mut self, caller: Caller, action_id: Option<&str>, result: &Result<Vec<u8>>, now: u64)",
|
|
1387
|
-
"docs": "Keeps what `caller` got for `action_id`; nothing without an action id."
|
|
1387
|
+
"docs": "Keeps what `caller` got for `action_id`; nothing without an action id, and nothing for a refusal coded [`codes::UNAVAILABLE`], which says the action did not finish."
|
|
1388
1388
|
},
|
|
1389
1389
|
{
|
|
1390
1390
|
"module": "ckx_sdk::kit",
|
|
@@ -1442,6 +1442,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
|
|
|
1442
1442
|
"signature": "pub mod codes",
|
|
1443
1443
|
"docs": "The refusal codes kit hubs share. A hub may add its own: lowercase letters, digits and `_`."
|
|
1444
1444
|
},
|
|
1445
|
+
{
|
|
1446
|
+
"module": "ckx_sdk::kit",
|
|
1447
|
+
"name": "econ",
|
|
1448
|
+
"kind": "module",
|
|
1449
|
+
"signature": "pub mod econ;",
|
|
1450
|
+
"docs": ""
|
|
1451
|
+
},
|
|
1445
1452
|
{
|
|
1446
1453
|
"module": "ckx_sdk::kit",
|
|
1447
1454
|
"name": "error",
|
|
@@ -2177,6 +2184,1469 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
|
|
|
2177
2184
|
"signature": "pub const STARTED: &str = \"started\";",
|
|
2178
2185
|
"docs": ""
|
|
2179
2186
|
},
|
|
2187
|
+
{
|
|
2188
|
+
"module": "ckx_sdk::kit::codes",
|
|
2189
|
+
"name": "UNAVAILABLE",
|
|
2190
|
+
"kind": "const",
|
|
2191
|
+
"signature": "pub const UNAVAILABLE: &str = \"unavailable\";",
|
|
2192
|
+
"docs": "Another hub this call needs did not answer in time, so the call did not finish: send it again with the same `action_id`. Receipts never keep it."
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"module": "ckx_sdk::kit::econ",
|
|
2196
|
+
"name": "ID_MAX",
|
|
2197
|
+
"kind": "const",
|
|
2198
|
+
"signature": "pub const ID_MAX: usize = 64;",
|
|
2199
|
+
"docs": "The longest item id or currency the economy takes."
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"module": "ckx_sdk::kit::econ",
|
|
2203
|
+
"name": "REFERENCE_MAX",
|
|
2204
|
+
"kind": "const",
|
|
2205
|
+
"signature": "pub const REFERENCE_MAX: usize = 128;",
|
|
2206
|
+
"docs": "The longest reference [`Holds`] and [`Applied`] take: room for a driver's key, a counter and the suffixes of the steps it derives from one."
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
"module": "ckx_sdk::kit::econ",
|
|
2210
|
+
"name": "Wallet",
|
|
2211
|
+
"kind": "reexport",
|
|
2212
|
+
"signature": "pub use wallet::Wallet;",
|
|
2213
|
+
"docs": ""
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
"module": "ckx_sdk::kit::econ",
|
|
2217
|
+
"name": "holdings",
|
|
2218
|
+
"kind": "module",
|
|
2219
|
+
"signature": "pub mod holdings;",
|
|
2220
|
+
"docs": ""
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"module": "ckx_sdk::kit::econ",
|
|
2224
|
+
"name": "holdings::{Bundle, Holdings}",
|
|
2225
|
+
"kind": "reexport",
|
|
2226
|
+
"signature": "pub use holdings::{Bundle, Holdings};",
|
|
2227
|
+
"docs": ""
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
"module": "ckx_sdk::kit::econ",
|
|
2231
|
+
"name": "holds",
|
|
2232
|
+
"kind": "module",
|
|
2233
|
+
"signature": "pub mod holds;",
|
|
2234
|
+
"docs": ""
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"module": "ckx_sdk::kit::econ",
|
|
2238
|
+
"name": "holds::{Applied, Holds}",
|
|
2239
|
+
"kind": "reexport",
|
|
2240
|
+
"signature": "pub use holds::{Applied, Holds};",
|
|
2241
|
+
"docs": ""
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"module": "ckx_sdk::kit::econ",
|
|
2245
|
+
"name": "items",
|
|
2246
|
+
"kind": "module",
|
|
2247
|
+
"signature": "pub mod items;",
|
|
2248
|
+
"docs": ""
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"module": "ckx_sdk::kit::econ",
|
|
2252
|
+
"name": "items::{Catalog, Inventory, ItemDef, Stack}",
|
|
2253
|
+
"kind": "reexport",
|
|
2254
|
+
"signature": "pub use items::{Catalog, Inventory, ItemDef, Stack};",
|
|
2255
|
+
"docs": ""
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
"module": "ckx_sdk::kit::econ",
|
|
2259
|
+
"name": "loot",
|
|
2260
|
+
"kind": "module",
|
|
2261
|
+
"signature": "pub mod loot;",
|
|
2262
|
+
"docs": ""
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
"module": "ckx_sdk::kit::econ",
|
|
2266
|
+
"name": "orderbook",
|
|
2267
|
+
"kind": "module",
|
|
2268
|
+
"signature": "pub mod orderbook;",
|
|
2269
|
+
"docs": ""
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"module": "ckx_sdk::kit::econ",
|
|
2273
|
+
"name": "production",
|
|
2274
|
+
"kind": "module",
|
|
2275
|
+
"signature": "pub mod production;",
|
|
2276
|
+
"docs": ""
|
|
2277
|
+
},
|
|
2278
|
+
{
|
|
2279
|
+
"module": "ckx_sdk::kit::econ",
|
|
2280
|
+
"name": "progression",
|
|
2281
|
+
"kind": "module",
|
|
2282
|
+
"signature": "pub mod progression;",
|
|
2283
|
+
"docs": ""
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
"module": "ckx_sdk::kit::econ",
|
|
2287
|
+
"name": "recipes",
|
|
2288
|
+
"kind": "module",
|
|
2289
|
+
"signature": "pub mod recipes;",
|
|
2290
|
+
"docs": ""
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"module": "ckx_sdk::kit::econ",
|
|
2294
|
+
"name": "vendor",
|
|
2295
|
+
"kind": "module",
|
|
2296
|
+
"signature": "pub mod vendor;",
|
|
2297
|
+
"docs": ""
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"module": "ckx_sdk::kit::econ",
|
|
2301
|
+
"name": "wallet",
|
|
2302
|
+
"kind": "module",
|
|
2303
|
+
"signature": "pub mod wallet;",
|
|
2304
|
+
"docs": ""
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2308
|
+
"name": "Bundle",
|
|
2309
|
+
"kind": "struct",
|
|
2310
|
+
"signature": "pub struct Bundle { /// Item id to how many. pub items: BTreeMap<String, u64>, /// Currency to how much. pub currency: BTreeMap<String, i64>, }",
|
|
2311
|
+
"docs": "Items and currency moved together: a price, a reward, a hold."
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2315
|
+
"name": "Bundle::check",
|
|
2316
|
+
"kind": "method",
|
|
2317
|
+
"signature": "pub fn check(&self) -> Result<()>",
|
|
2318
|
+
"docs": "`bad_request` for an id the economy does not take or a negative amount."
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2322
|
+
"name": "Bundle::coins",
|
|
2323
|
+
"kind": "method",
|
|
2324
|
+
"signature": "pub fn coins(currency: &str, amount: i64) -> Self",
|
|
2325
|
+
"docs": ""
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2329
|
+
"name": "Bundle::currency",
|
|
2330
|
+
"kind": "field",
|
|
2331
|
+
"signature": "pub currency: BTreeMap<String, i64>",
|
|
2332
|
+
"docs": "Currency to how much."
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2336
|
+
"name": "Bundle::is_empty",
|
|
2337
|
+
"kind": "method",
|
|
2338
|
+
"signature": "pub fn is_empty(&self) -> bool",
|
|
2339
|
+
"docs": ""
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2343
|
+
"name": "Bundle::item",
|
|
2344
|
+
"kind": "method",
|
|
2345
|
+
"signature": "pub fn item(id: &str, count: u64) -> Self",
|
|
2346
|
+
"docs": ""
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2350
|
+
"name": "Bundle::items",
|
|
2351
|
+
"kind": "field",
|
|
2352
|
+
"signature": "pub items: BTreeMap<String, u64>",
|
|
2353
|
+
"docs": "Item id to how many."
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2357
|
+
"name": "Bundle::minus",
|
|
2358
|
+
"kind": "method",
|
|
2359
|
+
"signature": "pub fn minus(&self, part: &Bundle) -> Result<Bundle>",
|
|
2360
|
+
"docs": "What is left of `self` once `part` is taken out of it; `insufficient` when it holds less."
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2364
|
+
"name": "Bundle::plus",
|
|
2365
|
+
"kind": "method",
|
|
2366
|
+
"signature": "pub fn plus(&self, other: &Bundle) -> Result<Bundle>",
|
|
2367
|
+
"docs": ""
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2371
|
+
"name": "Bundle::times",
|
|
2372
|
+
"kind": "method",
|
|
2373
|
+
"signature": "pub fn times(&self, n: u64) -> Result<Bundle>",
|
|
2374
|
+
"docs": "`n` of it."
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2378
|
+
"name": "Bundle::trimmed",
|
|
2379
|
+
"kind": "method",
|
|
2380
|
+
"signature": "pub fn trimmed(mut self) -> Bundle",
|
|
2381
|
+
"docs": "Without its zero entries."
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2385
|
+
"name": "Holdings",
|
|
2386
|
+
"kind": "struct",
|
|
2387
|
+
"signature": "pub struct Holdings { pub inventory: Inventory, pub wallet: Wallet, pub mail: BTreeMap<String, u64>, }",
|
|
2388
|
+
"docs": "A player's inventory and wallet, and their mail: items given to them that did not fit, kept until they make room ([`Holdings::take_mail`])."
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2392
|
+
"name": "Holdings::give",
|
|
2393
|
+
"kind": "method",
|
|
2394
|
+
"signature": "pub fn give(&mut self, catalog: &Catalog, b: &Bundle) -> Result<()>",
|
|
2395
|
+
"docs": "Gives `b`, or nothing: `full` when its items do not fit, `not_found` for an item the catalog lacks."
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2399
|
+
"name": "Holdings::give_or_mail",
|
|
2400
|
+
"kind": "method",
|
|
2401
|
+
"signature": "pub fn give_or_mail(&mut self, catalog: &Catalog, b: &Bundle) -> Result<()>",
|
|
2402
|
+
"docs": "Gives `b`, its items as far as they fit and the rest to the mail. It fails only for a bundle the economy does not take: what another hub delivers always arrives."
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2406
|
+
"name": "Holdings::has",
|
|
2407
|
+
"kind": "method",
|
|
2408
|
+
"signature": "pub fn has(&self, b: &Bundle) -> bool",
|
|
2409
|
+
"docs": "Whether `b` could be taken."
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2413
|
+
"name": "Holdings::inventory",
|
|
2414
|
+
"kind": "field",
|
|
2415
|
+
"signature": "pub inventory: Inventory",
|
|
2416
|
+
"docs": ""
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2420
|
+
"name": "Holdings::mail",
|
|
2421
|
+
"kind": "field",
|
|
2422
|
+
"signature": "pub mail: BTreeMap<String, u64>",
|
|
2423
|
+
"docs": ""
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2427
|
+
"name": "Holdings::new",
|
|
2428
|
+
"kind": "method",
|
|
2429
|
+
"signature": "pub fn new(slots: u32) -> Self",
|
|
2430
|
+
"docs": ""
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2434
|
+
"name": "Holdings::swap",
|
|
2435
|
+
"kind": "method",
|
|
2436
|
+
"signature": "pub fn swap(&mut self, catalog: &Catalog, pay: &Bundle, get: &Bundle) -> Result<()>",
|
|
2437
|
+
"docs": "Takes `pay` and gives `get` together, or neither."
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2441
|
+
"name": "Holdings::take",
|
|
2442
|
+
"kind": "method",
|
|
2443
|
+
"signature": "pub fn take(&mut self, b: &Bundle) -> Result<()>",
|
|
2444
|
+
"docs": "Takes `b`, or nothing: `insufficient`."
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2448
|
+
"name": "Holdings::take_mail",
|
|
2449
|
+
"kind": "method",
|
|
2450
|
+
"signature": "pub fn take_mail(&mut self, catalog: &Catalog) -> Bundle",
|
|
2451
|
+
"docs": "Moves what fits from the mail into the inventory; answers what moved."
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
"module": "ckx_sdk::kit::econ::holdings",
|
|
2455
|
+
"name": "Holdings::wallet",
|
|
2456
|
+
"kind": "field",
|
|
2457
|
+
"signature": "pub wallet: Wallet",
|
|
2458
|
+
"docs": ""
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2462
|
+
"name": "APPLIED_MAX",
|
|
2463
|
+
"kind": "const",
|
|
2464
|
+
"signature": "pub const APPLIED_MAX: usize = 4_096;",
|
|
2465
|
+
"docs": "How many references' answers are kept."
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2469
|
+
"name": "APPLIED_TTL_MS",
|
|
2470
|
+
"kind": "const",
|
|
2471
|
+
"signature": "pub const APPLIED_TTL_MS: u64 = 7 * 24 * 3_600_000;",
|
|
2472
|
+
"docs": "How long a reference's answer is kept."
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2476
|
+
"name": "Applied",
|
|
2477
|
+
"kind": "struct",
|
|
2478
|
+
"signature": "pub struct Applied { #[serde(default)] kept: VecDeque<Done>, }",
|
|
2479
|
+
"docs": "The answer each reference got, so a step asked for again is answered as it was the first time. Keep it in the hub's state. A refusal coded `unavailable` is not kept: it says the step did not run."
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2483
|
+
"name": "Applied::is_empty",
|
|
2484
|
+
"kind": "method",
|
|
2485
|
+
"signature": "pub fn is_empty(&self) -> bool",
|
|
2486
|
+
"docs": ""
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2490
|
+
"name": "Applied::len",
|
|
2491
|
+
"kind": "method",
|
|
2492
|
+
"signature": "pub fn len(&self) -> usize",
|
|
2493
|
+
"docs": ""
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2497
|
+
"name": "Applied::record",
|
|
2498
|
+
"kind": "method",
|
|
2499
|
+
"signature": "pub fn record(&mut self, reference: &str, result: &Result<Vec<u8>>, now: u64)",
|
|
2500
|
+
"docs": ""
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2504
|
+
"name": "Applied::replay",
|
|
2505
|
+
"kind": "method",
|
|
2506
|
+
"signature": "pub fn replay(&self, reference: &str, now: u64) -> Option<Result<Vec<u8>>>",
|
|
2507
|
+
"docs": ""
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2511
|
+
"name": "Applied::run",
|
|
2512
|
+
"kind": "method",
|
|
2513
|
+
"signature": "pub fn run<H>( hub: &mut H, applied: fn(&mut H) -> &mut Applied, reference: &str, now: u64, act: impl FnOnce(&mut H) -> Result<Vec<u8>>, ) -> Result<Vec<u8>>",
|
|
2514
|
+
"docs": "Runs `act` once per `reference`: asked again, it answers what it answered first."
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2518
|
+
"name": "Holds",
|
|
2519
|
+
"kind": "struct",
|
|
2520
|
+
"signature": "pub struct Holds { pub held: BTreeMap<String, Bundle>, }",
|
|
2521
|
+
"docs": "Goods held under references, out of their owner's holdings until settled or released."
|
|
2522
|
+
},
|
|
2523
|
+
{
|
|
2524
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2525
|
+
"name": "Holds::held",
|
|
2526
|
+
"kind": "field",
|
|
2527
|
+
"signature": "pub held: BTreeMap<String, Bundle>",
|
|
2528
|
+
"docs": ""
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2532
|
+
"name": "Holds::hold",
|
|
2533
|
+
"kind": "method",
|
|
2534
|
+
"signature": "pub fn hold(&mut self, holdings: &mut Holdings, reference: &str, bundle: &Bundle) -> Result<()>",
|
|
2535
|
+
"docs": "Moves `bundle` out of `holdings` into a hold under `reference`. The same reference with the same bundle again is the hold already made; with another, `conflict`."
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2539
|
+
"name": "Holds::release",
|
|
2540
|
+
"kind": "method",
|
|
2541
|
+
"signature": "pub fn release(&mut self, holdings: &mut Holdings, catalog: &Catalog, reference: &str) -> Result<Bundle>",
|
|
2542
|
+
"docs": "Gives what the hold still has back to its owner (items that do not fit go to the mail); answers what came back, nothing for a reference not held."
|
|
2543
|
+
},
|
|
2544
|
+
{
|
|
2545
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2546
|
+
"name": "Holds::settle",
|
|
2547
|
+
"kind": "method",
|
|
2548
|
+
"signature": "pub fn settle(&mut self, reference: &str, part: &Bundle) -> Result<()>",
|
|
2549
|
+
"docs": "Takes `part` out of the hold for good; the rest stays held, and an emptied hold is gone. `not_found` for a reference not held, `insufficient` when it holds less."
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
"module": "ckx_sdk::kit::econ::holds",
|
|
2553
|
+
"name": "Holds::total",
|
|
2554
|
+
"kind": "method",
|
|
2555
|
+
"signature": "pub fn total(&self) -> Bundle",
|
|
2556
|
+
"docs": "Everything held, together."
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2560
|
+
"name": "Catalog",
|
|
2561
|
+
"kind": "struct",
|
|
2562
|
+
"signature": "pub struct Catalog { items: BTreeMap<String, ItemDef>, }",
|
|
2563
|
+
"docs": "The game's items, by id."
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2567
|
+
"name": "Catalog::from",
|
|
2568
|
+
"kind": "method",
|
|
2569
|
+
"signature": "fn from(items: Vec<ItemDef>) -> Self",
|
|
2570
|
+
"docs": ""
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2574
|
+
"name": "Catalog::get",
|
|
2575
|
+
"kind": "method",
|
|
2576
|
+
"signature": "pub fn get(&self, id: &str) -> Option<&ItemDef>",
|
|
2577
|
+
"docs": ""
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2581
|
+
"name": "Catalog::is_empty",
|
|
2582
|
+
"kind": "method",
|
|
2583
|
+
"signature": "pub fn is_empty(&self) -> bool",
|
|
2584
|
+
"docs": ""
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2588
|
+
"name": "Catalog::item",
|
|
2589
|
+
"kind": "method",
|
|
2590
|
+
"signature": "pub fn item(&self, id: &str) -> Result<&ItemDef>",
|
|
2591
|
+
"docs": "The item, or `not_found`."
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2595
|
+
"name": "Catalog::iter",
|
|
2596
|
+
"kind": "method",
|
|
2597
|
+
"signature": "pub fn iter(&self) -> impl Iterator<Item = &ItemDef>",
|
|
2598
|
+
"docs": ""
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2602
|
+
"name": "Catalog::len",
|
|
2603
|
+
"kind": "method",
|
|
2604
|
+
"signature": "pub fn len(&self) -> usize",
|
|
2605
|
+
"docs": ""
|
|
2606
|
+
},
|
|
2607
|
+
{
|
|
2608
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2609
|
+
"name": "Inventory",
|
|
2610
|
+
"kind": "struct",
|
|
2611
|
+
"signature": "pub struct Inventory { pub slots: u32, pub stacks: Vec<Stack>, }",
|
|
2612
|
+
"docs": "Stacks of items in a number of slots. Adding fills the item's stacks before starting new ones; a stack holds at most its item's `max_stack`."
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2616
|
+
"name": "Inventory::add",
|
|
2617
|
+
"kind": "method",
|
|
2618
|
+
"signature": "pub fn add(&mut self, catalog: &Catalog, item: &str, count: u64) -> Result<()>",
|
|
2619
|
+
"docs": "Adds `count` of `item`, or nothing: `not_found` for an item the catalog lacks, `full` when they do not fit."
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2623
|
+
"name": "Inventory::add_what_fits",
|
|
2624
|
+
"kind": "method",
|
|
2625
|
+
"signature": "pub fn add_what_fits(&mut self, catalog: &Catalog, item: &str, count: u64) -> u64",
|
|
2626
|
+
"docs": "Adds what fits; answers how many did not."
|
|
2627
|
+
},
|
|
2628
|
+
{
|
|
2629
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2630
|
+
"name": "Inventory::count",
|
|
2631
|
+
"kind": "method",
|
|
2632
|
+
"signature": "pub fn count(&self, item: &str) -> u64",
|
|
2633
|
+
"docs": ""
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2637
|
+
"name": "Inventory::new",
|
|
2638
|
+
"kind": "method",
|
|
2639
|
+
"signature": "pub fn new(slots: u32) -> Self",
|
|
2640
|
+
"docs": ""
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2644
|
+
"name": "Inventory::remove",
|
|
2645
|
+
"kind": "method",
|
|
2646
|
+
"signature": "pub fn remove(&mut self, item: &str, count: u64) -> Result<()>",
|
|
2647
|
+
"docs": "Removes `count` of `item`, from its last stacks first, or nothing: `insufficient`."
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2651
|
+
"name": "Inventory::room",
|
|
2652
|
+
"kind": "method",
|
|
2653
|
+
"signature": "pub fn room(&self, catalog: &Catalog, item: &str) -> u64",
|
|
2654
|
+
"docs": "How many of `item` still fit."
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2658
|
+
"name": "Inventory::slots",
|
|
2659
|
+
"kind": "field",
|
|
2660
|
+
"signature": "pub slots: u32",
|
|
2661
|
+
"docs": ""
|
|
2662
|
+
},
|
|
2663
|
+
{
|
|
2664
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2665
|
+
"name": "Inventory::stacks",
|
|
2666
|
+
"kind": "field",
|
|
2667
|
+
"signature": "pub stacks: Vec<Stack>",
|
|
2668
|
+
"docs": ""
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2672
|
+
"name": "Inventory::totals",
|
|
2673
|
+
"kind": "method",
|
|
2674
|
+
"signature": "pub fn totals(&self) -> BTreeMap<String, u64>",
|
|
2675
|
+
"docs": "Every item's total, by id."
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2679
|
+
"name": "ItemDef",
|
|
2680
|
+
"kind": "struct",
|
|
2681
|
+
"signature": "pub struct ItemDef { pub id: String, /// What one slot holds; 1 for an item that does not stack. #[serde(default = \"one\")] pub max_stack: u64, /// Whether it may change hands (a market's order book, a trade). #[serde(default = \"yes\")] pub tradable: bool, #[serde(default)] pub name: String, }",
|
|
2682
|
+
"docs": "One kind of item."
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2686
|
+
"name": "ItemDef::id",
|
|
2687
|
+
"kind": "field",
|
|
2688
|
+
"signature": "pub id: String",
|
|
2689
|
+
"docs": ""
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2693
|
+
"name": "ItemDef::max_stack",
|
|
2694
|
+
"kind": "field",
|
|
2695
|
+
"signature": "pub max_stack: u64",
|
|
2696
|
+
"docs": "What one slot holds; 1 for an item that does not stack."
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2700
|
+
"name": "ItemDef::name",
|
|
2701
|
+
"kind": "field",
|
|
2702
|
+
"signature": "pub name: String",
|
|
2703
|
+
"docs": ""
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2707
|
+
"name": "ItemDef::tradable",
|
|
2708
|
+
"kind": "field",
|
|
2709
|
+
"signature": "pub tradable: bool",
|
|
2710
|
+
"docs": "Whether it may change hands (a market's order book, a trade)."
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2714
|
+
"name": "Stack",
|
|
2715
|
+
"kind": "struct",
|
|
2716
|
+
"signature": "pub struct Stack { pub item: String, pub count: u64, }",
|
|
2717
|
+
"docs": ""
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2721
|
+
"name": "Stack::count",
|
|
2722
|
+
"kind": "field",
|
|
2723
|
+
"signature": "pub count: u64",
|
|
2724
|
+
"docs": ""
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2728
|
+
"name": "Stack::item",
|
|
2729
|
+
"kind": "field",
|
|
2730
|
+
"signature": "pub item: String",
|
|
2731
|
+
"docs": ""
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"module": "ckx_sdk::kit::econ::items",
|
|
2735
|
+
"name": "Vec::from",
|
|
2736
|
+
"kind": "method",
|
|
2737
|
+
"signature": "fn from(c: Catalog) -> Self",
|
|
2738
|
+
"docs": ""
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2742
|
+
"name": "LootBook",
|
|
2743
|
+
"kind": "struct",
|
|
2744
|
+
"signature": "pub struct LootBook { pub rolls: u64, pub pity: BTreeMap<String, u32>, /// The last rolls: `(roll number, item)`. pub recent: Vec<(u64, String)>, }",
|
|
2745
|
+
"docs": "What a player's rolls on one table have been."
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2749
|
+
"name": "LootBook::pity",
|
|
2750
|
+
"kind": "field",
|
|
2751
|
+
"signature": "pub pity: BTreeMap<String, u32>",
|
|
2752
|
+
"docs": ""
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2756
|
+
"name": "LootBook::recent",
|
|
2757
|
+
"kind": "field",
|
|
2758
|
+
"signature": "pub recent: Vec<(u64, String)>",
|
|
2759
|
+
"docs": "The last rolls: `(roll number, item)`."
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2763
|
+
"name": "LootBook::rolls",
|
|
2764
|
+
"kind": "field",
|
|
2765
|
+
"signature": "pub rolls: u64",
|
|
2766
|
+
"docs": ""
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2770
|
+
"name": "LootEntry",
|
|
2771
|
+
"kind": "struct",
|
|
2772
|
+
"signature": "pub struct LootEntry { pub item: String, #[serde(default = \"one\")] pub count: u64, pub weight: u64, /// Entries in one pity group tick its counter together. #[serde(default)] pub pity_group: Option<String>, }",
|
|
2773
|
+
"docs": ""
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2777
|
+
"name": "LootEntry::count",
|
|
2778
|
+
"kind": "field",
|
|
2779
|
+
"signature": "pub count: u64",
|
|
2780
|
+
"docs": ""
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2784
|
+
"name": "LootEntry::item",
|
|
2785
|
+
"kind": "field",
|
|
2786
|
+
"signature": "pub item: String",
|
|
2787
|
+
"docs": ""
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2791
|
+
"name": "LootEntry::pity_group",
|
|
2792
|
+
"kind": "field",
|
|
2793
|
+
"signature": "pub pity_group: Option<String>",
|
|
2794
|
+
"docs": "Entries in one pity group tick its counter together."
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2798
|
+
"name": "LootEntry::weight",
|
|
2799
|
+
"kind": "field",
|
|
2800
|
+
"signature": "pub weight: u64",
|
|
2801
|
+
"docs": ""
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2805
|
+
"name": "LootRoll",
|
|
2806
|
+
"kind": "struct",
|
|
2807
|
+
"signature": "pub struct LootRoll { pub item: String, pub count: u64, /// Pity picked it. pub pity: bool, pub roll: u64, }",
|
|
2808
|
+
"docs": ""
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2812
|
+
"name": "LootRoll::count",
|
|
2813
|
+
"kind": "field",
|
|
2814
|
+
"signature": "pub count: u64",
|
|
2815
|
+
"docs": ""
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2819
|
+
"name": "LootRoll::item",
|
|
2820
|
+
"kind": "field",
|
|
2821
|
+
"signature": "pub item: String",
|
|
2822
|
+
"docs": ""
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2826
|
+
"name": "LootRoll::pity",
|
|
2827
|
+
"kind": "field",
|
|
2828
|
+
"signature": "pub pity: bool",
|
|
2829
|
+
"docs": "Pity picked it."
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2833
|
+
"name": "LootRoll::roll",
|
|
2834
|
+
"kind": "field",
|
|
2835
|
+
"signature": "pub roll: u64",
|
|
2836
|
+
"docs": ""
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2840
|
+
"name": "LootTable",
|
|
2841
|
+
"kind": "struct",
|
|
2842
|
+
"signature": "pub struct LootTable { pub entries: Vec<LootEntry>, /// A pity group, and the rolls within which it is guaranteed. pub pity_within: BTreeMap<String, u32>, }",
|
|
2843
|
+
"docs": ""
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2847
|
+
"name": "LootTable::entries",
|
|
2848
|
+
"kind": "field",
|
|
2849
|
+
"signature": "pub entries: Vec<LootEntry>",
|
|
2850
|
+
"docs": ""
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2854
|
+
"name": "LootTable::pity_within",
|
|
2855
|
+
"kind": "field",
|
|
2856
|
+
"signature": "pub pity_within: BTreeMap<String, u32>",
|
|
2857
|
+
"docs": "A pity group, and the rolls within which it is guaranteed."
|
|
2858
|
+
},
|
|
2859
|
+
{
|
|
2860
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2861
|
+
"name": "RECENT_KEEP",
|
|
2862
|
+
"kind": "const",
|
|
2863
|
+
"signature": "pub const RECENT_KEEP: usize = 32;",
|
|
2864
|
+
"docs": "How many of a book's rolls it keeps."
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"module": "ckx_sdk::kit::econ::loot",
|
|
2868
|
+
"name": "roll",
|
|
2869
|
+
"kind": "function",
|
|
2870
|
+
"signature": "pub fn roll(table: &LootTable, book: &mut LootBook, rng: &mut Rng) -> Option<LootRoll>",
|
|
2871
|
+
"docs": "Rolls once; `None` for a table with no weight. A due pity group picks its rarest entry."
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2875
|
+
"name": "Fill",
|
|
2876
|
+
"kind": "struct",
|
|
2877
|
+
"signature": "pub struct Fill { pub buyer: u64, pub seller: u64, pub buy_order: u64, pub sell_order: u64, pub price: i64, pub count: u64, }",
|
|
2878
|
+
"docs": ""
|
|
2879
|
+
},
|
|
2880
|
+
{
|
|
2881
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2882
|
+
"name": "Fill::buy_order",
|
|
2883
|
+
"kind": "field",
|
|
2884
|
+
"signature": "pub buy_order: u64",
|
|
2885
|
+
"docs": ""
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2889
|
+
"name": "Fill::buyer",
|
|
2890
|
+
"kind": "field",
|
|
2891
|
+
"signature": "pub buyer: u64",
|
|
2892
|
+
"docs": ""
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2896
|
+
"name": "Fill::count",
|
|
2897
|
+
"kind": "field",
|
|
2898
|
+
"signature": "pub count: u64",
|
|
2899
|
+
"docs": ""
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2903
|
+
"name": "Fill::price",
|
|
2904
|
+
"kind": "field",
|
|
2905
|
+
"signature": "pub price: i64",
|
|
2906
|
+
"docs": ""
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2910
|
+
"name": "Fill::sell_order",
|
|
2911
|
+
"kind": "field",
|
|
2912
|
+
"signature": "pub sell_order: u64",
|
|
2913
|
+
"docs": ""
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2917
|
+
"name": "Fill::seller",
|
|
2918
|
+
"kind": "field",
|
|
2919
|
+
"signature": "pub seller: u64",
|
|
2920
|
+
"docs": ""
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2924
|
+
"name": "Order",
|
|
2925
|
+
"kind": "struct",
|
|
2926
|
+
"signature": "pub struct Order { pub id: u64, pub player: u64, pub side: Side, /// The limit, per unit. pub price: i64, /// What is still open. pub count: u64, pub at: u64, }",
|
|
2927
|
+
"docs": ""
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2931
|
+
"name": "Order::at",
|
|
2932
|
+
"kind": "field",
|
|
2933
|
+
"signature": "pub at: u64",
|
|
2934
|
+
"docs": ""
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2938
|
+
"name": "Order::count",
|
|
2939
|
+
"kind": "field",
|
|
2940
|
+
"signature": "pub count: u64",
|
|
2941
|
+
"docs": "What is still open."
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2945
|
+
"name": "Order::id",
|
|
2946
|
+
"kind": "field",
|
|
2947
|
+
"signature": "pub id: u64",
|
|
2948
|
+
"docs": ""
|
|
2949
|
+
},
|
|
2950
|
+
{
|
|
2951
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2952
|
+
"name": "Order::player",
|
|
2953
|
+
"kind": "field",
|
|
2954
|
+
"signature": "pub player: u64",
|
|
2955
|
+
"docs": ""
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2959
|
+
"name": "Order::price",
|
|
2960
|
+
"kind": "field",
|
|
2961
|
+
"signature": "pub price: i64",
|
|
2962
|
+
"docs": "The limit, per unit."
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2966
|
+
"name": "Order::side",
|
|
2967
|
+
"kind": "field",
|
|
2968
|
+
"signature": "pub side: Side",
|
|
2969
|
+
"docs": ""
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2973
|
+
"name": "OrderBook",
|
|
2974
|
+
"kind": "struct",
|
|
2975
|
+
"signature": "pub struct OrderBook { pub bids: Vec<Order>, pub asks: Vec<Order>, }",
|
|
2976
|
+
"docs": "Bids best (highest) first, asks best (lowest) first, earlier first at a price."
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2980
|
+
"name": "OrderBook::asks",
|
|
2981
|
+
"kind": "field",
|
|
2982
|
+
"signature": "pub asks: Vec<Order>",
|
|
2983
|
+
"docs": ""
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2987
|
+
"name": "OrderBook::bids",
|
|
2988
|
+
"kind": "field",
|
|
2989
|
+
"signature": "pub bids: Vec<Order>",
|
|
2990
|
+
"docs": ""
|
|
2991
|
+
},
|
|
2992
|
+
{
|
|
2993
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
2994
|
+
"name": "OrderBook::cancel",
|
|
2995
|
+
"kind": "method",
|
|
2996
|
+
"signature": "pub fn cancel(&mut self, id: u64, player: u64) -> Option<Order>",
|
|
2997
|
+
"docs": "Takes `player`'s order `id` off the book."
|
|
2998
|
+
},
|
|
2999
|
+
{
|
|
3000
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3001
|
+
"name": "OrderBook::depth",
|
|
3002
|
+
"kind": "method",
|
|
3003
|
+
"signature": "pub fn depth(&self, side: Side, levels: usize) -> Vec<(i64, u64)>",
|
|
3004
|
+
"docs": "`(price, count)` a level, best first."
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3008
|
+
"name": "OrderBook::of",
|
|
3009
|
+
"kind": "method",
|
|
3010
|
+
"signature": "pub fn of(&self, player: u64) -> Vec<Order>",
|
|
3011
|
+
"docs": ""
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3015
|
+
"name": "OrderBook::order",
|
|
3016
|
+
"kind": "method",
|
|
3017
|
+
"signature": "pub fn order(&self, id: u64) -> Option<&Order>",
|
|
3018
|
+
"docs": ""
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3022
|
+
"name": "OrderBook::place",
|
|
3023
|
+
"kind": "method",
|
|
3024
|
+
"signature": "pub fn place(&mut self, id: u64, player: u64, side: Side, price: i64, count: u64, now: u64) -> Result<Vec<Fill>>",
|
|
3025
|
+
"docs": "Places order `id` and matches it at once; whatever is left rests on the book."
|
|
3026
|
+
},
|
|
3027
|
+
{
|
|
3028
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3029
|
+
"name": "Side",
|
|
3030
|
+
"kind": "enum",
|
|
3031
|
+
"signature": "pub enum Side { Buy, Sell, }",
|
|
3032
|
+
"docs": ""
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3036
|
+
"name": "Side::Buy",
|
|
3037
|
+
"kind": "variant",
|
|
3038
|
+
"signature": "Buy",
|
|
3039
|
+
"docs": ""
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"module": "ckx_sdk::kit::econ::orderbook",
|
|
3043
|
+
"name": "Side::Sell",
|
|
3044
|
+
"kind": "variant",
|
|
3045
|
+
"signature": "Sell",
|
|
3046
|
+
"docs": ""
|
|
3047
|
+
},
|
|
3048
|
+
{
|
|
3049
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3050
|
+
"name": "Chain",
|
|
3051
|
+
"kind": "struct",
|
|
3052
|
+
"signature": "pub struct Chain { pub producers: Vec<Producer>, pub stock: BTreeMap<String, u64>, pub capacity: BTreeMap<String, u64>, /// When it last caught up; 0 before it starts. pub at: u64, }",
|
|
3053
|
+
"docs": "Producers in order (an upstream producer before the ones it feeds), their stock, and how much of each resource the stock holds at most."
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3057
|
+
"name": "Chain::advance",
|
|
3058
|
+
"kind": "method",
|
|
3059
|
+
"signature": "pub fn advance(&mut self, now: u64) -> BTreeMap<String, u64>",
|
|
3060
|
+
"docs": "Catches up to `now`; answers what was made. A producer short of inputs or out of storage runs as many whole cycles as it can and loses the rest of the time."
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3064
|
+
"name": "Chain::at",
|
|
3065
|
+
"kind": "field",
|
|
3066
|
+
"signature": "pub at: u64",
|
|
3067
|
+
"docs": "When it last caught up; 0 before it starts."
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3071
|
+
"name": "Chain::capacity",
|
|
3072
|
+
"kind": "field",
|
|
3073
|
+
"signature": "pub capacity: BTreeMap<String, u64>",
|
|
3074
|
+
"docs": ""
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3078
|
+
"name": "Chain::producers",
|
|
3079
|
+
"kind": "field",
|
|
3080
|
+
"signature": "pub producers: Vec<Producer>",
|
|
3081
|
+
"docs": ""
|
|
3082
|
+
},
|
|
3083
|
+
{
|
|
3084
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3085
|
+
"name": "Chain::start",
|
|
3086
|
+
"kind": "method",
|
|
3087
|
+
"signature": "pub fn start(&mut self, now: u64)",
|
|
3088
|
+
"docs": "Starts the clock."
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3092
|
+
"name": "Chain::stock",
|
|
3093
|
+
"kind": "field",
|
|
3094
|
+
"signature": "pub stock: BTreeMap<String, u64>",
|
|
3095
|
+
"docs": ""
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3099
|
+
"name": "Chain::take",
|
|
3100
|
+
"kind": "method",
|
|
3101
|
+
"signature": "pub fn take(&mut self, resource: &str, count: u64) -> u64",
|
|
3102
|
+
"docs": "Takes up to `count` of `resource` out of the stock; answers how many."
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3106
|
+
"name": "Producer",
|
|
3107
|
+
"kind": "struct",
|
|
3108
|
+
"signature": "pub struct Producer { pub id: String, /// What a cycle takes from the chain's stock. pub inputs: BTreeMap<String, u64>, /// What a cycle adds to it. pub outputs: BTreeMap<String, u64>, pub per_minute: f64, /// A cycle begun and not finished, from 0 to 1. pub progress: f64, }",
|
|
3109
|
+
"docs": ""
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3113
|
+
"name": "Producer::id",
|
|
3114
|
+
"kind": "field",
|
|
3115
|
+
"signature": "pub id: String",
|
|
3116
|
+
"docs": ""
|
|
3117
|
+
},
|
|
3118
|
+
{
|
|
3119
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3120
|
+
"name": "Producer::inputs",
|
|
3121
|
+
"kind": "field",
|
|
3122
|
+
"signature": "pub inputs: BTreeMap<String, u64>",
|
|
3123
|
+
"docs": "What a cycle takes from the chain's stock."
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3127
|
+
"name": "Producer::outputs",
|
|
3128
|
+
"kind": "field",
|
|
3129
|
+
"signature": "pub outputs: BTreeMap<String, u64>",
|
|
3130
|
+
"docs": "What a cycle adds to it."
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3134
|
+
"name": "Producer::per_minute",
|
|
3135
|
+
"kind": "field",
|
|
3136
|
+
"signature": "pub per_minute: f64",
|
|
3137
|
+
"docs": ""
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"module": "ckx_sdk::kit::econ::production",
|
|
3141
|
+
"name": "Producer::progress",
|
|
3142
|
+
"kind": "field",
|
|
3143
|
+
"signature": "pub progress: f64",
|
|
3144
|
+
"docs": "A cycle begun and not finished, from 0 to 1."
|
|
3145
|
+
},
|
|
3146
|
+
{
|
|
3147
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3148
|
+
"name": "AchievementDef",
|
|
3149
|
+
"kind": "struct",
|
|
3150
|
+
"signature": "pub struct AchievementDef { pub id: String, pub counter: String, pub target: u64, #[serde(default)] pub reward: Bundle, #[serde(default)] pub xp: u64, /// Not shown until unlocked. #[serde(default)] pub hidden: bool, }",
|
|
3151
|
+
"docs": ""
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3155
|
+
"name": "AchievementDef::counter",
|
|
3156
|
+
"kind": "field",
|
|
3157
|
+
"signature": "pub counter: String",
|
|
3158
|
+
"docs": ""
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3162
|
+
"name": "AchievementDef::hidden",
|
|
3163
|
+
"kind": "field",
|
|
3164
|
+
"signature": "pub hidden: bool",
|
|
3165
|
+
"docs": "Not shown until unlocked."
|
|
3166
|
+
},
|
|
3167
|
+
{
|
|
3168
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3169
|
+
"name": "AchievementDef::id",
|
|
3170
|
+
"kind": "field",
|
|
3171
|
+
"signature": "pub id: String",
|
|
3172
|
+
"docs": ""
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3176
|
+
"name": "AchievementDef::reward",
|
|
3177
|
+
"kind": "field",
|
|
3178
|
+
"signature": "pub reward: Bundle",
|
|
3179
|
+
"docs": ""
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3183
|
+
"name": "AchievementDef::target",
|
|
3184
|
+
"kind": "field",
|
|
3185
|
+
"signature": "pub target: u64",
|
|
3186
|
+
"docs": ""
|
|
3187
|
+
},
|
|
3188
|
+
{
|
|
3189
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3190
|
+
"name": "AchievementDef::xp",
|
|
3191
|
+
"kind": "field",
|
|
3192
|
+
"signature": "pub xp: u64",
|
|
3193
|
+
"docs": ""
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3197
|
+
"name": "Levels",
|
|
3198
|
+
"kind": "struct",
|
|
3199
|
+
"signature": "pub struct Levels { pub base: u64, pub growth: f64, pub max: u32, }",
|
|
3200
|
+
"docs": "Experience to go from level `n` to `n + 1` is `base * growth^(n - 1)`, up to `max`."
|
|
3201
|
+
},
|
|
3202
|
+
{
|
|
3203
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3204
|
+
"name": "Levels::base",
|
|
3205
|
+
"kind": "field",
|
|
3206
|
+
"signature": "pub base: u64",
|
|
3207
|
+
"docs": ""
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3211
|
+
"name": "Levels::default",
|
|
3212
|
+
"kind": "method",
|
|
3213
|
+
"signature": "fn default() -> Self",
|
|
3214
|
+
"docs": ""
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3218
|
+
"name": "Levels::growth",
|
|
3219
|
+
"kind": "field",
|
|
3220
|
+
"signature": "pub growth: f64",
|
|
3221
|
+
"docs": ""
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3225
|
+
"name": "Levels::max",
|
|
3226
|
+
"kind": "field",
|
|
3227
|
+
"signature": "pub max: u32",
|
|
3228
|
+
"docs": ""
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3232
|
+
"name": "Levels::to_next",
|
|
3233
|
+
"kind": "method",
|
|
3234
|
+
"signature": "pub fn to_next(&self, level: u32) -> Option<u64>",
|
|
3235
|
+
"docs": "What level `level` takes to finish; `None` at the top."
|
|
3236
|
+
},
|
|
3237
|
+
{
|
|
3238
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3239
|
+
"name": "Objective",
|
|
3240
|
+
"kind": "struct",
|
|
3241
|
+
"signature": "pub struct Objective { pub counter: String, pub target: u64, }",
|
|
3242
|
+
"docs": ""
|
|
3243
|
+
},
|
|
3244
|
+
{
|
|
3245
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3246
|
+
"name": "Objective::counter",
|
|
3247
|
+
"kind": "field",
|
|
3248
|
+
"signature": "pub counter: String",
|
|
3249
|
+
"docs": ""
|
|
3250
|
+
},
|
|
3251
|
+
{
|
|
3252
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3253
|
+
"name": "Objective::target",
|
|
3254
|
+
"kind": "field",
|
|
3255
|
+
"signature": "pub target: u64",
|
|
3256
|
+
"docs": ""
|
|
3257
|
+
},
|
|
3258
|
+
{
|
|
3259
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3260
|
+
"name": "Progress",
|
|
3261
|
+
"kind": "struct",
|
|
3262
|
+
"signature": "pub struct Progress { pub level: u32, /// Toward the next level. pub xp: u64, pub total_xp: u64, }",
|
|
3263
|
+
"docs": ""
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3267
|
+
"name": "Progress::default",
|
|
3268
|
+
"kind": "method",
|
|
3269
|
+
"signature": "fn default() -> Self",
|
|
3270
|
+
"docs": ""
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3274
|
+
"name": "Progress::gain",
|
|
3275
|
+
"kind": "method",
|
|
3276
|
+
"signature": "pub fn gain(&mut self, levels: &Levels, xp: u64) -> u32",
|
|
3277
|
+
"docs": "Adds experience; answers how many levels it gained."
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3281
|
+
"name": "Progress::level",
|
|
3282
|
+
"kind": "field",
|
|
3283
|
+
"signature": "pub level: u32",
|
|
3284
|
+
"docs": ""
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3288
|
+
"name": "Progress::total_xp",
|
|
3289
|
+
"kind": "field",
|
|
3290
|
+
"signature": "pub total_xp: u64",
|
|
3291
|
+
"docs": ""
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3295
|
+
"name": "Progress::xp",
|
|
3296
|
+
"kind": "field",
|
|
3297
|
+
"signature": "pub xp: u64",
|
|
3298
|
+
"docs": "Toward the next level."
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3302
|
+
"name": "QuestDef",
|
|
3303
|
+
"kind": "struct",
|
|
3304
|
+
"signature": "pub struct QuestDef { pub id: String, pub objectives: Vec<Objective>, #[serde(default)] pub reward: Bundle, #[serde(default)] pub xp: u64, /// Quests done first. #[serde(default)] pub requires: Vec<String>, #[serde(default)] pub level: u32, /// A first-session tutorial: taken on as the player starts. #[serde(default)] pub tutorial: bool, }",
|
|
3305
|
+
"docs": ""
|
|
3306
|
+
},
|
|
3307
|
+
{
|
|
3308
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3309
|
+
"name": "QuestDef::id",
|
|
3310
|
+
"kind": "field",
|
|
3311
|
+
"signature": "pub id: String",
|
|
3312
|
+
"docs": ""
|
|
3313
|
+
},
|
|
3314
|
+
{
|
|
3315
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3316
|
+
"name": "QuestDef::level",
|
|
3317
|
+
"kind": "field",
|
|
3318
|
+
"signature": "pub level: u32",
|
|
3319
|
+
"docs": ""
|
|
3320
|
+
},
|
|
3321
|
+
{
|
|
3322
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3323
|
+
"name": "QuestDef::objectives",
|
|
3324
|
+
"kind": "field",
|
|
3325
|
+
"signature": "pub objectives: Vec<Objective>",
|
|
3326
|
+
"docs": ""
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3330
|
+
"name": "QuestDef::requires",
|
|
3331
|
+
"kind": "field",
|
|
3332
|
+
"signature": "pub requires: Vec<String>",
|
|
3333
|
+
"docs": "Quests done first."
|
|
3334
|
+
},
|
|
3335
|
+
{
|
|
3336
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3337
|
+
"name": "QuestDef::reward",
|
|
3338
|
+
"kind": "field",
|
|
3339
|
+
"signature": "pub reward: Bundle",
|
|
3340
|
+
"docs": ""
|
|
3341
|
+
},
|
|
3342
|
+
{
|
|
3343
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3344
|
+
"name": "QuestDef::tutorial",
|
|
3345
|
+
"kind": "field",
|
|
3346
|
+
"signature": "pub tutorial: bool",
|
|
3347
|
+
"docs": "A first-session tutorial: taken on as the player starts."
|
|
3348
|
+
},
|
|
3349
|
+
{
|
|
3350
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3351
|
+
"name": "QuestDef::xp",
|
|
3352
|
+
"kind": "field",
|
|
3353
|
+
"signature": "pub xp: u64",
|
|
3354
|
+
"docs": ""
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3358
|
+
"name": "Record",
|
|
3359
|
+
"kind": "struct",
|
|
3360
|
+
"signature": "pub struct Record { pub counters: BTreeMap<String, u64>, /// Achievement to when it unlocked. pub unlocked: BTreeMap<String, u64>, /// Quest taken on, to each objective's count since. pub active: BTreeMap<String, Vec<u64>>, /// Done, waiting for its reward to be claimed. pub complete: BTreeSet<String>, /// Claimed, to when. pub done: BTreeMap<String, u64>, }",
|
|
3361
|
+
"docs": "What a player did and what it earned them."
|
|
3362
|
+
},
|
|
3363
|
+
{
|
|
3364
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3365
|
+
"name": "Record::accept",
|
|
3366
|
+
"kind": "method",
|
|
3367
|
+
"signature": "pub fn accept(&mut self, q: &QuestDef, level: u32) -> Result<()>",
|
|
3368
|
+
"docs": "Takes on quest `q`: `conflict` when it is taken, done or waits for another, `forbidden` below its level."
|
|
3369
|
+
},
|
|
3370
|
+
{
|
|
3371
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3372
|
+
"name": "Record::active",
|
|
3373
|
+
"kind": "field",
|
|
3374
|
+
"signature": "pub active: BTreeMap<String, Vec<u64>>",
|
|
3375
|
+
"docs": "Quest taken on, to each objective's count since."
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3379
|
+
"name": "Record::claim",
|
|
3380
|
+
"kind": "method",
|
|
3381
|
+
"signature": "pub fn claim(&mut self, id: &str, now: u64) -> Result<()>",
|
|
3382
|
+
"docs": "Claims quest `id`'s reward: `not_ready` until it is complete."
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3386
|
+
"name": "Record::complete",
|
|
3387
|
+
"kind": "field",
|
|
3388
|
+
"signature": "pub complete: BTreeSet<String>",
|
|
3389
|
+
"docs": "Done, waiting for its reward to be claimed."
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3393
|
+
"name": "Record::count",
|
|
3394
|
+
"kind": "method",
|
|
3395
|
+
"signature": "pub fn count(&mut self, achievements: &[AchievementDef], quests: &[QuestDef], counter: &str, n: u64, now: u64) -> Unlocks",
|
|
3396
|
+
"docs": "Counts `n` of `counter`: the achievements it unlocks and the quests it completes."
|
|
3397
|
+
},
|
|
3398
|
+
{
|
|
3399
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3400
|
+
"name": "Record::counters",
|
|
3401
|
+
"kind": "field",
|
|
3402
|
+
"signature": "pub counters: BTreeMap<String, u64>",
|
|
3403
|
+
"docs": ""
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3407
|
+
"name": "Record::done",
|
|
3408
|
+
"kind": "field",
|
|
3409
|
+
"signature": "pub done: BTreeMap<String, u64>",
|
|
3410
|
+
"docs": "Claimed, to when."
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3414
|
+
"name": "Record::unlocked",
|
|
3415
|
+
"kind": "field",
|
|
3416
|
+
"signature": "pub unlocked: BTreeMap<String, u64>",
|
|
3417
|
+
"docs": "Achievement to when it unlocked."
|
|
3418
|
+
},
|
|
3419
|
+
{
|
|
3420
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3421
|
+
"name": "Unlocks",
|
|
3422
|
+
"kind": "struct",
|
|
3423
|
+
"signature": "pub struct Unlocks { pub achievements: Vec<String>, pub quests: Vec<String>, }",
|
|
3424
|
+
"docs": "What one count changed."
|
|
3425
|
+
},
|
|
3426
|
+
{
|
|
3427
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3428
|
+
"name": "Unlocks::achievements",
|
|
3429
|
+
"kind": "field",
|
|
3430
|
+
"signature": "pub achievements: Vec<String>",
|
|
3431
|
+
"docs": ""
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
"module": "ckx_sdk::kit::econ::progression",
|
|
3435
|
+
"name": "Unlocks::quests",
|
|
3436
|
+
"kind": "field",
|
|
3437
|
+
"signature": "pub quests: Vec<String>",
|
|
3438
|
+
"docs": ""
|
|
3439
|
+
},
|
|
3440
|
+
{
|
|
3441
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3442
|
+
"name": "CRAFT_MAX",
|
|
3443
|
+
"kind": "const",
|
|
3444
|
+
"signature": "pub const CRAFT_MAX: u64 = 100;",
|
|
3445
|
+
"docs": "The most crafts one call makes."
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3449
|
+
"name": "Recipe",
|
|
3450
|
+
"kind": "struct",
|
|
3451
|
+
"signature": "pub struct Recipe { pub id: String, pub inputs: Bundle, pub outputs: Bundle, /// The level a player needs; 0 for none. #[serde(default)] pub level: u32, }",
|
|
3452
|
+
"docs": ""
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3456
|
+
"name": "Recipe::id",
|
|
3457
|
+
"kind": "field",
|
|
3458
|
+
"signature": "pub id: String",
|
|
3459
|
+
"docs": ""
|
|
3460
|
+
},
|
|
3461
|
+
{
|
|
3462
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3463
|
+
"name": "Recipe::inputs",
|
|
3464
|
+
"kind": "field",
|
|
3465
|
+
"signature": "pub inputs: Bundle",
|
|
3466
|
+
"docs": ""
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3470
|
+
"name": "Recipe::level",
|
|
3471
|
+
"kind": "field",
|
|
3472
|
+
"signature": "pub level: u32",
|
|
3473
|
+
"docs": "The level a player needs; 0 for none."
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3477
|
+
"name": "Recipe::outputs",
|
|
3478
|
+
"kind": "field",
|
|
3479
|
+
"signature": "pub outputs: Bundle",
|
|
3480
|
+
"docs": ""
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
"module": "ckx_sdk::kit::econ::recipes",
|
|
3484
|
+
"name": "craft",
|
|
3485
|
+
"kind": "function",
|
|
3486
|
+
"signature": "pub fn craft(holdings: &mut Holdings, catalog: &Catalog, recipe: &Recipe, times: u64, level: u32) -> Result<Bundle>",
|
|
3487
|
+
"docs": "Crafts `recipe` `times` times into `holdings`; answers what it made. `insufficient` without the inputs, `full` without room for the outputs (the inputs' room counts, since they go first), `forbidden` below the recipe's level."
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3491
|
+
"name": "Offer",
|
|
3492
|
+
"kind": "struct",
|
|
3493
|
+
"signature": "pub struct Offer { pub item: String, /// What one costs. pub price: Bundle, /// How many a restock puts on the shelf; none for no limit. #[serde(default)] pub stock: Option<u64>, /// How many one player may buy between restocks; none for no limit. #[serde(default)] pub per_player: Option<u64>, /// What the vendor pays for one; none when it does not buy them. #[serde(default)] pub buys_for: Option<Bundle>, }",
|
|
3494
|
+
"docs": ""
|
|
3495
|
+
},
|
|
3496
|
+
{
|
|
3497
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3498
|
+
"name": "Offer::buys_for",
|
|
3499
|
+
"kind": "field",
|
|
3500
|
+
"signature": "pub buys_for: Option<Bundle>",
|
|
3501
|
+
"docs": "What the vendor pays for one; none when it does not buy them."
|
|
3502
|
+
},
|
|
3503
|
+
{
|
|
3504
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3505
|
+
"name": "Offer::item",
|
|
3506
|
+
"kind": "field",
|
|
3507
|
+
"signature": "pub item: String",
|
|
3508
|
+
"docs": ""
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3512
|
+
"name": "Offer::per_player",
|
|
3513
|
+
"kind": "field",
|
|
3514
|
+
"signature": "pub per_player: Option<u64>",
|
|
3515
|
+
"docs": "How many one player may buy between restocks; none for no limit."
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3519
|
+
"name": "Offer::price",
|
|
3520
|
+
"kind": "field",
|
|
3521
|
+
"signature": "pub price: Bundle",
|
|
3522
|
+
"docs": "What one costs."
|
|
3523
|
+
},
|
|
3524
|
+
{
|
|
3525
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3526
|
+
"name": "Offer::stock",
|
|
3527
|
+
"kind": "field",
|
|
3528
|
+
"signature": "pub stock: Option<u64>",
|
|
3529
|
+
"docs": "How many a restock puts on the shelf; none for no limit."
|
|
3530
|
+
},
|
|
3531
|
+
{
|
|
3532
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3533
|
+
"name": "Shelf",
|
|
3534
|
+
"kind": "struct",
|
|
3535
|
+
"signature": "pub struct Shelf { pub stock: BTreeMap<String, u64>, /// `\"<player>:<item>\"` to how many. pub bought: BTreeMap<String, u64>, pub restocked_at: u64, }",
|
|
3536
|
+
"docs": "A vendor's shelf and who bought what since the last restock."
|
|
3537
|
+
},
|
|
3538
|
+
{
|
|
3539
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3540
|
+
"name": "Shelf::bought",
|
|
3541
|
+
"kind": "field",
|
|
3542
|
+
"signature": "pub bought: BTreeMap<String, u64>",
|
|
3543
|
+
"docs": "`\"<player>:<item>\"` to how many."
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3547
|
+
"name": "Shelf::check",
|
|
3548
|
+
"kind": "method",
|
|
3549
|
+
"signature": "pub fn check(&self, offer: &Offer, player: u64, count: u64) -> Result<()>",
|
|
3550
|
+
"docs": "Whether `player` may buy `count` of `offer` now: `insufficient` (stock), `limit`."
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3554
|
+
"name": "Shelf::restock",
|
|
3555
|
+
"kind": "method",
|
|
3556
|
+
"signature": "pub fn restock(&mut self, vendor: &Vendor, now: u64)",
|
|
3557
|
+
"docs": ""
|
|
3558
|
+
},
|
|
3559
|
+
{
|
|
3560
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3561
|
+
"name": "Shelf::restocked_at",
|
|
3562
|
+
"kind": "field",
|
|
3563
|
+
"signature": "pub restocked_at: u64",
|
|
3564
|
+
"docs": ""
|
|
3565
|
+
},
|
|
3566
|
+
{
|
|
3567
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3568
|
+
"name": "Shelf::sold",
|
|
3569
|
+
"kind": "method",
|
|
3570
|
+
"signature": "pub fn sold(&mut self, offer: &Offer, player: u64, count: u64)",
|
|
3571
|
+
"docs": "Records a sale `check` allowed."
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3575
|
+
"name": "Shelf::stock",
|
|
3576
|
+
"kind": "field",
|
|
3577
|
+
"signature": "pub stock: BTreeMap<String, u64>",
|
|
3578
|
+
"docs": ""
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3582
|
+
"name": "Vendor",
|
|
3583
|
+
"kind": "struct",
|
|
3584
|
+
"signature": "pub struct Vendor { pub id: String, pub offers: Vec<Offer>, /// When it restocks (cron), or never. #[serde(default)] pub restock: Option<String>, }",
|
|
3585
|
+
"docs": ""
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3589
|
+
"name": "Vendor::id",
|
|
3590
|
+
"kind": "field",
|
|
3591
|
+
"signature": "pub id: String",
|
|
3592
|
+
"docs": ""
|
|
3593
|
+
},
|
|
3594
|
+
{
|
|
3595
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3596
|
+
"name": "Vendor::offer",
|
|
3597
|
+
"kind": "method",
|
|
3598
|
+
"signature": "pub fn offer(&self, item: &str) -> Result<&Offer>",
|
|
3599
|
+
"docs": ""
|
|
3600
|
+
},
|
|
3601
|
+
{
|
|
3602
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3603
|
+
"name": "Vendor::offers",
|
|
3604
|
+
"kind": "field",
|
|
3605
|
+
"signature": "pub offers: Vec<Offer>",
|
|
3606
|
+
"docs": ""
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
"module": "ckx_sdk::kit::econ::vendor",
|
|
3610
|
+
"name": "Vendor::restock",
|
|
3611
|
+
"kind": "field",
|
|
3612
|
+
"signature": "pub restock: Option<String>",
|
|
3613
|
+
"docs": "When it restocks (cron), or never."
|
|
3614
|
+
},
|
|
3615
|
+
{
|
|
3616
|
+
"module": "ckx_sdk::kit::econ::wallet",
|
|
3617
|
+
"name": "Wallet",
|
|
3618
|
+
"kind": "struct",
|
|
3619
|
+
"signature": "pub struct Wallet { pub balances: BTreeMap<String, i64>, }",
|
|
3620
|
+
"docs": ""
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
"module": "ckx_sdk::kit::econ::wallet",
|
|
3624
|
+
"name": "Wallet::balance",
|
|
3625
|
+
"kind": "method",
|
|
3626
|
+
"signature": "pub fn balance(&self, currency: &str) -> i64",
|
|
3627
|
+
"docs": ""
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
"module": "ckx_sdk::kit::econ::wallet",
|
|
3631
|
+
"name": "Wallet::balances",
|
|
3632
|
+
"kind": "field",
|
|
3633
|
+
"signature": "pub balances: BTreeMap<String, i64>",
|
|
3634
|
+
"docs": ""
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"module": "ckx_sdk::kit::econ::wallet",
|
|
3638
|
+
"name": "Wallet::credit",
|
|
3639
|
+
"kind": "method",
|
|
3640
|
+
"signature": "pub fn credit(&mut self, currency: &str, amount: i64) -> Result<i64>",
|
|
3641
|
+
"docs": "Adds `amount`; answers the balance. `bad_request` for a negative amount, `limit` past the largest balance."
|
|
3642
|
+
},
|
|
3643
|
+
{
|
|
3644
|
+
"module": "ckx_sdk::kit::econ::wallet",
|
|
3645
|
+
"name": "Wallet::debit",
|
|
3646
|
+
"kind": "method",
|
|
3647
|
+
"signature": "pub fn debit(&mut self, currency: &str, amount: i64) -> Result<i64>",
|
|
3648
|
+
"docs": "Takes `amount`; answers the balance. `insufficient` when there is not that much."
|
|
3649
|
+
},
|
|
2180
3650
|
{
|
|
2181
3651
|
"module": "ckx_sdk::kit::play",
|
|
2182
3652
|
"name": "abilities",
|