Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8dfeaca
port: cargo mail
Inari-Whitebear Dec 20, 2021
cb156a2
fix: forgot .dme file in commit
Inari-Whitebear Dec 20, 2021
cf077c8
chore: fix lints
Inari-Whitebear Dec 20, 2021
de53bf3
add postmark/stamp icons
Inari-Whitebear Dec 21, 2021
b510bd6
setup delta_time
Inari-Whitebear Dec 21, 2021
72369e8
more of the port
Inari-Whitebear Dec 21, 2021
d8ad457
more job goodies ported
Inari-Whitebear Dec 21, 2021
5ebbf13
fix sec officer
Inari-Whitebear Dec 21, 2021
52a676a
fix some tg->yog stuff
Inari-Whitebear Dec 21, 2021
9210b8e
fix check for station faction
Inari-Whitebear Dec 23, 2021
2181752
only remove the waiting mail amount that was actually delivered
Inari-Whitebear Dec 23, 2021
31b3630
fix fake nude code being obvious and check if code is already set
Inari-Whitebear Dec 23, 2021
9530e67
fix variable name
Inari-Whitebear Dec 23, 2021
fcb63f2
re-add strange reagent for HoP
Inari-Whitebear Dec 23, 2021
b223379
more atmostech goodies
Inari-Whitebear Dec 23, 2021
6ecf0f1
station engineer goodies
Inari-Whitebear Dec 23, 2021
62d498b
warden goodies
Inari-Whitebear Dec 23, 2021
b890ff1
more goodies
Inari-Whitebear Dec 23, 2021
e0c4d1d
Adds null check
adamsong Jan 11, 2022
807dca2
Fixed small parcels not being mailable, and set the default sort for …
adamsong Jan 11, 2022
8541d38
Makes lootdrops drop loot in the same loc in which they are, rather t…
adamsong Jan 11, 2022
c0aa2fc
add purple hat icon
Inari-Whitebear Jan 22, 2022
cc07f83
fix: envelopes with two items should give both now
Inari-Whitebear Jan 23, 2022
385df80
fix: mail amount was using incorrect calculation
Inari-Whitebear Jan 23, 2022
bb12277
fix typo
Inari-Whitebear Jan 23, 2022
2820b6a
Fuck your tails
adamsong Oct 11, 2022
29f6c2b
Merge remote-tracking branch 'origin/master' into doing-mail
adamsong Oct 12, 2022
20282aa
Why didn't these commit?
adamsong Oct 12, 2022
7dce663
Added debug verb to dump loot
adamsong Oct 12, 2022
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: 2 additions & 0 deletions code/__DEFINES/cargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ GLOBAL_LIST_INIT(podstyles, list(\
list(POD_SHAPE_OTHER, "gondola", FALSE, FALSE, FALSE, RUBBLE_NONE, "gondola", "The silent walker. This one seems to be part of a delivery agency."),\
list(POD_SHAPE_OTHER, FALSE, FALSE, FALSE, FALSE, RUBBLE_NONE, FALSE, FALSE, "rl_click", "give_po")\
))

GLOBAL_LIST_INIT(junkmail_messages, world.file2list("strings/junkmail.txt"))
1 change: 1 addition & 0 deletions code/__DEFINES/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define COLOR_MAGENTA "#FF00FF"
#define COLOR_PURPLE "#800080"
#define COLOR_ORANGE "#FF9900"
#define COLOR_PALE_ORANGE "#FFBE9D"
#define COLOR_BEIGE "#CEB689"
#define COLOR_BLUE_GRAY "#75A2BB"
#define COLOR_BROWN "#BA9F6D"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/economy.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#define STARTING_PAYCHECKS 3 // Amount of paychecks
#define STARTING_PAYCHECKS_MIN 50 // Minimum roundstart money
#define STARTING_PAYCHECKS_MAX 250 // Maximum roundstart money
/// How much mail the Economy SS will create per minute, regardless of firing time.
#define MAX_MAIL_PER_MINUTE 3
/// Probability of using letters of envelope sprites on all letters.
#define FULL_CRATE_LETTER_ODDS 70

#define PAYCHECK_ASSISTANT 5
#define PAYCHECK_MINIMAL 5
Expand Down
10 changes: 10 additions & 0 deletions code/controllers/subsystem/economy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ SUBSYSTEM_DEF(economy)
var/bounty_modifier = 1
///The modifier multiplied to the value of cargo pack prices.
var/pack_price_modifier = 1
/// Number of mail items generated.
var/mail_waiting = 0
/// Mail Holiday: AKA does mail arrive today? Always blocked on Sundays.
var/mail_blocked = FALSE

//only re-tally jobs when this changes. based on race conditions means this isn't 100% accurate, but oh well
var/last_player_count

Expand All @@ -70,6 +75,8 @@ SUBSYSTEM_DEF(economy)
)

/datum/controller/subsystem/economy/Initialize(timeofday)
if(time2text(world.timeofday, "DDD") == SUNDAY)
mail_blocked = TRUE
for(var/A in department_accounts)
switch(A)
if(ACCOUNT_SEC)
Expand All @@ -90,6 +97,7 @@ SUBSYSTEM_DEF(economy)
secmedsrv_payout() // Payout based on crew safety, health, and mood.
civ_payout() // Payout based on ??? Profit
car_payout() // Cargo's natural gain in the cash moneys.
var/delta_time = wait / (5 MINUTES)
var/list/dictionary = list()
for(var/datum/corporation/c in GLOB.corporations)
dictionary[c] = list()
Expand All @@ -101,6 +109,8 @@ SUBSYSTEM_DEF(economy)
if(B.account_holder in dictionary[c])
B.payday(c.paymodifier, TRUE)
B.payday(1)
var/effective_mailcount = living_player_count()
mail_waiting += clamp(effective_mailcount, 1, MAX_MAIL_PER_MINUTE * 5 * delta_time)

/datum/controller/subsystem/economy/proc/get_dep_account(dep_id)
for(var/datum/bank_account/department/D in generated_accounts)
Expand Down
65 changes: 63 additions & 2 deletions code/game/objects/effects/spawners/lootdrop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
var/turf/T = get_turf(src)
var/loot_spawned = 0
while((lootcount-loot_spawned) && loot.len)
var/lootspawn = pickweight(loot)
if(!lootdoubles)
loot.Remove(lootspawn)

if(lootspawn)
var/atom/movable/spawned_loot = new lootspawn(T)
var/atom/movable/spawned_loot = new lootspawn(loc)
if (!fan_out_items)
if (pixel_x != 0)
spawned_loot.pixel_x = pixel_x
Expand All @@ -30,6 +29,48 @@
loot_spawned++
return INITIALIZE_HINT_QDEL

/obj/effect/spawner/lootdrop/surgery_tool_advanced
name = "Advanced surgery tool spawner"
loot = list( // Mail loot spawner. Drop pool of advanced medical tools typically from research. Not endgame content.
/obj/item/scalpel/advanced,
/obj/item/retractor/advanced,
/obj/item/cautery/advanced,
)

/obj/effect/spawner/lootdrop/surgery_tool_alien
name = "Rare surgery tool spawner"
loot = list( // Mail loot spawner. Some sort of random and rare surgical tool. Alien tech found here.
/obj/item/scalpel/alien,
/obj/item/hemostat/alien,
/obj/item/retractor/alien,
/obj/item/circular_saw/alien,
/obj/item/surgicaldrill/alien,
/obj/item/cautery/alien,
)

/obj/effect/spawner/lootdrop/memeorgans
name = "meme organ spawner"
lootcount = 5
loot = list(
/obj/item/organ/ears/penguin,
/obj/item/organ/ears/cat,
/obj/item/organ/eyes/moth,
/obj/item/organ/eyes/snail,
/obj/item/organ/tongue/bone,
/obj/item/organ/tongue/fly,
/obj/item/organ/tongue/snail,
/obj/item/organ/tongue/lizard,
/obj/item/organ/tongue/alien,
///obj/item/organ/tongue/ethereal,
/obj/item/organ/tongue/robot,
/obj/item/organ/tongue/zombie,
/obj/item/organ/appendix,
/obj/item/organ/liver/fly,
/obj/item/organ/lungs/plasmaman,
/obj/item/organ/tail/cat,
/obj/item/organ/tail/lizard,
)

/obj/effect/spawner/lootdrop/armory_contraband
name = "armory contraband gun spawner"
lootdoubles = FALSE
Expand All @@ -56,6 +97,26 @@
/obj/item/toy/cards/deck/syndicate = 2
)

/obj/effect/spawner/lootdrop/seed_rare
name = "rare seed"
lootcount = 5
loot = list( // /obj/item/seeds/random is not a random seed, but an exotic seed.
/obj/item/seeds/random = 30,
/obj/item/seeds/liberty = 5,
/obj/item/seeds/replicapod = 5,
/obj/item/seeds/reishi = 5,
/obj/item/seeds/nettle/death = 1,
/obj/item/seeds/plump/walkingmushroom = 1,
/obj/item/seeds/cannabis/rainbow = 1,
/obj/item/seeds/cannabis/death = 1,
/obj/item/seeds/cannabis/white = 1,
/obj/item/seeds/cannabis/ultimate = 1,
/obj/item/seeds/kudzu = 1,
/obj/item/seeds/angel = 1,
/obj/item/seeds/glowshroom/glowcap = 1,
/obj/item/seeds/glowshroom/shadowshroom = 1,
)

/obj/effect/spawner/lootdrop/grille_or_trash
name = "maint grille or trash spawner"
loot = list(/obj/structure/grille = 5,
Expand Down
53 changes: 53 additions & 0 deletions code/game/objects/items/grenades/atmos_grenades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', volume, TRUE)
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)

/obj/item/grenade/gas_crystal/proto_nitrate_crystal
name = "Proto Nitrate crystal"
desc = "A crystal made from the Proto Nitrate gas, you can see the liquid gases inside."
icon_state = "proto_nitrate_crystal"
///Range of the grenade air refilling
var/refill_range = 5
///Amount of Nitrogen gas released (close to the grenade)
var/n2_gas_amount = 80
///Amount of Oxygen gas released (close to the grenade)
var/o2_gas_amount = 30

/obj/item/grenade/gas_crystal/proto_nitrate_crystal/prime(mob/living/lanced_by)
. = ..()
update_mob()
playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
for(var/turf/turf_loc in view(refill_range, loc))
if(!isopenturf(turf_loc))
continue
var/distance_from_center = max(get_dist(turf_loc, loc), 1)
var/turf/open/floor_loc = turf_loc
floor_loc.atmos_spawn_air("n2=[n2_gas_amount / distance_from_center];o2=[o2_gas_amount / distance_from_center];TEMP=273")
qdel(src)

/obj/item/grenade/gas_crystal/healium_crystal
name = "Healium crystal"
desc = "A crystal made from the Healium gas, it's cold to the touch."
Expand Down Expand Up @@ -94,3 +117,33 @@
var/turf/open/floor_loc = turf_loc
floor_loc.atmos_spawn_air("n2o=[n2o_gas_amount / distance_from_center];TEMP=273")
qdel(src)

/obj/item/grenade/gas_crystal/crystal_foam
name = "crystal foam"
desc = "A crystal with a foggy inside"
icon_state = "crystal_foam"
var/breach_range = 7

/obj/item/grenade/gas_crystal/crystal_foam/prime(mob/living/lanced_by)
. = ..()

var/datum/reagents/first_batch = new
var/datum/reagents/second_batch = new
var/list/datum/reagents/reactants = list()

first_batch.add_reagent(/datum/reagent/aluminium, 75)
second_batch.add_reagent(/datum/reagent/smart_foaming_agent, 25)
second_batch.add_reagent(/datum/reagent/toxin/acid/fluacid, 25)
reactants += first_batch
reactants += second_batch

var/turf/detonation_turf = get_turf(src)

chem_splash(detonation_turf, breach_range, reactants)

playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
log_game("A grenade detonated at [AREACOORD(detonation_turf)]")

update_mob()

qdel(src)
Loading