Merge branch 'master' into dullahan-2-electric-boogaloo
This commit is contained in:
@@ -322,3 +322,9 @@
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent
|
||||
opaque = FALSE
|
||||
|
||||
/proc/do_smoke(range=0, location=null, smoke_type=/obj/effect/particle_effect/smoke)
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.effect_type = smoke_type
|
||||
smoke.set_up(range, location)
|
||||
smoke.start()
|
||||
|
||||
@@ -528,3 +528,70 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
|
||||
name = "portal exit"
|
||||
icon_state = "portal_exit"
|
||||
var/id
|
||||
|
||||
/obj/effect/landmark/start/hangover
|
||||
name = "hangover spawn"
|
||||
icon_state = "hangover_spawn"
|
||||
|
||||
/// A list of everything this hangover spawn created
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/effect/landmark/start/hangover/Initialize(mapload)
|
||||
. = ..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/landmark/start/hangover/Destroy()
|
||||
debris = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/hangover/LateInitialize()
|
||||
. = ..()
|
||||
if(!HAS_TRAIT(SSstation, STATION_TRAIT_HANGOVER))
|
||||
return
|
||||
if(prob(60))
|
||||
debris += 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
|
||||
var/dense_object = FALSE
|
||||
for(var/atom/content in turf_to_spawn_on.contents)
|
||||
if(content.density)
|
||||
dense_object = TRUE
|
||||
break
|
||||
if(dense_object)
|
||||
continue
|
||||
debris += 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.set_resting(TRUE, silent = TRUE)
|
||||
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/joining_mob, buckle)
|
||||
. = ..()
|
||||
make_hungover(joining_mob)
|
||||
|
||||
/obj/effect/landmark/start/hangover/closet
|
||||
name = "hangover spawn closet"
|
||||
icon_state = "hangover_spawn_closet"
|
||||
|
||||
/obj/effect/landmark/start/hangover/closet/JoinPlayerHere(mob/joining_mob, buckle)
|
||||
make_hungover(joining_mob)
|
||||
for(var/obj/structure/closet/closet in contents)
|
||||
if(closet.opened)
|
||||
continue
|
||||
joining_mob.forceMove(closet)
|
||||
return
|
||||
return ..() //Call parent as fallback
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/effects/landmarks_static.dmi'
|
||||
icon_state = "random_loot"
|
||||
layer = OBJ_LAYER
|
||||
var/spawn_on_init = TRUE
|
||||
var/spawn_on_turf = TRUE
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = TRUE //if the same item can be spawned twice
|
||||
@@ -10,10 +11,19 @@
|
||||
|
||||
/obj/effect/spawner/lootdrop/Initialize(mapload)
|
||||
..()
|
||||
if(should_spawn_on_init())
|
||||
spawn_loot()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/lootdrop/proc/should_spawn_on_init()
|
||||
return spawn_on_init
|
||||
|
||||
/obj/effect/spawner/lootdrop/proc/spawn_loot(lootcount_override)
|
||||
var/lootcount = isnull(lootcount_override) ? src.lootcount : lootcount_override
|
||||
if(loot && loot.len)
|
||||
var/atom/A = spawn_on_turf ? get_turf(src) : loc
|
||||
var/loot_spawned = 0
|
||||
while((lootcount-loot_spawned) && loot.len)
|
||||
while((lootcount-loot_spawned) > 0 && loot.len)
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
@@ -29,7 +39,6 @@
|
||||
if (loot_spawned)
|
||||
spawned_loot.pixel_x = spawned_loot.pixel_y = ((!(loot_spawned%2)*loot_spawned/2)*-1)+((loot_spawned%2)*(loot_spawned+1)/2*1)
|
||||
loot_spawned++
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/lootdrop/bedsheet
|
||||
icon = 'icons/obj/bedsheets.dmi'
|
||||
@@ -162,6 +171,15 @@
|
||||
loot = GLOB.maintenance_loot
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance/spawn_loot(lootcount_override)
|
||||
if(isnull(lootcount_override))
|
||||
if(HAS_TRAIT(SSstation, STATION_TRAIT_FILLED_MAINT))
|
||||
lootcount_override = round(lootcount * 1.5)
|
||||
|
||||
else if(HAS_TRAIT(SSstation, STATION_TRAIT_EMPTY_MAINT))
|
||||
lootcount_override = round(lootcount * 0.5)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/spawner/lootdrop/glowstick
|
||||
name = "random colored glowstick"
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
|
||||
@@ -561,4 +561,4 @@
|
||||
singular_name = "catwalk floor tile"
|
||||
desc = "Flooring that shows its contents underneath. Engineers love it!"
|
||||
icon_state = "catwalk_tile"
|
||||
turf_type = /turf/open/floor/plating/catwalk_floor
|
||||
turf_type = /turf/open/floor/catwalk_floor
|
||||
|
||||
@@ -121,6 +121,10 @@
|
||||
else
|
||||
new /obj/item/tank/internals/plasmaman/belt(src)
|
||||
|
||||
if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS))
|
||||
new /obj/item/flashlight/flare(src)
|
||||
new /obj/item/radio/off(src)
|
||||
|
||||
/obj/item/storage/box/survival/radio/PopulateContents()
|
||||
..() // we want the survival stuff too.
|
||||
new /obj/item/radio/off(src)
|
||||
@@ -773,6 +777,10 @@
|
||||
else
|
||||
new /obj/item/tank/internals/plasmaman/belt(src)
|
||||
|
||||
if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS))
|
||||
new /obj/item/flashlight/flare(src)
|
||||
new /obj/item/radio/off(src)
|
||||
|
||||
/obj/item/storage/box/rubbershot
|
||||
name = "box of rubber shots"
|
||||
desc = "A box full of rubber shots, designed for riot shotguns."
|
||||
|
||||
Reference in New Issue
Block a user