-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinjection-madelis-lab.rb
More file actions
39 lines (34 loc) · 1.32 KB
/
injection-madelis-lab.rb
File metadata and controls
39 lines (34 loc) · 1.32 KB
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
class Game_Screen
attr_accessor :crawli_madelislabskip
end
InjectionHelper.registerScriptSwitch("$game_screen.crawli_madelislabskip")
InjectionHelper.defineMapPatch(124) { |map|
map.createNewEvent(16, 26, "Accessibility Option") { |event|
event.newPage { |page|
page.interact(
[:ShowText, "Welcome to Madelis' wonderful accessibility services."],
[:ShowText, "Here to remind you that while we're evil, we're not ableist."],
[:ShowText, "Would you like to disable the gates in this laboratory?"],
[:ShowChoices, ["Yes", "No"], 2],
[:When, 0, "Yes"],
[:PlaySoundEvent, 'PRSFX- Metal Burst2', 80, 100],
[:Script, "$game_screen.crawli_madelislabskip=true"],
[:Script, "$game_map.need_refresh=true"],
:Done,
[:When, 1, "No"],
:Done)
}
event.newPage { |page|
page.requiresSwitch(InjectionHelper.getScriptSwitch("$game_screen.crawli_madelislabskip"))
}
}
}
InjectionHelper.defineMapPatch(-1) { |map|
map.events.values.each { |event|
if event.pages.any? { |it| it.graphic.character_name == "object_madelisgate" || it.graphic.character_name == "object_madelisgate_1" }
event.newPage { |page|
page.requiresSwitch(InjectionHelper.getScriptSwitch("$game_screen.crawli_madelislabskip"))
}
end
}
}