Beispiel #1
0
def update_holiday(holiday_data: str, _connection=None):
    holiday_service = services.holiday_service()
    if holiday_service is None:
        return
    proto = GameplaySaveData_pb2.Holiday()
    text_format.Merge(holiday_data, proto)
    holiday_service.modify_holiday(proto)
Beispiel #2
0
def add_holiday(holiday_data: str,
                season: SeasonType,
                day: int,
                _connection=None):
    holiday_service = services.holiday_service()
    if holiday_service is None:
        return
    proto = GameplaySaveData_pb2.Holiday()
    text_format.Merge(holiday_data, proto)
    holiday_service.add_a_holiday(proto, season, day)