Skip to content

Commit

Permalink
Remove loader ver headers, use dependencies header instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelius7309 committed Aug 5, 2024
1 parent 7b807c8 commit 92c9636
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 230 deletions.
2 changes: 1 addition & 1 deletion core/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--- MODULE CORE

SMODS = {}
MODDED_VERSION = "1.0.0-ALPHA-0805c-STEAMODDED"
MODDED_VERSION = "1.0.0-ALPHA-0805d-STEAMODDED"

-- Include lovely and nativefs modules
local nativefs = require "nativefs"
Expand Down
6 changes: 3 additions & 3 deletions core/game_object.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
use = function(self, card, area, copier)
local used_tarot = copier or card
juice_flip(used_tarot)
local _suit = pseudorandom_element(SMODS.Suit.obj_buffer, pseudoseed('sigil'))
local _suit = pseudorandom_element(SMODS.Suits, pseudoseed('sigil'))
for i = 1, #G.hand.cards do
G.E_MANAGER:add_event(Event({
func = function()
Expand All @@ -1772,12 +1772,12 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
use = function(self, card, area, copier)
local used_tarot = copier or card
juice_flip(used_tarot)
local _rank = pseudorandom_element(SMODS.Rank.obj_buffer, pseudoseed('ouija'))
local _rank = pseudorandom_element(SMODS.Ranks, pseudoseed('ouija'))
for i = 1, #G.hand.cards do
G.E_MANAGER:add_event(Event({
func = function()
local _card = G.hand.cards[i]
assert(SMODS.change_base(_card, nil, _rank))
assert(SMODS.change_base(_card, nil, _rank.key))
return true
end
}))
Expand Down
2 changes: 0 additions & 2 deletions core/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,6 @@ function G.FUNCS.mods_buttons_page(options)
end
end

SMODS.id = 'Steamodded'

function SMODS.load_mod_config(mod)
local config = load(NFS.read(('config/%s.jkr'):format(mod.id)) or 'return {}', ('=[SMODS %s "config"]'):format(mod.id))()
local default_config = load(NFS.read(('%sconfig.lua'):format(mod.path)) or 'return {}', ('=[SMODS %s "default_config"]'):format(mod.id))()
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/AbsoluteDeck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: AbsoluteDeck
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Absolute Deck of PolyGlass!
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/AchievementsEnabler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: AchievementsEnabler
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Mod to activate Achievements
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/DeckOf4s.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: DeckOf4
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Create a special deck that only contains 4s!
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0731a]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
195 changes: 1 addition & 194 deletions example_mods/Mods/EditionExamples/EditionExamples.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,200 +5,7 @@
--- MOD_AUTHOR: [Eremel_, stupxd]
--- MOD_DESCRIPTION: Adds editions that demonstrate Edition API.
--- BADGE_COLOUR: 3FC7EB


local mod_path = SMODS.current_mod.path
-- SMODS.Sprite:new("High Exposure", mod.path, "high exposure.png", 71, 95, "asset_atli"):register()
-- SMODS.Sprite:new("Neon", mod.path, "neon.png", 71, 95, "asset_atli"):register()
-- SMODS.Sprite:new("Grey", mod.path, "grey.png", 71, 95, "asset_atli"):register()


-- local flippedDef = {
-- name = "Monochrome",
-- slug = "monochrome",
-- config = { labels = {'chip_mod'}, values = {10} },
-- shader_path = mod.path .. "/assets/shaders/monochrome.fs",
-- loc_txt = { name = "Monochrome", text = {"Earn {C:money}$#1#{} when a","hand is scored"}},
-- discovered = true,
-- unlocked = true,
-- unlock_condition = {},
-- badge_colour = G.C.DARK_EDITION,
-- calculate = function(self, context)
-- if context.edition or (context.cardarea == G.play and self.playing_card) then
-- ease_dollars(self.edition.p_dollars)
-- card_eval_status_text(self, 'dollars', self.edition.p_dollars)
-- end
-- end
-- }

-- local sepiaDef = {
-- name = "Sepia",
-- slug = "sepia",
-- config = { labels = {'chip_mod'}, values = {10} },
-- shader_path = mod.path .. "/assets/shaders/sepia.fs",
-- loc_txt = { name = "Sepia", text = {"{C:chips}+#1#{} chips"}},
-- discovered = true,
-- unlocked = true,
-- unlock_condition = {},
-- badge_colour = G.C.DARK_EDITION,
-- weight = 3,
-- in_shop = true,
-- extra_cost = 4,
-- calculate = function(self, context)
-- if context.edition or (context.cardarea == G.play and self.playing_card) then
-- hand_chips = mod_chips(hand_chips + self.edition.chip_mod)
-- update_hand_text({delay = 0}, {chips = hand_chips})
-- card_eval_status_text(self, 'chips', self.edition. chip_mod, percent)
-- -- ret = {}
-- -- for k, v in pairs(self.edition) do
-- -- ret[k] = v
-- -- end
-- -- return ret
-- end
-- end
-- }

-- local c_high_exposure = SMODS.Spectral:new('High Exposure', 'high_exposure', {}, {
-- x = 0,
-- y = 0
-- }, {
-- name = "Test Card",
-- text = {"Add {C:dark_edition}Foil{} or {C:dark_edition}Sepia{}","to a random joker"}
-- }, 4, nil, nil, 'High Exposure')

-- local c_neon = SMODS.Spectral:new('Neon', 'neon', {}, {
-- x = 0,
-- y = 0
-- }, {
-- name = "+Sepia",
-- text = {"Increase {C:dark_edition}Sepia{} chip", "value by {C:chips}+10{}"}
-- }, 4, nil, nil, 'Neon')

-- local c_grey = SMODS.Spectral:new('Grey', 'grey', {}, {
-- x = 0,
-- y = 0
-- }, {
-- name = "Grey",
-- text = {"Add {C:dark_edition}Greyscale{}", "to a random joker"}
-- }, 4, nil, nil, 'Grey')

-- c_high_exposure:register()
-- c_neon:register()
-- c_grey:register()


-- -- two cards in hand overexposed
-- function SMODS.Spectrals.c_high_exposure.can_use(card)
-- if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or
-- any_state then
-- if G.hand and (#G.hand.highlighted == 4) and G.hand.highlighted[1] and G.hand.highlighted[2] and G.hand.highlighted[3] and G.hand.highlighted[4] and (not G.hand.highlighted[1].edition) and (not G.hand.highlighted[2].edition) and (not G.hand.highlighted[3].edition) and (not G.hand.highlighted[4].edition) then return true end
-- end
-- end

-- function SMODS.Spectrals.c_high_exposure.use(card, area, copier)
-- local used_tarot = (copier or card)
-- local selected_cards = G.hand.highlighted
-- for _,_card in ipairs(selected_cards) do
-- G.E_MANAGER:add_event(Event({
-- trigger = 'after',
-- delay = 0.6,
-- func = function()
-- local selected_edition = poll_edition("custom_editions", nil, nil, true, {{name = "sepia", weight = 1}, {name = "overexposed", weight = 1}, {name = "anaglyphic", weight = 1}, {name = "fluorescent", weight = 1}})
-- _card.set_edition(_card, selected_edition)
-- for k,_ in pairs(selected_edition) do
-- used_tarot:juice_up(0.3, 0.5)
-- attention_text({
-- text = "+ "..k,
-- scale = 1,
-- hold = 0.4,
-- major = used_tarot,
-- backdrop_colour = G.C.UI_CHIPS,
-- align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm',
-- offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0},
-- silent = true
-- })
-- end
-- return true
-- end
-- }))
-- end
-- end

-- -- -- Set joker overexposed
-- -- function SMODS.Spectrals.c_high_exposure.can_use(card)
-- -- if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or
-- -- any_state then

-- -- if next(SMODS.Edition:get_editionless_jokers({})) then
-- -- return true
-- -- end
-- -- end
-- -- end

-- -- function SMODS.Spectrals.c_high_exposure.use(card, area, copier)
-- -- local used_tarot = (copier or card)
-- -- local selected_cards = G.hand.highlighted
-- -- local eligible_jokers = SMODS.Edition:get_editionless_jokers({})
-- -- G.E_MANAGER:add_event(Event({
-- -- trigger = 'after',
-- -- delay = 0.4,
-- -- func = function()
-- -- local selected_joker = pseudorandom_element(eligible_jokers, pseudoseed('seed'))
-- -- local selected_edition = poll_edition("photograph", nil, nil, true, {{name = "foil", weight = 1}, {name = "polychrome", weight = 1}})
-- -- selected_joker.set_edition(selected_joker, { overexposed = true })
-- -- used_tarot:juice_up(0.3, 0.5)
-- -- return true
-- -- end
-- -- }))
-- -- end

-- function SMODS.Spectrals.c_high_exposure.loc_def(self, info_queue)
-- info_queue[#info_queue+1] = G.P_CENTERS.e_foil
-- info_queue[#info_queue+1] = G.P_CENTERS.e_sepia
-- return {}
-- end

-- function SMODS.Spectrals.c_neon.can_use(card)
-- if G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT or
-- any_state then
-- -- if next(SMODS.Edition:get_eligible_jokers({})) then
-- -- return true
-- -- end
-- return true
-- end
-- end

-- function SMODS.Spectrals.c_neon.use(card, area, copier)
-- local used_tarot = (copier or card)
-- local eligible_jokers = SMODS.Edition:get_editionless_jokers({})
-- G.E_MANAGER:add_event(Event({
-- trigger = 'after',
-- delay = 0.4,
-- func = function()
-- local over = false
-- -- local selected_joker = pseudorandom_element(eligible_jokers, pseudoseed('seed'))
-- -- selected_joker.set_edition(selected_joker, { fluorescent = true })
-- SMODS.Editions.sepia:change_modifier("chip_mod", 10)
-- attention_text({
-- text = "+10 chips",
-- scale = 1,
-- hold = 1.4,
-- major = used_tarot,
-- backdrop_colour = G.C.UI_CHIPS,
-- align = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and 'tm' or 'cm',
-- offset = {x = 0, y = (G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK) and -0.2 or 0},
-- silent = true
-- })
-- used_tarot:juice_up(0.3, 0.5)
-- return true
-- end
-- }))
-- end

-- function SMODS.Spectrals.c_neon.loc_def(self, info_queue)
-- info_queue[#info_queue+1] = G.P_CENTERS.e_sepia
-- return {}
-- end
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0508a]

SMODS.Atlas({
key = 'edition_example',
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/JokerAPI_Example/JokerAPI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: JAPI
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Joker API Test Mod
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0520a]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/LabyrinthDeck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: LabyrinthDeck
--- MOD_AUTHOR: [MathIsFun_]
--- MOD_DESCRIPTION: Implements an unused deck hidden in the game's textures
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
1 change: 1 addition & 0 deletions example_mods/Mods/MoreSpeeds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--- MOD_ID: MoreSpeed
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: More Speed options!
--- This mod is deprecated, use Nopeus instead: https://github.com/jenwalter666/Nopeus

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/NegateTexturePack/NegateTexturePack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: NegateTexturePack
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Negated Balatro... THIS IS AN EXAMPLE MOD, FEEL FREE TO USE IT AS A BASE
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
1 change: 1 addition & 0 deletions example_mods/Mods/RoyalFlush/RoyalFlush.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--- MOD_DESCRIPTION: Adds Royal Flush to demonstrated Steamodded Poker Hand API
--- BADGE_COLOUR: A67C00
--- PREFIX: ex_royal_flush
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0710a]

SMODS.PokerHand {
key = 'Royal Flush',
Expand Down
1 change: 1 addition & 0 deletions example_mods/Mods/SealExample/SealsMod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
--- MOD_AUTHOR: [stupxd]
--- PREFIX: seel
--- MOD_DESCRIPTION: Modded seal example
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0710a]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
1 change: 1 addition & 0 deletions example_mods/Mods/TestKeybinds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
--- MOD_ID: CKeybinds
--- MOD_AUTHOR: [stupxd]
--- MOD_DESCRIPTION: Custom keybinds example!
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA-0721a]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
2 changes: 1 addition & 1 deletion example_mods/Mods/UltimateRandom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--- MOD_ID: UltimateRandomDeck
--- MOD_AUTHOR: [Steamo]
--- MOD_DESCRIPTION: Ultimate Random Deck!
--- LOADER_VERSION_GEQ: 1.0.0
--- DEPENDENCIES: [Steamodded>=1.0.0-ALPHA]

----------------------------------------------
------------MOD CODE -------------------------
Expand Down
Loading

0 comments on commit 92c9636

Please sign in to comment.