Codechange:Renaming BusyBee's to BeeReward's.

This commit is contained in:
Alberth
2015-06-13 15:38:19 +02:00
parent 0be7ca07ee
commit c4d35c22f2
8 changed files with 73 additions and 77 deletions

View File

@@ -1,4 +1,4 @@
# Busy Bee Makefile
# Bee Reward Makefile
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
PROJECT_NAME = BusyBee
PROJECT_NAME = BeeReward
SOURCES = *.nut
VERSION_NUT = version.nut

View File

@@ -1,19 +1,19 @@
[musa]
type = Game Script
name = BusyBee
name = BeeReward
# The version is inserted by the Makefile
version =
description_file = bananas_description.txt
url = http://dev.openttdcoop.org/projects/busy-bee-gs
url = http://dev.openttdcoop.org/projects/bee-awards
license = GPL v2
tags = cargo, challenge, goal, cooperative
tags = cargo, challenge, goal, cooperative, reward
openttd_minimum_supported_version = 1.4.2
openttd_maximum_supported_version =
# SuperLib_for_NoGo-36.tar
dependencies =
authors = alberth, andythenorth
authors = alberth, andythenorth, jottyfan

View File

@@ -1 +1 @@
BusyBee continuously gives you new goals for transportation. It's meant for long-term fun; as such there is no ultimate goal to achieve.
BeeReward is a fork of Busy Bee. It continuously gives you new goals for transportation, and can give rewards in the form of money for achieving it. There is no ultimate goal to achieve.

View File

@@ -1,19 +1,19 @@
#!/usr/bin/env python3
#
# This file is part of BusyBee, which is a GameScript for OpenTTD
# This file is part of BeeReward, which is a GameScript for OpenTTD
# Copyright (C) 2014-2015 alberth / andythenorth
#
# BusyBee is free software; you can redistribute it and/or modify it
# BeeReward is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License
#
# BusyBee is distributed in the hope that it will be useful,
# BeeReward is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BusyBee; If not, see <http://www.gnu.org/licenses/> or
# along with BeeReward; If not, see <http://www.gnu.org/licenses/> or
# write to the Free Software Foundation, Inc., 51 Franklin Street,
# Fifth Floor, Boston, MA 02110-1301 USA.
"""

View File

@@ -1,18 +1,18 @@
/*
* This file is part of BusyBee, which is a GameScript for OpenTTD
* This file is part of BeeReward, which is a GameScript for OpenTTD
* Copyright (C) 2014-2015 alberth / andythenorth
*
* BusyBee is free software; you can redistribute it and/or modify it
* BeeReward is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* BusyBee is distributed in the hope that it will be useful,
* BeeReward is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BusyBee; If not, see <http://www.gnu.org/licenses/> or
* along with BeeReward; If not, see <http://www.gnu.org/licenses/> or
* write to the Free Software Foundation, Inc., 51 Franklin Street,
* Fifth Floor, Boston, MA 02110-1301 USA.
*/

View File

@@ -1,18 +1,18 @@
/*
* This file is part of BusyBee, which is a GameScript for OpenTTD
* Copyright (C) 2014-2015 alberth / andythenorth
* This file is part of BeeReward, which is a GameScript for OpenTTD
* Copyright (C) 2014-2015 alberth / andythenorth / jottyfan
*
* BusyBee is free software; you can redistribute it and/or modify it
* BeeReward is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* BusyBee is distributed in the hope that it will be useful,
* BeeReward is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BusyBee; If not, see <http://www.gnu.org/licenses/> or
* along with BeeReward; If not, see <http://www.gnu.org/licenses/> or
* write to the Free Software Foundation, Inc., 51 Franklin Street,
* Fifth Floor, Boston, MA 02110-1301 USA.
*/
@@ -24,13 +24,13 @@ PROGRAM_VERSION <- Syntax error, set by 'make bundle'.
PROGRAM_DATE <- Syntax error, set by 'make bundle'.
PROGRAM_NAME <- Syntax error, set by 'make bundle'.
class BusyBeeInfo extends GSInfo {
function GetAuthor() { return "alberth & andythenorth, reward by jottyfan"; }
class BeeRewardInfo extends GSInfo {
function GetAuthor() { return "alberth, andythenorth, jottyfan"; }
function GetName() { return "Bee Reward"; } // Old: return PROGRAM_NAME;
function GetDescription() { return "Make connection, transport cargo, recieve reward"; }
function GetDescription() { return "Make connection, transport cargo, receive reward"; }
function GetVersion() { return PROGRAM_VERSION + SAVEGAME_VERSION * 100000; }
function GetDate() { return PROGRAM_DATE; }
function CreateInstance() { return "BusyBeeClass"; }
function CreateInstance() { return "BeeRewardClass"; }
function GetShortName() { return "BREW"; }
function GetAPIVersion() { return "1.5"; }
function GetUrl() { return "http://dev.openttdcoop.org/projects/bee-awards"; }
@@ -38,7 +38,7 @@ class BusyBeeInfo extends GSInfo {
function GetSettings();
}
function BusyBeeInfo::GetSettings()
function BeeRewardInfo::GetSettings()
{
GSInfo.AddSetting({name="num_goals",
description="Number of goals for a company (1-10)",
@@ -127,4 +127,4 @@ function BusyBeeInfo::GetSettings()
flags=GSInfo.CONFIG_INGAME});
}
RegisterGS(BusyBeeInfo());
RegisterGS(BeeRewardInfo());

View File

@@ -1,18 +1,18 @@
/*
* This file is part of BusyBee, which is a GameScript for OpenTTD
* This file is part of BeeReward, which is a GameScript for OpenTTD
* Copyright (C) 2014-2015 alberth / andythenorth
*
* BusyBee is free software; you can redistribute it and/or modify it
* BeeReward is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License
*
* BusyBee is distributed in the hope that it will be useful,
* BeeReward is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BusyBee; If not, see <http://www.gnu.org/licenses/> or
* along with BeeReward; If not, see <http://www.gnu.org/licenses/> or
* write to the Free Software Foundation, Inc., 51 Franklin Street,
* Fifth Floor, Boston, MA 02110-1301 USA.
*/
@@ -22,7 +22,7 @@ require("company.nut");
// Cargo description.
class Cargo
{
index = null; ///< Index of the cargo in the cargo table (#BusyBeeClass.cargoes).
index = null; ///< Index of the cargo in the cargo table (#BeeRewardClass.cargoes).
cid = null; ///< Id of the cargo in GRF.
freight = null; ///< Whether the cargo is considered to be freight.
effect = null; ///< Town effect (One of #GSCargo.TownEffect).
@@ -53,7 +53,7 @@ function Cargo::GetWeight(effect)
// ************************************************************************
// ************************************************************************
class BusyBeeClass extends GSController
class BeeRewardClass extends GSController
{
cargoes = null; ///< Cargoes of the game (index -> 'cid' number, 'freight' boolean, 'effect' on town).
num_cargoes = 0; ///< Number of cargoes in 'this.cargoes'.
@@ -68,7 +68,7 @@ class BusyBeeClass extends GSController
function Start();
}
function BusyBeeClass::Load(version, data)
function BeeRewardClass::Load(version, data)
{
this.loaded = true;
this.Initialize();
@@ -79,7 +79,7 @@ function BusyBeeClass::Load(version, data)
}
}
function BusyBeeClass::Save()
function BeeRewardClass::Save()
{
local result = {};
foreach (comp_id, cdata in this.companies) {
@@ -90,7 +90,7 @@ function BusyBeeClass::Save()
}
// Initialize core data of the script.
function BusyBeeClass::Initialize()
function BeeRewardClass::Initialize()
{
if (this.companies != null) return; // Already initialized.
@@ -119,7 +119,7 @@ function BusyBeeClass::Initialize()
// @param cargo_index Cargo index (index in this.cargoes).
// @return List of resources that produce the requested cargo, list of
// 'ind' or 'town' number, 'prod' produced amount, 'transp' transported amount, and 'loc' location.
function BusyBeeClass::FindSources(cargo_index)
function BeeRewardClass::FindSources(cargo_index)
{
local cargo = this.cargoes[cargo_index];
local num_sources = 0;
@@ -167,7 +167,7 @@ function BusyBeeClass::FindSources(cargo_index)
// @param cargo_index Cargo index (index in this.cargoes).
// @param company Company to inspect.
// @return A list of destinations, tables 'ind' or 'town' id, and a 'loc' location.
function BusyBeeClass::FindDestinations(cargo_index, company)
function BeeRewardClass::FindDestinations(cargo_index, company)
{
local cargo = this.cargoes[cargo_index];
local num_dests = 0;
@@ -218,18 +218,18 @@ function BusyBeeClass::FindDestinations(cargo_index, company)
// @param desired Desired distance.
// @param actual Actual distance.
// @return Score for the distance.
function BusyBeeClass::GetDistanceScore(desired, actual)
function BeeRewardClass::GetDistanceScore(desired, actual)
{
if (actual < desired) return 1000 - 3 * (desired - actual); // Too close gets punished hard.
return 1000 - (actual - desired);
}
// Try to find a challenge for a given cargo and a desired distance.
// @param cargo_index Index in BusyBeeClass.cargoes.
// @param cargo_index Index in BeeRewardClass.cargoes.
// @param distance Desired distance between source and target.
// @param comp_id Company to find a challenge for.
// @return Best accepting industry to use, or 'null' if no industry-pair found.
function BusyBeeClass::FindChallenge(cargo_index, distance, comp_id)
function BeeRewardClass::FindChallenge(cargo_index, distance, comp_id)
{
local prods = this.FindSources(cargo_index);
if (prods.len() == 0) return null;
@@ -266,7 +266,7 @@ function BusyBeeClass::FindChallenge(cargo_index, distance, comp_id)
// Select the next cargo to use for a goal.
// @return The index of the cargo to use in this.cargoes.
function BusyBeeClass::SelectCargo()
function BeeRewardClass::SelectCargo()
{
local remaining = GSBase.RandRange(this.sum_weight);
local cargo_index = 0;
@@ -280,7 +280,7 @@ function BusyBeeClass::SelectCargo()
// Try to add a goal for a company.
// @param comp_id Company to find a challenge for.
function BusyBeeClass::CreateChallenge(comp_id)
function BeeRewardClass::CreateChallenge(comp_id)
{
local cdata = this.companies[comp_id];
local cargomp = GSController.GetSetting("cargo_mp");
@@ -320,7 +320,7 @@ function BusyBeeClass::CreateChallenge(comp_id)
// Process events that arrived.
// @return Table with 'force_goal' bool to force goal updating.
function BusyBeeClass::ProcessEvents()
function BeeRewardClass::ProcessEvents()
{
local force_goal = false;
while (GSEventController.IsEventWaiting()) {
@@ -362,7 +362,7 @@ function BusyBeeClass::ProcessEvents()
// Check if new goals should be created.
// @return Table with 'more_goals_needed' boolean, and 'force_monitor' to force updating.
function BusyBeeClass::TryAddNewGoal()
function BeeRewardClass::TryAddNewGoal()
{
local force_monitor=false;
@@ -391,7 +391,7 @@ function BusyBeeClass::TryAddNewGoal()
// Update progress on existing monitored goals, add monitoring for new goals, and drop monitors for removed goals.
// @param old_cmon Monitored deliveries (or 'null' if first call).
// @return Table 'cmon' with the new monitored deliveries, 'finished_goals' boolean when there exist goals that are completed.
function BusyBeeClass::UpdateDeliveries(old_cmon)
function BeeRewardClass::UpdateDeliveries(old_cmon)
{
if (old_cmon == null) { // First run, clear any old monitoring.
GSCargoMonitor.StopAllMonitoring();
@@ -421,7 +421,7 @@ function BusyBeeClass::UpdateDeliveries(old_cmon)
}
// The script data got loaded from file, check it against the game.
function BusyBeeClass::CompaniesPostLoadCheck()
function BeeRewardClass::CompaniesPostLoadCheck()
{
// Check companies.
for (local comp_id = GSCompany.COMPANY_FIRST; comp_id <= GSCompany.COMPANY_LAST; comp_id++) {
@@ -446,7 +446,7 @@ function BusyBeeClass::CompaniesPostLoadCheck()
}
}
function BusyBeeClass::Start()
function BeeRewardClass::Start()
{
this.Initialize();
this.Sleep(1); // Wait for the game to start.
@@ -525,7 +525,7 @@ function BusyBeeClass::Start()
// Fill company monitors with monitored amounts.
// @param [inout] cmon Table of 'comp_id' number to 'cargo_id' number to
// 'ind' and/or 'town' to resource indices to 'null'.
function BusyBeeClass::FillMonitors(cmon)
function BeeRewardClass::FillMonitors(cmon)
{
foreach (comp_id, mon in cmon) {
foreach (cargo_id, rmon in mon) {
@@ -555,7 +555,7 @@ function BusyBeeClass::FillMonitors(cmon)
}
}
function BusyBeeClass::UpdateCompanyMonitors(old_cmon, cmon)
function BeeRewardClass::UpdateCompanyMonitors(old_cmon, cmon)
{
foreach (comp_id, old_mon in old_cmon) {
if (comp_id in cmon) {
@@ -566,7 +566,7 @@ function BusyBeeClass::UpdateCompanyMonitors(old_cmon, cmon)
}
}
function BusyBeeClass::UpdateCargoMonitors(comp_id, old_mon, mon)
function BeeRewardClass::UpdateCargoMonitors(comp_id, old_mon, mon)
{
foreach (cargo_id, old_rmon in old_mon) {
if (cargo_id in mon) {
@@ -577,7 +577,7 @@ function BusyBeeClass::UpdateCargoMonitors(comp_id, old_mon, mon)
}
}
function BusyBeeClass::UpdateResourceMonitors(comp_id, cargo_id, old_rmon, rmon)
function BeeRewardClass::UpdateResourceMonitors(comp_id, cargo_id, old_rmon, rmon)
{
if ("town" in old_rmon) {
if ("town" in rmon) {
@@ -595,7 +595,7 @@ function BusyBeeClass::UpdateResourceMonitors(comp_id, cargo_id, old_rmon, rmon)
}
}
function BusyBeeClass::UpdateTownMonitors(comp_id, cargo_id, old_tmon, tmon)
function BeeRewardClass::UpdateTownMonitors(comp_id, cargo_id, old_tmon, tmon)
{
foreach (town_id, _ in old_tmon) {
if (!(town_id in tmon)) {
@@ -607,7 +607,7 @@ function BusyBeeClass::UpdateTownMonitors(comp_id, cargo_id, old_tmon, tmon)
}
}
function BusyBeeClass::UpdateIndMonitors(comp_id, cargo_id, old_imon, imon)
function BeeRewardClass::UpdateIndMonitors(comp_id, cargo_id, old_imon, imon)
{
foreach (ind_id, _ in old_imon) {
if (!(ind_id in imon)) {

View File

@@ -1,32 +1,32 @@
===============
Busy Bee readme
===============
=================
Bee Reward readme
=================
Manual for the really Busy Bees
===============================
Manual for the really impatient Bees
====================================
- Activate the game script,
- Start new game,
- Pick a goal from the goal window to do,
- Make a connection from a supplier to the given destination for the requested
cargo type,
- Transport the cargo,
- Transport the cargo, get reward,
- Pick next goal to connect.
Manual for the less Busy Bees
=============================
Manual for the less impatient bees
==================================
Busy Bee is a game script for OpenTTD 1.5 or newer.
Bee Reward is a game script for OpenTTD 1.5 or newer.
The script gives a number of goals to achieve (number of goals can be set by a
parameter). It requests a given amount of cargo of a given type to deliver to a
given destination within a time frame. You have to build the transport
connection, and deliver the requested amount. When that is done, the goal is
considered to be fulfilled. It is removed from the list, and a new goal is
created (may take a while) for you to fulfill.
given destination, where the first amount should arrive within a time frame.
You have to build the transport connection, and deliver the requested amount.
When that is done, the goal is considered to be fulfilled. It is removed from
the list, and a new goal is created (may take a while) for you to fulfill.
You don't get anything when you fulfill the goal. There is also no penalty for
You can configure how much you get for completing a goal. There is no penalty for
failing to achieve a goal. The purpose of the timer is to get rid of obsolete
or unreachable goals. Since the timer is reset when new cargo is detected, you
can take as long as you like to complete the goal, as long as you deliver
@@ -36,14 +36,10 @@ something regularly.
Features
========
Busy Bee RC2
- Clickable news (with sufficiently new OpenTTD).
- Goal timer gets reset to its original length on delivery of cargo.
- Added options to set the weight of passengers, mail, or town-effect cargoes,
to give them a higher chance of being picked as goal.
Busy Bee RC1
- Initial release
Bee Reward 1
- Set the balance between town and industrial cargo goals.
- Set the amount of reward for completing a goal.
- Forked from Busy Bee RC2
Translations
============
@@ -65,8 +61,8 @@ We thank the following people for their contributed translations:
License
=======
Busy Bee
Copyright (C) 2015 andythenorth and alberth
Bee Reward
Copyright (C) 2015 andythenorth, alberth, jottyfan
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2 as published by the Free