mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
CLOSES #1206, CLOSES #1189, CLOSES #1175, CLOSES #1129, CLOSES #1119, CLOSES #1089, CLOSES #1073, CLOSES #1069, CLOSES #1065, CLOSES #1010, CLOSES #990, CLOSES #989, CLOSES #988, CLOSES #978, CLOSES #944, CLOSES #936, CLOSES #1221, CLOSES #1220, CLOSES #1193, CLOSES #1101, CLOSES #1066, CLOSES #1056, CLOSES #1041, CLOSES #984, CLOSES #1225, CLOSES #1214, CLOSES #1011, CLOSES #1035, CLOSES #1219, CLOSES #1048, CLOSES #1047, CLOSES #964, CLOSES #949, CLOSES #1149, CLOSES #1007, CLOSES #914, CLOSES #1115, CLOSES #1146, CLOSES #999, CLOSES #1207, CLOSES #1029, CLOSES #1120, CLOSES #987, CLOSES #983
This commit is contained in:
+17
-3
@@ -526,6 +526,22 @@ function Commands.set_field(ctx, key, value)
|
||||
ctx.save[key] = value
|
||||
end
|
||||
|
||||
function Commands.load_player_starter_name(ctx)
|
||||
local flags = ctx.save.flags or {}
|
||||
local species = flags.EVENT_CHOSE_PIKACHU and "PIKACHU"
|
||||
or flags.EVENT_CHOSE_CHARMANDER and "CHARMANDER"
|
||||
or flags.EVENT_CHOSE_SQUIRTLE and "SQUIRTLE"
|
||||
or flags.EVENT_CHOSE_BULBASAUR and "BULBASAUR"
|
||||
or (ctx.save.party and ctx.save.party[1] and ctx.save.party[1].species)
|
||||
local def = species and ctx.game.data.pokemon[species]
|
||||
ctx.game.stringBuffer = def and def.name or species or ""
|
||||
end
|
||||
|
||||
function Commands.spawn_pikachu_follower(ctx)
|
||||
require("src.world.PikachuFollower").onMapEntered(
|
||||
ctx.game, ctx.overworld, nil, false)
|
||||
end
|
||||
|
||||
local function toggleObject(ctx, mapId, objName, visible)
|
||||
local save = ctx.save
|
||||
save.objectToggles = save.objectToggles or {}
|
||||
@@ -1131,9 +1147,7 @@ end
|
||||
-- opts.tempo is the Music_*AlternateTempo override (audio/alternate_tempo.asm
|
||||
-- re-points channel 1 at a stub that only changes the song's `tempo`) (#847).
|
||||
function Commands.play_music(ctx, songId, opts)
|
||||
local tempo = opts and opts.tempo
|
||||
require("src.core.Music").play(ctx.game.data, songId, nil,
|
||||
tempo and { tempo = tempo } or nil)
|
||||
require("src.core.Music").play(ctx.game.data, songId, nil, opts)
|
||||
if opts and opts.keep and ctx.overworld then
|
||||
ctx.overworld.keepMusicOnce = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user