1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-12 15:26:00 +00:00

dice values are now editable in Shift+G

This commit is contained in:
Zeno Rogue
2021-06-16 13:13:13 +02:00
parent 41e11a63dc
commit c953b2dda6
2 changed files with 38 additions and 0 deletions

View File

@@ -959,6 +959,8 @@ EX namespace dice {
vector<die_structure*> die_list = {&d4, &d6, &d8, &d12, &d20};
#if HDR
extern vector<struct die_structure*> die_list;
struct die_data {
struct die_structure *which;
int val; /* the current face value */
@@ -967,6 +969,10 @@ EX namespace dice {
int happy();
};
#endif
EX int shape_faces(die_structure *w) { return w->faces; }
EX string die_name(die_structure *w) { return its(w->faces); }
int die_data::happy() {
if(val == which->faces-1) return 1;