diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c61e181a5..ef2304410 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,6 +159,9 @@ stages: Debian testing GCC: stage: build + + when: manual + image: debian:testing-slim allow_failure: true @@ -198,6 +201,8 @@ Debian testing GCC: Windows x86: stage: build + when: on_success + artifacts: paths: - "bin/" @@ -228,6 +233,8 @@ Windows x86: Debian stable:amd64: stage: build + when: on_success + artifacts: paths: - "bin/" @@ -270,6 +277,8 @@ Debian stable:amd64: Debian stable:i386: stage: build + when: manual + artifacts: paths: - "bin/" @@ -311,6 +320,8 @@ Debian stable:i386: Debian stable:arm64: stage: build + when: manual + artifacts: paths: - "bin/" @@ -353,6 +364,8 @@ Debian stable:arm64: Windows x64: stage: build + when: manual + artifacts: paths: - "bin/" @@ -383,6 +396,8 @@ Windows x64: Debian stable Clang: stage: build + when: manual + allow_failure: true artifacts: @@ -422,6 +437,8 @@ Debian stable Clang: Debian stable musl: stage: build + when: manual + allow_failure: true artifacts: @@ -459,6 +476,8 @@ Debian stable musl: Debian testing Clang: extends: Debian stable Clang + when: manual + image: debian:testing-slim artifacts: @@ -473,6 +492,8 @@ Debian testing Clang: Debian testing musl: extends: Debian stable musl + when: manual + image: debian:testing-slim artifacts: diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e33199d78..6dbb48359 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1425,6 +1425,18 @@ static int lib_pGivePlayerRings(lua_State *L) return 0; } +static int lib_pGivePlayerSpheres(lua_State *L) +{ + player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); + INT32 num_spheres = (INT32)luaL_checkinteger(L, 2); + NOHUD + INLEVEL + if (!player) + return LUA_ErrInvalid(L, "player_t"); + P_GivePlayerSpheres(player, num_spheres); + return 0; +} + static int lib_pGivePlayerLives(lua_State *L) { player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); @@ -2253,6 +2265,21 @@ static int lib_pDoMatchSuper(lua_State *L) return 0; } +static int lib_pTouchSpecialThing(lua_State *L) +{ + mobj_t *special = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); + mobj_t *toucher = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); + boolean heightcheck = lua_optboolean(L, 3); + NOHUD + INLEVEL + if (!special || !toucher) + return LUA_ErrInvalid(L, "mobj_t"); + if (!toucher->player) + return luaL_error(L, "P_TouchSpecialThing requires a valid toucher.player."); + P_TouchSpecialThing(special, toucher, heightcheck); + return 0; +} + // P_SPEC //////////// @@ -4200,6 +4227,7 @@ static luaL_Reg lib[] = { {"P_SpawnShieldOrb",lib_pSpawnShieldOrb}, {"P_SpawnGhostMobj",lib_pSpawnGhostMobj}, {"P_GivePlayerRings",lib_pGivePlayerRings}, + {"P_GivePlayerSpheres",lib_pGivePlayerSpheres}, {"P_GivePlayerLives",lib_pGivePlayerLives}, {"P_GiveCoopLives",lib_pGiveCoopLives}, {"P_ResetScore",lib_pResetScore}, @@ -4246,6 +4274,7 @@ static luaL_Reg lib[] = { {"P_FloorzAtPos",lib_pFloorzAtPos}, {"P_CeilingzAtPos",lib_pCeilingzAtPos}, {"P_DoSpring",lib_pDoSpring}, + {"P_TouchSpecialThing",lib_pTouchSpecialThing}, {"P_TryCameraMove", lib_pTryCameraMove}, {"P_TeleportCameraMove", lib_pTeleportCameraMove},