Skip to content

Commit

Permalink
Merge commit '93db4b9e45393e7dbd5b7d12ad8c5c7be03cc031'
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Aug 21, 2022
1 parent 694afdf commit 0cdca3a
Show file tree
Hide file tree
Showing 167 changed files with 15,165 additions and 6,707 deletions.
495 changes: 248 additions & 247 deletions .eslintrc.json

Large diffs are not rendered by default.

Binary file added app/data/Wood_End.wav
Binary file not shown.
Binary file added app/data/Wood_Start.wav
Binary file not shown.
3 changes: 3 additions & 0 deletions app/data/ct.libs/place/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@
drawDebugGraphic(absolute) {
const shape = this._shape || getSSCDShape(this);
const g = this.$cDebugCollision;
const inverse = this.transform.localTransform.clone().invert();
this.$cDebugCollision.transform.setFromMatrix(inverse);
this.$cDebugCollision.position.set(0, 0);
let color = 0x00ffff;
if (this instanceof Copy) {
color = 0x0066ff;
Expand Down
8 changes: 5 additions & 3 deletions app/data/ct.libs/place/injections/beforedraw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if ([/*%debugMode%*/][0] && this instanceof ct.templates.Copy) {
this.$cDebugText.scale.x = this.$cDebugCollision.scale.x = 1 / this.scale.x;
this.$cDebugText.scale.y = this.$cDebugCollision.scale.y = 1 / this.scale.y;
this.$cDebugText.angle = this.$cDebugCollision.angle = -this.angle;
const inverse = this.transform.localTransform.clone().invert();
this.$cDebugCollision.transform.setFromMatrix(inverse);
this.$cDebugCollision.position.set(0, 0);
this.$cDebugText.transform.setFromMatrix(inverse);
this.$cDebugText.position.set(0, 0);

const newtext = `Partitions: ${this.$chashes.join(', ')}
CGroup: ${this.cgroup || 'unset'}
Expand Down
33 changes: 20 additions & 13 deletions app/data/ct.release/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,28 @@ class Room extends PIXI.Container {
ct.room = ct.rooms.current = this;
}
if (template) {
if (template.extends) {
ct.u.ext(this, template.extends);
}
this.onCreate = template.onCreate;
this.onStep = template.onStep;
this.onDraw = template.onDraw;
this.onLeave = template.onLeave;
this.template = template;
this.name = template.name;
this.isUi = template.isUi;
if (template.extends) {
ct.u.ext(this, template.extends);
}
if (this === ct.room) {
ct.pixiApp.renderer.backgroundColor = ct.u.hexToPixi(this.template.backgroundColor);
}
/*%beforeroomoncreate%*/
for (let i = 0, li = template.bgs.length; i < li; i++) {
// Need to put extensions here, so we don't use ct.backgrounds.add
// Need to put additional properties like parallax here,
// so we don't use ct.backgrounds.add
const bg = new ct.templates.Background(
template.bgs[i].texture,
null,
template.bgs[i].depth,
template.bgs[i].extends
template.bgs[i]
);
this.addChild(bg);
}
Expand All @@ -52,17 +54,22 @@ class Room extends PIXI.Container {
this.addChild(tl);
}
for (let i = 0, li = template.objects.length; i < li; i++) {
const exts = template.objects[i].exts || {};
const copy = template.objects[i];
const exts = copy.exts || {};
const customProperties = copy.customProperties || {};
ct.templates.copyIntoRoom(
template.objects[i].template,
template.objects[i].x,
template.objects[i].y,
copy.template,
copy.x,
copy.y,
this,
{
tx: template.objects[i].tx,
ty: template.objects[i].ty,
tr: template.objects[i].tr,
...exts
...exts,
...customProperties,
scaleX: copy.scale.x,
scaleY: copy.scale.y,
rotation: copy.rotation,
alpha: copy.opacity,
tint: copy.tint
}
);
}
Expand Down
12 changes: 5 additions & 7 deletions app/data/ct.release/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const Copy = (function Copy() {
this.parent = container;
this.blendMode = t.blendMode || PIXI.BLEND_MODES.NORMAL;
this.loop = t.loopAnimation;
this.animationSpeed = t.animationFPS / 60;
if (t.playAnimationOnStart) {
this.play();
}
Expand All @@ -89,14 +90,11 @@ const Copy = (function Copy() {
this.timer1 = this.timer2 = this.timer3 = this.timer4 = this.timer5 = this.timer6 = 0;
if (exts) {
ct.u.ext(this, exts);
if (exts.tx) {
this.scale.x = exts.tx;
if (exts.scaleX) {
this.scale.x = exts.scaleX;
}
if (exts.ty) {
this.scale.y = exts.ty;
}
if (exts.tr) {
this.angle = exts.tr;
if (exts.scaleY) {
this.scale.y = exts.scaleY;
}
}
this.uid = ++uid;
Expand Down
16 changes: 11 additions & 5 deletions app/data/ct.release/tilemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ class Tilemap extends PIXI.Container {
Object.assign(this, template.extends);
}
for (let i = 0, l = template.tiles.length; i < l; i++) {
const textures = ct.res.getTexture(template.tiles[i].texture);
const sprite = new PIXI.Sprite(textures[template.tiles[i].frame]);
sprite.anchor.x = sprite.anchor.y = 0;
const tile = template.tiles[i];
const textures = ct.res.getTexture(tile.texture);
const sprite = new PIXI.Sprite(textures[tile.frame]);
sprite.anchor.x = textures[0].defaultAnchor.x;
sprite.anchor.y = textures[0].defaultAnchor.y;
sprite.shape = textures.shape;
sprite.scale.set(tile.scale.x, tile.scale.y);
sprite.rotation = tile.rotation;
sprite.alpha = tile.opacity;
sprite.tint = tile.tint;
sprite.x = tile.x;
sprite.y = tile.y;
this.addChild(sprite);
this.pixiTiles.push(sprite);
this.tiles[i].sprite = sprite;
sprite.x = template.tiles[i].x;
sprite.y = template.tiles[i].y;
}
} else {
this.tiles = [];
Expand Down
12 changes: 12 additions & 0 deletions app/data/cursorErase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/data/cursorRotate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 132 additions & 15 deletions app/data/i18n/Brazilian Portuguese.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"template": "",
"room": "",
"sound": "",
"tandem": ""
"tandem": "",
"type": ""
},
"newName": "Novo nome:",
"saveProject": "Salvar projeto",
Expand Down Expand Up @@ -125,7 +126,9 @@
"",
""
]
}
},
"next": "",
"previous": ""
},
"colorPicker": {
"current": "Novo",
Expand Down Expand Up @@ -587,7 +590,10 @@
"SpringStream": "Spring Stream",
"LucasDracula": "Lucas Dracula",
"Horizon": "",
"HCBlack": ""
"HCBlack": "",
"RosePine": "",
"RosePineMoon": "",
"RosePineDawn": ""
},
"codeFontDefault": "Padrão (Iosevka Light)",
"codeFontOldSchool": "Old school",
Expand All @@ -602,7 +608,10 @@
"translateToYourLanguage": "Traduza o ct.js!",
"disableSounds": "Desabilitar sons de UI",
"changeDataFolder": "",
"forceProductionForDebug": ""
"forceProductionForDebug": "",
"settings": "",
"prideMode": "",
"altTemplateLayout": ""
},
"project": {
"save": "Salvar projeto",
Expand Down Expand Up @@ -638,14 +647,36 @@
"sounds": "Sons",
"ui": "UI",
"fx": "FX",
"templates": "Tipos"
},
"copyCustomProperties": {
"customProperties": "",
"addProperty": "",
"property": "",
"value": "",
"delete": ""
"templates": "Tipos",
"tour": {
"header": "",
"aboutTour": "",
"helpPanel": "",
"helpPanelTabs": "",
"projectResources": "",
"tabTextures": "",
"tabTexturesImport": "",
"tabTexturesGallery": "",
"tabTexturesClipboard": "",
"tabTexturesPlaceholders": "",
"tabTemplates": "",
"tabRooms": "",
"tabSounds": "",
"tabSoundsImport": "",
"tabSoundsGallery": "",
"tabSoundsRecord": "",
"tabInterlude": "",
"tabUI": "",
"tabFX": "",
"tabProject": "",
"tabProjectModules": "",
"tabProjectModuleDocs": "",
"tabMainMenu": "",
"tabMainMenuSettings": "",
"tabMainMenuMeta": "",
"helpPanelReminder": "",
"buttonStartTutorial": ""
}
},
"assetViewer": {
"addNewGroup": "",
Expand Down Expand Up @@ -716,7 +747,13 @@
"copyProperties": {
"position": "",
"rotation": "",
"scale": ""
"scale": "",
"multipleValues": ""
},
"copyCustomProperties": {
"addProperty": "",
"property": "",
"value": ""
},
"customProperties": "",
"restrictCamera": "",
Expand All @@ -736,7 +773,19 @@
"deleteTiles": "Remover tiles",
"moveTilesToLayer": "Mover para camada",
"shiftTiles": "Trocar tiles",
"changeCopyRotation": "Rotacionar"
"changeCopyRotation": "Rotacionar",
"simulate": "",
"toggleDiagonalGrid": "",
"changeGridSize": "",
"xrayMode": "",
"colorizeTileLayers": "",
"tools": {
"select": "",
"addCopies": "",
"addTiles": "",
"manageBackgrounds": "",
"roomProperties": ""
}
},
"styleView": {
"active": "Ativo",
Expand Down Expand Up @@ -869,7 +918,9 @@
"add": "",
"multiply": "",
"screen": ""
}
},
"animationFPS": "",
"loopAnimation": ""
},
"assetInput": {
"changeAsset": "",
Expand All @@ -889,5 +940,71 @@
"visitAuthorsItch": "",
"visitAuthorsTwitter": "",
"tipAuthor": ""
},
"scriptables": {
"addEvent": "",
"removeEvent": "",
"removeEventConfirm": "",
"changeArguments": "",
"eventAlreadyExists": "",
"localEventVars": "",
"createEventHint": "",
"coreEventsCategories": {
"lifecycle": "",
"actions": "",
"pointer": "",
"misc": "",
"animation": "",
"timers": ""
},
"coreEvents": {
"OnCreate": "",
"OnRoomStart": "",
"OnStep": "",
"OnDraw": "",
"OnDestroy": "",
"OnRoomEnd": "",
"OnPointerClick": "",
"OnPointerSecondaryClick": "",
"OnPointerEnter": "",
"OnPointerLeave": "",
"OnPointerDown": "",
"OnPointerUp": "",
"OnPointerUpOutside": "",
"OnPointerWheel": "",
"OnActionPress": "",
"OnActionRelease": "",
"OnActionDown": "",
"OnFrameChange": "",
"OnAnimationLoop": "",
"OnAnimationComplete": "",
"Timer": ""
},
"coreParameterizedNames": {
"OnActionPress": "",
"OnActionRelease": "",
"OnActionDown": ""
},
"coreEventsArguments": {
"action": ""
},
"coreEventsLocals": {
"OnActionDown_value": "",
"OnActionPress_value": ""
},
"coreEventsDescriptions": {
"OnCreate": "",
"OnRoomStart": "",
"OnStep": "",
"OnDraw": "",
"OnDestroy": "",
"OnRoomEnd": "",
"OnActionPress": "",
"OnActionRelease": "",
"OnActionDown": "",
"OnAnimationLoop": "",
"OnAnimationComplete": "",
"Timer": ""
}
}
}
Loading

0 comments on commit 0cdca3a

Please sign in to comment.