new station trait: hangover (#57525)

This commit is contained in:
Qustinnus
2021-03-08 16:23:03 -08:00
committed by GitHub
parent a700a42a20
commit 8095930906
13 changed files with 4227 additions and 1960 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1
View File
@@ -551,6 +551,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define STATION_TRAIT_PREMIUM_INTERNALS "station_trait_premium_internals"
#define STATION_TRAIT_LATE_ARRIVALS "station_trait_late_arrivals"
#define STATION_TRAIT_RANDOM_ARRIVALS "station_trait_random_arrivals"
#define STATION_TRAIT_HANGOVER "station_trait_hangover"
#define STATION_TRAIT_FILLED_MAINT "station_trait_filled_maint"
#define STATION_TRAIT_EMPTY_MAINT "station_trait_empty_maint"
#define STATION_TRAIT_PDA_GLITCHED "station_trait_pda_glitched"
+9 -2
View File
@@ -458,12 +458,19 @@ SUBSYSTEM_DEF(job)
if(!joined_late)
var/spawning_handled = FALSE
var/obj/S = null
if(HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS))
if(HAS_TRAIT(SSstation, STATION_TRAIT_LATE_ARRIVALS) && job.random_spawns_possible)
SendToLateJoin(living_mob)
spawning_handled = TRUE
else if(HAS_TRAIT(SSstation, STATION_TRAIT_RANDOM_ARRIVALS))
else if(HAS_TRAIT(SSstation, STATION_TRAIT_RANDOM_ARRIVALS) && job.random_spawns_possible)
DropLandAtRandomHallwayPoint(living_mob)
spawning_handled = TRUE
else if(HAS_TRAIT(SSstation, STATION_TRAIT_HANGOVER) && job.random_spawns_possible)
for(var/obj/effect/landmark/start/hangover/hangover_spawn in GLOB.start_landmarks_list)
S = hangover_spawn
if(locate(/mob/living) in hangover_spawn.loc) //so we can revert to spawning them on top of eachother if something goes wrong
continue
hangover_spawn.used = TRUE
break
else if(length(GLOB.jobspawn_overrides[rank]))
S = pick(GLOB.jobspawn_overrides[rank])
else
+25 -2
View File
@@ -24,7 +24,7 @@
show_in_report = TRUE
report_message = "Sorry for that, we didn't expect to fly into that vomiting goose while bringing you to your new station."
trait_to_give = STATION_TRAIT_LATE_ARRIVALS
blacklist = list(/datum/station_trait/random_spawns)
blacklist = list(/datum/station_trait/random_spawns, /datum/station_trait/hangover)
/datum/station_trait/random_spawns
name = "Drive-by landing"
@@ -33,7 +33,30 @@
show_in_report = TRUE
report_message = "Sorry for that, we missed your station by a few miles, so we just launched you towards your station in pods. Hope you don't mind!"
trait_to_give = STATION_TRAIT_RANDOM_ARRIVALS
blacklist = list(/datum/station_trait/late_arrivals)
blacklist = list(/datum/station_trait/late_arrivals, /datum/station_trait/hangover)
/datum/station_trait/hangover
name = "Hangover"
trait_type = STATION_TRAIT_NEGATIVE
weight = 2
show_in_report = TRUE
report_message = "Ohh....Man....That mandatory office party from last shift...God that was awesome..I woke up in some random toilet 3 sectors away..."
trait_to_give = STATION_TRAIT_HANGOVER
blacklist = list(/datum/station_trait/late_arrivals, /datum/station_trait/random_spawns)
/datum/station_trait/hangover/New()
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, .proc/on_job_after_spawn)
/datum/station_trait/hangover/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/living_mob, mob/spawned_mob, joined_late)
SIGNAL_HANDLER
if(joined_late)
return
if(prob(35))
var/obj/item/hat = pick(list(/obj/item/clothing/head/sombrero, /obj/item/clothing/head/fedora, /obj/item/clothing/mask/balaclava, /obj/item/clothing/head/ushanka, /obj/item/clothing/head/cardborg, /obj/item/clothing/head/pirate, /obj/item/clothing/head/cone))
hat = new hat(spawned_mob)
spawned_mob.equip_to_slot(hat, ITEM_SLOT_HEAD)
/datum/station_trait/blackout
name = "Blackout"
+50
View File
@@ -439,3 +439,53 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
/// In landmarks.dm and not unit_test.dm so it is always active in the mapping tools.
/obj/effect/landmark/unit_test_top_right
name = "unit test zone top right"
/obj/effect/landmark/start/hangover
name = "hangover spawn"
icon_state = "hangover_spawn"
/obj/effect/landmark/start/hangover/Initialize()
. = ..()
if(!HAS_TRAIT(SSstation, STATION_TRAIT_HANGOVER))
return
if(prob(60))
new /obj/effect/decal/cleanable/vomit(get_turf(src))
if(prob(70))
var/bottle_count = rand(1, 3)
for(var/index in 1 to bottle_count)
var/turf/turf_to_spawn_on = get_step(src, pick(GLOB.alldirs))
if(!isopenturf(turf_to_spawn_on))
continue
new /obj/item/reagent_containers/food/drinks/beer/almost_empty(turf_to_spawn_on)
///Spawns the mob with some drugginess/drunkeness, and some disgust.
/obj/effect/landmark/start/hangover/proc/make_hungover(mob/hangover_mob)
if(!iscarbon(hangover_mob))
return
var/mob/living/carbon/spawned_carbon = hangover_mob
spawned_carbon.Sleeping(rand(2 SECONDS, 5 SECONDS))
if(prob(50))
spawned_carbon.adjust_drugginess(rand(15, 20))
else
spawned_carbon.drunkenness += rand(15, 25)
spawned_carbon.adjust_disgust(rand(5, 55)) //How hungover are you?
if(spawned_carbon.head)
return
/obj/effect/landmark/start/hangover/JoinPlayerHere(mob/M, buckle)
. = ..()
make_hungover(M)
/obj/effect/landmark/start/hangover/closet
name = "hangover spawn closet"
icon_state = "hangover_spawn_closet"
/obj/effect/landmark/start/hangover/closet/JoinPlayerHere(mob/M, buckle)
make_hungover(M)
for(var/obj/structure/closet/closet in contents)
if(closet.opened)
continue
M.forceMove(closet)
return
..() //Call parent as fallback
@@ -435,6 +435,9 @@
foodtype = GRAIN | ALCOHOL
custom_price = PAYCHECK_EASY
/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\"."
+3
View File
@@ -70,6 +70,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
/// List of family heirlooms this job can get with the family heirloom quirk. List of types.
var/list/family_heirlooms
+1
View File
@@ -14,6 +14,7 @@
display_order = JOB_DISPLAY_ORDER_AI
allow_bureaucratic_error = FALSE
departments = DEPARTMENT_SILICON
random_spawns_possible = FALSE
var/do_special_check = TRUE
/datum/job/ai/equip(mob/living/carbon/human/H, visualsOnly, announce, latejoin, datum/outfit/outfit_override, client/preference_source = null)
+1
View File
@@ -12,6 +12,7 @@
display_order = JOB_DISPLAY_ORDER_CYBORG
departments = DEPARTMENT_SILICON
random_spawns_possible = FALSE
/datum/job/cyborg/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source = null)
if(visualsOnly)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB