Skip to content

Commit 2dba5de

Browse files
committed
turn off game specific behaviors based on time
1 parent 5fa0b86 commit 2dba5de

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/hacklib.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,9 @@ phase_of_the_moon() /* 0-7, with 0: new, 4: full */
11061106
if ((epact == 25 && goldn > 11) || epact == 24)
11071107
epact++;
11081108

1109-
return ((((((diy + epact) * 6) + 11) % 177) / 22) & 7);
1109+
// return ((((((diy + epact) * 6) + 11) % 177) / 22) & 7);
1110+
// turn off game changes based on phase_of_the_moon
1111+
return 1;
11101112
}
11111113

11121114
boolean
@@ -1115,21 +1117,27 @@ friday_13th()
11151117
register struct tm *lt = getlt();
11161118

11171119
/* tm_wday (day of week; 0==Sunday) == 5 => Friday */
1118-
return (boolean) (lt->tm_wday == 5 && lt->tm_mday == 13);
1120+
// return (boolean) (lt->tm_wday == 5 && lt->tm_mday == 13);
1121+
// turn off game changes based on friday_13th
1122+
return (boolean) 0;
11191123
}
11201124

11211125
int
11221126
night()
11231127
{
11241128
register int hour = getlt()->tm_hour;
11251129

1126-
return (hour < 6 || hour > 21);
1130+
// return (hour < 6 || hour > 21);
1131+
// turn off game changes based on night
1132+
return 0;
11271133
}
11281134

11291135
int
11301136
midnight()
11311137
{
1132-
return (getlt()->tm_hour == 0);
1138+
// return (getlt()->tm_hour == 0);
1139+
// turn off game changes based on midnight
1140+
return 0;
11331141
}
11341142

11351143
/* strbuf_init() initializes strbuf state for use */

0 commit comments

Comments
 (0)