Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some missing English translations #12

Merged
merged 1 commit into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15.0)

project(
R136
VERSION 3.4.1)
VERSION 3.4.2)

set(CURSES_NEED_NCURSES 1)
set(CURSES_NEED_WIDE 1)
Expand Down
5 changes: 1 addition & 4 deletions include/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ AnimateStatus operator++(AnimateStatus& status, int);
AnimateStatus& operator++(AnimateStatus& status);

#include "templates/base.h"
#include "inlines/base.h"

#define select(...) select_language_param(core.language, __VA_ARGS__)
#define get_y_or_n() (tolower(console.main().get_char_input(select("jJnN", "yYnN"))) == select((int)'j', (int)'y'))
#include "inlines/base.h"
6 changes: 3 additions & 3 deletions include/inlines/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ inline AnimateStatus& Item::target_status(CoreData& core)
return core.animates[usable_on].status;
}

inline void Item::report_pointless_use()
inline void Item::report_pointless_use(CoreData &core)
{
console.main().print("Dat heeft geen zin.\n");
console.main().print(select("Dat heeft geen zin.\n", "That serves no use.\n"));
}

inline bool Item::use_to_status(CoreData& core, AnimateStatus to_status)
Expand All @@ -99,7 +99,7 @@ inline bool Item::use(CoreData& core)
if (is_target_present(core))
return use_with_target_present(core);

report_pointless_use();
report_pointless_use(core);
return true;
}

Expand Down
6 changes: 3 additions & 3 deletions include/inlines/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ inline bool Nightcap::use_with_target_present(CoreData& core)
if (target_status(core) == AnimateStatus::sleeping_lightly)
return use_to_status(core);

report_pointless_use();
report_pointless_use(core);
return false;
}

inline bool Gasmask::use(CoreData& core)
{
console.main().print("Je hebt het gasmasker al op.");
console.main().print(select("Je hebt het gasmasker al op.", "You're already wearing the gas mask."));
console.main().empty_line();
return false;
}

inline bool ThermalSuit::use(CoreData& core)
{
console.main().print("Je hebt het hittepak al aan.");
console.main().print(select("Je hebt het hittepak al aan.", "You're already wearing the thermal suit."));
console.main().empty_line();
return false;
}
Expand Down
6 changes: 5 additions & 1 deletion include/types/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ constexpr auto to_value(E e) noexcept
return static_cast<std::underlying_type_t<E>>(e);
}

// included here because they are used in some headers that directly include this types/base.h
#define select(...) select_language_param(core.language, __VA_ARGS__)
#define get_y_or_n() (tolower(console.main().get_char_input(select("jJnN", "yYnN"))) == select((int)'j', (int)'y'))

enum class RoomType : char
{
forest,
Expand Down Expand Up @@ -291,7 +295,7 @@ struct Item : Entity<ItemID>
AnimateStatus sets_target_to_status;
bool is_target_present(CoreData& core);
AnimateStatus& target_status(CoreData& core);
void report_pointless_use();
void report_pointless_use(CoreData& core);

virtual bool use_with_target_present(CoreData& core);
virtual bool use_to_status(CoreData& core, AnimateStatus to_status = AnimateStatus::undefined);
Expand Down
2 changes: 1 addition & 1 deletion src/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ namespace startup
console.main().empty_line();

console.main().set_attribute(A_BOLD);
console.main().print_centered(select("Versie 3.4.1, (C) 1998, 2022 R.I.P.", "Version 3.4.1, (C) 1998, 2022 R.I.P."));
console.main().print_centered(select("Versie 3.4.2, (C) 1998, 2023 R.I.P.", "Version 3.4.2, (C) 1998, 2023 R.I.P."));
console.main().unset_attribute(A_BOLD);
console.main().empty_line();
}
Expand Down
2 changes: 1 addition & 1 deletion src/items/sword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bool Sword::use(CoreData& core)
monsterID = AnimateID::plant;
else
{
report_pointless_use();
report_pointless_use(core);
return false;
}

Expand Down