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

Return-To-The-Roots / s25client / 19143370511

06 Nov 2025 04:56PM UTC coverage: 50.065%. First build
19143370511

Pull #1720

github

web-flow
Merge a3d378e6e into 7333cc249
Pull Request #1720: Add leather addon

304 of 1117 new or added lines in 66 files covered. (27.22%)

22729 of 45399 relevant lines covered (50.06%)

36159.55 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
    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

NEW
35
unsigned short nofTanner::GetCarryID() const
×
36
{
NEW
37
    throw std::logic_error("Must not be called. Handled by custom DrawWalkingWithWare");
×
38
}
39

NEW
40
void nofTanner::DrawWalkingWithWare(DrawPoint drawPt)
×
41
{
NEW
42
    DrawWalking(drawPt, "leather_bobs", leatheraddon::bobIndex[leatheraddon::BobType::TannerCarryingLeatherInOut]);
×
NEW
43
}
×
44

NEW
45
helpers::OptionalEnum<GoodType> nofTanner::ProduceWare()
×
46
{
NEW
47
    return GoodType::Leather;
×
48
}
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