Skip to content

Commit

Permalink
Replace uno reverse with body swap potion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiskster committed Jan 23, 2025
1 parent 25c1a61 commit 986b233
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Lua/Hooks/Player/Scripts/Role Handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ return function(p) -- Role handler

MM:GiveItem(p, givenweapon)
if p.mm.role == MMROLE_MURDERER then
local giveitem = P_RandomChance(FRACUNIT/2) and "uno_reverse" or "tripmine"
local giveitem = P_RandomChance(FRACUNIT/2) and "swap_gear" or "tripmine"

MM:GiveItem(p, giveitem)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ local MAX_COOLDOWN = TICRATE
local MAX_ANIM = MAX_COOLDOWN
local MAX_HIT = MAX_COOLDOWN/3

weapon.id = "uno_reverse"
weapon.category = "Test"
weapon.display_name = "Uno Reverse"
weapon.display_icon = "MM_UNO_REVERSE"
weapon.state = dofile "Items/Weapons/Uno_Reverse/freeslot"
weapon.id = "swap_gear"
weapon.category = "perkitem"
weapon.display_name = "Body Swap Potion"
weapon.display_icon = "MM_SWAP_GEAR"
weapon.state = dofile "Items/Weapons/Swap_Gear/freeslot"
weapon.timeleft = -1
weapon.hit_time = TICRATE/3
weapon.animation_time = TICRATE
Expand Down
7 changes: 7 additions & 0 deletions src/Lua/Items/Weapons/Swap_Gear/freeslot.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
states[freeslot "S_MM_SWAP_GEAR"] = {
sprite = freeslot "SPR_SGER",
frame = A,
tics = -1
}

return S_MM_SWAP_GEAR
2 changes: 1 addition & 1 deletion src/Lua/Items/Weapons/Tripmine/def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local MAX_ANIM = MAX_COOLDOWN
local MAX_HIT = MAX_COOLDOWN/5

weapon.id = "tripmine"
weapon.category = "Weapon"
weapon.category = "perkitem"
weapon.display_name = "\x89Subspace Tripmine"
weapon.display_icon = "MM_TRIPMINE"
weapon.state = dofile "Items/Weapons/Tripmine/freeslot"
Expand Down
7 changes: 0 additions & 7 deletions src/Lua/Items/Weapons/Uno_Reverse/freeslot.lua

This file was deleted.

2 changes: 1 addition & 1 deletion src/Lua/Items/Weapons/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MM:CreateItem(dofile(path.."Gun/def"))
MM:CreateItem(dofile(path.."Luger/def"))
MM:CreateItem(dofile(path.."Knife/def"))
MM:CreateItem(dofile(path.."Burger/def"))
MM:CreateItem(dofile(path.."Uno_Reverse/def"))
MM:CreateItem(dofile(path.."Swap_Gear/def"))
MM:CreateItem(dofile(path.."Sword/def"))
MM:CreateItem(dofile(path.."Snowball/def"))
MM:CreateItem(dofile(path.."DevLuger/def"))
Expand Down
2 changes: 1 addition & 1 deletion src/Lua/Perks/Scripts/Swap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MM.addHook("GiveStartWeapon",function(p)
if (MM_N.dueling) then return end

if (p.mm_save.pri_perk == MMPERK_SWAP)
MM:giveItem(p, "uno_reverse")
MM:giveItem(p, "swap_gear")
elseif (p.mm_save.sec_perk == MMPERK_SWAP)
--TODO: swap gun
end
Expand Down

0 comments on commit 986b233

Please sign in to comment.