Skip to content

Commit

Permalink
Merge pull request #16 from AlexAzumi/persistent-control
Browse files Browse the repository at this point in the history
Added a new menu for character control (.chr files).
Mentioned in #18.
  • Loading branch information
saber-nyan authored Jan 16, 2018
2 parents ced637e + 1ae0d25 commit c939202
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The license of the original game is not specified, but developer [is against](ht
## TODO
- [x] Extract, decompile
- [x] Fix poem game
- [ ] Fix `*.chr`-files (**spoilers!**)
- [x] Fix `*.chr`-files (kawaii menu, thanks to [@AlexAzumi](https://github.com/AlexAzumi)! See [#16](https://github.com/saber-nyan/ddlc-android/pull/16))
- [x] Fix dialogbox (bug [reasons](boxes_sizing.txt), in russian)
- [x] Test build
- [ ] Resolve all Issues **and**...
Expand Down
2 changes: 1 addition & 1 deletion README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## TODO
- [x] Распаковать, декомпилировать, проверить работу
- [x] Пофиксить поэму
- [ ] Пофиксить интересные вещи, связанные с `*.chr`-файлами (**spoilers!**)
- [x] Пофиксить интересные вещи, связанные с `*.chr`-файлами (няшное меню, спасибо [@AlexAzumi](https://github.com/AlexAzumi)! См. [#16](https://github.com/saber-nyan/ddlc-android/pull/16))
- [x] Пофиксить диалоговое окно (глючит на каждом устройстве. Нашел [причины](boxes_sizing.txt)!)
- [x] Собрать тест
- [ ] Решить все Issues **и**...
Expand Down
7 changes: 6 additions & 1 deletion game/definitions.rpy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define persistent.demo = False
define persistent.steam = True
define persistent.steam = False
define config.developer = True # FIXME: set to False b4 release

python early:
Expand Down Expand Up @@ -29,6 +29,11 @@ init python:
for char in ("monika", "natsuki", "yuri", "sayori"): # TO!DONE: character fix!
restore_character(char)
renpy.save_persistent()
def check_if_exist(name): #Changed
try:
return getattr(persistent, name) == "restored"
except:
return True
def pause(time=None):
if not time:
renpy.ui.saybehavior(afm=" ")
Expand Down
59 changes: 39 additions & 20 deletions game/screens.rpy
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@











init -1 style default:
font gui.default_font
size gui.text_size
Expand Down Expand Up @@ -471,7 +460,9 @@ init -501 screen navigation():
textbutton _("Main Menu") action NullAction()

textbutton _("Settings") action [ShowMenu("preferences"), SensitiveIf(renpy.get_screen("preferences") == None)]


#Added by AlexAzumi
textbutton _("Characters") action [ShowMenu("characters"), SensitiveIf(renpy.get_screen("characters") == None)]


if renpy.variant("pc"):
Expand Down Expand Up @@ -917,14 +908,42 @@ init -1 style slot_button_text:
color "#666"
outlines []









#Added by AlexAzumi
init -501 screen characters() tag menu:
use game_menu(_("Files"), scroll ="viewport"):
vbox:
style_prefix "navigation"
xoffset 50
frame:
xpadding 10
ypadding 10
xalign 1
yalign 1
vbox:
label "Characters":
xalign 0.5
text_size 50
null height 10
textbutton "Restore all characters":
action [Function(restore_all_characters), Show(screen="dialog", message="All characters have been restored", ok_action=Hide("dialog"))]
null height 5

textbutton "Delete Monika":
action [Function(delete_character, "monika"), Show(screen="dialog", message="Monika has been deleted", ok_action=Hide("dialog"))]
null height 5

textbutton "Delete Natsuki":
action [Function(delete_character, "natsuki"), Show(screen="dialog", message="Natsuki has been deleted", ok_action=Hide("dialog"))]
null height 5

textbutton "Delete Sayori":
action [Function(delete_character, "sayori"), Show(screen="dialog", message="Sayori has been deleted", ok_action=Hide("dialog"))]
null height 5

textbutton "Delete Yuri":
action [Function(delete_character, "yuri"), Show(screen="dialog", message="Yuri has been deleted", ok_action=Hide("dialog"))]


init -501 screen preferences() tag menu:


Expand Down
11 changes: 4 additions & 7 deletions game/script-ch30.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,8 @@ label ch30_main2:
m "And you wouldn't believe how easy it was to delete Natsuki and Yuri."
m "I mean, there's a folder called 'characters' right in the game directory..."
m "It kind of freaked me out, how easy it was."
if persistent.steam:
m "Well, you're playing on Steam, so it was actually a bit more difficult..."
m "To get to the game directory, I had to go into the game's properties and find the 'Browse Local Files' button..."
m "Well, you're playing on Android, so it was actually a bit less difficult..."
m "I had to go to 'Settings' and find the 'Characters' button..." # TODOne: monika fix
elif renpy.macintosh:
m "Well, you're on a Mac, so it was actually a bit more difficult..."
m "To go into the game directory, you have to right-click the app and click 'Show Package Contents'."
Expand Down Expand Up @@ -802,8 +801,7 @@ label ch30_reload_2:
m "There's nothing wrong with my character file, right?"
m "Maybe you should make a backup of it or something..."
m "I'm pretty sure you can find it in the folder called [basedir]/characters."
if persistent.steam:
m "Well, you're playing on Steam, so you can just go into the game's properties and find the 'Browse Local Files' button."
m "Well, you're playing on Android, so you can just go to 'Settings' and find the 'Characters' button." # TODOne: monika fix
elif renpy.macintosh:
m "Since you're on a Mac, you have to right-click the app and select 'Show Package Contents' to find the game folder."
m "It's in the 'Resources' folder, or 'autorun' folder, or something..."
Expand All @@ -825,8 +823,7 @@ label ch30_reload_4:
m "I missed you."
m "Were you making sure my character file was okay for me?"
m "It's in [basedir]/characters."
if persistent.steam:
m "Well, you're playing on Steam, so you can just go into the game's properties and find the 'Browse Local Files' button."
m "Well, you're playing on Android, so you can just go to 'Settings' and find the 'Characters' button." # TODOne: monika fix
elif renpy.macintosh:
m "Since you're on a Mac, you have to right-click the app and select 'Show Package Contents' to find the game folder."
m "It's in the 'Resources' folder, or 'autorun' folder, or something..."
Expand Down

0 comments on commit c939202

Please sign in to comment.