• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Return-To-The-Roots / s25client / 22239234288

20 Feb 2026 08:04PM UTC coverage: 50.316% (-0.5%) from 50.79%
22239234288

Pull #1720

github

web-flow
Merge 2f74b463f into ed1e143dc
Pull Request #1720: Add leather addon

282 of 1072 new or added lines in 65 files covered. (26.31%)

47 existing lines in 28 files now uncovered.

23027 of 45765 relevant lines covered (50.32%)

42926.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/libs/s25main/figures/nofTanner.cpp
1
// Copyright (C) 2024 Settlers Freaks (sf-team at siedler25.org)
2
//
3
// SPDX-License-Identifier: GPL-2.0-or-later
4

5
#include "nofTanner.h"
6
#include "GamePlayer.h"
7
#include "LeatherLoader.h"
8
#include "Loader.h"
9
#include "SoundManager.h"
10
#include "buildings/nobUsual.h"
11
#include "network/GameClient.h"
12
#include "ogl/glArchivItem_Bitmap_Player.h"
13
#include "world/GameWorld.h"
14

NEW
15
nofTanner::nofTanner(const MapPoint pos, const unsigned char player, nobUsual* workplace)
×
NEW
16
    : nofWorkman(Job::Tanner, pos, player, workplace)
×
NEW
17
{}
×
18

NEW
19
nofTanner::nofTanner(SerializedGameData& sgd, const unsigned obj_id) : nofWorkman(sgd, obj_id) {}
×
20

NEW
21
void nofTanner::DrawWorking(DrawPoint drawPt)
×
22
{
NEW
23
    constexpr helpers::EnumArray<DrawPoint, Nation> offsets = {{{28, -14}, {28, -8}, {-14, -22}, {-5, -25}, {17, -35}}};
×
24

NEW
25
    const unsigned now_id = GAMECLIENT.Interpolate(136, current_ev);
×
26

NEW
27
    LOADER
×
28
      .GetPlayerImage("leather_bobs",
NEW
29
                      leatheraddon::bobIndex[leatheraddon::BobType::TanneryWorkWindowAnimation] + (now_id) % 8)
×
NEW
30
      ->DrawFull(drawPt + offsets[workplace->GetNation()], COLOR_WHITE, world->GetPlayer(workplace->GetPlayer()).color);
×
31

NEW
32
    last_id = now_id;
×
NEW
33
}
×
34

35
#ifdef _MSC_VER
36
#    pragma warning(push)
37
#    pragma warning(disable : 4646) // function declared with [[noreturn]] has non-void return type
38
#endif
39

NEW
40
unsigned short nofTanner::GetCarryID() const
×
41
{
NEW
42
    throw std::logic_error("Must not be called. Handled by custom DrawWalkingWithWare");
×
43
}
44

45
#ifdef _MSC_VER
46
#    pragma warning(pop)
47
#endif
48

NEW
49
void nofTanner::DrawWalkingWithWare(DrawPoint drawPt)
×
50
{
NEW
51
    DrawWalking(drawPt, "leather_bobs", leatheraddon::bobIndex[leatheraddon::BobType::TannerCarryingLeatherInOut]);
×
NEW
52
}
×
53

NEW
54
helpers::OptionalEnum<GoodType> nofTanner::ProduceWare()
×
55
{
NEW
56
    return GoodType::Leather;
×
57
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc