[DECORATE] Add support for printing localized strings

Moderator: GZDoom Developers

Post Reply
yqco
Posts: 80
Joined: Sat Jul 06, 2013 9:19 pm

[DECORATE] Add support for printing localized strings

Post by yqco »

Add support for the '$identifer' syntax to A_Print, A_PrintBold, and A_Log so that they may print localized strings.

Use case:

Code: Select all

actor MyMedkit : CustomInventory
{
  tag "$MY_MEDKIT_TAG" // "Localized Medkit"
  inventory.pickupMessage "$MY_MEDKIT_PICKUP" // "You picked up a localized medkit."
  // ...

  states
  {
  // ...
  Use:
    TNT1 A 0 A_JumpIfHealthLower(200, 2)
    TNT1 A 0 A_Print("$MY_MEDKIT_FAIL")  // "You cannot heal right now."
    fail
    
    TNT1 A 0 A_GiveInventory("HealthBonus", 25)
    TNT1 A 0 A_Print("$MY_MEDKIT_USE") // "You restored some health."
    stop
  }
}
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”