Skip to content

Commit b649bf0

Browse files
assume AD if bsp has ad_ prefix, and not AD if not
for issue #9 This is true for every current singleplayer map!
1 parent ccccaed commit b649bf0

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

scripts/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ An attempt to launch a gamedir with such a dependency will stop with an error if
114114

115115
## Arcane Dimensions and Copper
116116

117-
"quakelaunch" will similarly look in docs for mentions of Arcane Dimensions or Copper (unless the gamedir is standalone). If it finds such a mention, that will be interpreted as a dependency on that mod.
117+
"quakelaunch" will similarly look in docs for mentions of Copper (unless the gamedir is standalone). If it finds such a mention, that will be interpreted as a dependency on that mod.
118+
119+
For Arcane Dimensions, instead of examining the docs it will look to see if there is a bsp filename that starts with the "ad_" prefix... that turns out to be a 100% reliable indicator (so far) of a dependency on AD.
118120

119121
Unlike the situation with Quoth and missionpack dependencies however, not all Quake engines can handle launching non-standalone AD/Copper-dependent content that is installed in its own separate gamedir. If you have a Quake engine that can do it, you can set the relevant options in your "quakelaunch.conf" file. I do know that [FTE](http://fte.triptohell.info/), [Quakespasm-Spiked](http://triptohell.info/moodles/qss/), [vkQuake](https://github.com/Novum/vkQuake) (version 1.05.0 and later), and [DarkPlaces](https://icculus.org/twilight/darkplaces/) can do it, and I've included examples in the conf file that work with those engines.
120122

scripts/quakelaunch

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -638,31 +638,35 @@ then
638638
fi
639639
fi
640640
fi
641-
# If basegame_args was not explicitly set in a gamedir-specific conf, see if
642-
# we can figure out any required basegame from grepping docs. (Only do this
643-
# if the mod is not "standalone".)
641+
# For a non-standalone mod where basegame_args was not explicitly set in a
642+
# gamedir-specific conf, see if we can figure out any required basegame from
643+
# grepping docs. Arcane Dimensions is somewhat different; we assume AD if
644+
# and only if a bsp has the "ad_" prefix, as that works for every existing
645+
# map currently. (Note that we don't have to worry about maps inside pak files
646+
# since this logic only applies to non-standalone releases.)
644647
if [[ $calc_basegame_args == "true" && $(is_standalone_gamedir "$mod") == "false" ]]
645648
then
646-
if [[ $(docscheck "quoth" "$mod") == "true" ]]
649+
ad_bsps=$(ls -1d "$basedir"/"$mod"/maps/ad_*.bsp 2>/dev/null)
650+
if [[ -n "$ad_bsps" ]]
647651
then
648-
basegame_args=-quoth
652+
if [[ -n "$ad_basegame_args" ]]
653+
then
654+
basegame_args=$ad_basegame_args
655+
else
656+
basegame_error="ad"
657+
fi
649658
else
650-
if [[ $(docscheck "-hipnotic\|-game hipnotic" "$mod") == "true" ]]
659+
if [[ $(docscheck "quoth" "$mod") == "true" ]]
651660
then
652-
basegame_args=-hipnotic
661+
basegame_args=-quoth
653662
else
654-
if [[ $(docscheck "-rogue\|-game rogue" "$mod") == "true" ]]
663+
if [[ $(docscheck "-hipnotic\|-game hipnotic" "$mod") == "true" ]]
655664
then
656-
basegame_args=-rogue
665+
basegame_args=-hipnotic
657666
else
658-
if [[ $(docscheck "arcane dimension" "$mod") == "true" ]]
667+
if [[ $(docscheck "-rogue\|-game rogue" "$mod") == "true" ]]
659668
then
660-
if [[ -n "$ad_basegame_args" ]]
661-
then
662-
basegame_args=$ad_basegame_args
663-
else
664-
basegame_error="ad"
665-
fi
669+
basegame_args=-rogue
666670
else
667671
if [[ $(docscheck "copper" "$mod") == "true" ]]
668672
then

0 commit comments

Comments
 (0)