diff --git a/game/engines/default/engine/KeyBind.lua b/game/engines/default/engine/KeyBind.lua index a46627c9a5065a3da1411051631ba0ebb4015071..b4abf550d1d552d1a95f64a68972843506531961 100644 --- a/game/engines/default/engine/KeyBind.lua +++ b/game/engines/default/engine/KeyBind.lua @@ -175,11 +175,14 @@ function _M:formatKeyString(ks) end sym = core.key.symName(sym) end + sym = sym:gsub("Keypad ", "k") - if ctrl then sym = "[C]+"..sym end - if shift then sym = "[S]+"..sym end - if alt then sym = "[A]+"..sym end - if meta then sym = "[M]+"..sym end + local st = "" + if ctrl then st = "C"..st end + if shift then st = "S"..st end + if alt then st = "A"..st end + if meta then st = "M"..st end + if st ~= "" then sym = st..""..sym end return sym elseif ks:find("^mouse:") then @@ -190,12 +193,14 @@ function _M:formatKeyString(ks) shift = shift == "true" and true or false alt = alt == "true" and true or false meta = meta == "true" and true or false - sym = "mouse["..sym.."]" - - if ctrl then sym = "[C]+"..sym end - if shift then sym = "[S]+"..sym end - if alt then sym = "[A]+"..sym end - if meta then sym = "[M]+"..sym end + sym = sym:gsub("button", "b") + + local st = "" + if ctrl then st = "C"..st end + if shift then st = "S"..st end + if alt then st = "A"..st end + if meta then st = "M"..st end + if st ~= "" then sym = st..""..sym end return sym elseif ks:find("^gest:") then diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index fe3a9a3e8187005bfa417e2775b5bdfca051ee79..4721f288bb0761c4f6490a1c8e4eb93ec0eef11c 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2846,6 +2846,7 @@ function _M:updateModdableTile() self:triggerHook{"Actor:updateModdableTile:front", base=base, add=add} if self.moddable_tile_ornament and self.moddable_tile_ornament[self.female and "female" or "male"] then add[#add+1] = {image = base..self.moddable_tile_ornament[self.female and "female" or "male"]..".png"} end + if self.moddable_tile_ornament2 and self.moddable_tile_ornament2[self.female and "female" or "male"] then add[#add+1] = {image = base..self.moddable_tile_ornament2[self.female and "female" or "male"]..".png"} end if self.x and game.level then game.level.map:updateMap(self.x, self.y) end end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 0793540eebf1627e261b268934c1780eb6b61801..a9638601cd82e6424e56327aa1e2401894d02063 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -2097,6 +2097,7 @@ unlocks_list = { birth_transmo_chest = "Birth option: Transmogrification Chest", birth_zigur_sacrifice = "Birth option: Zigur sacrifice", cosmetic_race_human_redhead = "Cosmetic: Redheads", + cosmetic_race_dwarf_female_beard = "Cosmetic: Female dwarves facial pilosity", difficulty_insane = "Difficulty: Insane", difficulty_madness = "Difficulty: Madness", diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index 484a53eebd82c37933e7bf75791ef4a155938424..bca05104f5514013fcba90271f0c4a38b7a46d46 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -52,9 +52,16 @@ newBirthDescriptor{ moddable_attachement_spots = "race_dwarf", cosmetic_unlock = { + cosmetic_race_dwarf_female_beard = { + {priority=2, name="Beard [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_ornament={female="beard_"..(actor.is_redhead and "redhead_" or "").."01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + {priority=2, name="Sideburns [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_ornament={female="sideburners_"..(actor.is_redhead and "redhead_" or "").."01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + {priority=2, name="Mustache [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_ornament={female="mustache_"..(actor.is_redhead and "redhead_" or "").."01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + {priority=2, name="Flip [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_ornament={female="flip_"..(actor.is_redhead and "redhead_" or "").."01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + {priority=2, name="Donut [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_ornament={female="donut_"..(actor.is_redhead and "redhead_" or "").."01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + }, cosmetic_race_human_redhead = { - {name="Redhead [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_base = "base_redhead_01.png" actor.moddable_tile_ornament={male="beard_redhead_02"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Male" end}, - {name="Redhead [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.moddable_tile_base = "base_redhead_01.png" actor.moddable_tile_ornament={female="braid_redhead_01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, + {priority=1, name="Redhead [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.is_redhead = true actor.moddable_tile_base = "base_redhead_01.png" actor.moddable_tile_ornament2={male="beard_redhead_02"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Male" end}, + {priority=1, name="Redhead [donator only]", donator=true, on_actor=function(actor) if actor.moddable_tile then actor.is_redhead = true actor.is_redhead = true actor.moddable_tile_base = "base_redhead_01.png" actor.moddable_tile_ornament2={female="braid_redhead_01"} end end, check=function(birth) return birth.descriptors_by_type.sex == "Female" end}, }, }, } @@ -83,7 +90,7 @@ newBirthDescriptor }, copy = { moddable_tile = "dwarf_#sex#", - moddable_tile_ornament = {male="beard_02", female="braid_01"}, + moddable_tile_ornament2 = {male="beard_02", female="braid_01"}, random_name_def = "dwarf_#sex#", life_rating=12, }, diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/base_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/base_01.png index 2342d9b078c143c16212bd97c61f012b788e7570..6fccf88dfe356415f8e9aa119b46b7b01dbc0808 100644 Binary files a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/base_01.png and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/base_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_01.png new file mode 100644 index 0000000000000000000000000000000000000000..c77f1d0dce3aee9759af8117c549ed6ef0b8adf7 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_redhead_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_redhead_01.png new file mode 100644 index 0000000000000000000000000000000000000000..a809cef9afd7505d55399b7dfd714cde54171f9c Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/beard_redhead_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_01.png new file mode 100644 index 0000000000000000000000000000000000000000..d9bf9fa6715b56430b2b261ca99486f45163d35c Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_redhead_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_redhead_01.png new file mode 100644 index 0000000000000000000000000000000000000000..64fe7a2d368d1ba39cbad0eef111f795ae89b34c Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/donut_redhead_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_01.png new file mode 100644 index 0000000000000000000000000000000000000000..7e4f04a8212c21b6a7f80223f6820e57a59d566c Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_redhead_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_redhead_01.png new file mode 100644 index 0000000000000000000000000000000000000000..84a74b0726244c89ab5c1997fba59b85ec8747f2 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/flip_redhead_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_01.png new file mode 100644 index 0000000000000000000000000000000000000000..59b30b51f4942878e4d699ff1523907e7eb89851 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_redhead_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_redhead_01.png new file mode 100644 index 0000000000000000000000000000000000000000..127fa2f0e2b9985792210055b87f043b57500692 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/mustache_redhead_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_01.png new file mode 100644 index 0000000000000000000000000000000000000000..630ae064911553552a6dac0e4ed8ba90c98228e7 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_redhead_01.png b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_redhead_01.png new file mode 100644 index 0000000000000000000000000000000000000000..4da7fa750b00e1122c3fb09d65ae04a7a040048e Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/player/dwarf_female/sideburners_redhead_01.png differ diff --git a/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua b/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua new file mode 100644 index 0000000000000000000000000000000000000000..f41f4e60224e41efb264b61c28f6346f35e65704 --- /dev/null +++ b/game/modules/tome/data/texts/unlock-cosmetic_race_dwarf_female_beard.lua @@ -0,0 +1,27 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return "New Cosmetic Race Option: #LIGHT_GREEN#Facial Pilosity for Female Dwarves", +[[You have saved the Iron Council from untold horrors from the deep. + +You may now create female dwarf characters sporting proudnly facial pilosity as is the norm in the upper classes of dwarven society. +This has no effect on gameplay at all but it is fun! + +#LIGHT_GREEN#This is only available to donators. Thanks for your support! +]] diff --git a/game/modules/tome/data/zones/deep-bellow/npcs.lua b/game/modules/tome/data/zones/deep-bellow/npcs.lua index 324c6d3cc4a45267b57d3a3df1085209d32d4e79..038c1563a5933a674bba97db624aff9c1e978e5b 100644 --- a/game/modules/tome/data/zones/deep-bellow/npcs.lua +++ b/game/modules/tome/data/zones/deep-bellow/npcs.lua @@ -80,6 +80,10 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", on_die = function(self, who) game.player:resolveSource():setQuestStatus("deep-bellow", engine.Quest.COMPLETED) game.state:activateBackupGuardian("ABOMINATION", 3, 35, "I have heard a dwarf whispering about some abomination in the deep bellow.") + + if game:getPlayer(true).female then + game:setAllowedBuild("cosmetic_race_dwarf_female_beard", true) + end end, } diff --git a/game/modules/tome/dialogs/Birther.lua b/game/modules/tome/dialogs/Birther.lua index 7835314af0ad5bc175ab04f98f004683b47d7273..966373aab3e79fdcf0facf3dd73ba78ae1db28cc 100644 --- a/game/modules/tome/dialogs/Birther.lua +++ b/game/modules/tome/dialogs/Birther.lua @@ -1067,6 +1067,7 @@ function _M:setTile(f, w, h, last) self.actor.moddable_tile = dr.copy.moddable_tile self.actor.moddable_tile_base = dr.copy.moddable_tile_base self.actor.moddable_tile_ornament = dr.copy.moddable_tile_ornament + self.actor.moddable_tile_ornament2 = dr.copy.moddable_tile_ornament2 end else self.actor.make_tile = nil @@ -1105,8 +1106,15 @@ function _M:setTile(f, w, h, last) end function _M:applyCosmeticActor() + self.actor.is_redhaed = nil -- Booh this is ugly + + local list = {} for i, d in ipairs(self.cosmetic_unlocks) do - if self.selected_cosmetic_unlocks[d.name] and d.on_actor then d.on_actor(self.actor) end + if self.selected_cosmetic_unlocks[d.name] and d.on_actor then list[#list+1] = d if not d.priority then d.priority = 1 end end + end + table.sort(list, function(a,b) return a.priority < b.priority end) + for i, d in ipairs(list) do + d.on_actor(self.actor) end end