Skip to content

Commit

Permalink
Rename the "Anti-Graffiti Spray Can" to "Graffiti Remover Spray Can"
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Dec 9, 2022
1 parent 2e3e616 commit 4a2f7cc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Press and hold the dig button (the one you normally use to remove blocks) to pai

![](./docpics/recipe_red_mushroom_extract.png)

**Anti-Graffiti Spray Can**
**Graffiti Remover Spray Can**

![](./docpics/recipe_anti_spray_can.png)
![](./docpics/recipe_remover_spray_can.png)

A spray can that removes graffiti. Essentially an eraser.

Expand Down
File renamed without changes
16 changes: 9 additions & 7 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ local function spraycast(player, pos, dir, def)
end

if not canvas then
if def.anti then return end
if def.remover then return end

local obj = minetest.add_entity(canvas_pos, "ggraffiti:canvas")
obj:set_rotation(canvas_rot)
Expand All @@ -112,7 +112,7 @@ local function spraycast(player, pos, dir, def)
)
local index = pos_on_bitmap.y * canvas.bitmap_size.x + pos_on_bitmap.x + 1

if def.anti then
if def.remover then
if canvas.bitmap[index] ~= TRANSPARENT then
canvas.bitmap[index] = TRANSPARENT
if canvas:is_empty() then
Expand Down Expand Up @@ -203,26 +203,28 @@ minetest.register_craft({
output = "ggraffiti:mushroom_red_extract 4",
})

minetest.register_tool("ggraffiti:spray_can_anti", {
description = S("Anti-Graffiti Spray Can"),
inventory_image = "ggraffiti_spray_can_anti.png",
minetest.register_tool("ggraffiti:spray_can_remover", {
description = S("Graffiti Remover Spray Can"),
inventory_image = "ggraffiti_spray_can_remover.png",

range = MAX_SPRAY_DISTANCE,
on_use = spray_can_on_use,
_ggraffiti_spray_can = {
anti = true,
remover = true,
},

groups = {ggraffiti_spray_can = 1},
})

minetest.register_alias("ggraffiti:spray_can_anti", "ggraffiti:spray_can_remover")

minetest.register_craft({
recipe = {
{"default:steel_ingot"},
{"ggraffiti:mushroom_red_extract"},
{"default:steel_ingot"},
},
output = "ggraffiti:spray_can_anti",
output = "ggraffiti:spray_can_remover",
})

minetest.register_craft({
Expand Down
2 changes: 1 addition & 1 deletion locale/ggraffiti.de.tr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Graffiti Spray Can (red)=Graffiti-Sprühdose (rot)
Graffiti Spray Can (magenta)=Graffiti-Sprühdose (magenta)
Graffiti Spray Can (pink)=Graffiti-Sprühdose (rosa)
Red Mushroom Extract=Roter Pilzextrakt
Anti-Graffiti Spray Can=Anti-Graffiti-Sprühdose
Graffiti Remover Spray Can=Graffiti-Entferner-Sprühdose
File renamed without changes

0 comments on commit 4a2f7cc

Please sign in to comment.