From 955399d1d873a68fafd703c878533d330a720e5b Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 25 May 2024 14:09:54 -0400 Subject: Enabled settings screen from main menu --- AnodyneArchipelago/Menu/BoxedConfigState.cs | 31 +++++++++++++++++++++++++ AnodyneArchipelago/Menu/MenuState.cs | 35 ++++++++++++++++++----------- 2 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 AnodyneArchipelago/Menu/BoxedConfigState.cs diff --git a/AnodyneArchipelago/Menu/BoxedConfigState.cs b/AnodyneArchipelago/Menu/BoxedConfigState.cs new file mode 100644 index 0000000..229b82c --- /dev/null +++ b/AnodyneArchipelago/Menu/BoxedConfigState.cs @@ -0,0 +1,31 @@ +using AnodyneSharp.States; +using AnodyneSharp.States.MenuSubstates; + +namespace AnodyneArchipelago.Menu +{ + internal class BoxedConfigState : State + { + private ConfigSubstate _substate = new(true); + + public BoxedConfigState() + { + _substate.GetControl(); + } + + public override void Update() + { + if (_substate.Exit) + { + Exit = true; + } + + _substate.Update(); + _substate.HandleInput(); + } + + public override void DrawUI() + { + _substate.DrawUI(); + } + } +} diff --git a/AnodyneArchipelago/Menu/MenuState.cs b/AnodyneArchipelago/Menu/MenuState.cs index 59a4fdf..c7be02a 100644 --- a/AnodyneArchipelago/Menu/MenuState.cs +++ b/AnodyneArchipelago/Menu/MenuState.cs @@ -26,6 +26,7 @@ namespace AnodyneArchipelago.Menu private UILabel _quitLabel; private State _substate = null; + private bool _hide = false; private string _apServer = ""; private string _apSlot = ""; @@ -109,6 +110,7 @@ namespace AnodyneArchipelago.Menu if (_substate.Exit) { _substate = null; + _hide = false; } return; @@ -131,19 +133,22 @@ namespace AnodyneArchipelago.Menu public override void DrawUI() { - _selector.Draw(); - _versionLabel1.Draw(); - _versionLabel2.Draw(); - _serverLabel.Draw(); - _serverValue.Draw(); - _slotLabel.Draw(); - _slotValue.Draw(); - _passwordLabel.Draw(); - _passwordValue.Draw(); - _connectionSwitcher.Draw(); - _connectLabel.Draw(); - _settingsLabel.Draw(); - _quitLabel.Draw(); + if (!_hide) + { + _selector.Draw(); + _versionLabel1.Draw(); + _versionLabel2.Draw(); + _serverLabel.Draw(); + _serverValue.Draw(); + _slotLabel.Draw(); + _slotValue.Draw(); + _passwordLabel.Draw(); + _passwordValue.Draw(); + _connectionSwitcher.Draw(); + _connectLabel.Draw(); + _settingsLabel.Draw(); + _quitLabel.Draw(); + } if (_substate != null) { @@ -257,6 +262,10 @@ namespace AnodyneArchipelago.Menu case 4: _substate = new ConnectionState(_apServer, _apSlot, _apPassword, OnConnected); break; + case 5: + _substate = new BoxedConfigState(); + _hide = true; + break; case 6: GlobalState.ClosingGame = true; break; -- cgit 1.4.1 Kelly Rauchenberger <fefferburbia@gmail.com> 2021-02-23 10:14:36 -0500 committer Kelly Rauchenberger <fefferburbia@gmail.com> 2021-02-23 10:14:36 -0500 Added connection between hallucination_cliff and hallucination_hot_spring' href='/tanetane/commit/res/scripts/hallucination_cliff.lua?id=1cf3ccd05b193e6090c3a61c0e2f54524e1a4ba7'>1cf3ccd ^
b844c61 ^


5ad7082 ^
a27a616 ^
b844c61 ^
dbc28c8 ^


















































































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98




                                                



                                                    


                                                                                                                              
                            
                                        
   


















































































                                                                                                          
hallucination_cliff = {}

function hallucination_cliff.off_bottom()
  ChangeMap("hallucination_interior", "fromTop")
end

function hallucination_cliff.off_left()
  ChangeMap("hallucination_hot_spring", "fromRight")
end

function hallucination_cliff.enter_door()
  CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "pink_shell", Direction.DOWN, SpriteLayer.NORMAL)
  PlaySound("door_open.wav")
  ChangeMap("pink_shell", "fromOutside")
end

function hallucination_cliff.claus_fall_event()
  -- do not trigger if we don't have claus
  if not gamestate.still_has_claus then
    return
  end

  -- do not trigger a second time
  if gamestate.claus_fall_scene then
    return
  end

  gamestate.claus_fall_scene = true

  -- have the player automatically climb most of the ladder. this is to ensure
  -- that Claus is off screen when the event triggers.
  DisablePlayerControl()
  Halt("lucas")
  DirectSpriteToLocation("lucas", "near_top_first_ladder", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
  WaitForSpritePath("lucas")
  DisableBehaviour("lucas")

  StartCutscene(CutsceneOptions.DO_NOT_CHANGE_ANIMATION)
  DisplayMessage("* Aiee!", "Claus", SpeakerType.MAN)
  PlaySound("wobble_and_fall.wav")
  WaitForEndOfMessage()

  Delay(1000)

  PlaySound("thud.wav")
  ShakeCamera(100)
  Delay(50)

  ShowExpression("lucas", "surprise")
  Delay(50)

  ShowExpression("kuma", "surprise")
  ShowExpression("duster", "surprise")
  Delay(100)

  StopShakingCamera()
  Delay(1000)

  MoveSpriteToWarp("join_claus", "claus_fall_location")
  SetDirection("join_claus", Direction.LEFT)
  SetAnimation("join_claus", "collapsed")
  PanToSprite("join_claus", 4000)
  Delay(1000)

  RemoveExpression("lucas")
  RemoveExpression("kuma")
  RemoveExpression("duster")
  WaitForPan()

  Delay(1000)

  -- we need to break up the party to detach Claus anyway, and while we're there
  -- we should turn down the movement speed because the pathfinding algorithm
  -- doesn't take media into consideration, and if we don't change the speed
  -- before adding the other characters back, they'll bunch up as they move down
  BreakUpParty("lucas")
  SetMovementSpeed("lucas", 1)
  character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("kuma"))
  character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster"))
  character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney"))

  UnpauseSprite("lucas")
  DirectSpriteToLocation("lucas", "near_bottom_first_ladder", PathfindingOptions.CARDINAL_DIRECTIONS_ONLY)
  WaitForSpritePath("lucas")
  DisableBehaviour("lucas")
  PauseSprite("lucas")
  SetAnimation("lucas", "frozen") -- so he doesn't blink

  -- TODO: rest of scene

  -- same as before but less justifiable because the only reason we're doing
  -- this is to fix the movement trails
  -- BreakUpParty("lucas")
  -- SetMovementSpeed("lucas", 2)
  -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("kuma"))
  -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("duster"))
  -- character():addSpriteToParty(getPlayerSprite(), getSpriteByAlias("boney"))
end