mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Update/Add my gamemodes for 1.7.20+ (API 8)
This commit is contained in:
parent
654d99c555
commit
cd29dacf98
6 changed files with 890 additions and 773 deletions
|
|
@ -1,9 +1,10 @@
|
|||
# Ported by: Freaku / @[Just] Freak#4999
|
||||
# Ported by your friend: Freaku
|
||||
|
||||
# Join BCS:
|
||||
#Join BCS:
|
||||
# https://discord.gg/ucyaesh
|
||||
|
||||
|
||||
|
||||
# ba_meta require api 8
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
@ -11,7 +12,6 @@ from __future__ import annotations
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
import babase
|
||||
import bauiv1 as bui
|
||||
import bascenev1 as bs
|
||||
from bascenev1lib.actor.playerspaz import PlayerSpaz
|
||||
|
||||
|
|
@ -19,6 +19,7 @@ if TYPE_CHECKING:
|
|||
from typing import Any, Type, List, Dict, Tuple, Union, Sequence, Optional
|
||||
|
||||
|
||||
|
||||
class State:
|
||||
def __init__(self, bomb=None, grab=False, punch=False, curse=False, required=False, final=False, name=''):
|
||||
self.bomb = bomb
|
||||
|
|
@ -35,8 +36,8 @@ class State:
|
|||
def apply(self, spaz):
|
||||
spaz.disconnect_controls_from_player()
|
||||
spaz.connect_controls_to_player(enable_punch=self.punch,
|
||||
enable_bomb=self.bomb,
|
||||
enable_pickup=self.grab)
|
||||
enable_bomb=self.bomb,
|
||||
enable_pickup=self.grab)
|
||||
if self.curse:
|
||||
spaz.curse_time = -1
|
||||
spaz.curse()
|
||||
|
|
@ -48,18 +49,16 @@ class State:
|
|||
return (self.name)
|
||||
|
||||
|
||||
states = [State(bomb='normal', name='Basic Bombs'),
|
||||
State(bomb='ice', name='Frozen Bombs'),
|
||||
State(bomb='sticky', name='Sticky Bombs'),
|
||||
State(bomb='impact', name='Impact Bombs'),
|
||||
State(grab=True, name='Grabbing only'),
|
||||
State(punch=True, name='Punching only'),
|
||||
State(curse=True, name='Cursed', final=True)]
|
||||
|
||||
states = [ State(bomb='normal', name='Basic Bombs'),
|
||||
State(bomb='ice', name='Frozen Bombs'),
|
||||
State(bomb='sticky', name='Sticky Bombs'),
|
||||
State(bomb='impact', name='Impact Bombs'),
|
||||
State(grab=True, name='Grabbing only'),
|
||||
State(punch=True, name='Punching only'),
|
||||
State(curse=True, name='Cursed', final=True) ]
|
||||
|
||||
class Player(bs.Player['Team']):
|
||||
"""Our player type for this game."""
|
||||
|
||||
def __init__(self):
|
||||
self.state = None
|
||||
|
||||
|
|
@ -193,4 +192,4 @@ class ArmsRaceGame(bs.TeamGameActivity[Player, Team]):
|
|||
results = bs.GameResults()
|
||||
for team in self.teams:
|
||||
results.set_team_score(team, team.score)
|
||||
self.end(results=results)
|
||||
self.end(results=results)
|
||||
Loading…
Add table
Add a link
Reference in a new issue