Permalink
Browse files

ModRules: remove the retarded 'allow_team_colors' nanospray rendering…

… option (this did not even make sense in the *A days...)
  • Loading branch information...
1 parent 3134daa commit 25aad4b1341f0132f38b02438a2c2006e0d99158 rt committed Apr 3, 2012
View
@@ -126,7 +126,7 @@ bool LuaConstGame::PushEntries(lua_State* L)
LuaPushNamedString(L, "modMutator", modInfo.mutator);
LuaPushNamedString(L, "modDesc", modInfo.description);
- LuaPushNamedBool(L, "allowTeamColors", modInfo.allowTeamColors);
+ LuaPushNamedBool(L, "allowTeamColors", true);
LuaPushNamedBool(L, "constructionDecay", modInfo.constructionDecay);
LuaPushNamedNumber(L, "constructionDecayTime", modInfo.constructionDecayTime);
@@ -18,6 +18,7 @@ CONFIG(bool, CompressTextures).defaultValue(false).safemodeValue(true); // in sa
CONFIG(int, AtiHacks).defaultValue(-1);
CONFIG(bool, DualScreenMode).defaultValue(false);
CONFIG(bool, DualScreenMiniMapOnLeft).defaultValue(false);
+CONFIG(bool, TeamNanoSpray).defaultValue(true);
/**
* @brief global rendering
@@ -89,7 +90,7 @@ CGlobalRendering::CGlobalRendering()
, drawFog(true)
, drawdebug(false)
- , teamNanospray(false)
+ , teamNanospray(true)
, active(true)
, compressTextures(false)
, haveATI(false)
@@ -189,6 +190,8 @@ void CGlobalRendering::PostInit() {
FBO::IsSupported(), supportNPOTs, support24bitDepthBuffers,
maxTextureSize, compressTextures
);
+
+ teamNanospray = configHandler->GetBool("TeamNanoSpray");
}
@@ -137,7 +137,7 @@ class CGlobalRendering {
/**
- * Does the user want team colored nanospray if the mod allows it?
+ * Does the user want team colored nanospray?
*/
bool teamNanospray;
View
@@ -10,14 +10,11 @@
#include "Lua/LuaSyncedRead.h"
#include "Sim/Units/Unit.h"
#include "Sim/Units/UnitTypes/Builder.h"
-#include "Rendering/GlobalRendering.h"
#include "System/Log/ILog.h"
#include "System/Config/ConfigHandler.h"
#include "System/FileSystem/ArchiveScanner.h"
#include "System/Exceptions.h"
-CONFIG(bool, TeamNanoSpray).defaultValue(true);
-
CModInfo modInfo;
@@ -54,14 +51,6 @@ void CModInfo::Init(const char* modArchive)
allowCrushingAlliedUnits = movementTbl.GetBool("allowCrushingAlliedUnits", false);
allowUnitCollisionDamage = movementTbl.GetBool("allowUnitCollisionDamage", false);
- // determine whether the modder allows the user to use team coloured nanospray
- const LuaTable nanosprayTbl = root.SubTable("nanospray");
- allowTeamColors = nanosprayTbl.GetBool("allow_team_colors", true);
- if (allowTeamColors) {
- // Load the users preference for team coloured nanospray
- globalRendering->teamNanospray = configHandler->GetBool("TeamNanoSpray");
- }
-
// constructions
const LuaTable constructionTbl = root.SubTable("construction");
constructionDecay = constructionTbl.GetBool("constructionDecay", true);
View
@@ -10,8 +10,7 @@ class CModInfo
{
public:
CModInfo()
- : allowTeamColors(true)
- , allowAircraftToLeaveMap(true)
+ : allowAircraftToLeaveMap(true)
, allowPushingEnemyUnits(false)
, allowCrushingAlliedUnits(false)
, allowUnitCollisionDamage(false)
@@ -75,8 +74,6 @@ class CModInfo
std::string mutator;
std::string description;
- bool allowTeamColors;
-
// Movement behaviour
bool allowAircraftToLeaveMap; // determines if gunships are allowed to leave map boundaries
bool allowPushingEnemyUnits; // determines if enemy (ground-)units can be pushed during collisions

15 comments on commit 25aad4b

Contributor

nixtux replied Apr 3, 2012

Tech annihilation uses this tag as we have nano spray colored per faction .

Contributor

FLOZi replied Apr 3, 2012

Game designer should have control, not player.

Contributor

ForbodingAngel replied Apr 4, 2012

No, this engine is for the gamedevs. Without us, there would be no players.

The games built on this engine are for the players.

Contributor

nixtux replied Apr 4, 2012

Should have also said that it based on buildspeed as well as faction color. So the stronger the buildspeed the brighter the nano spray . So now does team color have priory over the unitdef tag for setting spray color. If so all color spray it useless now in techa. If not that mean units apart from. Builders will get team color spray for nano frame's and builder's a different color? Not good for us imho

Contributor

FLOZi replied Apr 4, 2012

It was (probably) trepan that moved it into modrules fwiw http://springrts.com/phpbb/viewtopic.php?f=14&t=14892&hilit=+particles.tdf+

I agree it's not ideal, but it's better than leaving it to players (consider if s44 used yellow spray for 'welding' f.ex.) or having a special file just for this one thing.

Actually that's the big question - does player-selected team spray colours override the 'nanocolor' tag in unitdefs? ( https://github.com/spring/spring/blob/master/rts/Sim/Units/UnitDef.cpp#L457 )

Contributor

nixtux replied Apr 4, 2012

Flozi yeah I tested that and it does

Contributor

tomjn replied Apr 4, 2012

When I wrote the patch, I added the switch to override the user option, after people kicked up a fuss in the discussion on the forums. The intention being if Arm units have blue nanospray in the unitdefs in my mod, I would like to be able to enforce it, and if I don't set the option then it'll be overriden if team coloured nanospray is activated. I placed the tag in modrules (or whatever its predecessor was)

Contributor

FLOZi replied Apr 4, 2012

It was originally in particles.tdf, and was the only thing in there, so it got moved into modrules, as did sensors.tdf

Contributor

tomjn replied Apr 4, 2012

That makes about as much sense as saying that Visual Studios C# compiler is for your grandparents, because a program they use built with C# has a configuration file that gets changed when they install an add on from the Windows Store

End users don't write and maintain widgets, widget developers do that.

Contributor

FLOZi replied Apr 4, 2012

Good to hear that nano particles are on the way out in the long term, but in the short term, can the nanoColor tag have the final say? (Or even remove team colour spray altogether)

As for widgets - player local widgets was a terrible idea from the start... ;) (And there's more than 1 game now which explicitly does not allow them!)

Contributor

nixtux replied Apr 4, 2012

Is that gone for good or just replaced by 89 with lua callings ?

Contributor

nixtux replied Apr 4, 2012

Thanks for clearing the matter up :) great to see improvement like this

Contributor

FLOZi replied Apr 4, 2012

Sounds good overall, if its all gone by 89 that's fine, otherwise I will repeat the call for nanoColor taking precedence :)

If spray is going, what will be the situation with 'nanoframes' ?

Contributor

zerver replied Apr 7, 2012

Nanospray in Lua does not sound like a good idea to me, for performance reasons. In case you did not know, nanospray is a performance problem already as it is now. There is nothing wrong with the engine providing one default build visualization system that can be overridden.

Contributor

nixtux replied May 30, 2012

So did anything else change for this had a quick look at commits and see nothing new. Still this now causes a problem for me as I've said before

Please sign in to comment.