mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Added task system to Thang Editor.
This commit is contained in:
parent
2d410fa57f
commit
dbc42fb7e1
6 changed files with 114 additions and 6 deletions
|
@ -14,6 +14,8 @@ module.exports = class LevelComponent extends CocoModel
|
|||
@PlansID: '524b7b517fc0f6d51900000d'
|
||||
@ProgrammableID: '524b7b5a7fc0f6d51900000e'
|
||||
@MovesID: '524b7b8c7fc0f6d519000013'
|
||||
@MissileID: '524cc2593ea855e0ab000142'
|
||||
@FindsPaths: '52872b0ead92b98561000002'
|
||||
urlRoot: '/db/level.component'
|
||||
|
||||
set: (key, val, options) ->
|
||||
|
|
|
@ -16,7 +16,7 @@ defaultTasks = [
|
|||
'Choose music file in Introduction script.'
|
||||
|
||||
'Add to a campaign.'
|
||||
'Publish for playtesting.'
|
||||
'Publish.'
|
||||
'Choose level options like required/restricted gear.'
|
||||
'Create achievements, including unlocking next level.'
|
||||
|
||||
|
@ -25,17 +25,17 @@ defaultTasks = [
|
|||
'Playtest with a couple random seeds.'
|
||||
'Make sure the level ends promptly on success and failure.'
|
||||
'Remove/simplify unnecessary doodad collision.'
|
||||
'Release to adventurers.'
|
||||
'Release to adventurers via MailChimp.'
|
||||
|
||||
'Write the description.'
|
||||
'Translate the sample code comments.'
|
||||
'Add Io/Clojure/Lua/CoffeeScript.'
|
||||
'Write the guide.'
|
||||
'Write a loading tip, if needed.'
|
||||
'Populate i18n.'
|
||||
'Click the Populate i18n button.'
|
||||
|
||||
'Mark whether it requires a subscription (after adventurer week).'
|
||||
'Release to everyone.'
|
||||
'Release to everyone via MailChimp.'
|
||||
|
||||
'Check completion/engagement/problem analytics.'
|
||||
'Do any custom scripting, if needed.'
|
||||
|
|
|
@ -168,6 +168,8 @@ _.extend ThangTypeSchema.properties,
|
|||
i18n: {type: 'object', format: 'i18n', props: ['name', 'description', 'extendedName', 'unlockLevelName'], description: 'Help translate this ThangType\'s name and description.'}
|
||||
extendedName: {type: 'string', title: 'Extended Hero Name', description: 'The long form of the hero\'s name. Ex.: "Captain Anya Weston".'}
|
||||
unlockLevelName: {type: 'string', title: 'Unlock Level Name', description: 'The name of the level in which the hero is unlocked.'}
|
||||
tasks: c.array {title: 'Tasks', description: 'Tasks to be completed for this ThangType.'}, c.task
|
||||
|
||||
|
||||
ThangTypeSchema.required = []
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ CocoCollection = require 'collections/CocoCollection'
|
|||
|
||||
LC = (componentName, config) -> original: LevelComponent[componentName + 'ID'], majorVersion: 0, config: config
|
||||
DEFAULT_COMPONENTS =
|
||||
Unit: [LC('Equips')]
|
||||
Hero: [LC('Equips')]
|
||||
Unit: [LC('Equips'), LC('FindsPaths')]
|
||||
Hero: [LC('Equips'), LC('FindsPaths')]
|
||||
Floor: [
|
||||
LC('Exists', stateless: true)
|
||||
LC('Physical', width: 20, height: 17, depth: 2, shape: 'sheet', pos: {x: 10, y: 8.5, z: 1})
|
||||
|
@ -35,6 +35,7 @@ DEFAULT_COMPONENTS =
|
|||
Misc: [LC('Exists'), LC('Physical')]
|
||||
Mark: []
|
||||
Item: [LC('Item')]
|
||||
Missile: [LC('Missile')]
|
||||
|
||||
module.exports = class ThangComponentsEditView extends CocoView
|
||||
id: 'thang-components-edit-view'
|
||||
|
|
|
@ -23,6 +23,106 @@ storage = require 'core/storage'
|
|||
|
||||
CENTER = {x: 200, y: 300}
|
||||
|
||||
commonTasks = [
|
||||
'Upload the art.'
|
||||
'Set up the vector icon.'
|
||||
]
|
||||
|
||||
displayedThangTypeTasks = [
|
||||
'Configure the idle action.'
|
||||
'Configure the positions (registration point, etc.).'
|
||||
'Set shadow diameter to 0 if needed.'
|
||||
'Set scale to 0.3, 0.5, or whatever is appropriate.'
|
||||
'Set rotation to isometric if needed.'
|
||||
'Set accurate Physical size, shape, and default z.'
|
||||
'Set accurate Collides collision information if needed.'
|
||||
'Double-check that fixedRotation is accurate, if it collides.'
|
||||
]
|
||||
|
||||
animatedThangTypeTasks = displayedThangTypeTasks.concat [
|
||||
'Configure the non-idle actions.'
|
||||
'Configure any per-action registration points needed.'
|
||||
'Add flipX per action if needed to face to the right.'
|
||||
'Make sure any death and attack actions do not loop.'
|
||||
'Add defaultSimlish if needed.'
|
||||
'Add selection sounds if needed.'
|
||||
'Add per-action sound triggers.'
|
||||
'Add team color groups.'
|
||||
]
|
||||
|
||||
containerTasks = displayedThangTypeTasks.concat [
|
||||
'Select viable terrains if not universal.'
|
||||
'Set Exists stateless: true if needed.'
|
||||
]
|
||||
|
||||
purchasableTasks = [
|
||||
'Add a tier, or 10 + desired tier if not ready yet.'
|
||||
'Add a gem cost.'
|
||||
'Write a description.'
|
||||
'Click the Populate i18n button.'
|
||||
]
|
||||
|
||||
defaultTasks =
|
||||
Unit: commonTasks.concat animatedThangTypeTasks.concat [
|
||||
'Start a new name category in names.coffee if needed.'
|
||||
'Set to Allied to correct team (ogres, humans, or neutral).'
|
||||
'Add AutoTargetsNearest or FightsBack if needed.'
|
||||
'Add other Components like Shoots or Casts if needed.'
|
||||
'Configure other Components, like Moves, Attackable, Attacks, etc.'
|
||||
'Override the HasAPI type if it will not be correctly inferred.'
|
||||
]
|
||||
Hero: commonTasks.concat animatedThangTypeTasks.concat purchasableTasks.concat [
|
||||
'Set the hero class.'
|
||||
'Add Extended Hero Name.'
|
||||
'Upload Hero Doll Images.'
|
||||
'Start a new name category in names.coffee.'
|
||||
'Set up hero stats in Equips, Attackable, Moves.'
|
||||
'Set Collects collectRange to 2, Sees visualRange to 60.'
|
||||
'Add any custom hero abilities.'
|
||||
'Add to ThangType model hard-coded hero ids/classes list.'
|
||||
'Add to LevelHUDView hard-coded hero short names list.'
|
||||
'Add to InventoryView hard-coded hero gender list.'
|
||||
'Add to PlayHeroesModal hard-coded hero positioning logic.'
|
||||
'Add as unlock to a level and add unlockLevelName here.'
|
||||
]
|
||||
Floor: commonTasks.concat containerTasks.concat [
|
||||
'Add 10 x 8.5 snapping.'
|
||||
'Set fixed rotation.'
|
||||
'Make sure everything is scaled to tile perfectly.'
|
||||
'Adjust SingularSprite floor scale list if necessary.'
|
||||
]
|
||||
Wall: commonTasks.concat containerTasks.concat [
|
||||
'Add 4x4 snapping.'
|
||||
'Set fixed rotation.'
|
||||
'Set up and tune complicated wall-face actions.'
|
||||
'Make sure everything is scaled to tile perfectly.'
|
||||
]
|
||||
Doodad: commonTasks.concat containerTasks.concat [
|
||||
'Add to GenerateTerrainModal logic if needed.'
|
||||
]
|
||||
Misc: commonTasks.concat [
|
||||
'Add any misc tasks for this misc ThangType.'
|
||||
]
|
||||
Mark: commonTasks.concat [
|
||||
'Check the animation framerate.'
|
||||
'Double-check that bottom of mark is just touching registration point.'
|
||||
]
|
||||
Item: commonTasks.concat purchasableTasks.concat [
|
||||
'Set the hero class if class-specific.'
|
||||
'Upload Paper Doll Images.'
|
||||
]
|
||||
Missile: commonTasks.concat animatedThangTypeTasks.concat [
|
||||
'Make sure there is a launch sound trigger.'
|
||||
'Make sure there is a hit sound trigger.'
|
||||
'Make sure there is a die animation.'
|
||||
'Add Arrow, Shell, Beam, or other missile Component.'
|
||||
'Choose Missile.leadsShots and Missile.shootsAtGround.'
|
||||
'Choose Moves.maxSpeed and other config.'
|
||||
'Choose Expires.lifespan config if needed.'
|
||||
'Set spriteType: singular if needed for proper rendering.'
|
||||
'Add HasAPI if the missile should show up in findEnemyMissiles.'
|
||||
]
|
||||
|
||||
module.exports = class ThangTypeEditView extends RootView
|
||||
id: 'thang-type-edit-view'
|
||||
className: 'editor'
|
||||
|
@ -435,6 +535,8 @@ module.exports = class ThangTypeEditView extends RootView
|
|||
Backbone.Mediator.publish 'editor:thang-type-kind-changed', kind: kind
|
||||
if kind in ['Doodad', 'Floor', 'Wall'] and not @treema.data.terrains
|
||||
@treema.set '/terrains', ['Grass', 'Dungeon', 'Indoor', 'Desert'] # So editors know to set them.
|
||||
if not @treema.data.tasks
|
||||
@treema.set '/tasks', (name: t for t in defaultTasks[kind])
|
||||
|
||||
onSelectNode: (e, selected) =>
|
||||
selected = selected[0]
|
||||
|
|
|
@ -33,6 +33,7 @@ ThangTypeHandler = class ThangTypeHandler extends Handler
|
|||
'tier'
|
||||
'extendedName'
|
||||
'unlockLevelName'
|
||||
'tasks'
|
||||
]
|
||||
|
||||
hasAccess: (req) ->
|
||||
|
|
Loading…
Reference in a new issue