Station traits

This commit is contained in:
Putnam3145
2021-12-08 16:04:32 -08:00
parent 6659f8c585
commit 629ce5bea6
94 changed files with 1518 additions and 170 deletions
+2 -2
View File
@@ -613,7 +613,7 @@
SSticker.start_immediately = FALSE
SSticker.SetTimeLeft(1800)
to_chat(world, "<b>The game will start in 180 seconds.</b>")
SEND_SOUND(world, sound(get_announcer_sound("attention")))
SEND_SOUND(world, sound(SSstation.announcer.get_rand_alert_sound()))
message_admins("<font color='blue'>[usr.key] has cancelled immediate game start. Game will start in 180 seconds.</font>")
log_admin("[usr.key] has cancelled immediate game start.")
else
@@ -696,7 +696,7 @@
log_admin("[key_name(usr)] delayed the round start.")
else
to_chat(world, "<b>The game will start in [DisplayTimeText(newtime)].</b>", confidential = TRUE)
SEND_SOUND(world, sound(get_announcer_sound("attention")))
SEND_SOUND(world, sound(SSstation.announcer.get_rand_alert_sound()))
log_admin("[key_name(usr)] set the pre-game delay to [DisplayTimeText(newtime)].")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -528,7 +528,7 @@
message_admins("[key_name_admin(holder)] made everything kawaii.")
for(var/i in GLOB.human_list)
var/mob/living/carbon/human/H = i
SEND_SOUND(H, sound(get_announcer_sound("animes")))
SEND_SOUND(H, sound(SSstation.announcer.event_sounds[ANNOUNCER_ANIMES]))
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
@@ -53,7 +53,7 @@ GLOBAL_VAR_INIT(war_declared, FALSE)
if(!check_allowed(user) || !war_declaration)
return
priority_announce(war_declaration, title = "Declaration of War", sound = 'sound/machines/alarm.ogg')
priority_announce(war_declaration, title = "Declaration of War", sound = 'sound/machines/alarm.ogg', has_important_message = TRUE)
to_chat(user, "You've attracted the attention of powerful forces within the syndicate. A bonus bundle of telecrystals has been granted to your team. Great things await you if you complete the mission.")
+1 -1
View File
@@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(bounties_list)
if(can_claim())
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
D.adjust_money(reward)
D.adjust_money(reward * SSeconomy.bounty_modifier)
claimed = TRUE
// If an item sent in the cargo shuttle can satisfy the bounty.
+3 -3
View File
@@ -99,7 +99,7 @@
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
data["cart"] += list(list(
"object" = SO.pack.name,
"cost" = SO.pack.cost,
"cost" = SO.pack.get_cost(),
"id" = SO.id,
"orderer" = SO.orderer,
"paid" = !isnull(SO.paying_account) //paid by requester
@@ -109,7 +109,7 @@
for(var/datum/supply_order/SO in SSshuttle.requestlist)
data["requests"] += list(list(
"object" = SO.pack.name,
"cost" = SO.pack.cost,
"cost" = SO.pack.get_cost(),
"orderer" = SO.orderer,
"reason" = SO.reason,
"id" = SO.id
@@ -132,7 +132,7 @@
continue
data["supplies"][P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.cost,
"cost" = P.get_cost(),
"id" = pack,
"desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name.
"goody" = P.goody,
+6 -6
View File
@@ -81,7 +81,7 @@
continue // i'd be right happy to
meme_pack_data[P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.cost,
"cost" = P.get_cost(),
"id" = pack,
"desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name.
))
@@ -174,7 +174,7 @@
if(D)
points_to_check = D.account_balance
if(!(obj_flags & EMAGGED))
if(SO.pack.cost <= points_to_check)
if(SO.pack.get_cost() <= points_to_check)
var/LZ
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
LZ = get_turf(beacon)
@@ -191,13 +191,13 @@
CHECK_TICK
if(empty_turfs && empty_turfs.len)
LZ = pick(empty_turfs)
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
D.adjust_money(-SO.pack.cost)
if (SO.pack.get_cost() <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
D.adjust_money(-SO.pack.get_cost())
new /obj/effect/pod_landingzone(LZ, podType, SO)
. = TRUE
update_icon()
else
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^)
if(SO.pack.get_cost() * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^)
landingzone = GLOB.areas_by_type[pick(GLOB.the_station_areas)] //override default landing zone
for(var/turf/open/floor/T in landingzone.contents)
if(is_blocked_turf(T))
@@ -205,7 +205,7 @@
LAZYADD(empty_turfs, T)
CHECK_TICK
if(empty_turfs && empty_turfs.len)
D.adjust_money(-(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)))
D.adjust_money(-(SO.pack.get_cost() * (0.72*MAX_EMAG_ROCKETS)))
SO.generateRequisition(get_turf(src))
for(var/i in 1 to MAX_EMAG_ROCKETS)
+3
View File
@@ -38,6 +38,9 @@
fill(C)
return C
/datum/supply_pack/proc/get_cost()
return cost * SSeconomy.pack_price_modifier
/datum/supply_pack/proc/fill(obj/structure/closet/crate/C)
if (admin_spawned)
for(var/item in contains)
+7
View File
@@ -6,6 +6,13 @@
earliest_start = 10 MINUTES
max_occurrences = 6
/datum/round_event_control/carp_migration/New()
. = ..()
if(HAS_TRAIT(SSstation, STATION_TRAIT_CARP_INFESTATION))
weight *= 3
max_occurrences *= 2
earliest_start *= 0.5
/datum/round_event/carp_migration
announceWhen = 3
startWhen = 50
+4 -4
View File
@@ -888,7 +888,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if("blob alert")
to_chat(target, "<h1 class='alert'>Biohazard Alert</h1>")
to_chat(target, "<br><br><span class='alert'>Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.</span><br><br>")
SEND_SOUND(target, get_announcer_sound("outbreak5"))
SEND_SOUND(target, SSstation.announcer.event_sounds[ANNOUNCER_OUTBREAK5])
if("ratvar")
target.playsound_local(target, 'sound/machines/clockcult/ark_deathrattle.ogg', 50, FALSE, pressure_affected = FALSE)
target.playsound_local(target, 'sound/effects/clockcult_gateway_disrupted.ogg', 50, FALSE, pressure_affected = FALSE)
@@ -897,15 +897,15 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if("shuttle dock")
to_chat(target, "<h1 class='alert'>Priority Announcement</h1>")
to_chat(target, "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>")
SEND_SOUND(target, get_announcer_sound("shuttledock"))
SEND_SOUND(target, SSstation.announcer.event_sounds[ANNOUNCER_SHUTTLEDOCK])
if("malf ai") //AI is doomsdaying!
to_chat(target, "<h1 class='alert'>Anomaly Alert</h1>")
to_chat(target, "<br><br><span class='alert'>Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.</span><br><br>")
SEND_SOUND(target, get_announcer_sound("aimalf"))
SEND_SOUND(target, SSstation.announcer.event_sounds[ANNOUNCER_AIMALF])
if("meteors") //Meteors inbound!
to_chat(target, "<h1 class='alert'>Meteor Alert</h1>")
to_chat(target, "<br><br><span class='alert'>[generateMeteorString(rand(60, 90),FALSE,pick(GLOB.cardinals))]</span><br><br>")
SEND_SOUND(target, get_announcer_sound("meteors"))
SEND_SOUND(target, SSstation.announcer.event_sounds[ANNOUNCER_METEORS])
if("supermatter")
SEND_SOUND(target, 'sound/magic/charge.ogg')
to_chat(target, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
@@ -347,6 +347,9 @@
foodtype = GRAIN | ALCOHOL
custom_price = PRICE_PRETTY_CHEAP
/obj/item/reagent_containers/food/drinks/beer/almost_empty
list_reagents = list(/datum/reagent/consumable/ethanol/beer = 1)
/obj/item/reagent_containers/food/drinks/beer/light
name = "Carp Lite"
desc = "Brewed with \"Pure Ice Asteroid Spring Water\"."
+71 -4
View File
@@ -66,6 +66,9 @@
/// Should this job be allowed to be picked for the bureaucratic error event?
var/allow_bureaucratic_error = TRUE
///Is this job affected by weird spawns like the ones from station traits
var/random_spawns_possible = TRUE
var/display_order = JOB_DISPLAY_ORDER_DEFAULT
//If a job complies with dresscodes, loadout items will not be equipped instead of the job's outfit, instead placing the items into the player's backpack.
@@ -109,14 +112,16 @@
//Only override this proc
//H is usually a human unless an /equip override transformed it
/datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE)
/datum/job/proc/after_spawn(mob/living/spawned, client/player_client, latejoin = FALSE)
SHOULD_CALL_PARENT(TRUE)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_JOB_AFTER_SPAWN, src, spawned, player_client)
//do actions on H but send messages to M as the key may not have been transferred_yet
if(mind_traits)
for(var/t in mind_traits)
ADD_TRAIT(H.mind, t, JOB_TRAIT)
ADD_TRAIT(spawned.mind, t, JOB_TRAIT)
if(/datum/quirk/paraplegic in blacklisted_quirks)
H.regenerate_limbs() //if you can't be a paraplegic, attempt to regenerate limbs to stop amputated limb selection
H.set_resting(FALSE, TRUE) //they probably shouldn't be on the floor because they had no legs then suddenly had legs
spawned.regenerate_limbs() //if you can't be a paraplegic, attempt to regenerate limbs to stop amputated limb selection
spawned.set_resting(FALSE, TRUE) //they probably shouldn't be on the floor because they had no legs then suddenly had legs
/datum/job/proc/announce(mob/living/carbon/human/H)
if(head_announce)
@@ -323,3 +328,65 @@
if(CONFIG_GET(flag/security_has_maint_access))
return list(ACCESS_MAINT_TUNNELS)
return list()
/// Handles finding and picking a valid roundstart effect landmark spawn point, in case no uncommon different spawning events occur.
/datum/job/proc/get_default_roundstart_spawn_point()
for(var/obj/effect/landmark/start/spawn_point as anything in GLOB.start_landmarks_list)
if(spawn_point.name != title)
continue
. = spawn_point
if(spawn_point.used) //so we can revert to spawning them on top of eachother if something goes wrong
continue
spawn_point.used = TRUE
break
if(!.)
log_world("Couldn't find a round start spawn point for [title]")
/// Finds a valid latejoin spawn point, checking for events and special conditions.
/datum/job/proc/get_latejoin_spawn_point()
if(length(GLOB.jobspawn_overrides[title])) //We're doing something special today.
return pick(GLOB.jobspawn_overrides[title])
if(length(SSjob.latejoin_trackers))
return pick(SSjob.latejoin_trackers)
return SSjob.get_last_resort_spawn_points()
/// Returns an atom where the mob should spawn in.
/datum/job/proc/get_roundstart_spawn_point(var/mob/M)
if(random_spawns_possible)
if(HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS))
return get_latejoin_spawn_point()
if(HAS_TRAIT(SSstation, STATION_TRAIT_RANDOM_ARRIVALS))
return get_safe_random_station_turf(typesof(/area/hallway)) || get_latejoin_spawn_point()
if(HAS_TRAIT(SSstation, STATION_TRAIT_HANGOVER) && (!M || !HAS_TRAIT(M, TRAIT_TOXIC_ALCOHOL)))
var/obj/effect/landmark/start/hangover_spawn_point
for(var/obj/effect/landmark/start/hangover/hangover_landmark in GLOB.start_landmarks_list)
hangover_spawn_point = hangover_landmark
if(hangover_landmark.used) //so we can revert to spawning them on top of eachother if something goes wrong
continue
hangover_landmark.used = TRUE
break
return hangover_spawn_point || get_latejoin_spawn_point()
if(length(GLOB.jobspawn_overrides[title]))
return pick(GLOB.jobspawn_overrides[title])
var/obj/effect/landmark/start/spawn_point = get_default_roundstart_spawn_point()
if(!spawn_point) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper
return get_latejoin_spawn_point()
return spawn_point
/**
* Called after a successful roundstart spawn.
* Client is not yet in the mob.
* This happens after after_spawn()
*/
/datum/job/proc/after_roundstart_spawn(mob/living/spawning, client/player_client)
SHOULD_CALL_PARENT(TRUE)
/**
* Called after a successful latejoin spawn.
* Client is in the mob.
* This happens after after_spawn()
*/
/datum/job/proc/after_latejoin_spawn(mob/living/spawning)
SHOULD_CALL_PARENT(TRUE)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_JOB_AFTER_LATEJOIN_SPAWN, src, spawning)
+1
View File
@@ -15,6 +15,7 @@
exp_type_department = EXP_TYPE_SILICON
display_order = JOB_DISPLAY_ORDER_AI
allow_bureaucratic_error = FALSE
random_spawns_possible = FALSE
var/do_special_check = TRUE
threat = 5
considered_combat_role = TRUE
+5
View File
@@ -49,6 +49,11 @@
chameleon_extras = /obj/item/stamp/clown
/datum/outfit/job/clown/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
if(HAS_TRAIT(SSstation, STATION_TRAIT_BANANIUM_SHIPMENTS))
backpack_contents[/obj/item/stack/sheet/mineral/bananium] = 5
/datum/outfit/job/clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
..()
if(visualsOnly)
+1 -1
View File
@@ -12,7 +12,7 @@
exp_requirements = 120
exp_type = EXP_TYPE_CREW
considered_combat_role = TRUE
random_spawns_possible = FALSE
starting_modifiers = list(/datum/skill_modifier/job/level/wiring/basic)
display_order = JOB_DISPLAY_ORDER_CYBORG
-6
View File
@@ -30,8 +30,6 @@
var/maptype = MAP_TYPE_STATION //This should be used to adjust ingame behavior depending on the specific type of map being played. For instance, if an overmap were added, it'd be appropriate for it to only generate with a MAP_TYPE_SHIP
var/announcertype = "standard" //Determines the announcer the map uses. standard uses the default announcer, classic, but has a random chance to use other similarly-themed announcers, like medibot
var/allow_custom_shuttles = TRUE
var/shuttles = list(
"cargo" = "cargo_box",
@@ -178,9 +176,6 @@
if ("maptype" in json)
maptype = json["maptype"]
if ("announcertype" in json)
announcertype = json["announcertype"]
if ("orientation" in json)
orientation = json["orientation"]
if(!(orientation in GLOB.cardinals))
@@ -277,7 +272,6 @@
jsonlist["year_offset"] = year_offset
jsonlist["minetype"] = minetype
jsonlist["maptype"] = maptype
jsonlist["announcertype"] = announcertype
jsonlist["orientation"] = orientation
jsonlist["allow_custom_shuttles"] = allow_custom_shuttles
jsonlist["job_whitelist"] = job_whitelist
@@ -565,12 +565,14 @@
SSjob.AssignRole(src, rank, 1)
var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind
var/datum/job/job = SSjob.GetJob(rank)
var/equip = SSjob.EquipRank(character, rank, TRUE)
job.after_latejoin_spawn(character)
if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
character = equip
var/datum/job/job = SSjob.GetJob(rank)
if(job && !job.override_latejoin_spawn(character))
SSjob.SendToLateJoin(character)
if(!arrivals_docked)
@@ -426,7 +426,7 @@ Difficulty: Very Hard
/obj/machinery/anomalous_crystal/honk //Strips and equips you as a clown. I apologize for nothing
observer_desc = "This crystal strips and equips its targets as clowns."
possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations!
possible_methods = list(ACTIVATE_TOUCH) //Because We love AOE transformations!
activation_sound = 'sound/items/bikehorn.ogg'
/obj/machinery/anomalous_crystal/honk/ActivationReaction(mob/user)
@@ -436,7 +436,7 @@ Difficulty: Very Hard
H.dropItemToGround(W)
var/datum/job/clown/C = new /datum/job/clown()
C.equip(H)
C.after_spawn(H, H, TRUE)
C.after_spawn(H, H.client, TRUE)
qdel(C)
affected_targets.Add(H)
File diff suppressed because one or more lines are too long
@@ -96,7 +96,7 @@
continue
data["supplies"][P.group]["packs"] += list(list(
"name" = P.name,
"cost" = P.cost,
"cost" = P.get_cost(),
"id" = pack,
"desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name.
"goody" = P.goody,
@@ -123,7 +123,7 @@
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
data["cart"] += list(list(
"object" = SO.pack.name,
"cost" = SO.pack.cost,
"cost" = SO.pack.get_cost(),
"id" = SO.id,
"orderer" = SO.orderer,
"paid" = !isnull(SO.paying_account) //paid by requester
@@ -133,7 +133,7 @@
for(var/datum/supply_order/SO in SSshuttle.requestlist)
data["requests"] += list(list(
"object" = SO.pack.name,
"cost" = SO.pack.cost,
"cost" = SO.pack.get_cost(),
"orderer" = SO.orderer,
"reason" = SO.reason,
"id" = SO.id
+4 -4
View File
@@ -131,7 +131,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
if(!empty_turfs.len)
break
var/price = SO.pack.cost
var/price = SO.pack.get_cost()
if(SO.applied_coupon)
price *= (1 - SO.applied_coupon.discount_pct_off)
@@ -163,8 +163,8 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
LAZYADD(goodies_by_buyer[SO.paying_account], SO)
D.bank_card_talk("Cargo order #[SO.id] has shipped. [price] credits have been charged to your bank account.")
var/datum/bank_account/department/cargo = SSeconomy.get_dep_account(ACCOUNT_CAR)
cargo.adjust_money(price - SO.pack.cost) //Cargo gets the handling fee
value += SO.pack.cost
cargo.adjust_money(price - SO.pack.get_cost()) //Cargo gets the handling fee
value += SO.pack.get_cost()
SSshuttle.shoppinglist -= SO
SSshuttle.orderhistory += SO
QDEL_NULL(SO.applied_coupon)
@@ -172,7 +172,7 @@ GLOBAL_LIST_INIT(cargo_shuttle_leave_behind_typecache, typecacheof(list(
if(!SO.pack.goody && !ispath(SO.pack.crate_type, /obj/structure/closet/secure_closet/cargo)) //we handle goody crates and material closets below
SO.generate(pick_n_take(empty_turfs))
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.get_cost()]", "[SO.pack.name]"))
investigate_log("Order #[SO.id] ([SO.pack.name], placed by [key_name(SO.orderer_ckey)]), paid by [D.account_holder] has shipped.", INVESTIGATE_CARGO)
if(SO.pack.dangerous)
message_admins("\A [SO.pack.name] ordered by [ADMIN_LOOKUPFLW(SO.orderer_ckey)], paid by [D.account_holder] has shipped.")