1
0
mirror of synced 2024-09-23 19:08:21 +02:00

Frontend admin support for Peace

This commit is contained in:
tyam 2021-09-09 23:15:05 -05:00 committed by GitHub
parent 25adc43696
commit 2983ee2926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 912 additions and 13 deletions

View File

@ -1,5 +1,5 @@
# vim: set fileencoding=utf-8
from typing import Dict, Tuple
from typing import Any, Dict, Tuple
from bemani.backend.popn.base import PopnMusicBase
from bemani.backend.popn.common import PopnMusicModernBase
@ -27,9 +27,134 @@ class PopnMusicPeace(PopnMusicModernBase):
def previous_version(self) -> PopnMusicBase:
return PopnMusicUsaNeko(self.data, self.config, self.model)
@classmethod
def get_settings(cls) -> Dict[str, Any]:
"""
Return all of our front-end modifiably settings.
"""
return {
'ints': [
{
'name': 'Music Open Phase',
'tip': 'Default music phase for all players.',
'category': 'game_config',
'setting': 'music_phase',
'values': {
# The value goes to 23 now, but it starts where usaneko left off at 11
# Unlocks a total of 53 songs
12: 'No music unlocks',
13: 'Phase 1',
14: 'Phase 2',
15: 'Phase 3',
16: 'Phase 4',
17: 'Phase 5',
18: 'Phase 6',
19: 'Phase 7',
20: 'Phase 8',
21: 'Phase 9',
22: 'Phase 10',
23: 'Phase MAX',
}
},
{
'name': 'NAVI-Kun Event Phase',
'tip': 'NAVI-Kun event phase for all players.',
'category': 'game_config',
'setting': 'navikun_phase',
'values': {
# The value goes to 30 now, but it starts where usaneko left off at 15
# Unlocks a total of 89 songs
15: 'Phase 1',
16: 'Phase 2',
17: 'Phase 3',
18: 'Phase 4',
19: 'Phase 5',
20: 'Phase 6',
21: 'Phase 7',
22: 'Phase 8',
23: 'Phase 9',
24: 'Phase 10',
25: 'Phase 11',
26: 'Phase 12',
27: 'Phase 13',
28: 'Phase 14',
29: 'Phase 15',
30: 'Phase MAX',
},
},
{
# For festive times, it's possible to change the welcome greeting. I'm not sure why you would want to change this, but now you can.
'name': 'Holiday Greeting',
'tip': 'Changes the payment selection confirmation sound.',
'category': 'game_config',
'setting': 'holiday_greeting',
'values': {
0: 'Okay!',
1: 'Merry Christmas!',
2: 'Happy New Year!',
}
},
{
# The following values control the pop'n music event archive. Setting the flag to the following values has the
# corresponding effect. Each value will include the events above it, for example setting it to 5 gives you the
# pop'n 15 event, as well as SP, 12, and 11 events. Setting it to 0 disabled the event and skips the entire screen,
#setting it to 20 makes all of the events available for selection. Completing the minigame unlocks the associated content.
'name': 'Event Archive Phase',
'tip': 'Event Archive mini-game phase for all players.',
'category': 'game_config',
'setting': 'event_archive_phase',
'values': {
0: 'Event Archive disabled',
1: 'pop\'n music 11 - The Latest Space Station',
2: 'pop\'n music 11 & 12 Iroha - The Southernmost Point of the Universe / Ninja Otasuke Cheat Sheet in Trouble',
3: 'pop\'n music Sunny Park - I Love Walking in Happiness Park',
4: 'pop\'n music 12 Iroha - Ninja Code: April 1st Volume',
5: 'pop\'n music 15 ADVENTURE - Route to Awaken the Soul',
6: 'pop\'n music 20 fantasia - A Braided Fantasy Song',
7: 'EXTRA',
8: 'pop\'n music 15 ADVENTURE - A Route with a Faint Bell Sound',
9: 'pop\'n music 13 Carnival - Bunny Magician Attraction',
10: 'pop\'n music 14 FEVER! - That Burning Special Attack, again!',
11: 'pop\'n music Sunny Park - Festival Nightfall Park',
12: 'pop\'n music 20 fantasia - A Fantasy Song by the Bladed Warrior',
13: 'pop\'n music 19 TUNE STREET - A Town Where the Sound of the Brass Band Rings After School',
14: 'pop\'n music éclale - Fun Rag Hour',
15: 'pop\'n music 13 Carnival - Ghost Piano Attraction',
16: 'pop\'n music 14 FEVER! - That Warrior Defending Peace, again!',
17: 'pop\'n music 18 Sengoku Retsuden - A Territory with a Glamorous Cultural Flavor',
18: 'pop\'n music éclale - Runaway Guitarist in the Starry Sky',
19: 'pop\'n music 17 THE MOVIE - A Blockbuster Uncovering a Conspiracy in the Peaceful City',
20: 'pop\'n music lapistoria - God\'s Forgotten Things',
}
},
],
'bools': [
# Enable Net Taisen, including win/loss display on song select (0-1)
{
'name': 'Net Taisen',
'tip': 'Enable Net Taisen, including win/loss display on song select',
'category': 'game_config',
'setting': 'enable_net_taisen',
},
{
'name': 'Force Song Unlock',
'tip': 'Force unlock all songs.',
'category': 'game_config',
'setting': 'force_unlock_songs',
},
],
}
def get_common_config(self) -> Tuple[Dict[int, int], bool, int]:
game_config = self.get_game_config()
music_phase = game_config.get_int('music_phase')
event_archive_phase = game_config.get_int('event_archive_phase')
holiday_greeting = game_config.get_int('holiday_greeting')
enable_net_taisen = game_config.get_bool('enable_net_taisen')
navikun_phase = game_config.get_int('navikun_phase')
# Event phases
# TODO: Hook event mode settings up to the front end.
return (
{
# Default song phase availability (0-23)
@ -58,17 +183,17 @@ class PopnMusicPeace(PopnMusicModernBase):
# 21 - 1818
# 22 - 1825
# 23 - 1858, 1857
0: 23,
0: music_phase,
# Unknown event (0-4)
1: 4,
# Unknown event (0-2)
2: 2,
# Holiday Greeting (0-2)
2: holiday_greeting,
# Unknown event (0-4)
3: 4,
# Unknown event (0-1)
4: 1,
# Enable Net Taisen, including win/loss display on song select (0-1)
5: 1,
5: enable_net_taisen,
# Enable NAVI-kun shunkyoku toujou, allows song 1608 to be unlocked (0-1)
6: 1,
# Unknown event (0-1)
@ -109,14 +234,14 @@ class PopnMusicPeace(PopnMusicModernBase):
# 28 - 1692, 1693, 1694
# 29 - 1696, 1697, 1698, 1699, 1700, 1701, 1702
# 30 - 1682, 1683, 1684
10: 30,
10: navikun_phase,
# Unknown event (0-1)
11: 1,
# Unknown event (0-2)
12: 2,
# Enable Pop'n Peace preview song (0-1)
13: 1,
# Unknown event (0-39)
# Stamp Card Rally (0-39)
14: 39,
# Unknown event (0-2)
15: 2,
@ -124,11 +249,11 @@ class PopnMusicPeace(PopnMusicModernBase):
16: 3,
# Unknown event (0-8)
17: 8,
# Appears to be floor infection (0-1)
# FLOOR INFECTION event (0-1)
# The following songs are linked to this event:
# 1 - 1223, 1224, 1225, 1239, 1240, 1241, 1245, 1247, 1340, 1342, 1394, 1523, 1524, 1525, 1598, 1667, 1668, 1666
18: 1,
# Appears to be pop'n music × NOSTALGIA kyouenkai (0-1)
# pop'n music × NOSTALGIA kyouenkai (0-1)
# Setting this to 1 is linked to the song 1695
19: 1,
# Event archive event (0-13)
@ -148,7 +273,7 @@ class PopnMusicPeace(PopnMusicModernBase):
# 13 - 1833, 1824
20: 13,
# Pop'n event archive song phase availability (0-20)
21: 20,
21: event_archive_phase,
# バンめし♪ ふるさとグランプリunlocks (split into two rounds) (0-2)
# The following songs are linked to this event:
# 1 - 1851, 1852, 1853, 1854

View File

@ -54,6 +54,18 @@ class PopnMusicUsaNeko(PopnMusicModernBase):
11: 'Phase MAX',
}
},
{
# For festive times, it's possible to change the welcome greeting. I'm not sure why you would want to change this, but now you can.
'name': 'Holiday Greeting',
'tip': 'Changes the payment selection confirmation sound.',
'category': 'game_config',
'setting': 'holiday_greeting',
'values': {
0: 'Okay!',
1: 'Merry Christmas!',
2: 'Happy New Year!',
}
},
{
'name': 'Active Event',
'tip': 'Active event for all players.',
@ -103,6 +115,7 @@ class PopnMusicUsaNeko(PopnMusicModernBase):
def get_common_config(self) -> Tuple[Dict[int, int], bool, int]:
game_config = self.get_game_config()
music_phase = game_config.get_int('music_phase')
holiday_greeting = game_config.get_int('holiday_greeting')
active_event = game_config.get_int('active_event')
navikun_phase = game_config.get_int('navikun_phase')
@ -128,8 +141,8 @@ class PopnMusicUsaNeko(PopnMusicModernBase):
0: music_phase,
# Unknown event (0-2)
1: 2,
# Unknown event (0-2)
2: 2,
# Holiday Greeting (0-2)
2: holiday_greeting,
# Unknown event (0-4)
3: 4,
# Unknown event (0-1)

View File

@ -0,0 +1,35 @@
.bishi.border {
border-color: #EF6A32;
}
.mga.border {
border-color: #ff0000;
}
.ddr.border {
border-color: #017351;
}
.iidx.border {
border-color: #A12A5E;
}
.jubeat.border {
border-color: #FBBF45;
}
.museca.border {
border-color: #AAD962;
}
.pnm.border {
border-color: #ED0345;
}
.reflec.border {
border-color: #03C383;
}
.sdvx.border {
border-color: #710162;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,130 @@
form.inline {
margin: 0px;
}
form.inline label {
display: block;
}
form.inline label.inline {
display: inline-block;
}
form.inline div.row {
padding-bottom: 5px;
}
form.inline select {
vertical-align: bottom;
margin-right: 5px;
}
input.inline {
margin-right: 5px;
}
button::-moz-focus-inner, input::-moz-focus-inner {
border:0;
padding:0;
}
form div.action {
margin-top: 5px;
}
option.placeholder {
font-style: italic;
}
div.buttons {
padding-top:5px;
}
input[type="submit"] {
border: 1px solid #cddcc1;
background: #49B979;
margin-right: 5px;
}
input[type="button"], button.nav, button.toggle, button.edit, button.add, button.viewmore, button.btn-default {
border: 1px solid #dadada;
color: #b0b1b2;
background: #282828;
margin-right: 5px;
}
input[type="submit"], input[type="button"], button {
border-radius: 0px;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 12px;
padding-right: 12px;
cursor: pointer;
}
input[type="text"], input[type="password"], textarea {
border: 1px solid #dadada;
padding: 4px;
border-radius: 0px;
background-color: #b3b4b5;
}
select {
border: 1px solid #dadada;
padding: 4px 4px 3px 4px;
border-radius: 0px;
background: #dadada;
}
input[type="button"] {
margin-right: 5px;
}
button.toggle:not(:last-child):not(:only-child), button.edit:not(:last-child):not(:only-child), button.delete:not(:last-child):not(:only-child), button.add:not(:last-child):not(:only-child), button.nav:not(:last-child):not(:only-child) {
margin-right: 5px;
}
span + button.edit, span + button.toggle, span + button.delete, span + button.add,
div + button.edit, div + button.toggle, div + button.delete, div + button.add {
margin-left: 15px;
background-color: #282828;
color: #b3b3b3;
}
button.nav {
margin-bottom: 5px;
margin-right: 0px;
border: 1px solid #dadada;
background-color: #282828;
}
button.prev::before {
content: "\2190";
font-weight: bold;
margin-right: 5px;
}
button.next::after {
content: "\2192";
font-weight: bold;
margin-left: 5px;
}
button.active {
text-shadow: 0.33px 0.33px #000000;
border: 1px solid #999999;
}
button {
color: #b3b3b3;
background-color: #282828;
}
button.delete {
border: 1px solid #d6caca;
background: #B94949;
}
.popn-nav button, .settings-nav button {
height: 32px;
}

View File

@ -0,0 +1,187 @@
div.container div.section:not(:first-child) {
padding-top: 20px;
clear: both;
}
div.container div.floating.right {
float: right;
}
span.separator {
font-size: large;
font-weight: bold;
padding-left: 5px;
padding-right: 5px;
}
div.labelledsection.horizontal {
display: inline-block;
margin: 0px;
}
div.labelledsection.vertical {
display: block;
margin-bottom: 5px;
}
div.labelledsection.horizontal:not(:last-child):not(:only-child) {
margin-right: 20px;
}
div.labelledsection div.label {
font-weight: bold;
}
div.labelledsection div.content {
margin: 0px;
padding-bottom: 0px;
font-size: small;
}
div.labelledsection.centered div.content, div.labelledsection.centered div.label {
text-align: center;
}
div.labelledsection.padded {
text-align: center;
width: 150px;
padding-top: 20px;
padding-bottom: 20px;
}
div.labelledsection.filled {
background-color: #f7f7f7;
border: 1px dashed #dddddd;
}
span.separator {
font-size: large;
font-weight: bold;
padding-left: 5px;
padding-right: 5px;
}
div.labelledsection.iidx.themeoption select {
width: 200px;
}
div.labelledsection.iidx.qprooption select {
width: 300px;
}
div.labelledsection.ddr.option select {
width: 200px;
}
div.iidx.menuoption label, div.arcade.menuoption label {
position: relative;
vertical-align: middle;
bottom: 3px;
font-size: small;
}
div.iidx.menuoption, div.arcade.menuoption {
padding-bottom: 5px;
}
div.arcade.menuoption label {
display: inline-block;
min-width: 200px;
}
div.score span.label {
font-size: smaller;
font-weight: bold;
}
div.score span.status {
font-size: smaller;
font-weight: bold;
}
div.score span.score {
padding-left: 3px;
padding-right: 3px;
}
div.score span.grade {
font-weight: bold;
padding-right: 3px;
}
div.songname {
font-weight: bold;
font-size: large;
}
div.songartist, div.songgenre, div.songdifficulty, div.songplays {
font-size: small;
}
span.file {
font-family: monospace;
}
ul.ownerlist {
margin: 0px;
padding: 0px;
}
ul.ownerlist li {
margin-left: 25px;
margin-right: 10px;
}
div.card {
display: inline-block;
font-family: monospace;
}
div.placeholder, span.placeholder {
font-style: italic;
}
div.timestamp {
font-style: italic;
font-size: small;
padding-bottom: 5px;
}
span.loading {
font-size: small;
}
span.raised {
font-style: italic;
font-size: small;
font-weight: bold;
}
dl {
margin: 0px;
}
dt {
font-weight: bold;
}
dd {
margin: 0px;
padding-bottom: 5px;
}
div.longmessage {
margin-bottom: 10px;
}
div.longmessage pre {
border: 1px solid rgba(128, 128, 128, 0.33);
background: rgb(232, 232, 232);
padding: 5px;
margin-bottom: 0px;
}
span.filter:not(:last-child) {
padding-right: 20px;
}

View File

@ -0,0 +1,274 @@
body {
font-family: Helvetica;
color: #b3b3b3;
margin: 0px;
padding-bottom: 30px;
background-color: #121212;
}
a {
color: #878889;
}
div.messages {
padding-top: 0px;
padding-bottom: 0px;
padding-left: 10px;
padding-right: 10px;
margin: 0px;
}
div.container {
padding-top: 15px;
padding-bottom: 0px;
padding-left: 30px;
padding-right: 30px;
margin: 0px;
}
div.loading {
margin-left: 50%;
margin-right: 50%;
height: 20px;
}
div.navigation {
background-color: whitesmoke;
padding-left: 10px;
padding-right: 10px;
}
.tinynav {
display: none;
}
@media only screen and (max-width: 600px) {
.tinynav {
display: inline-block;
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
#nav {
display: none;
}
}
@media only screen and (hover: none) {
.tinynav {
display: inline-block;
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
#nav {
display: none;
}
}
ul.messages {
list-style: none;
padding: 0px;
margin: 0px;
}
ul.messages li {
padding: 5px;
margin-top: 10px;
border-radius: 0px;
font-size: smaller;
}
ul.messages div.close {
font-size: smaller;
text-decoration: none;
display: inline-block;
color: #000000;
float: right;
cursor: pointer;
margin-right: 3px;
}
ul.messages li.error {
border: 1px solid #e2afb6;
background-color: #ffced5;
}
ul.messages li.warning {
border: 1px solid #e6deb4;
background-color: #fff7ce;
}
ul.messages li.success {
border: 1px solid #cddcc1;
background: #e7ffd4;
}
ul.messages li.info {
border: 1px solid #b0b0d2;
background-color: #d0d0ff;
}
ul.navigation {
list-style: none;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 10px;
padding-right: 10px;
margin: 0px;
background-color: whitesmoke;
position: relative;
text-align: right;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
ul.navigation li {
display: inline-block;
padding: 0px;
}
ul.navigation_sub {
display: none;
position: absolute;
background-color: #e4e4e4;
padding: 10px;
margin: 0;
padding: 0;
min-width: 150px;
text-align: left;
}
ul.navigation_sub li {
float: none;
display: block;
position: relative;
padding: 0px;
margin: 0px;
}
ul.navigation_sub li a {
display: block;
}
a.cursor {
cursor: default;
}
ul.navigation li:hover ul.navigation_sub {
display: block;
}
ul.navigation li.left {
float: left;
}
ul.navigation div.separator {
cursor: default;
width: 25px;
}
ul.navigation li a {
border: 0px solid #676767;
display: block;
text-decoration: none;
padding: 10px;
color: #676767;
}
ul.navigation li a:hover {
background-color: #d2d2d2;
}
ul.navigation li a:active {
background-color: #d2d2d2;
}
ul.navigation > li > a.current {
border-bottom-width: 1.6px;
border-bottom-style: solid;
padding-bottom: 8.4px;
}
ul.navigation > li > ul.navigation_sub > li > a.current {
border-left-width: 2px;
border-left-style: solid;
padding-left: 8px;
}
h1, h2, h3, h4, h5 {
padding-top: 0px;
margin-top: 0px;
}
img.loading {
vertical-align: text-bottom;
}
div.tooltip {
position: relative;
display: inline-block;
}
button.nav span.alert {
padding-left: 5px;
color: #459900;
font-weight: bold;
}
div.tooltip span.tooltiptext {
visibility: hidden;
background-color: #555;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
width: 300px;
/* Position the tooltip text */
position: absolute;
top: -5px;
left: 105%;
z-index: 1;
}
div.tooltip span.tooltiptext::after {
content: "";
position: absolute;
top: 15px;
right: 100%;
margin-top: -5px;
border-width: 5px;
border-style: solid;
border-color: transparent #555 transparent transparent;
}
div.tooltip:hover span.tooltiptext {
visibility: visible;
}
div.pill {
display: inline-block;
border: 1px solid red;
background: pink;
border-radius: 5px;
padding-left: 10px;
margin-left: 10px;
padding-right: 10px;
}
pre {
white-space: pre-wrap;
}
span.sort {
float: right;
}
span.checkbox {
padding-right: 5px;
cursor: default;
}

View File

@ -0,0 +1,135 @@
table.list, table.add {
border-collapse: collapse;
}
thead tr th {
cursor: default;
}
table.add th {
text-align: left;
padding: 5px;
}
table.list th {
background-color: #192021;
font-weight: bold;
padding: 10px;
text-align: left;
border: 1px solid #e0e0e0;
}
table.list th.action {
background-color: #808080;
border: none;
}
table.list tbody td, table.add tbody td {
padding: 5px;
vertical-align: top;
}
table.list tbody td {
border: 1px solid #e0e0e0;
padding: 10px;
}
table td.center {
word-break: break-word;
text-align: center;
}
table.list input[type="text"], table.add input[type="text"] {
width: 100%;
}
table.list select, table.add select {
width: 100%;
}
table.list tbody tr:nth-child(odd) td {
background-color: #242526;
}
table.list tbody tr:nth-child(even) td {
background-color: #3a3b3c;
}
table td.subheader {
background-color: #e7e7e7 ! important;
font-weight: bold;
}
table tfoot td {
padding-top: 5px;
}
table.records, table.attempts, table.topscores, table.players, table.events {
width: 100%;
}
table.records a, table.attempts a, table.topscores a, table.players a {
text-decoration: none;
}
td.edit {
background-color: #808080 ! important;
border: none ! important;
}
td.nochart {
background-color: #181818 ! important;
}
table.list input[type="checkbox"], table.add input[type="checkbox"] {
width: 26px;
height: 26px;
margin: 0px;
}
table.events div.circle {
width: 16px;
height: 16px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
display: inline-block;
margin-left: 0px;
margin-right: 5px;
margin-top: 2px;
margin-bottom: -2px;
}
table.events td.details div.inline {
display: inline-block;
margin-right: 5px;
}
table.events td.details pre.inline {
display: inline-block;
margin: 0px;
}
table.events td.exception div.circle {
background-color: rgb(214, 72, 72);
}
table.events td.unhandled div.circle {
background-color: rgb(255, 165, 0);
}
table.events td.unauthorized div.circle {
background-color: rgb(119, 0, 119);
}
table.events td.scheduled div.circle {
background-color: #2d6ccc;
}
table.events td.pcbevent div.circle {
background-color: #26a226;
}
table.events td.transaction div.circle {
background-color: #f9ed00;
}