From f930d675628baa57e8ea2c8c4867f379d128d2b9 Mon Sep 17 00:00:00 2001 From: Shagnor Date: Wed, 8 Feb 2023 22:35:05 +1100 Subject: [PATCH] Start of Concourse setup + early start on reward system --- .concourse.yml | 25 +++++++++++++++++++ blastmud_game/src/static_content/npc.rs | 11 ++++++-- .../src/static_content/npc/melbs_dog.rs | 6 ++++- 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .concourse.yml diff --git a/.concourse.yml b/.concourse.yml new file mode 100644 index 00000000..6b4de703 --- /dev/null +++ b/.concourse.yml @@ -0,0 +1,25 @@ +jobs: + - name: build-blastmud-image + public: true + plan: + - get: blastmud-repo + trigger: true + - task: build + config: + platform: linux + image_resource: + type: registry-image + source: + repository: rust + run: + path: echo + args: ["Hello", "world!"] +resources: + - name: blastmud-repo + type: git + check_every: never + webhook_token: ((webhook_token)) + source: + uri: https://git.blastmud.org/blasthavers/blastmud.git + branch: main + diff --git a/blastmud_game/src/static_content/npc.rs b/blastmud_game/src/static_content/npc.rs index c33fcd70..23916f76 100644 --- a/blastmud_game/src/static_content/npc.rs +++ b/blastmud_game/src/static_content/npc.rs @@ -62,6 +62,11 @@ pub struct NPCSayInfo { pub talk_type: NPCSayType } +pub struct KillBonus { + pub msg: &'static str, + pub payment: u64, +} + pub struct NPC { pub code: &'static str, pub name: &'static str, @@ -77,7 +82,8 @@ pub struct NPC { pub total_xp: u64, pub total_skills: BTreeMap, pub species: SpeciesType, - pub wander_zones: Vec<&'static str> + pub wander_zones: Vec<&'static str>, + pub kill_bonus: Option, } impl Default for NPC { @@ -98,7 +104,8 @@ impl Default for NPC { aggression: 0, intrinsic_weapon: None, species: SpeciesType::Human, - wander_zones: vec!() + wander_zones: vec!(), + kill_bonus: None, } } } diff --git a/blastmud_game/src/static_content/npc/melbs_dog.rs b/blastmud_game/src/static_content/npc/melbs_dog.rs index ba66cd1a..b02a40d4 100644 --- a/blastmud_game/src/static_content/npc/melbs_dog.rs +++ b/blastmud_game/src/static_content/npc/melbs_dog.rs @@ -1,4 +1,4 @@ -use super::NPC; +use super::{NPC, KillBonus}; use crate::models::item::Pronouns; use crate::static_content::{ possession_type::PossessionType, @@ -19,6 +19,10 @@ macro_rules! dog { spawn_location: concat!("room/", $spawn), intrinsic_weapon: Some(PossessionType::Fangs), species: SpeciesType::Dog, + kill_bonus: Some(KillBonus { + msg: "On your wristpad: Thank you for helping Melbs with animal control! Here's your fee.", + payment: 100, + }), ..Default::default() } }