-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This mini-patch refines already existing things and improves the quality of life overall. Main: - added 2 items; - grammar fixes; - lore expansion; - balancing. Alta: - added 2 more A.I. Chips: - Alta Security A.I. Chip; - Alta S.A.I.L. A.I. Chip. - made alta bodies less curvy - will later release a patch that brings back the original version. Translation: - fixed typos in a number of objects and effects: - `/objects/alta/special/figurines/anglure/ct_nightmare_anglure.object` - `description`; - `/objects/alta/special/paintings/ct_alta_abstract_art.object` (and other paintings) - `longdescription`; - `/objects/alta/special/samples/phospholion/ct_phospholion_sample.object` - `altaDescription`; - `/objects/alta/special/terraformers/biome/alterash/astera/ct_moonrock_space_islands.object` - `longdescription`; - `/objects/alta/special/figurines/sporgus/ct_warped_sporgus.object` - `altaDescription`; - `/objects/alta/special/figurines/other/ct_alta_af.object` - `description`; - `/objects/alta/arknight/pod/ct_arknight_pod.object` - `description`; - `/objects/alta/special/terraformers/biome/alterash_prime/gheatorn/ct_gheatorn.object` - `description`; - `/stats/effects/alta/emotions/passion.statuseffect` - `description`; - `/objects/alta/elite/pod/ct_elite_pod.object` - `altaDescription`; - `/objects/alta/special/terraformers/biome/alterash/enchanted/ct_alterash_enchanted.object` - `longdescription`; - `/objects/alta/scout/drone_spawner/ct_alta_drone_spawner.object` - `longdescription`; - `/objects/biome/alterash_prime/bishyn/decorative/terminal/ct_bishyn_terminal.object` - `altaDescription`. - added altered species descriptions for decorative alta plants; - added a `longdescription` for Alta Energy Source; - added shared descriptions to `/items/buildscripts/ct_texts.config:lore`; - removed shared `longdescription` from most special objects. Other: - added recipes for Alta Shielders and included them as ingredients in other alta equipment; - added an entry to the My Enternia Guide that talks about the Alta Scanner; - made support for More Planet Info more granular, in that it now checks for each parameter before adding values to it; - made Yaara Eyes ferment a little slower (`0.003` -> `0.3`); - made slight adjustments to creature spawn rates and loot; - made Alta Constructor only ask for 16 Stardust instead of 256 to upgrade to tier 5; - fixed Brutefly and Bionfly - they no longer autodefeat when trying to perform an attack; - minor bug fixes.
- Loading branch information
Showing
410 changed files
with
6,285 additions
and
4,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
import base | ||
|
||
|
||
WIKI_URL = 'https://raw.githubusercontent.com/wiki/Ceterai/Enternia/' | ||
FILE_PATH = '/.meta/wiki/tenants.md' | ||
CATEGORIES = { | ||
'alta' : '## Alta', | ||
'casual' : '### Casual', | ||
'misc' : '#### Misc', | ||
'tropical' : '#### Tropical', | ||
'special' : '#### Special', | ||
'official' : '### Official', | ||
'lab' : '### Scientific', | ||
'merchant' : '### Merchants', | ||
'biome_merchant' : '#### Biome Merchants', | ||
'guard' : '### Guards', | ||
'guard_l3' : '#### Level 3', | ||
'guard_l4' : '#### Level 4', | ||
'guard_l5' : '#### Level 5', | ||
'guard_l6' : '#### Level 6', | ||
'guard_l7' : '#### Level 7 and above', | ||
'guard_l0' : '#### Unleveled', | ||
'android' : '#### Androids', | ||
} | ||
|
||
|
||
def is_obj_file(name: str) -> bool: | ||
return (base.get_ext(name) == 'tenant') | ||
|
||
|
||
def get_image(path: str): | ||
return f'![ ]({WIKI_URL}{path})' if path else '' | ||
|
||
|
||
class Tenant: | ||
def __init__(self, obj: dict[str]): | ||
self.raw = obj | ||
|
||
@property | ||
def desc(self): | ||
return self.raw.get('wiki', {}).get('description', '') | ||
|
||
@property | ||
def name(self): | ||
return self.raw.get('wiki', {}).get('title', '') | ||
|
||
@property | ||
def id(self): | ||
return self.raw.get('name', '') | ||
|
||
@property | ||
def npc(self): | ||
return self.raw.get('tenants', [{}])[0].get('type', '') | ||
|
||
@property | ||
def species(self): | ||
return self.raw.get('tenants', [{}])[0].get('species', '') | ||
|
||
@property | ||
def tags(self): | ||
tags = self.raw.get('colonyTagCriteria', {}) | ||
return {tag: tags[tag] for tag in tags if tag not in ('light', 'door',)} | ||
|
||
@property | ||
def tags_str(self): | ||
return ', '.join([f'`{tag}` ({self.tags[tag]})' for tag in self.tags]) | ||
|
||
@property | ||
def category(self): | ||
return self.raw.get('wiki', {}).get('category', '') | ||
|
||
@property | ||
def images(self) -> dict[str]: | ||
return self.raw.get('wiki', {}).get('images', {}) | ||
|
||
@property | ||
def icon(self) -> str: | ||
return get_image(self.images.get('main')) | ||
|
||
@property | ||
def primary_images(self) -> str: | ||
return '\n'.join([get_image(img) for img in self.images.get('primary', [])]) | ||
|
||
@property | ||
def secondary_images(self) -> str: | ||
return '\n'.join([get_image(img) for img in self.images.get('secondary', [])]) | ||
|
||
@property | ||
def old_images(self) -> str: | ||
return ('Old variants:\n\n' + '\n'.join([get_image(img) for img in self.images.get('old', [])])) if self.images.get('old') else '' | ||
|
||
|
||
def get_tenants(): | ||
return [Tenant(obj) for obj in base.get_objects(is_obj_file).values()] | ||
|
||
|
||
def get_tenants_by_cats(): | ||
result = {cat : [] for cat in CATEGORIES} | ||
result[''] = [] | ||
for tenant in get_tenants(): | ||
result[tenant.category].append(tenant) | ||
return result | ||
|
||
|
||
def get_table_head(): | ||
return ''' | ||
<tr valign="middle"><th> | ||
Sprite | ||
</th> <th> | ||
Description </th></tr> | ||
''' | ||
|
||
|
||
def get_table_expand(tenant: Tenant): | ||
return f''' | ||
<details> | ||
<summary>Examples: (Expand)</summary> | ||
{tenant.primary_images} | ||
{tenant.secondary_images} | ||
{tenant.old_images} | ||
</details> | ||
''' if tenant.primary_images or tenant.secondary_images or tenant.old_images else '' | ||
|
||
|
||
def get_table_row(tenant: Tenant): | ||
return f''' | ||
<tr><td valign="middle" align="middle"> | ||
{tenant.icon} | ||
</td><td> | ||
Type: **{tenant.name}** | ||
Tags: {tenant.tags_str} | ||
{tenant.desc} | ||
{get_table_expand(tenant)} | ||
</td></tr> | ||
''' | ||
|
||
|
||
def get_table(tenants: list[Tenant]): | ||
rows = '\n'.join(get_table_row(tenant) for tenant in tenants) | ||
return f''' | ||
<table> <tbody valign="top"> | ||
{get_table_head()} | ||
{rows} | ||
</table> | ||
''' | ||
|
||
|
||
def get_text(): | ||
tenants = get_tenants_by_cats() | ||
body = '' | ||
for cat in CATEGORIES: | ||
body = body + CATEGORIES[cat] + '\n' | ||
if len(tenants[cat]) > 0: | ||
body = body + get_table(tenants[cat]) | ||
body = body + '\n' | ||
return body.replace('\n\n\n\n\n', '\n\n').replace('\n\n\n\n', '\n\n').replace('\n\n\n', '\n\n')[:-1] | ||
|
||
|
||
def run(): | ||
with open(base.ROOT + FILE_PATH, 'w') as guide: | ||
guide.write(get_text()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.