Skip to content

Commit

Permalink
Test Windows fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvhewitt committed Nov 5, 2024
1 parent ab8d86b commit d637800
Show file tree
Hide file tree
Showing 21 changed files with 645 additions and 818 deletions.
296 changes: 143 additions & 153 deletions caramel-recolor-cython/pbgerecolor.c

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions caramel-recolor-cython/pbgerecolor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import numpy as np
# about the numpy module (this is stored in a file numpy.pxd which is
# currently part of the Cython distribution).
cimport numpy as np
np.import_array()



Expand Down
19 changes: 19 additions & 0 deletions data/stc_default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,25 @@ BallisticWeapon
quantity=16
END

BallisticWeapon
desig = "MBAZ-17"
name = "Mecha Bazooka"
reach = 7
damage = 4
accuracy = 2
penetration = 4
ammo_type = SelfPropelled_70cm
attack_stat = Perception
magazine = 12
shot_anim = Missile1
SUB
Ammo
ammo_type=SelfPropelled_70cm
quantity=12
attributes = (Blast2, Brutal)
END


BeamWeapon
desig = "LAS-5"
name = "Intercept Laser"
Expand Down
121 changes: 120 additions & 1 deletion design/Daum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,131 @@ Mecha

Mecha
name = "Daum"
desig = "SAN-D8 Mughal"
desig = "SAN-D1h HW"
imagename = "mav_daum.png"
portrait = "mecha_daum.png"
family = "Daum"
environment_list = (GroundEnv,UrbanEnv,SpaceEnv,AquaticEnv)
faction_list = (None,)
role_list = (Support,)
desc = "In NT100, RegEx corporation and the Federation Defense Force began a project to update the BuruBuru design using modern technology. This mecha was the result."
material = Advanced

SUB
Head
size = 4
SUB
Armor
size = 4
Sensor
size = 2
BeamWeapon
name = "Gatling Laser"
reach = 2
damage = 2
accuracy = 2
penetration = 1
integral = True
shot_anim = SmallBeam
attributes = (Intercept,VariableFire4)
END
Torso
size = 5
SUB
Armor
size = 4
Engine
size = 1000
Gyroscope
Cockpit
SUB
Armor
size = 2
END
Mount
name = "Right Shoulder Mount"
INV
Launcher
size = 4
SUB
Missile
name = "Swarm Missiles"
reach = 6
damage = 1
accuracy = 2
penetration = 1
quantity = 25
END
END
Mount
name = "Left Shoulder Mount"
HoverJets
size = 1

END
Arm
name = "Right Arm"
size = 5
SUB
Armor
size = 4
Hand
name = "Right Hand"
INV
STC MBAZ-17 Mecha Bazooka

END
END
Arm
name = "Left Arm"
size = 5
SUB
Armor
size = 4
Hand
name = "Left Hand"
INV
STC Mecha Sword
END
END
INV
BeamShield
size = 5
bonus = 1
END
Leg
name = "Right Leg"
size = 5
SUB
Armor
size = 4
HoverJets
size = 5
Mount
name = "Right Leg Mount"
END
Leg
name = "Left Leg"
size = 5
SUB
Armor
size = 4
HoverJets
size = 5
Mount
name = "Left Leg Mount"
END
END


Mecha
name = "Daum"
desig = "SAN-D8 Mughal"
imagename = "mav_daum.png"
portrait = "mecha_daum.png"
family = "Daum"
environment_list = (GroundEnv,UrbanEnv,SpaceEnv,AquaticEnv)
faction_list = (TerranFederation, RegExCorporation)
role_list = (Commander,)
desc = "A variant of the Daum that specializes in devastating melee attacks with unconventional weapons."
material = Advanced
Expand Down
4 changes: 4 additions & 0 deletions design/Mecha_Equipment.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ STC Heavy Gauss Rifle
shop_tags= ("MEXTRA","MECHA_WEAPON")
faction_list = (None,)

STC MBAZ-17 Mecha Bazooka
shop_tags= ("MEXTRA","MECHA_WEAPON")
faction_list = (None,)

STC Light Autocannon
shop_tags= ("MEXTRA","MECHA_WEAPON")
faction_list = (None,)
Expand Down
50 changes: 50 additions & 0 deletions game/content/ghplots/encounters.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,53 @@ def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
self.elements["TYPE_TAGS"], camp.scene.scale).contents, myteam
)
self.last_update = camp.time


# *************************
# *** MECHA_OUTPOST ***
# *************************
#
# Like a mecha encounter, but it respawns like a dungeon encounter.
#
# Elements:
# LOCALE: The scene where the encounter will take place
# ROOM: The room where the encounter will take place; if None, an open room will be added.
# ENEMY_FACTION: The enemy you'll be fighting
#

class BasicMechaOutpost(Plot):
# Fight some random mecha. What do they want? To pad the adventure.
LABEL = "MECHA_OUTPOST"
active = True
scope = "LOCALE"

def custom_init(self, nart: pbge.plots.NarrativeRequest):
myscene = self.elements["LOCALE"]
fac = self.elements.get("ENEMY_FACTION")
if not self.elements.get("ROOM"):
mapgen: pbge.randmaps.SceneGenerator = nart.get_map_generator(myscene)
if mapgen:
room_class = mapgen.archi.get_a_room()
else:
return False
self.register_element("ROOM", room_class(random.randint(5,10), random.randint(5,10)), dident="LOCALE")
team2 = self.register_element("_eteam", teams.Team(enemies=(myscene.player_team,), faction=fac), dident="ROOM")
team2.contents += gears.selector.RandomMechaUnit(self.rank, 50, fac, myscene.environment).mecha_list
self.last_update = 0
return True

def _eteam_ACTIVATETEAM(self, camp):
self.last_update = camp.time

def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
myteam: game.teams.Team = self.elements["_eteam"]
myscene = self.elements["LOCALE"]
fac = self.elements.get("ENEMY_FACTION")
if camp.time > self.last_update:
dungeonmaker.dungeon_cleaner(self.elements["LOCALE"])
if len(myteam.get_members_in_play(camp)) < 1 and random.randint(1, 3) != 2:
camp.scene.deploy_team(gears.selector.RandomMechaUnit(
self.rank, random.randint(30,80), fac, myscene.environment
).mecha_list, myteam
)
self.last_update = camp.time
46 changes: 46 additions & 0 deletions game/content/ghplots/mechadungeons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
from pbge.plots import Plot
from game import teams
import gears
import pbge
from game.content import ghwaypoints, gharchitecture, plotutility, dungeonmaker
import random
from game.content.dungeonmaker import DG_NAME, DG_ARCHITECTURE, DG_SCENE_TAGS, DG_TEMPORARY, DG_PARENT_SCENE, DG_EXPLO_MUSIC, DG_COMBAT_MUSIC, DG_DECOR


class GenericMechaDungeonLevel(Plot):
LABEL = "MECHA_DUNGEON_GENERIC"

active = True
scope = "LOCALE"

def custom_init(self, nart):
team1 = teams.Team(name="Player Team")
intscene = gears.GearHeadScene(65, 65, self.elements[DG_NAME], player_team=team1,
attributes=self.elements[DG_SCENE_TAGS],
combat_music=self.elements[DG_COMBAT_MUSIC],
exploration_music=self.elements[DG_EXPLO_MUSIC],
scale=gears.scale.MechaScale)
intscenegen = pbge.randmaps.SceneGenerator(intscene, self.elements[DG_ARCHITECTURE],
decorate=self.elements[DG_DECOR])
self.register_scene(nart, intscene, intscenegen, ident="LOCALE", dident=DG_PARENT_SCENE,
temporary=self.elements.get(DG_TEMPORARY,False))

self.last_update = 0

for t in range(random.randint(3,5)):
self.add_sub_plot(nart, "MECHA_OUTPOST",)

#self.add_sub_plot(nart, "DUNGEON_EXTRA", necessary=False)

return True

def t_ENDCOMBAT(self, camp:gears.GearHeadCampaign):
camp.bring_out_your_dead(True)
if camp.pc not in camp.party:
pbge.alert("Your lance retreats...")
camp.go(camp.home_base)

def LOCALE_ENTER(self, camp: gears.GearHeadCampaign):
if camp.time > self.last_update:
dungeonmaker.dungeon_cleaner(camp.scene)
self.last_update = camp.time
2 changes: 1 addition & 1 deletion game/content/ghwaypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def unlocked_use(self, camp):
mymenu.add_item("[EXIT]", None)
char = mymenu.query()
if char:
ui = cyberdoc.UI(char, camp, self.shop, camp.party, camp.year)
ui = cyberdoc.SurgeryUI(camp, self.shop, char)
ui.activate_and_run()


Expand Down
Loading

0 comments on commit d637800

Please sign in to comment.