Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Loadout donators update #690

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/example/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ disable_ambient_noise = false
# Enable this if you want to disable the popup alert for people on the same CID
disable_cid_warning_popup = false
# Amount of loadout points people should get
base_loadout_points = 5
base_loadout_points = 4
# Respawnability loss penalty if you cryo below this threshold (Minutes)
cryo_penalty_period = 30
# Enable twitter emojis in OOC?
Expand Down
43 changes: 43 additions & 0 deletions modular_ss220/donor/code/client_procs.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define MAX_SAVE_SLOTS_SS220 3

/datum/client_login_processor/donator_check/process_result(datum/db_query/Q, client/C)
if(IsGuestKey(C.ckey))
return
Expand All @@ -21,6 +23,7 @@
if(10000 to INFINITY)
C.donator_level = DONATOR_LEVEL_MAX
C.donor_loadout_points()
C.donor_character_slots()

/datum/client_login_processor/donator_check/get_query(client/C)
var/datum/db_query/query = SSdbcore.NewQuery({"
Expand All @@ -33,3 +36,43 @@
"}, list("ckey" = C.ckey))

return query

/client/donor_loadout_points()
if(!prefs)
return

prefs.max_gear_slots = GLOB.configuration.general.base_loadout_points

switch(donator_level)
if(1)
prefs.max_gear_slots += 2
if(2)
prefs.max_gear_slots += 4
if(3)
prefs.max_gear_slots += 8
if(4)
prefs.max_gear_slots += 12
if(5)
prefs.max_gear_slots += 16

/client/proc/donor_character_slots()
if(!prefs)
return

prefs.max_save_slots = MAX_SAVE_SLOTS_SS220

switch(donator_level)
if(1)
prefs.max_save_slots += 2
if(2)
prefs.max_save_slots += 4
if(3)
prefs.max_save_slots += 6
if(4)
prefs.max_save_slots += 8
if(5)
prefs.max_save_slots += 10

prefs.character_saves.len = prefs.max_save_slots

#undef MAX_SAVE_SLOTS_SS220
1 change: 1 addition & 0 deletions modular_ss220/loadout/_loadout.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#include "code/donor.dm"
#include "code/shoes.dm"
#include "code/suit.dm"
#include "code/donor_items.dm"
45 changes: 45 additions & 0 deletions modular_ss220/loadout/code/donor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,48 @@
path = /obj/item/clothing/suit/hooded/vi_arcane
donator_tier = 3
cost = 2

/datum/gear/donor/wallet
display_name = "Бумажник"
path = /obj/item/storage/wallet
cost = 12

/datum/gear/donor/firefirstaid
display_name = "Набор первой медицинской помощи от премиальной страховки"
path = /obj/item/storage/firstaid/regular/donor
cost = 12

/datum/gear/donor/airtank
display_name = "Спаренный балон от премиальной страховки"
path = /obj/item/tank/internals/emergency_oxygen/double
cost = 3

/datum/gear/donor/toolbelt
display_name = "Дедушкин пояс с инструментами"
path = /obj/item/storage/belt/utility
cost = 8

/datum/gear/donor/bruise_pack
display_name = "Медицинские бинты"
path = /obj/item/stack/medical/bruise_pack
cost = 2

/datum/gear/donor/ointment
display_name = "Мазь от ожогов"
path = /obj/item/stack/medical/ointment
cost = 2

/datum/gear/donor/charcoal
display_name = "Активированный уголь"
path = /obj/item/reagent_containers/syringe/charcoal
cost = 2

/datum/gear/donor/epinephrine
display_name = "Эпинефрин"
path = /obj/item/reagent_containers/hypospray/autoinjector/epinephrine
cost = 2

/datum/gear/donor/healthanalyzer
display_name = "Медицинский анализатор"
path = /obj/item/healthanalyzer
cost = 2
10 changes: 10 additions & 0 deletions modular_ss220/loadout/code/donor_items.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/obj/item/storage/firstaid/regular/donor
desc = "Набор первой медицинской помощи за оформление страховки"
icon_state = "firstaid"

/obj/item/storage/firstaid/regular/donor/populate_contents()
new /obj/item/reagent_containers/food/pill/patch/styptic(src)
new /obj/item/reagent_containers/food/pill/salicylic(src)
new /obj/item/reagent_containers/food/pill/patch/silver_sulf(src)
new /obj/item/healthanalyzer(src)
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)