SM small improvements (#190)
* added a fallback default starting location instead of failing generation if an invalid one was chosen * added Nothing and NoEnergy as hint blacklist added missing NoEnergy as local items and removed it from progression
This commit is contained in:
parent
0c3b5439e9
commit
a6a9989fcf
|
@ -44,6 +44,7 @@ class SMWorld(World):
|
||||||
itemManager: ItemManager
|
itemManager: ItemManager
|
||||||
|
|
||||||
locations = {}
|
locations = {}
|
||||||
|
hint_blacklist = {'Nothing', 'NoEnergy'}
|
||||||
|
|
||||||
Logic.factory('vanilla')
|
Logic.factory('vanilla')
|
||||||
|
|
||||||
|
@ -85,6 +86,7 @@ class SMWorld(World):
|
||||||
# keeps Nothing items local so no player will ever pickup Nothing
|
# keeps Nothing items local so no player will ever pickup Nothing
|
||||||
# doing so reduces contribution of this world to the Multiworld the more Nothing there is though
|
# doing so reduces contribution of this world to the Multiworld the more Nothing there is though
|
||||||
self.world.local_items[self.player].value.add('Nothing')
|
self.world.local_items[self.player].value.add('Nothing')
|
||||||
|
self.world.local_items[self.player].value.add('NoEnergy')
|
||||||
|
|
||||||
if (self.variaRando.args.morphPlacement == "early"):
|
if (self.variaRando.args.morphPlacement == "early"):
|
||||||
self.world.local_items[self.player].value.add('Morph')
|
self.world.local_items[self.player].value.add('Morph')
|
||||||
|
@ -126,7 +128,7 @@ class SMWorld(World):
|
||||||
weaponCount[2] += 1
|
weaponCount[2] += 1
|
||||||
else:
|
else:
|
||||||
isAdvancement = False
|
isAdvancement = False
|
||||||
elif item.Type == 'Nothing':
|
elif item.Category == 'Nothing':
|
||||||
isAdvancement = False
|
isAdvancement = False
|
||||||
|
|
||||||
itemClass = ItemManager.Items[item.Type].Class
|
itemClass = ItemManager.Items[item.Type].Class
|
||||||
|
|
|
@ -16,6 +16,7 @@ from utils.doorsmanager import DoorsManager
|
||||||
from logic.logic import Logic
|
from logic.logic import Logic
|
||||||
|
|
||||||
import utils.log
|
import utils.log
|
||||||
|
from worlds.sm.Options import StartLocation
|
||||||
|
|
||||||
# we need to know the logic before doing anything else
|
# we need to know the logic before doing anything else
|
||||||
def getLogic():
|
def getLogic():
|
||||||
|
@ -498,10 +499,12 @@ class VariaRandomizer:
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
args.startLocation = random.choice(possibleStartAPs)
|
args.startLocation = random.choice(possibleStartAPs)
|
||||||
elif args.startLocation not in possibleStartAPs:
|
elif args.startLocation not in possibleStartAPs:
|
||||||
optErrMsgs.append('Invalid start location: {}. {}'.format(args.startLocation, reasons[args.startLocation]))
|
args.startLocation = 'Landing Site'
|
||||||
optErrMsgs.append('Possible start locations with these settings: {}'.format(possibleStartAPs))
|
world.start_location[player] = StartLocation(StartLocation.default)
|
||||||
dumpErrorMsgs(args.output, optErrMsgs)
|
#optErrMsgs.append('Invalid start location: {}. {}'.format(args.startLocation, reasons[args.startLocation]))
|
||||||
sys.exit(-1)
|
#optErrMsgs.append('Possible start locations with these settings: {}'.format(possibleStartAPs))
|
||||||
|
#dumpErrorMsgs(args.output, optErrMsgs)
|
||||||
|
#sys.exit(-1)
|
||||||
ap = getAccessPoint(args.startLocation)
|
ap = getAccessPoint(args.startLocation)
|
||||||
if 'forcedEarlyMorph' in ap.Start and ap.Start['forcedEarlyMorph'] == True:
|
if 'forcedEarlyMorph' in ap.Start and ap.Start['forcedEarlyMorph'] == True:
|
||||||
forceArg('morphPlacement', 'early', "'Morph Placement' forced to early for custom start location")
|
forceArg('morphPlacement', 'early', "'Morph Placement' forced to early for custom start location")
|
||||||
|
|
Loading…
Reference in New Issue