diff --git a/src/const/game.ts b/src/const/game.ts index 2c1909c2..210c75b1 100644 --- a/src/const/game.ts +++ b/src/const/game.ts @@ -16,7 +16,6 @@ export const ENVIRONMENTS: Record = { [GamePlatform.POKI]: { sdk: 'https://game-cdn.poki.com/scripts/v2/poki-sdk.js', flags: { - [GameFlag.NO_BLOOD]: true, [GameFlag.ADS]: true, [GameFlag.AUTO_ORIENTATION]: true, }, @@ -24,16 +23,21 @@ export const ENVIRONMENTS: Record = { [GamePlatform.CRAZY_GAMES]: { sdk: 'https://sdk.crazygames.com/crazygames-sdk-v2.js', flags: { - [GameFlag.NO_BLOOD]: true, [GameFlag.ADS]: true, + [GameFlag.COPYRIGHT]: true, }, }, [GamePlatform.VANILLA]: { - flags: {}, + flags: { + [GameFlag.BLOOD]: true, + [GameFlag.COPYRIGHT]: true, + }, }, [GamePlatform.DEVELOPMENT]: { flags: { + [GameFlag.BLOOD]: true, [GameFlag.ADS]: true, + [GameFlag.COPYRIGHT]: true, }, }, }; diff --git a/src/game/scenes/menu/interface/copyright/index.tsx b/src/game/scenes/menu/interface/copyright/index.tsx index 203c8214..0230b635 100644 --- a/src/game/scenes/menu/interface/copyright/index.tsx +++ b/src/game/scenes/menu/interface/copyright/index.tsx @@ -1,19 +1,25 @@ import React from 'react'; import pkg from '../../../../../../package.json'; +import { Environment } from '~lib/environment'; +import { GameFlag } from '~type/game'; import { - Wrapper, Icon, About, Discord, Link, Version, + Wrapper, Icon, About, Discord, Author, Link, } from './styles'; export const Copyright: React.FC = () => ( - Created by{' '} - - {pkg.author.name} - - Version {pkg.version} + {Environment.GetFlag(GameFlag.COPYRIGHT) && ( + + Created by{' '} + + {pkg.author.name} + + + )} + Version {pkg.version} diff --git a/src/game/scenes/menu/interface/copyright/styles.ts b/src/game/scenes/menu/interface/copyright/styles.ts index 20c9ce91..36a280dc 100644 --- a/src/game/scenes/menu/interface/copyright/styles.ts +++ b/src/game/scenes/menu/interface/copyright/styles.ts @@ -27,6 +27,13 @@ export const About = styled.div` } `; +export const Author = styled.div` + margin-bottom: 8px; + @media ${INTERFACE_MOBILE_BREAKPOINT} { + margin-bottom: 5px; + } +`; + export const Link = styled.a` color: #fff; pointer-events: all; @@ -35,13 +42,6 @@ export const Link = styled.a` } `; -export const Version = styled.div` - margin-top: 8px; - @media ${INTERFACE_MOBILE_BREAKPOINT} { - margin-top: 5px; - } -`; - export const Discord = styled.a` margin-top: 10px; color: #fff; diff --git a/src/game/scenes/world/entities/npc/variants/enemy/enemy.ts b/src/game/scenes/world/entities/npc/variants/enemy/enemy.ts index 1f7f773c..258bd4aa 100644 --- a/src/game/scenes/world/entities/npc/variants/enemy/enemy.ts +++ b/src/game/scenes/world/entities/npc/variants/enemy/enemy.ts @@ -285,7 +285,7 @@ export class Enemy extends NPC implements IEnemy { if ( !this.currentBiome?.solid || !this.scene.game.isSettingEnabled(GameSettings.EFFECTS) - || Environment.GetFlag(GameFlag.NO_BLOOD) + || !Environment.GetFlag(GameFlag.BLOOD) ) { return; } diff --git a/src/game/scenes/world/entities/sprite.ts b/src/game/scenes/world/entities/sprite.ts index 7bd2dccf..d18faac0 100644 --- a/src/game/scenes/world/entities/sprite.ts +++ b/src/game/scenes/world/entities/sprite.ts @@ -349,7 +349,7 @@ export class Sprite extends Phaser.Physics.Arcade.Sprite implements ISprite { public onDamage(amount: number) { if ( !this.scene.game.isSettingEnabled(GameSettings.EFFECTS) - || Environment.GetFlag(GameFlag.NO_BLOOD) + || !Environment.GetFlag(GameFlag.BLOOD) ) { return; } diff --git a/src/types/game.ts b/src/types/game.ts index 43813b0f..9cf5db8f 100644 --- a/src/types/game.ts +++ b/src/types/game.ts @@ -151,9 +151,10 @@ export enum GameDifficulty { } export enum GameFlag { - NO_BLOOD = 'NO_BLOOD', + BLOOD = 'BLOOD', ADS = 'ADS', AUTO_ORIENTATION = 'AUTO_ORIENTATION', + COPYRIGHT = 'COPYRIGHT', } export enum GamePlatform {