forked from Mirrors/openclonk
fixed burned wind generator radiusin Mine Rescue
parent
346d5cd709
commit
49997045f6
|
@ -170,7 +170,7 @@ func InitializeObjects()
|
|||
WindGenerator0190->SetR(92);
|
||||
WindGenerator0190->SetClrModulation(0xff503c28);
|
||||
WindGenerator0190->SetPosition(177, 134);
|
||||
WindGenerator0190->~Destruction(); // shouldn't have a power radius
|
||||
WindGenerator0190->SetFlagRadius(0); // shouldn't have a power radius
|
||||
|
||||
var Elevator0228 = CreateObjectAbove(Elevator, 69, 159);
|
||||
Elevator0228->CreateShaft(5);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* Flagpole */
|
||||
// Changes default flag radius
|
||||
// Change the default flag radius.
|
||||
|
||||
#appendto Flagpole
|
||||
|
||||
public func GetFlagRadius(){ return 130; }
|
||||
local DefaultFlagRadius = 130;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/**
|
||||
Flag Library: Construction Previewer
|
||||
Construction preview object for objects implementing flagpole behavior.
|
||||
This object is used in the flag library
|
||||
Shows helper arrows around the preview to tell the player which
|
||||
neighbouring flags will be connected.
|
||||
This object is used in the flag library and shows helper arrows around
|
||||
the preview to tell the player which neighbouring flags will be connected.
|
||||
|
||||
@author Sven2
|
||||
*/
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
/**
|
||||
Flag Library
|
||||
The flagpoles mark the area a player owns. It also serves as an energy transmitter.
|
||||
A structure that serves as a flagpole, which is an object which defines an ownership
|
||||
radius, should include this library.
|
||||
|
||||
The ownership radius can be changed via the function SetFlagRadius(int to_radius).
|
||||
The power system uses the flag library to determine which structures belong to the
|
||||
same network, which is given by a number of connected flags.
|
||||
|
||||
Important notes when including this library:
|
||||
* The object including this library should return _inherited(...) in the
|
||||
Construction, Initialize and Destruction callback if overloaded.
|
||||
|
||||
The flag library and its components Library_Flag_Marker, Library_Ownable,
|
||||
Library_Flag_ConstructionPreviewer and Library_Flag_ConstructionPreviewer_Arrow
|
||||
depend on the following other definitions:
|
||||
* ConstructionPreviewer
|
||||
|
||||
@author Zapper, Maikel
|
||||
*/
|
||||
|
@ -168,6 +178,8 @@ private func RefreshOwnershipOfSurrounding()
|
|||
|
||||
private func AddOwnership()
|
||||
{
|
||||
// Debugging logs.
|
||||
//Log("FLAG - AddOwnership(): flag = %v", this);
|
||||
// Add this flag to the global list of flags.
|
||||
if (GetIndexOf(LIB_FLAG_FlagList, this) == -1)
|
||||
PushBack(LIB_FLAG_FlagList, this);
|
||||
|
@ -183,6 +195,8 @@ private func AddOwnership()
|
|||
|
||||
private func RemoveOwnership()
|
||||
{
|
||||
// Debugging logs.
|
||||
//Log("FLAG - RemoveOwnership(): flag = %v", this);
|
||||
// Remove all the flag markers.
|
||||
ClearFlagMarkers();
|
||||
// Remove the flag from the global flag list.
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
Producers are stored according to {obj, prod_amount, priority} and consumers
|
||||
according to {obj, cons_amount, priority}.
|
||||
|
||||
The power library and its components Library_Producer, Library_Consumer and
|
||||
Library_Storage depend on the following other definitions:
|
||||
* StatusSymbol
|
||||
|
||||
OPEN TODOS:
|
||||
* Remove all the if (!link) checks, they are not needed in principle but errors arise when they are removed.
|
||||
* Fix overproduction if a request is not met, e.g. compensator trying to supply a workshop alone.
|
||||
|
|
Loading…
Reference in New Issue