mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Update my minigames for 1.7.37+ (API 9)
arms_race: • Fixed a warning error getting on curse_time being less than zero.
This commit is contained in:
parent
7fa1149944
commit
ca8fcd8c22
5 changed files with 28 additions and 19 deletions
|
|
@ -1,3 +1,10 @@
|
|||
# Ported by your friend: Freaku
|
||||
|
||||
#Join BCS:
|
||||
# https://discord.gg/ucyaesh
|
||||
|
||||
|
||||
|
||||
# ba_meta require api 9
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -30,8 +37,11 @@ class State:
|
|||
enable_bomb=self.bomb,
|
||||
enable_pickup=self.grab)
|
||||
if self.curse:
|
||||
try:
|
||||
spaz.curse_time = -1
|
||||
spaz.curse()
|
||||
except:
|
||||
pass
|
||||
if self.bomb:
|
||||
spaz.bomb_type = self.bomb
|
||||
spaz.set_score_text(self.name)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import bascenev1 as bs
|
|||
from bascenev1lib.game.chosenone import Player, ChosenOneGame
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta require api 9
|
||||
# ba_meta export bascenev1.GameActivity
|
||||
class FrozenOneGame(ChosenOneGame):
|
||||
name = 'Frozen One'
|
||||
|
|
|
|||
|
|
@ -2,13 +2,12 @@
|
|||
|
||||
|
||||
import babase
|
||||
import bascenev1 as bs
|
||||
import random
|
||||
import bascenev1 as bs, random
|
||||
from bascenev1lib.actor.bomb import Bomb
|
||||
from bascenev1lib.game.meteorshower import Player, MeteorShowerGame
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta require api 9
|
||||
# ba_meta export bascenev1.GameActivity
|
||||
class IcyEmitsGame(MeteorShowerGame):
|
||||
name = 'Icy Emits'
|
||||
|
|
@ -31,18 +30,17 @@ class IcyEmitsGame(MeteorShowerGame):
|
|||
self._set_meteor_timer()
|
||||
|
||||
def _drop_bomb(self, position, velocity):
|
||||
random_xpositions = [-10, -9, -8, -7, -6, -5, -
|
||||
4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
random_zpositions = [-5, -4.5, -4, -3.5, -3, -2.5, -2, -
|
||||
1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5]
|
||||
random_xpositions = [-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10]
|
||||
random_zpositions = [-5,-4.5,-4,-3.5,-3,-2.5,-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5]
|
||||
bomb_position = (random.choice(random_xpositions), 0.2,random.choice(random_zpositions))
|
||||
Bomb(position=bomb_position, velocity=velocity, bomb_type = 'ice').autoretain()
|
||||
|
||||
|
||||
|
||||
|
||||
# ba_meta export plugin
|
||||
class byFreaku(babase.Plugin):
|
||||
def __init__(self):
|
||||
## Campaign support ##
|
||||
randomPic = ['lakeFrigidPreview','hockeyStadiumPreview']
|
||||
babase.app.classic.add_coop_practice_level(bs.Level(
|
||||
name='Icy Emits', displayname='${GAME}', gametype=IcyEmitsGame, settings={}, preview_texture_name=random.choice(randomPic)))
|
||||
babase.app.classic.add_coop_practice_level(bs.Level(name='Icy Emits', displayname='${GAME}', gametype=IcyEmitsGame, settings={}, preview_texture_name=random.choice(randomPic)))
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from __future__ import annotations
|
|||
# def spawnAllMap(self)
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta require api 9
|
||||
from typing import TYPE_CHECKING, overload
|
||||
import _babase
|
||||
import babase
|
||||
|
|
@ -27,6 +27,7 @@ if TYPE_CHECKING:
|
|||
from typing import Any, Sequence, Optional, List, Dict, Type, Union, Any, Literal
|
||||
|
||||
|
||||
|
||||
class OnTimer(bs.Actor):
|
||||
"""Timer which counts but doesn't show on-screen"""
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Team(bs.Team[Player]):
|
|||
self.score = 0
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
# ba_meta require api 9
|
||||
# ba_meta export bascenev1.GameActivity
|
||||
class MFGame(bs.TeamGameActivity[Player, Team]):
|
||||
name = 'Musical Flags'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue