Skip to content

Commit

Permalink
Merge branch 'main' into fix-register-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires authored Aug 8, 2024
2 parents 1c3fc6d + f75de3d commit 993cf1a
Show file tree
Hide file tree
Showing 10 changed files with 185,061 additions and 12 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/analysis-qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Analysis - Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,./qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ endif()

set(VCPKG_FEATURE_FLAGS "versions")
set(VCPKG_BUILD_TYPE "release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)


# *****************************************************************************
# Project canary
Expand Down
15 changes: 13 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,19 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DEBUG_LOG": "ON",
"SPEED_UP_BUILD_UNITY": "OFF",
"ASAN_ENABLED": "ON"
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
"name": "linux-debug-asan",
"inherits": "linux-release",
"displayName": "Linux - Debug Build",
"description": "Build Debug Mode With ASAN Enable",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"DEBUG_LOG": "ON",
"ASAN_ENABLED": "ON",
"SPEED_UP_BUILD_UNITY": "OFF"
}
},
{
Expand Down
12 changes: 12 additions & 0 deletions data/scripts/actions/items/cobra_flask.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ end

cobraFlask:id(31296)
cobraFlask:register()

local cobraFlask = Action()

function cobraFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if table.contains({ 4188, 4189, 4190 }, target:getId()) then
item:transform(31296)
end
return true
end

cobraFlask:id(31297)
cobraFlask:register()
8 changes: 6 additions & 2 deletions data/scripts/runes/magic_wall.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
function onCreateMagicWall(creature, tile)
function onCreateMagicWall(creature, position)
local tile = Tile(position)
if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then
return false
end
local magicWall
if Game.getWorldType() == WORLD_TYPE_NO_PVP then
magicWall = ITEM_MAGICWALL_SAFE
else
magicWall = ITEM_MAGICWALL
end
local item = Game.createItem(magicWall, 1, tile)
local item = Game.createItem(magicWall, 1, position)
item:setDuration(16, 24)
end

Expand Down
8 changes: 6 additions & 2 deletions data/scripts/runes/wild_growth.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
function onCreateWildGrowth(creature, tile)
function onCreateWildGrowth(creature, position)
local tile = Tile(position)
if tile and tile:getTopCreature() and not tile:getTopCreature():isPlayer() then
return false
end
local wildGrowth
if Game.getWorldType() == WORLD_TYPE_NO_PVP then
wildGrowth = ITEM_WILDGROWTH_SAFE
else
wildGrowth = ITEM_WILDGROWTH
end
local item = Game.createItem(wildGrowth, 1, tile)
local item = Game.createItem(wildGrowth, 1, position)
item:setDuration(30, 60)
end

Expand Down
13 changes: 7 additions & 6 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ RUN --mount=type=cache,target=/var/cache/apt \

WORKDIR /opt
COPY vcpkg.json /opt
RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ') \
&& echo "vcpkg commit ID: $vcpkgCommitId" \
&& git clone https://github.com/Microsoft/vcpkg.git \
&& cd vcpkg \
&& git checkout "$vcpkgCommitId" \
&& ./bootstrap-vcpkg.sh
RUN vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ' | tr -d '\r\n') \
&& echo "vcpkg commit ID: '$vcpkgCommitId'" \
&& git clone https://github.com/microsoft/vcpkg.git \
&& cd vcpkg \
&& git fetch origin \
&& git checkout "$vcpkgCommitId" \
&& ./bootstrap-vcpkg.sh

WORKDIR /opt/vcpkg
COPY vcpkg.json /opt/vcpkg/
Expand Down
Loading

0 comments on commit 993cf1a

Please sign in to comment.