Skip to content
Draft
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
1 change: 1 addition & 0 deletions data/conf/zones/deniran.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,7 @@ Entrance fee is 10 money</attribute>

<!-- NPCs -->
<configurator class-name="games.stendhal.server.maps.deniran.cityinterior.tannery.TannerNPC"/>
<configurator class-name="games.stendhal.server.maps.deniran.cityinterior.tannery.LeatherCrafterNPC"/>

<entity x="24" y="9">
<implementation class-name="games.stendhal.server.entity.mapstuff.sign.Sign"/>
Expand Down
Binary file not shown.
Binary file added data/sprites/outfit/detail/016-rear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/sprites/outfit/detail/016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/sprites/outfit/hair/057.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/sprites/outfit/outfits.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"detail": {
"rear": [1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15]
"rear": [1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
}
}
2 changes: 2 additions & 0 deletions doc/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Changelog
- added music to Athor Island
- Mayor Chalmers won't accept experimental sandwiches for Daily Item Quest
- touched up and added equipment to many entity sprites
- new player selectable hair
- new NPC Tinny

*chat*
- new offers with Harold are announced in chat
Expand Down
28 changes: 15 additions & 13 deletions doc/sources/graphics-outfit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@ data/sprites/outfit/body/
data/sprites/outfit/detail/

000 (empty)
00[1-3] (balloon) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal, https://opengameart.org/node/101299
004 (bone) Bart Kelsey; CC0; https://opengameart.org/node/3755
005 (flag) Kimmo Rundelin (kiheru); CC BY-SA 3.0; Stendhal
006 (cane) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
007 (umbrella) Diligent Dodo (soniccuz), Jordan Irwin (AntumDeluge); CC BY-SA 3.0; https://sourceforge.net/p/arianne/patches/687/
008 (sword) LordNeo; CC0; https://opengameart.org/node/10878
009 (knife) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
010 (spear) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
011 (bow) Michael Williams (BizmasterStudios); CC BY 3.0; https://opengameart.org/node/66349
012 (axe) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
013 (axe) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
014 (kite shield) Michael Williams (BizmasterStudios); CC BY 3.0; https://opengameart.org/node/64857
015 (shield) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
00[1-3] (balloon) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal, https://opengameart.org/node/101299
004 (bone) Bart Kelsey; CC0; https://opengameart.org/node/3755
005 (flag) Kimmo Rundelin (kiheru); CC BY-SA 3.0; Stendhal
006 (cane) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
007 (umbrella) Diligent Dodo (soniccuz), Jordan Irwin (AntumDeluge); CC BY-SA 3.0; https://sourceforge.net/p/arianne/patches/687/
008 (sword) LordNeo; CC0; https://opengameart.org/node/10878
009 (knife) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
010 (spear) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
011 (bow) Michael Williams (BizmasterStudios); CC BY 3.0; https://opengameart.org/node/66349
012 (axe) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
013 (axe) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
014 (kite shield) Michael Williams (BizmasterStudios); CC BY 3.0; https://opengameart.org/node/64857
015 (shield) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
016 (blacksmith hammer) Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal, https://opengameart.org/node/82370


data/sprites/outfit/dress/
Expand Down Expand Up @@ -241,6 +242,7 @@ data/sprites/outfit/hair/
054 diamonddmgirl, Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal, https://opengameart.org/node/72198
055 Yamilian; CC BY-SA 3.0; https://opengameart.org/node/11445
056 Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
057 Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
998 Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal
999 diamonddmgirl, bleutailfly, Jordan Irwin (AntumDeluge); OGA BY 3.0; Stendhal, https://opengameart.org/node/72198

Expand Down
4 changes: 2 additions & 2 deletions src/games/stendhal/common/Outfits.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
* (C) Copyright 2003-2024 - Stendhal *
***************************************************************************
***************************************************************************
* *
Expand Down Expand Up @@ -34,7 +34,7 @@ public class Outfits {
public static final int CLOTHES_OUTFITS = 65;

/** number of player selectable hair styles */
public static final int HAIR_OUTFITS = 57;
public static final int HAIR_OUTFITS = 58;

/** number of player selectable body shapes */
public static final int BODY_OUTFITS = 3;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.deniran.cityinterior.tannery;

import java.awt.Color;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import games.stendhal.common.constants.SkinColor;
import games.stendhal.server.core.config.ZoneConfigurator;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.core.pathfinder.FixedPath;
import games.stendhal.server.core.pathfinder.Node;
import games.stendhal.server.entity.CollisionAction;
import games.stendhal.server.entity.npc.ChatCondition;
import games.stendhal.server.entity.npc.ConversationPhrases;
import games.stendhal.server.entity.npc.ConversationStates;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.entity.npc.condition.NotCondition;
import games.stendhal.server.entity.npc.condition.QuestRegisteredCondition;


public class LeatherCrafterNPC implements ZoneConfigurator {

@Override
public void configureZone(StendhalRPZone zone, Map<String, String> attributes) {
zone.add(buildNPC());
}

private SpeakerNPC buildNPC() {
final SpeakerNPC npc = new SpeakerNPC("Tinny");
npc.setDescription("You see Tinny, the leather crafter.");

buildOutfit(npc);
buildPath(npc);
buildDialogue(npc);

return npc;
}

private void buildOutfit(final SpeakerNPC npc) {
npc.setOutfit("body=0,head=0,eyes=3,hair=57,dress=968,mask=5,detail=16");
npc.setOutfitColor("body", SkinColor.LIGHT);
npc.setOutfitColor("eyes", Color.BLUE);
}

private void buildPath(final SpeakerNPC npc) {
final List<Node> nodes = new LinkedList<>();
nodes.add(new Node(30, 4));
nodes.add(new Node(20, 4));
nodes.add(new Node(20, 13));
nodes.add(new Node(30, 13));
npc.setPath(new FixedPath(nodes, true));
npc.setPosition(30, 4);
npc.setCollisionAction(CollisionAction.STOP);
}

private void buildDialogue(final SpeakerNPC npc) {
npc.addGreeting("Hello, how can I help you?");
npc.addGoodbye("Goodbye.");
npc.addJob("I am a leather crafter. I recently completed my apprenticeship under Skinner and"
+ " will one day take over responsibility of the tannery.");

final String questSlot = "items_for_tinny";
final ChatCondition questNotRegistered = new NotCondition(new QuestRegisteredCondition(questSlot));

npc.add(
ConversationStates.ATTENDING,
ConversationPhrases.HELP_MESSAGES,
questNotRegistered,
ConversationStates.ATTENDING,
"If you are interested in a pouch to carry your money in, speak to Skinner.",
null);

npc.add(
ConversationStates.ATTENDING,
ConversationPhrases.QUEST_MESSAGES,
questNotRegistered,
ConversationStates.ATTENDING,
"There is nothing I need help with at this time.",
null);
}
}
47 changes: 47 additions & 0 deletions src/games/stendhal/server/maps/quests/ItemsForTinny.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.quests;

import games.stendhal.server.entity.npc.quest.BringItemQuestBuilder;
import games.stendhal.server.entity.npc.quest.QuestManuscript;
import games.stendhal.server.maps.Region;


public class ItemsForTinny implements QuestManuscript {

@Override
public BringItemQuestBuilder story() {
final BringItemQuestBuilder quest = new BringItemQuestBuilder();

quest.info()
.name("Items for Tinny")
.internalName("items_for_tinny")
.description("Tinny the leather crafter needs to restock his shelves.")
.region(Region.DENIRAN_CITY)
.questGiverNpc("Tinny");

quest.history();

quest.offer()
.respondToRequest("Well, as a matter of fact I do have a task for you. I am in need of some"
+ " supplies. Would you be interested in helping me?")
.respondToReject("Ah well, maybe I can find another brave soul to help me.")
.respondToAccept("Good! There is a few things that I need to restock my shelves. I would"
+ " reward you nicely, I do love working with leather.");

quest.task();

quest.complete();

return quest;
}
}
4 changes: 2 additions & 2 deletions src/js/stendhal/data/OutfitStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2003-2023 - Arianne *
* Copyright © 2003-2024 - Arianne *
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
Expand All @@ -21,7 +21,7 @@ export class OutfitStore {
// player pickable layers
private count: {[key: string]: number} = {
"hat": 19,
"hair": 57,
"hair": 58,
"mask": 9,
"eyes": 28,
"mouth": 5,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.deniran.cityinterior.tannery;

import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static utilities.SpeakerNPCTestHelper.getReply;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.entity.npc.SpeakerNPC;
import games.stendhal.server.entity.npc.fsm.Engine;
import games.stendhal.server.entity.player.Player;
import utilities.PlayerTestHelper;
import utilities.QuestHelper;
import utilities.ZonePlayerAndNPCTestImpl;


public class LeatherCrafterNPCTest extends ZonePlayerAndNPCTestImpl {

@BeforeClass
public static void setUpBeforeClass() throws Exception {
QuestHelper.setUpBeforeClass();
setupZone("testzone");
}

@Override
@Before
public void setUp() throws Exception {
setZoneForPlayer("testzone");
setNpcNames("Tinny");
addZoneConfigurator(new LeatherCrafterNPC(), "testzone");

super.setUp();
}

@Test
public void testDialogue() {
final Player player = PlayerTestHelper.createPlayer("player");
final SpeakerNPC npc = SingletonRepository.getNPCList().get("Tinny");

assertThat(player, notNullValue());
assertThat(npc, notNullValue());

final Engine en = npc.getEngine();
en.step(player, "hi");
assertThat(getReply(npc), is("Hello, how can I help you?"));
en.step(player, "job");
assertThat(getReply(npc), is("I am a leather crafter. I recently completed my apprenticeship"
+ " under Skinner and will one day take over responsibility of the tannery."));
en.step(player, "help");
assertThat(getReply(npc), is("If you are interested in a pouch to carry your money in, speak to"
+ " Skinner."));
en.step(player, "task");
assertThat(getReply(npc), is("There is nothing I need help with at this time."));
en.step(player, "bye");
assertThat(getReply(npc), is("Goodbye."));
}
}
18 changes: 18 additions & 0 deletions tests/games/stendhal/server/maps/quests/ItemsForTinnyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package games.stendhal.server.maps.quests;

import utilities.QuestHelper;


public class ItemsForTinnyTest extends QuestHelper {
}