Skip to content

Commit

Permalink
Merge pull request #3186 from KBVE/alpha
Browse files Browse the repository at this point in the history
Preparing Beta Branch
  • Loading branch information
h0lybyte authored Nov 10, 2024
2 parents 9ff25bd + d3d92fa commit 72159bb
Show file tree
Hide file tree
Showing 107 changed files with 9,540 additions and 2,375 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }}
with:
source_file: 'dist/apps/kbve.com/'
destination_repo: 'kbve/kbve.com'
destination_repo: 'KBVE/kbve.com'
destination_folder: '/docs'
destination_branch: 'dev'
destination_branch_create: 'patch-kbve-deploy-${{ needs.globals.outputs.sha256head }}'
Expand All @@ -211,7 +211,7 @@ jobs:
API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }}
with:
source_file: 'dist/apps/herbmail.com/'
destination_repo: 'kbve/herbmail.com'
destination_repo: 'KBVE/herbmail.com'
destination_folder: '/docs'
destination_branch: 'main'
destination_branch_create: 'patch-herbmail-deploy-${{ needs.globals.outputs.sha256head }}'
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
API_TOKEN_GITHUB: ${{ secrets.UNITY_PAT }}
with:
source_file: 'dist/apps/cryptothrone.com/'
destination_repo: 'kbve/cryptothrone.com'
destination_repo: 'KBVE/cryptothrone.com'
destination_folder: '/docs'
destination_branch: 'main'
destination_branch_create: 'patch-cryptothrone-deploy-${{ needs.globals.outputs.sha256head }}'
Expand Down Expand Up @@ -547,15 +547,6 @@ jobs:
name: atlas-python-package-distributions
path: apps/atlas/dist/

- name: KBVE Shell
uses: ./.github/actions/kbve-shell
with:
flag: '-pythonbump apps/atlas'
create_pull_request: true
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_request_title: 'python-atlas-minor-version-bump-${{ needs.globals.outputs.sha256head }}'
pull_request_body: 'Bumping up the minor version of the Python ATLAS package.'


# [Fudster] -> Publish (As App)
python_fudster_build:
Expand Down Expand Up @@ -616,14 +607,6 @@ jobs:
name: fudster-python-package-distributions
path: apps/fudster/dist/

- name: KBVE Shell
uses: ./.github/actions/kbve-shell
with:
flag: '-pythonbump apps/fudster'
create_pull_request: true
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_request_title: 'python-fudster-minor-version-bump-${{ needs.globals.outputs.sha256head }}'
pull_request_body: 'Bumping up the minor version of the Python fudster package.'


# @[ERust] -> Publish
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,5 @@ apps/expo-cityvote/.tamagui/css/*

# NuGetScracthroot
NuGetScratchroot/
dotnet-install.sh
dotnet-install.sh
vite.config.*.timestamp*
1 change: 1 addition & 0 deletions apps/cryptothrone.com/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { fileURLToPath } from 'node:url';

// https://astro.build/config
export default defineConfig({
site: 'https://cryptothrone.com',
outDir: '../../dist/apps/cryptothrone.com',
integrations: [
react(),
Expand Down
24 changes: 23 additions & 1 deletion apps/cryptothrone.com/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,33 @@
"sourceRoot": "apps/cryptothrone.com/src",
"tags": [],
"targets": {
"dev": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/cryptothrone.com",
"commands": [
"UV_THREADPOOL_SIZE=4 NODE_OPTIONS=\"--max-old-space-size=4096\" nx exec -- astro dev"
],
"parallel": false
}

},
"build": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/cryptothrone.com",
"commands": [
"UV_THREADPOOL_SIZE=4 NODE_OPTIONS=\"--max-old-space-size=4096\" nx exec -- astro build"
],
"parallel": false
}

},
"buildx": {
"executor": "@nxtensions/astro:build",
"options": {}
},
"dev": {
"devx": {
"executor": "@nxtensions/astro:dev",
"options": {}
},
Expand Down
24 changes: 12 additions & 12 deletions apps/cryptothrone.com/src/components/game/menu/ModalDice.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DiceRollModal.tsx
import React, { useState, useEffect, memo } from 'react';
import React, { useState, useEffect, memo, useCallback } from 'react';
import { useStore } from '@nanostores/react';
import { playerStealDiceRoll } from './tempstore';
import { eventEmitterInstance as EventEmitter, notificationType, queryItemDB, type DiceRollResultEventData, type PlayerStealEventData } from '@kbve/laser';
Expand Down Expand Up @@ -48,23 +48,23 @@ const ModalDice: React.FC = () => {
let message = '';

switch (true) {
case roll >= 24:
case roll == 24:
itemName = '01J27QABD2GPFNRVK69S51HSGB';
message = `You successfully stole a ${itemName}!`;
break;
case roll >= 20:
case roll == 23:
itemName = '01J27QN2KZG1RDZW4CE9Q9Z3YQ';
message = `You successfully stole a ${itemName}!`;
break;
case roll >= 18:
case roll == 19:
itemName = '01J269PK47V1DWX2S1251DEASD';
message = `You successfully stole a ${itemName}!`;
break;
case roll >= 15:
case roll == 18:
itemName = 'Blue Shark';
message = `You successfully stole a ${itemName}!`;
break;
case roll >= 12:
case roll == 17:
itemName = 'Salmon';
message = `You successfully stole a ${itemName}!`;
break;
Expand Down Expand Up @@ -101,17 +101,17 @@ const ModalDice: React.FC = () => {
}
};

const handleClose = () => {
const handleClose = useCallback(() => {
updateDiceValues([]);
setDiceValues([]);
setCurrentRoll(null);
playerStealDiceRoll.set(null);
};
}, []);

if (!_npc$) return null;

return (
<div className="fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50">
<div className="fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50 text-white">
<div className="bg-zinc-800 p-4 rounded-lg shadow-lg w-3/4">
<DiceRollMessage npcName={_npc$.npcName} roll={currentRoll} />
<MemoizedMinigameDiceComponent />
Expand All @@ -125,7 +125,7 @@ const DiceRollMessage: React.FC<{ npcName: string, roll: number | null }> = ({ n
<div>
<h2 className="text-lg text-yellow-400 font-bold mb-4">Steal Attempt</h2>
<p className="mb-4">
Roll the dice to steal from {npcName}. You need a total of 12 or higher to succeed.
Roll the dice to steal from {npcName}. You need a total of 17 or higher to succeed.
</p>
{roll !== null && (
<p className="mb-4">
Expand All @@ -152,13 +152,13 @@ const MinigameDiceComponent: React.FC = () => (

const MemoizedMinigameDiceComponent = memo(MinigameDiceComponent);

const CloseButton: React.FC<{ handleClose: () => void }> = ({ handleClose }) => (
const CloseButton: React.FC<{ handleClose: () => void }> = memo(({ handleClose }) => (
<button
onClick={handleClose}
className="block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2"
>
Close
</button>
);
));

export default ModalDice;
Loading

0 comments on commit 72159bb

Please sign in to comment.