10ef9e374a
I know it's a mess, but the least I can do is add comments anywhere I can
271 lines
9.7 KiB
Plaintext
271 lines
9.7 KiB
Plaintext
#define PARTY_COOLDOWN_LENGTH_MIN 6 MINUTES
|
|
#define PARTY_COOLDOWN_LENGTH_MAX 12 MINUTES
|
|
|
|
|
|
/datum/station_trait/lucky_winner
|
|
name = "Lucky winner"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 1
|
|
show_in_report = TRUE
|
|
report_message = "Your station has won the grand prize of the annual station charity event. Free snacks will be delivered to the bar every now and then."
|
|
trait_processes = TRUE
|
|
COOLDOWN_DECLARE(party_cooldown)
|
|
|
|
/datum/station_trait/lucky_winner/on_round_start()
|
|
. = ..()
|
|
COOLDOWN_START(src, party_cooldown, rand(PARTY_COOLDOWN_LENGTH_MIN, PARTY_COOLDOWN_LENGTH_MAX))
|
|
|
|
/datum/station_trait/lucky_winner/process(delta_time)
|
|
if(!COOLDOWN_FINISHED(src, party_cooldown))
|
|
return
|
|
|
|
COOLDOWN_START(src, party_cooldown, rand(PARTY_COOLDOWN_LENGTH_MIN, PARTY_COOLDOWN_LENGTH_MAX))
|
|
|
|
var/area/area_to_spawn_in = pick(GLOB.bar_areas)
|
|
var/turf/T = pick(area_to_spawn_in.contents)
|
|
|
|
var/obj/structure/closet/supplypod/centcompod/toLaunch = new()
|
|
var/obj/item/pizzabox/pizza_to_spawn = pick(list(/obj/item/pizzabox/margherita, /obj/item/pizzabox/mushroom, /obj/item/pizzabox/meat, /obj/item/pizzabox/vegetable, /obj/item/pizzabox/pineapple))
|
|
new pizza_to_spawn(toLaunch)
|
|
for(var/i in 1 to 6)
|
|
if(prob(50))
|
|
new /obj/item/reagent_containers/food/drinks/beer(toLaunch)
|
|
else
|
|
for(var/m in 1 to 2)
|
|
var/obj/item/soda_to_spawn = pick(list(/obj/item/reagent_containers/food/drinks/soda_cans/sol_dry,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/space_up,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/starkist,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/cola,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/space_mountain_wind,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/dr_gibb,
|
|
/obj/item/reagent_containers/food/drinks/soda_cans/pwr_game))
|
|
new soda_to_spawn(toLaunch)
|
|
new /obj/effect/pod_landingzone(T, toLaunch)
|
|
|
|
/datum/station_trait/galactic_grant
|
|
name = "Galactic grant"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 6
|
|
show_in_report = TRUE
|
|
report_message = "Your station has been selected for a special grant. Some extra funds has been made available to your cargo department."
|
|
|
|
/datum/station_trait/galactic_grant/on_round_start()
|
|
var/datum/bank_account/cargo_bank = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
|
cargo_bank.adjust_money(rand(2000, 5000))
|
|
|
|
/datum/station_trait/premium_internals_box
|
|
name = "Premium internals boxes"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 10
|
|
show_in_report = TRUE
|
|
report_message = "The internals boxes for your crew have been filled with bonus equipment."
|
|
trait_to_give = STATION_TRAIT_PREMIUM_INTERNALS
|
|
|
|
/datum/station_trait/bountiful_bounties
|
|
name = "Bountiful bounties"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 5
|
|
show_in_report = TRUE
|
|
report_message = "It seems collectors in this system are extra keen to on bounties, and will pay more to see their completion."
|
|
|
|
/datum/station_trait/bountiful_bounties/on_round_start()
|
|
SSeconomy.bounty_modifier *= 1.2
|
|
|
|
/datum/station_trait/strong_supply_lines
|
|
name = "Strong supply lines"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 5
|
|
show_in_report = TRUE
|
|
report_message = "Prices are low in this system, BUY BUY BUY!"
|
|
blacklist = list(/datum/station_trait/distant_supply_lines)
|
|
|
|
|
|
/datum/station_trait/strong_supply_lines/on_round_start()
|
|
SSeconomy.pack_price_modifier *= 0.8
|
|
|
|
/datum/station_trait/scarves
|
|
name = "Scarves"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 5
|
|
show_in_report = TRUE
|
|
var/list/scarves
|
|
|
|
/datum/station_trait/scarves/New() //GS13 - Nanotrasen to GATO
|
|
. = ..()
|
|
report_message = pick(
|
|
"GATO is experimenting with seeing if neck warmth improves employee morale.",
|
|
"After Space Fashion Week, scarves are the hot new accessory.",
|
|
"Everyone was simultaneously a little bit cold when they packed to go to the station.",
|
|
"The station is definitely not under attack by neck grappling aliens masquerading as wool. Definitely not.",
|
|
"You all get free scarves. Don't ask why.",
|
|
"A shipment of scarves was delivered to the station.",
|
|
)
|
|
scarves = typesof(/obj/item/clothing/neck/scarf) + list(
|
|
/obj/item/clothing/neck/stripedredscarf,
|
|
/obj/item/clothing/neck/stripedgreenscarf,
|
|
/obj/item/clothing/neck/stripedbluescarf,
|
|
)
|
|
|
|
scarves -= /obj/item/clothing/neck/scarf/zomb // donator snowflake code--mayhaps we should make a glob for this or similar
|
|
|
|
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))
|
|
|
|
|
|
/datum/station_trait/scarves/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client)
|
|
SIGNAL_HANDLER
|
|
var/scarf_type = pick(scarves)
|
|
|
|
spawned.equip_to_slot_or_del(new scarf_type(spawned), ITEM_SLOT_NECK)
|
|
|
|
|
|
/datum/station_trait/filled_maint
|
|
name = "Filled up maintenance"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 5
|
|
show_in_report = TRUE
|
|
report_message = "Our workers accidentaly forgot more of their personal belongings in the maintenace areas."
|
|
blacklist = list(/datum/station_trait/empty_maint)
|
|
trait_to_give = STATION_TRAIT_FILLED_MAINT
|
|
|
|
// This station trait is checked when loot drops initialize, so it's too late
|
|
can_revert = FALSE
|
|
|
|
/datum/station_trait/quick_shuttle
|
|
name = "Quick Shuttle"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
weight = 6
|
|
show_in_report = TRUE
|
|
report_message = "Due to proximity to our supply station, the cargo shuttle will have a quicker flight time to your cargo department."
|
|
blacklist = list(/datum/station_trait/slow_shuttle)
|
|
|
|
/datum/station_trait/quick_shuttle/on_round_start()
|
|
. = ..()
|
|
SSshuttle.supply.callTime *= 0.5
|
|
|
|
/datum/station_trait/deathrattle_department
|
|
name = "deathrattled department"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
show_in_report = TRUE
|
|
trait_flags = STATION_TRAIT_ABSTRACT
|
|
blacklist = list(/datum/station_trait/deathrattle_all)
|
|
|
|
var/department_to_apply_to
|
|
var/department_name = "department"
|
|
var/datum/deathrattle_group/deathrattle_group
|
|
|
|
/datum/station_trait/deathrattle_department/New()
|
|
. = ..()
|
|
deathrattle_group = new("[department_name] group")
|
|
blacklist += subtypesof(/datum/station_trait/deathrattle_department) - type //All but ourselves
|
|
name = "deathrattled [department_name]"
|
|
report_message = "All members of [department_name] have received an implant to notify each other if one of them dies. This should help improve job-safety!"
|
|
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))
|
|
|
|
/datum/station_trait/deathrattle_department/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/living_mob, mob/M, joined_late)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!(job.departments & department_to_apply_to))
|
|
return
|
|
|
|
var/obj/item/implant/deathrattle/implant_to_give = new()
|
|
deathrattle_group.register(implant_to_give)
|
|
implant_to_give.implant(living_mob, living_mob, TRUE, TRUE)
|
|
|
|
|
|
/datum/station_trait/deathrattle_department/service
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_SERVICE
|
|
department_name = "Service"
|
|
|
|
/datum/station_trait/deathrattle_department/cargo
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_CARGO
|
|
department_name = "Cargo"
|
|
|
|
/datum/station_trait/deathrattle_department/engineering
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_ENGINEERING
|
|
department_name = "Engineering"
|
|
|
|
/datum/station_trait/deathrattle_department/command
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_COMMAND
|
|
department_name = "Command"
|
|
|
|
/datum/station_trait/deathrattle_department/science
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_SCIENCE
|
|
department_name = "Science"
|
|
|
|
/datum/station_trait/deathrattle_department/security
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_SECURITY
|
|
department_name = "Security"
|
|
|
|
/datum/station_trait/deathrattle_department/medical
|
|
trait_flags = NONE
|
|
weight = 1
|
|
department_to_apply_to = DEPARTMENT_BITFLAG_MEDICAL
|
|
department_name = "Medical"
|
|
|
|
/datum/station_trait/deathrattle_all
|
|
name = "deathrattled station"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
show_in_report = TRUE
|
|
weight = 1
|
|
report_message = "All members of the station have received an implant to notify each other if one of them dies. This should help improve job-safety!"
|
|
var/datum/deathrattle_group/deathrattle_group
|
|
|
|
|
|
/datum/station_trait/deathrattle_all/New()
|
|
. = ..()
|
|
deathrattle_group = new("station group")
|
|
blacklist = subtypesof(/datum/station_trait/deathrattle_department)
|
|
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))
|
|
|
|
/datum/station_trait/deathrattle_all/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/living_mob, mob/M, joined_late)
|
|
SIGNAL_HANDLER
|
|
|
|
var/obj/item/implant/deathrattle/implant_to_give = new()
|
|
deathrattle_group.register(implant_to_give)
|
|
implant_to_give.implant(living_mob, living_mob, TRUE, TRUE)
|
|
|
|
/datum/station_trait/wallets
|
|
name = "Wallets!"
|
|
trait_type = STATION_TRAIT_POSITIVE
|
|
show_in_report = TRUE
|
|
weight = 10
|
|
report_message = "It has become temporarily fashionable to use a wallet, so everyone on the station has been issued one."
|
|
|
|
/datum/station_trait/wallets/New()
|
|
. = ..()
|
|
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn))
|
|
|
|
/datum/station_trait/wallets/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/living_mob, mob/M, joined_late)
|
|
SIGNAL_HANDLER
|
|
|
|
var/obj/item/card/id/id_card = living_mob.get_item_by_slot(ITEM_SLOT_ID)
|
|
if(!istype(id_card))
|
|
return
|
|
|
|
living_mob.temporarilyRemoveItemFromInventory(id_card, force=TRUE)
|
|
|
|
// "Doc, what's wrong with me?"
|
|
var/obj/item/storage/wallet/wallet = new(src)
|
|
// "You've got a wallet embedded in your chest."
|
|
wallet.add_fingerprint(living_mob, ignoregloves = TRUE)
|
|
|
|
living_mob.equip_to_slot_if_possible(wallet, ITEM_SLOT_ID)
|
|
|
|
id_card.forceMove(wallet)
|
|
|
|
// Put our filthy fingerprints all over the contents
|
|
for(var/obj/item/item in wallet)
|
|
item.add_fingerprint(living_mob, ignoregloves = TRUE)
|