Browse Source

First commit

master
Yves Quemener 2 weeks ago
parent
commit
ec8d8f4314
6 changed files with 98 additions and 18 deletions
  1. 39
    0
      README.md
  2. 59
    18
      init.lua
  3. BIN
      sc1.png
  4. BIN
      sc2.png
  5. BIN
      sc3.png
  6. BIN
      textures/socialemote_all_animated.png

+ 39
- 0
README.md View File

@@ -0,0 +1,39 @@
# Social Emotes for minetest

This mod adds chat commands that make bubbles with icons appear temporarily above the player.

"I did not want to hurt moma! I wanted to kiss her!" - My 5 yo, used to interactions with other players in cuter games.

There should be more than a wave/hit attitude for characters in Minetest. Here is a list of proposed emotes.


Commands available:
```
/love
/embarrassed
/exclamation
/question
/good
/bad
/idea
/sleepy
/sad
```

**License**:
- Affero GPL for the code
- Assuming CC-by-sa for the texture (need to confirm, see below)


The icons used come from [here](https://kicked-in-teeth.itch.io/emoticons). The author is [Kicked In Teeth](https://kicked-in-teeth.itch.io/) and stated:

```
free to edit
free for commercial use
```
Unfortunately no specific license has been provided.


![Character showing a bubble with hear icon](sc1.png)
![Character showing a bubble with hear icon](sc2.png)
![Character showing a bubble with hear icon](sc3.png)

+ 59
- 18
init.lua View File

@@ -1,31 +1,72 @@
socialemote = {}

function socialemote.show_heart(player)
local object = minetest.add_entity(player:get_pos(), "socialemote:heart_bubble")
object:set_attach(player, "Head", {x=-4.0, y=10.0, z=0.0}, {x=0, y=0, z=0}, {x=0.5, y=0.5, z=0.5})
object:set_sprite({x=1, y=1}, 3, 0.3, false)
function socialemote.show_emote(player, coordx, coordy)
local object = minetest.add_entity(player:get_pos(), "socialemote:bubble")
object:set_attach(player, "Head", {x=-3.0, y=7.0, z=0.0}, {x=0, y=0, z=0})
object:set_sprite({x=coordx, y=coordy}, 3, 0.3, false)
minetest.after(5.0, function()
object:remove()
end)
end

minetest.register_entity("socialemote:heart_bubble", {
minetest.register_entity("socialemote:bubble", {
visual = "sprite",
textures = {"socialemote_heart_animated.png"},
spritediv = {x = 1, y = 3},
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.5,
},
springiness= 0,
textures = {"socialemote_all_animated.png"},
spritediv = {x = 6, y = 12},
visual_size={x=0.5, y=0.5, z=0.5},
})

minetest.register_chatcommand("love", {
description = "Shows a beating heart for 5 seconds",
params = "",
privs = {},
func = function(name, param)
socialemote.show_heart(minetest.get_player_by_name(name))
end })
socialemote.show_emote(minetest.get_player_by_name(name), 3, 0)
end })
minetest.register_chatcommand("embarrassed", {
description = "Shows a sweat drop in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 1, 6)
end })

minetest.register_chatcommand("exclamation", {
description = "Shows an excalmation mark animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 4, 0)
end })

minetest.register_chatcommand("question", {
description = "Shows a question mark animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 4, 3)
end })

minetest.register_chatcommand("good", {
description = "Shows a thumbs up animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 1, 0)
end })

minetest.register_chatcommand("bad", {
description = "Shows a thumbs down animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 1, 3)
end })

minetest.register_chatcommand("idea", {
description = "Shows a lightbulb animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 1, 9)
end })
minetest.register_chatcommand("sleepy", {
description = "Shows a sleepy animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 2, 6)
end })

minetest.register_chatcommand("sad", {
description = "Shows a black thoughts animation in a bubble",
func = function(name, param)
socialemote.show_emote(minetest.get_player_by_name(name), 0, 9)
end })

BIN
sc1.png View File


BIN
sc2.png View File


BIN
sc3.png View File


BIN
textures/socialemote_all_animated.png View File


Loading…
Cancel
Save