From 513e448976d0d58fa1845e7c9241e6688566fa4b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 11 Sep 2020 21:58:42 +0200 Subject: [PATCH] academy changes light: teacher does not need to be in an academy --- src/academy.c | 10 ++-------- src/academy.test.c | 4 ---- src/study.c | 2 +- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/academy.c b/src/academy.c index a3df1a5f9..630552b10 100644 --- a/src/academy.c +++ b/src/academy.c @@ -17,12 +17,6 @@ void academy_teaching_bonus(struct unit *u, skill_t sk, int students) { bool academy_can_teach(unit *teacher, unit *scholar, skill_t sk) { const struct building_type *btype = bt_find("academy"); - if (active_building(teacher, btype) && active_building(scholar, btype)) { - int j = study_cost(scholar, sk) * 2; - if (j < 50) j = 50; - /* kann Einheit das zahlen? */ - return get_pooled(scholar, get_resourcetype(R_SILVER), GET_DEFAULT, j) >= j; - /* sonst nehmen sie nicht am Unterricht teil */ - } - return false; + return (active_building(scholar, btype)); } + diff --git a/src/academy.test.c b/src/academy.test.c index 6e971ee60..6f26cee93 100644 --- a/src/academy.test.c +++ b/src/academy.test.c @@ -41,10 +41,6 @@ static void test_academy(CuTest * tc) CuAssert(tc, "building must have capacity", !academy_can_teach(u, u2, SK_CROSSBOW)); b->size = 2; CuAssertTrue(tc, academy_can_teach(u, u2, SK_CROSSBOW)); - - CuAssert(tc, "student must pay skillcost", !academy_can_teach(u, u2, SK_ALCHEMY)); - i_change(&u2->items, it_silver, 150); - CuAssertTrue(tc, academy_can_teach(u, u2, SK_ALCHEMY)); test_teardown(); } diff --git a/src/study.c b/src/study.c index bb2d4fe7a..74f3d108c 100644 --- a/src/study.c +++ b/src/study.c @@ -201,7 +201,7 @@ teach_unit(unit * teacher, unit * scholar, int nteaching, skill_t sk, teach->days += students * STUDYDAYS; teach->students += students; - if (scholar->building && teacher->building == scholar->building) { + if (scholar->building) { /* Solange Akademien groessenbeschraenkt sind, sollte Lehrer und * Student auch in unterschiedlichen Gebaeuden stehen duerfen */ /* FIXME comment contradicts implementation */