From 04c75c989dd958cd1b25a8f49f34972fe1860f33 Mon Sep 17 00:00:00 2001 From: philipmi Date: Sun, 7 Feb 2021 21:53:20 +0100 Subject: [PATCH] Re-add rocketeer class --- mods/ctf/ctf_classes/classes.lua | 24 +++++++++++++----------- mods/ctf/ctf_classes/gui.lua | 2 +- mods/ctf/ctf_crafting/init.lua | 21 +++++++++++++++------ mods/ctf/ctf_map/ctf_map_core/maps | 2 +- mods/ctf/ctf_treasure/init.lua | 2 ++ mods/other/give_initial_stuff/init.lua | 2 +- 6 files changed, 33 insertions(+), 20 deletions(-) diff --git a/mods/ctf/ctf_classes/classes.lua b/mods/ctf/ctf_classes/classes.lua index 043db92..05aaa6a 100644 --- a/mods/ctf/ctf_classes/classes.lua +++ b/mods/ctf/ctf_classes/classes.lua @@ -2,8 +2,8 @@ ctf_classes.default_class = "knight" ctf_classes.register("knight", { description = "Knight", - pros = { "Skilled with swords", "+50% health points" }, - cons = { "-10% speed" }, + pros = { ">Skilled with swords", "> +50% health points" }, + cons = { "> -10% speed" }, color = "#ccc", properties = { max_hp = 30, @@ -23,8 +23,8 @@ ctf_classes.register("knight", { ctf_classes.register("shooter", { description = "Sharp Shooter", - pros = { "Skilled with ranged weapons", "Can craft/use sniper rifles"}, - cons = {"-25% health points"}, + pros = { ">Skilled with ranged", "weapons and can", "craft/use sniper rifles"}, + cons = { "> -20% health points" }, color = "#c60", properties = { allow_grapples = true, @@ -72,7 +72,7 @@ ctf_classes.register("shooter", { ctf_classes.register("medic", { description = "Medic", - pros = { "x2 regen for nearby friendlies", "Building supplies + Paxel", "+10% speed" }, + pros = { ">x2 regen for nearby", "friendlies", ">Building supplies +", "Paxel", "> +10% speed" }, cons = {}, color = "#0af", properties = { @@ -154,12 +154,16 @@ ctf_classes.register("sniper", { }) ]]-- ---[[ctf_classes.register("rocketeer", { +ctf_classes.register("rocketeer", { description = "Rocketeer", - pros = { "Can craft rockets" }, - cons = {}, + pros = { ">Can craft/use rockets" }, + cons = { "> -50% health points" }, color = "#fa0", properties = { + -- Disallow rocketeers from capturing flags - they're intended to be support + can_capture = false, + max_hp = 10, + initial_stuff = { "shooter_rocket:rocket_gun_loaded", "shooter_rocket:rocket 4", @@ -171,12 +175,10 @@ ctf_classes.register("sniper", { allowed_guns = { "shooter_guns:pistol", - "shooter_guns:machine_gun", - "shooter_guns:shotgun", }, crafting = { "shooter_rocket:rocket" }, }, -})]] +}) diff --git a/mods/ctf/ctf_classes/gui.lua b/mods/ctf/ctf_classes/gui.lua index e863f24..e5cfd94 100644 --- a/mods/ctf/ctf_classes/gui.lua +++ b/mods/ctf/ctf_classes/gui.lua @@ -24,7 +24,7 @@ function ctf_classes.show_gui(name, player) fs[#fs + 1] = "]" fs[#fs + 1] = "tableoptions[background=#00000000;highlight=#00000000;border=false]" fs[#fs + 1] = "tablecolumns[color;text]" - fs[#fs + 1] = "table[0,0.9;2.8,2.2;;" + fs[#fs + 1] = "table[0,0.9;3.0,2.25;;" fs[#fs + 1] = class.color fs[#fs + 1] = "," fs[#fs + 1] = minetest.formspec_escape(class.description) diff --git a/mods/ctf/ctf_crafting/init.lua b/mods/ctf/ctf_crafting/init.lua index a819871..5c30f51 100644 --- a/mods/ctf/ctf_crafting/init.lua +++ b/mods/ctf/ctf_crafting/init.lua @@ -8,24 +8,24 @@ local full_ores = { local sword_materials = { steel = "default:steel_ingot", - mese = "default:mese_crystal", diamond = "default:diamond", + mese = "default:mese_crystal", } --- Rocket <== Gold ingot x16 + Coal lump x5 +-- Rocket <== Gold ingot x5 + Coal lump x4 crafting.register_recipe({ type = "inv", output = "shooter_rocket:rocket", - items = { "default:gold_ingot 16", "default:coal_lump 5" }, + items = { "default:gold_ingot 5", "default:coal_lump 4" }, always_known = false, level = 1, }) --- Rocket <== Mese x5 + Coal lump x5 +-- Rocket <== Mese x1 + Coal lump x4 crafting.register_recipe({ type = "inv", output = "shooter_rocket:rocket", - items = { "default:mese 5", "default:coal_lump 5" }, + items = { "default:mese 1", "default:coal_lump 4" }, always_known = false, level = 1, }) @@ -52,11 +52,20 @@ for ore, ore_item in pairs(full_ores) do }) end +--Mese block <== Mese crystal x9 +crafting.register_recipe({ + type = "inv", + output = "default:mese", + items = { "default:mese_crystal 9" }, + always_known = true, + level = 1, +}) + -- Mese crystal x9 <== Mese block crafting.register_recipe({ type = "inv", output = "default:mese_crystal 9", - items = { "default:mese"}, + items = { "default:mese" }, always_known = true, level = 1, }) diff --git a/mods/ctf/ctf_map/ctf_map_core/maps b/mods/ctf/ctf_map/ctf_map_core/maps index 08f5719..e8dffc7 160000 --- a/mods/ctf/ctf_map/ctf_map_core/maps +++ b/mods/ctf/ctf_map/ctf_map_core/maps @@ -1 +1 @@ -Subproject commit 08f571991b30fa7d9eae0e836e3047f5049d7963 +Subproject commit e8dffc7b1bdf445b87c4ae1cf3eeeb3da2b1a801 diff --git a/mods/ctf/ctf_treasure/init.lua b/mods/ctf/ctf_treasure/init.lua index a7f4840..e39e3b6 100644 --- a/mods/ctf/ctf_treasure/init.lua +++ b/mods/ctf/ctf_treasure/init.lua @@ -24,6 +24,8 @@ function ctf_treasure.get_default_treasures() { "shooter:ammo", 0.3, 2, { 1, 10 } }, -- { "shooter:arrow_white", 0.5, 2, { 2, 18 } }, + { "shooter_rocket:rocket", 0.3, 2, 1 }, + { "sniper_rifles:rifle_762_loaded", 0.1, 2, 1 }, { "sniper_rifles:rifle_magnum_loaded", 0.01, 2, 1 }, diff --git a/mods/other/give_initial_stuff/init.lua b/mods/other/give_initial_stuff/init.lua index 20a697c..472d27c 100644 --- a/mods/other/give_initial_stuff/init.lua +++ b/mods/other/give_initial_stuff/init.lua @@ -22,7 +22,7 @@ function give_initial_stuff.give_item(inv, item) end -- Don't duplicate stacks - if inv:contains_item("main", item:get_name()) then + if inv:contains_item("main", item:get_name()) and not inv:contains_item("main", "shooter_rocket:rocket") then local safeguard = 0 local itemcount = item:get_count()-5 if itemcount < 0 then itemcount = 0 end