mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 23:13:46 +08:00
Making register_all_maps function
This commit is contained in:
parent
2a780d6ff9
commit
692ee04db0
@ -5,7 +5,6 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import TYPE_CHECKING, override
|
from typing import TYPE_CHECKING, override
|
||||||
import random
|
import random
|
||||||
import inspect
|
|
||||||
import logging
|
import logging
|
||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
@ -178,9 +177,7 @@ class ClassicAppSubsystem(babase.AppSubsystem):
|
|||||||
if not env.debug and not env.test and not plus.is_blessed():
|
if not env.debug and not env.test and not plus.is_blessed():
|
||||||
babase.screenmessage('WARNING: NON-BLESSED BUILD', color=(1, 0, 0))
|
babase.screenmessage('WARNING: NON-BLESSED BUILD', color=(1, 0, 0))
|
||||||
|
|
||||||
for _, maptype in inspect.getmembers(stdmaps, inspect.isclass):
|
stdmaps.register_all_maps()
|
||||||
if issubclass(maptype, bascenev1.Map):
|
|
||||||
bascenev1.register_map(maptype)
|
|
||||||
|
|
||||||
spazappearance.register_appearances()
|
spazappearance.register_appearances()
|
||||||
bascenev1.init_campaigns()
|
bascenev1.init_campaigns()
|
||||||
|
|||||||
@ -14,6 +14,29 @@ from bascenev1lib.gameutils import SharedObjects
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
ALL_MAPS = [
|
||||||
|
HockeyStadium,
|
||||||
|
FootballStadium,
|
||||||
|
Bridgit,
|
||||||
|
BigG,
|
||||||
|
Roundabout,
|
||||||
|
MonkeyFace,
|
||||||
|
ZigZag,
|
||||||
|
ThePad,
|
||||||
|
DoomShroom,
|
||||||
|
LakeFrigid,
|
||||||
|
TipTop,
|
||||||
|
CragCastle,
|
||||||
|
TowerD,
|
||||||
|
HappyThoughts,
|
||||||
|
StepRightUp,
|
||||||
|
Courtyard,
|
||||||
|
Rampage,
|
||||||
|
]
|
||||||
|
|
||||||
|
def register_all_maps():
|
||||||
|
for maptype in ALL_MAPS:
|
||||||
|
bascenev1.register_map(maptype)
|
||||||
|
|
||||||
class HockeyStadium(bs.Map):
|
class HockeyStadium(bs.Map):
|
||||||
"""Stadium map used for ice hockey games."""
|
"""Stadium map used for ice hockey games."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user