Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Docker Image CI

on:
push:
branches: [ "v1.7" ]
pull_request:
branches: [ "v1.7" ]
branches: [ "main" ]

env:
DOCKERHUB_PLATFORMS: linux/amd64,linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([lbbs],[1.7.3])
AC_INIT([lbbs],[1.7.4])
AC_CONFIG_SRCDIR([src/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
Expand Down
19 changes: 6 additions & 13 deletions utils/game/chicken.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static const char *cstate[10] =

char fname[FILE_PATH_LEN];
time_t birth;
int weight, satis, mon, day, age, angery, sick, oo, happy, clean, tiredstrong, play;
int weight, satis, day, month, age, angery, sick, oo, happy, clean, tiredstrong, play;
int winn, losee, last, chictime, agetmp, food, zfood;
char chicken_name[CHICKEN_NAME_LEN + 1];
FILE *cfp;
Expand Down Expand Up @@ -109,22 +109,15 @@ static int load_chicken()
last = 0;
}
ret = fscanf(fp, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %s ",
&weight, &mon, &day, &satis, &age, &oo, &happy, &clean, &tiredstrong, &play, &winn, &losee, &food, &zfood, chicken_name);
&weight, &day, &month, &satis, &age, &oo, &happy, &clean, &tiredstrong, &play, &winn, &losee, &food, &zfood, chicken_name);
if (ret != 15)
{
log_error("Error in chicken data");
}
fclose(fp);

if (day < (ptime.tm_mon + 1))
{
age = ptime.tm_mday;
age = age + 31 - mon;
}
else
{
age = ptime.tm_mday - mon;
}
age = (ptime.tm_mon + 1 + 12 - month) % 12 * 31 +
(ptime.tm_mday - day);

return 0;
}
Expand All @@ -135,7 +128,7 @@ int save_chicken()

fp = fopen(fname, "r+");
fprintf(fp, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %s ",
weight, mon, day, satis, age, oo, happy, clean, tiredstrong, play, winn, losee, food, zfood, chicken_name);
weight, day, month, satis, age, oo, happy, clean, tiredstrong, play, winn, losee, food, zfood, chicken_name);
fclose(fp);

return 0;
Expand Down Expand Up @@ -224,7 +217,7 @@ static int show_chicken()
" 快乐度:%d"
" 满意度:%d",
// " 大补丸:%d\r\n",
chicken_name, age, weight, food, zfood, tiredstrong, clean, day, mon, money_balance(), happy, satis); //,oo);
chicken_name, age, weight, food, zfood, tiredstrong, clean, month, day, money_balance(), happy, satis); //,oo);

moveto(3, 0);
if (age <= 16)
Expand Down