EasyRPG / liblcf

Library to handle RPG Maker 2000/2003 and EasyRPG projects
https://easyrpg.org
MIT License
113 stars 52 forks source link

Add more custom game settings in the database #433

Closed ghost closed 2 years ago

ghost commented 2 years ago

This PR adds the following database settings, here we can discuss which ones are useful for inclusion. If some options are unclear, then ask away!

The implementation of the features can be found at Player#2697.

Ghabry commented 2 years ago

Sorry for ignoring this for so long. I will finally review this next week. On first look these additions look reasonable. My bigger issue is with some of the Player implementations. Will write a longer text about them soon


You can mark it ready

Ghabry commented 2 years ago

Imo the major issue is stuff like this: https://github.com/rueter37/Player/commit/560fa522f0e7a1c6deeaeabb729d246f8c73ef6e

This is hard to read and lots of code-duplication. Will easily break when new stuff is added.

I guess the easiest way would be to add some new feature.cpp and feature.h that contains things like

namespace Feature {
    bool HasRpg2kBattleSystem();
    bool HasRpg2k3BattleSystem();
    bool HasRow();
    bool HasPlaceholders();
}

Similiar to the IsEngine stuff in Player.

HasPlacefolders could be e.g.

if (Player::IsRPG2kE()) {
    return true;
}

return Player::IsRPG2k3() && IsRpg2kBattleSystem() && lcf::Data::system.easyrpg_battle_use_rpg2ke_strings;

Maybe better when you also open a Player PR. Makes it easier to discuss it.

ghost commented 2 years ago

Added the feature namespace and opened a Player PR (Player#2697) now.