summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/encyclopediae/default_encyclopedia.json15
-rw-r--r--src/components/mod.rs3
-rw-r--r--src/componentwrapper.rs1
-rw-r--r--src/room.rs2
-rw-r--r--src/systems/die.rs7
5 files changed, 7 insertions, 21 deletions
diff --git a/content/encyclopediae/default_encyclopedia.json b/content/encyclopediae/default_encyclopedia.json
index e22efba..1747293 100644
--- a/content/encyclopediae/default_encyclopedia.json
+++ b/content/encyclopediae/default_encyclopedia.json
@@ -90,7 +90,6 @@
"arguments": [["health", "int", 100]],
"components": [
["Health", {"health": ["arg", "health"], "maxhealth": 100}],
- "Mortal",
["Loot", {"loot": ["list", [{"type": "stone"}]]}]
],
"sprite": "builtwall",
@@ -108,8 +107,7 @@
"sprite": "dummy",
"height": 1,
"components": [
- ["Health", {"health": ["arg", "health"], "maxhealth": 20}],
- "Mortal"
+ ["Health", {"health": ["arg", "health"], "maxhealth": 20}]
]
},
"wound": {
@@ -130,7 +128,6 @@
["Health", {"health": 8, "maxhealth": 8}],
["Fighter", {"damage": 2, "cooldown": 6}],
["Movable", {"cooldown": 3}],
- "Mortal",
["Faction", {"faction": "evil"}],
["Loot", {"loot": ["list", [
["list", [{"type": "radishseed"}, 1.0]]
@@ -149,7 +146,6 @@
["Health", {"health": 15, "maxhealth": 15}],
["Fighter", {"damage": 5, "cooldown": 8}],
["Movable", {"cooldown": 4}],
- "Mortal",
["Faction", {"faction": "evil"}],
["Loot", {"loot": ["list", [
["list", [{"type": "sword"}, 0.05]],
@@ -170,7 +166,6 @@
["Health", {"health": 75, "maxhealth": 75}],
["Fighter", {"damage": 15, "cooldown": 10}],
["Movable", {"cooldown": 5}],
- "Mortal",
["Faction", {"faction": "evil"}],
["Loot", {"loot": ["list", [
["list", [{"type": "stone"}, 1.0]],
@@ -221,7 +216,6 @@
"height": 0.5,
"components": [
["Interactable", {"action": ["interaction", "harvest"]}],
- "Mortal",
["Loot", {"loot": ["list", [
["list", [{"type": "radishseed"}, 0.92]],
["list", [{"type": "radishseed"}, 0.20]],
@@ -288,8 +282,7 @@
"flags": ["Blocking"],
"components": [
["Interactable", {"action": ["interaction", "harvest"]}],
- ["Loot", {"loot": ["list", [{"type": "opendoor", "save": false}]]}],
- "Mortal"
+ ["Loot", {"loot": ["list", [{"type": "opendoor", "save": false}]]}]
]
},
"opendoor": {
@@ -298,8 +291,7 @@
"flags": ["Occupied"],
"components": [
["Interactable", {"action": ["interaction", "harvest"]}],
- ["Loot", {"loot": ["list", [{"type": "closeddoor", "save": false}]]}],
- "Mortal"
+ ["Loot", {"loot": ["list", [{"type": "closeddoor", "save": false}]]}]
]
},
"sign": {
@@ -388,7 +380,6 @@
"height": 1.0,
"components": [
["Interactable", {"action": ["interaction", "harvest"]}],
- "Mortal",
["Loot", {"loot": ["list", [
["list", [{"type": "carrotseed"}, 1.0]],
["list", [{"type": "carrot"}, 1.0]]
diff --git a/src/components/mod.rs b/src/components/mod.rs
index cb28c4b..412dc2e 100644
--- a/src/components/mod.rs
+++ b/src/components/mod.rs
@@ -186,9 +186,6 @@ pub struct Home {
pub home: Pos
}
-#[derive(Component, Debug, Clone, Default)]
-pub struct Mortal;
-
#[derive(Component, Debug, Clone)]
#[storage(HashMapStorage)]
pub struct Spawner {
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs
index 4b9401a..2d3c102 100644
--- a/src/componentwrapper.rs
+++ b/src/componentwrapper.rs
@@ -164,7 +164,6 @@ components!(
Volatile (delay: Int) {Volatile{delay, end_time: None}};
Autofight () {Autofight::default()};
MonsterAI (move_chance: Float, homesickness: Float, view_distance: Int);
- Mortal;
Spawner (amount: Int, delay: Int, clan: String, template: Template, initial_spawn: Bool) {
Spawner{
amount: amount as usize,
diff --git a/src/room.rs b/src/room.rs
index 94d5f00..c8a0dac 100644
--- a/src/room.rs
+++ b/src/room.rs
@@ -118,7 +118,7 @@ impl <'a, 'b>Room<'a, 'b> {
world.insert(NewEntities::new(encyclopedia));
register_insert!(
world,
- (Position, Visible, Controller, Movable, New, Removed, Moved, Player, Inventory, Health, Serialise, RoomExit, Entered, Dead, Trap, Fighter, Healing, Volatile, ControlCooldown, Autofight, MonsterAI, Home, Mortal, AttackInbox, Item, Spawner, Clan, Faction, Interactable, Loot, Grow, Equipment, CreationTime, Flags, Ear),
+ (Position, Visible, Controller, Movable, New, Removed, Moved, Player, Inventory, Health, Serialise, RoomExit, Entered, Dead, Trap, Fighter, Healing, Volatile, ControlCooldown, Autofight, MonsterAI, Home, AttackInbox, Item, Spawner, Clan, Faction, Interactable, Loot, Grow, Equipment, CreationTime, Flags, Ear),
(Ground, Input, Output, Size, Spawn, Players, Emigration, Time)
);
diff --git a/src/systems/die.rs b/src/systems/die.rs
index fd953e0..e9fb127 100644
--- a/src/systems/die.rs
+++ b/src/systems/die.rs
@@ -9,7 +9,7 @@ use specs::{
};
use crate::{
- components::{Mortal, Dead, Removed, Player},
+ components::{Dead, Removed, Player},
resources::Emigration,
purgatory,
playerstate::RoomPos
@@ -20,15 +20,14 @@ pub struct Die;
impl <'a> System<'a> for Die {
type SystemData = (
Entities<'a>,
- ReadStorage<'a, Mortal>,
ReadStorage<'a, Dead>,
WriteStorage<'a, Removed>,
Write<'a, Emigration>,
ReadStorage<'a, Player>
);
- fn run(&mut self, (entities, mortals, deads, mut removeds, mut emigration, players): Self::SystemData) {
+ fn run(&mut self, (entities, deads, mut removeds, mut emigration, players): Self::SystemData) {
// npcs etc get removed when dead
- for (entity, _, _) in (&entities, &mortals, &deads).join() {
+ for (entity, _, _) in (&entities, &deads, !&players).join() {
removeds.insert(entity, Removed).unwrap();
}
// players move to purgatory when dead