From 8ab4e4370986d09d39c6cbcee8a9cf9d65cd8a83 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 14 May 2022 22:12:47 +0300 Subject: [PATCH 39/39] Don't consider failure to receive a tech loss of an existing tech See osdn #44593 Signed-off-by: Marko Lindqvist --- server/techtools.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/techtools.c b/server/techtools.c index a3e43c2ac4..7ea9b7988b 100644 --- a/server/techtools.c +++ b/server/techtools.c @@ -1385,7 +1385,21 @@ bool tech_transfer(struct player *plr_recv, struct player *plr_donor, } if (fc_rand(100) < game.server.techlost_recv) { - forget_tech_transfered(plr_recv, tech); + struct research *presearch = research_get(plr_recv); + + /* We've not received the tech yet, and never will. + * Do not call forget_tech_transfered() that would handle it + * as something we had and now lose. + * (e.g. subtracting techs_researched counter) */ + notify_player(plr_recv, NULL, E_TECH_LOST, ftc_server, + _("Too bad! You made a mistake transferring the tech %s and " + "didn't get it."), + research_advance_name_translation(presearch, tech)); + notify_research(presearch, plr_recv, E_TECH_LOST, ftc_server, + _("Too bad! The %s made a mistake transferring the tech " + "%s and didn't get it."), + nation_plural_for_player(plr_recv), + research_advance_name_translation(presearch, tech)); return FALSE; } -- 2.35.1