Skip to content

Commit

Permalink
Rewrite log function without CvUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
VDuchauffour committed Oct 9, 2024
1 parent eaabab9 commit 8cf6074
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Assets/Python/Core.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from CivilizationsData import (
CIV_ADDITIONAL_UNITS,
CIV_AI_MODIFIERS,
Expand All @@ -20,7 +21,6 @@
)
from Consts import INDEPENDENT_CIVS, WORLD_HEIGHT, WORLD_WIDTH, MessageData
from CoreTypes import Civ, Scenario
import CvUtil
from LocationsData import (
CIV_AREAS,
CIV_CAPITAL_LOCATIONS,
Expand Down Expand Up @@ -2303,7 +2303,8 @@ def message(player_id, text, **settings):


def log(message):
CvUtil.pyPrint(message)
message = "RFCE - " + message + "\n"
sys.stdout.write(message)


def get_data_from_province_map(plot):
Expand Down
2 changes: 1 addition & 1 deletion Assets/Python/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def init():
init_player_variables()
init_provinces()
set_province_type_parameters()
log("RFCE: Init.init()")
log("Init.init()")


def init_player_variables():
Expand Down
6 changes: 3 additions & 3 deletions Assets/Python/Modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@

@handler("GameStart")
def setup_gamestart():
log("RFCE: GameStart")
log("GameStart")
setup()


@handler("OnLoad")
def setup_on_load():
log("RFCE: OnLoad")
log("OnLoad")
setup()


Expand All @@ -57,7 +57,7 @@ def setup():
set_religion_benefit()
set_historical_enemies()
set_other_parameters()
log("RFCE: Modifiers.setup()")
log("Modifiers.setup()")


def set_modifiers():
Expand Down
6 changes: 3 additions & 3 deletions Assets/Python/Setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

@handler("GameStart")
def setup_gamestart():
log("RFCE: GameStart")
log("GameStart")
setup()
data.setup()


@handler("OnLoad")
def setup_on_load():
log("RFCE: OnLoad")
log("OnLoad")
setup()


Expand All @@ -40,7 +40,7 @@ def setup():
update_province_id()
update_city_name()
update_lake_id()
log("RFCE: Setup.setup()")
log("Setup.setup()")


def init_player_maps():
Expand Down

0 comments on commit 8cf6074

Please sign in to comment.