ports all the tg junk for icemoon, not yet changed to make it all compile
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
/datum/component/knockback
|
||||
/// distance the atom will be thrown
|
||||
var/throw_distance
|
||||
/// whether this can throw anchored targets (tables, etc)
|
||||
var/throw_anchored
|
||||
/// whether this is a gentle throw (default false means people thrown into walls are stunned / take damage)
|
||||
var/throw_gentle
|
||||
|
||||
/datum/component/knockback/Initialize(throw_distance=1)
|
||||
/datum/component/knockback/Initialize(throw_distance=1, throw_gentle=FALSE)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.throw_distance = throw_distance
|
||||
src.throw_anchored = throw_anchored
|
||||
src.throw_gentle = throw_gentle
|
||||
|
||||
/datum/component/knockback/RegisterWithParent()
|
||||
. = ..()
|
||||
@@ -22,17 +27,29 @@
|
||||
. = ..()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/// triggered after an item attacks something
|
||||
/datum/component/knockback/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_knockback(target, user, get_dir(source, target))
|
||||
|
||||
/// triggered after a hostile simplemob attacks something
|
||||
/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_knockback(target, attacker, get_dir(attacker, target))
|
||||
|
||||
/// triggered after a projectile hits something
|
||||
/datum/component/knockback/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_knockback(target, null, angle2dir(Angle))
|
||||
|
||||
|
||||
/**
|
||||
* Throw a target in a direction
|
||||
*
|
||||
* Arguments:
|
||||
* * target - Target atom to throw
|
||||
* * thrower - Thing that caused this atom to be thrown
|
||||
* * throw_dir - Direction to throw the atom
|
||||
*/
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovableatom(target) || throw_dir == null)
|
||||
return
|
||||
@@ -43,4 +60,4 @@
|
||||
throw_dir = turn(throw_dir, 180)
|
||||
throw_distance *= -1
|
||||
var/atom/throw_target = get_edge_target_turf(throwee, throw_dir)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower, gentle = throw_gentle)
|
||||
|
||||
106
code/datums/ruins/icemoon.dm
Normal file
106
code/datums/ruins/icemoon.dm
Normal file
@@ -0,0 +1,106 @@
|
||||
// Hey! Listen! Update \config\iceruinblacklist.txt with your new ruins!
|
||||
|
||||
/datum/map_template/ruin/icemoon
|
||||
prefix = "_maps/RandomRuins/IceRuins/"
|
||||
allow_duplicates = FALSE
|
||||
cost = 5
|
||||
|
||||
// above ground only
|
||||
|
||||
/datum/map_template/ruin/icemoon/lust
|
||||
name = "Ruin of Lust"
|
||||
id = "lust"
|
||||
description = "Not exactly what you expected."
|
||||
suffix = "icemoon_surface_lust.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/asteroid
|
||||
name = "Asteroid Site"
|
||||
id = "asteroidsite"
|
||||
description = "Surprised to see us here?"
|
||||
suffix = "icemoon_surface_asteroid.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/hotsprings
|
||||
name = "Hot Springs"
|
||||
id = "hotsprings"
|
||||
description = "Just relax and take a dip, nothing will go wrong, I swear!"
|
||||
suffix = "icemoon_surface_hotsprings.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/fountain
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented."
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "fountain_hall.dmm"
|
||||
|
||||
// above and below ground together
|
||||
|
||||
/datum/map_template/ruin/icemoon/mining_site
|
||||
name = "Mining Site"
|
||||
id = "miningsite"
|
||||
description = "Ruins of a site where people once mined with primitive tools for ore."
|
||||
suffix = "icemoon_surface_mining_site.dmm"
|
||||
always_place = TRUE
|
||||
always_spawn_with = list(/datum/map_template/ruin/icemoon/underground/mining_site_below = PLACE_BELOW)
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/mining_site_below
|
||||
name = "Mining Site Underground"
|
||||
id = "miningsite-underground"
|
||||
description = "Who knew ladders could be so useful?"
|
||||
suffix = "icemoon_underground_mining_site.dmm"
|
||||
unpickable = TRUE
|
||||
|
||||
// below ground only
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground
|
||||
name = "underground ruin"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/abandonedvillage
|
||||
name = "Abandoned Village"
|
||||
id = "abandonedvillage"
|
||||
description = "Who knows what lies within?"
|
||||
suffix = "icemoon_underground_abandoned_village.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/library
|
||||
name = "Buried Library"
|
||||
id = "buriedlibrary"
|
||||
description = "A once grand library, now lost to the confines of the Ice Moon."
|
||||
suffix = "icemoon_underground_library.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/wrath
|
||||
name = "Ruin of Wrath"
|
||||
id = "wrath"
|
||||
description = "You'll fight and fight and just keep fighting."
|
||||
suffix = "icemoon_underground_wrath.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/lavaland
|
||||
name = "Lavaland Site"
|
||||
id = "lavalandsite"
|
||||
description = "I guess we never really left you huh?"
|
||||
suffix = "icemoon_underground_lavaland.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/puzzle
|
||||
name = "Ancient Puzzle"
|
||||
id = "puzzle"
|
||||
description = "Mystery to be solved."
|
||||
suffix = "icemoon_underground_puzzle.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/bathhouse
|
||||
name = "Bath House"
|
||||
id = "bathhouse"
|
||||
description = "A taste of paradise, locked in the hell of the Ice Moon."
|
||||
suffix = "icemoon_underground_bathhouse.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/wendigo_cave
|
||||
name = "Wendigo Cave"
|
||||
id = "wendigocave"
|
||||
description = "Into the jaws of the beast."
|
||||
suffix = "icemoon_underground_wendigo_cave.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/free_golem
|
||||
name = "Free Golem Ship"
|
||||
id = "golem-ship"
|
||||
description = "Lumbering humanoids, made out of precious metals, move inside this ship. They frequently leave to mine more minerals, which they somehow turn into more of them. \
|
||||
Seem very intent on research and individual liberty, and also geology-based naming?"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "golem_ship.dmm"
|
||||
allow_duplicates = FALSE
|
||||
@@ -67,7 +67,8 @@
|
||||
description = "Lumbering humanoids, made out of precious metals, move inside this ship. They frequently leave to mine more minerals, which they somehow turn into more of them. \
|
||||
Seem very intent on research and individual liberty, and also geology based naming?"
|
||||
cost = 20
|
||||
suffix = "lavaland_surface_golem_ship.dmm"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "golem_ship.dmm"
|
||||
allow_duplicates = FALSE
|
||||
|
||||
/datum/map_template/ruin/lavaland/animal_hospital
|
||||
@@ -175,7 +176,8 @@
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented."
|
||||
suffix = "lavaland_surface_fountain_hall.dmm"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "fountain_hall.dmm"
|
||||
cost = 5
|
||||
allow_duplicates = FALSE
|
||||
|
||||
|
||||
@@ -467,6 +467,12 @@
|
||||
else
|
||||
new /obj/effect/temp_visual/bleed(get_turf(owner))
|
||||
|
||||
/datum/status_effect/stacking/saw_bleed/bloodletting
|
||||
id = "bloodletting"
|
||||
stack_threshold = 7
|
||||
max_stacks = 7
|
||||
bleed_damage = 20
|
||||
|
||||
/datum/status_effect/neck_slice
|
||||
id = "neck_slice"
|
||||
status_type = STATUS_EFFECT_UNIQUE
|
||||
|
||||
@@ -1,49 +1,96 @@
|
||||
//The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
/**
|
||||
* Causes weather to occur on a z level in certain area types
|
||||
*
|
||||
* The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
* Weather always occurs on different z levels at different times, regardless of weather type.
|
||||
* Can have custom durations, targets, and can automatically protect indoor areas.
|
||||
*
|
||||
*/
|
||||
|
||||
/datum/weather
|
||||
/// name of weather
|
||||
var/name = "space wind"
|
||||
/// description of weather
|
||||
var/desc = "Heavy gusts of wind blanket the area, periodically knocking down anyone caught in the open."
|
||||
|
||||
var/telegraph_message = "<span class='warning'>The wind begins to pick up.</span>" //The message displayed in chat to foreshadow the weather's beginning
|
||||
var/telegraph_duration = 300 //In deciseconds, how long from the beginning of the telegraph until the weather begins
|
||||
var/telegraph_sound //The sound file played to everyone on an affected z-level
|
||||
var/telegraph_overlay //The overlay applied to all tiles on the z-level
|
||||
/// The message displayed in chat to foreshadow the weather's beginning
|
||||
var/telegraph_message = "<span class='warning'>The wind begins to pick up.</span>"
|
||||
|
||||
var/weather_message = "<span class='userdanger'>The wind begins to blow ferociously!</span>" //Displayed in chat once the weather begins in earnest
|
||||
var/weather_duration = 1200 //In deciseconds, how long the weather lasts once it begins
|
||||
var/weather_duration_lower = 1200 //See above - this is the lowest possible duration
|
||||
var/weather_duration_upper = 1500 //See above - this is the highest possible duration
|
||||
/// In deciseconds, how long from the beginning of the telegraph until the weather begins
|
||||
var/telegraph_duration = 300
|
||||
/// The sound file played to everyone on an affected z-level
|
||||
var/telegraph_sound
|
||||
/// The overlay applied to all tiles on the z-level
|
||||
var/telegraph_overlay
|
||||
/// Displayed in chat once the weather begins in earnest
|
||||
var/weather_message = "<span class='userdanger'>The wind begins to blow ferociously!</span>"
|
||||
///In deciseconds, how long the weather lasts once it begins
|
||||
var/weather_duration = 1200
|
||||
///See above - this is the lowest possible duration
|
||||
var/weather_duration_lower = 1200
|
||||
///See above - this is the highest possible duration
|
||||
var/weather_duration_upper = 1500
|
||||
/// Looping sound while weather is occuring
|
||||
var/weather_sound
|
||||
/// Area overlay while the weather is occuring
|
||||
var/weather_overlay
|
||||
/// Color to apply to the area while weather is occuring
|
||||
var/weather_color = null
|
||||
|
||||
var/end_message = "<span class='danger'>The wind relents its assault.</span>" //Displayed once the weather is over
|
||||
var/end_duration = 300 //In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
|
||||
/// Displayed once the weather is over
|
||||
var/end_message = "<span class='danger'>The wind relents its assault.</span>"
|
||||
/// In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
|
||||
var/end_duration = 300
|
||||
/// Sound that plays while weather is ending
|
||||
var/end_sound
|
||||
/// Area overlay while weather is ending
|
||||
var/end_overlay
|
||||
|
||||
var/area_type = /area/space //Types of area to affect
|
||||
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
|
||||
var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas.
|
||||
var/impacted_z_levels // The list of z-levels that this weather is actively affecting
|
||||
/// Types of area to affect
|
||||
var/area_type = /area/space
|
||||
/// TRUE value protects areas with outdoors marked as false, regardless of area type
|
||||
var/protect_indoors = FALSE
|
||||
/// Areas to be affected by the weather, calculated when the weather begins
|
||||
var/list/impacted_areas = list()
|
||||
|
||||
var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
var/aesthetic = FALSE //If the weather has no purpose other than looks
|
||||
var/immunity_type = "storm" //Used by mobs to prevent them from being affected by the weather
|
||||
/// Areas that are protected and excluded from the affected areas.
|
||||
var/list/protected_areas = list()
|
||||
/// The list of z-levels that this weather is actively affecting
|
||||
var/impacted_z_levels
|
||||
|
||||
var/stage = END_STAGE //The stage of the weather, from 1-4
|
||||
/// Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
var/overlay_layer = AREA_LAYER
|
||||
/// Plane for the overlay
|
||||
var/overlay_plane = BLACKNESS_PLANE
|
||||
/// If the weather has no purpose but aesthetics.
|
||||
var/aesthetic = FALSE
|
||||
/// Used by mobs to prevent them from being affected by the weather
|
||||
var/immunity_type = "storm"
|
||||
|
||||
// These are read by the weather subsystem and used to determine when and where to run the weather.
|
||||
var/probability = 0 // Weight amongst other eligible weather. If zero, will never happen randomly.
|
||||
var/target_trait = ZTRAIT_STATION // The z-level trait to affect when run randomly or when not overridden.
|
||||
/// The stage of the weather, from 1-4
|
||||
var/stage = END_STAGE
|
||||
|
||||
/// Weight amongst other eligible weather. if zero, will never happen randomly.
|
||||
var/probability = 0
|
||||
/// The z-level trait to affect when run randomly or when not overridden.
|
||||
var/target_trait = ZTRAIT_STATION
|
||||
|
||||
/// Whether a barometer can predict when the weather will happen
|
||||
var/barometer_predictable = FALSE
|
||||
var/next_hit_time = 0 //For barometers to know when the next storm will hit
|
||||
/// For barometers to know when the next storm will hit
|
||||
var/next_hit_time = 0
|
||||
|
||||
/datum/weather/New(z_levels)
|
||||
..()
|
||||
impacted_z_levels = z_levels
|
||||
|
||||
/**
|
||||
* Telegraphs the beginning of the weather on the impacted z levels
|
||||
*
|
||||
* Sends sounds and details to mobs in the area
|
||||
* Calculates duration and hit areas, and makes a callback for the actual weather to start
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/telegraph()
|
||||
if(stage == STARTUP_STAGE)
|
||||
return
|
||||
@@ -58,6 +105,8 @@
|
||||
affectareas -= get_areas(V)
|
||||
for(var/V in affectareas)
|
||||
var/area/A = V
|
||||
if(protect_indoors && !A.outdoors)
|
||||
continue
|
||||
if(A.z in impacted_z_levels)
|
||||
impacted_areas |= A
|
||||
weather_duration = rand(weather_duration_lower, weather_duration_upper)
|
||||
@@ -72,6 +121,13 @@
|
||||
SEND_SOUND(M, sound(telegraph_sound))
|
||||
addtimer(CALLBACK(src, .proc/start), telegraph_duration)
|
||||
|
||||
/**
|
||||
* Starts the actual weather and effects from it
|
||||
*
|
||||
* Updates area overlays and sends sounds and messages to mobs to notify them
|
||||
* Begins dealing effects from weather to mobs in the area
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/start()
|
||||
if(stage >= MAIN_STAGE)
|
||||
return
|
||||
@@ -86,6 +142,13 @@
|
||||
SEND_SOUND(M, sound(weather_sound))
|
||||
addtimer(CALLBACK(src, .proc/wind_down), weather_duration)
|
||||
|
||||
/**
|
||||
* Weather enters the winding down phase, stops effects
|
||||
*
|
||||
* Updates areas to be in the winding down phase
|
||||
* Sends sounds and messages to mobs to notify them
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/wind_down()
|
||||
if(stage >= WIND_DOWN_STAGE)
|
||||
return
|
||||
@@ -100,6 +163,13 @@
|
||||
SEND_SOUND(M, sound(end_sound))
|
||||
addtimer(CALLBACK(src, .proc/end), end_duration)
|
||||
|
||||
/**
|
||||
* Fully ends the weather
|
||||
*
|
||||
* Effects no longer occur and area overlays are removed
|
||||
* Removes weather from processing completely
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/end()
|
||||
if(stage == END_STAGE)
|
||||
return 1
|
||||
@@ -115,7 +185,11 @@
|
||||
if(can_weather_act(L))
|
||||
weather_act(L)
|
||||
|
||||
/datum/weather/proc/can_weather_act(mob/living/L) //Can this weather impact a mob?
|
||||
/**
|
||||
* Returns TRUE if the living mob can be affected by the weather
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/can_weather_act(mob/living/L)
|
||||
var/turf/mob_turf = get_turf(L)
|
||||
if(mob_turf && !(mob_turf.z in impacted_z_levels))
|
||||
return
|
||||
@@ -123,11 +197,19 @@
|
||||
return
|
||||
if(!(get_area(L) in impacted_areas))
|
||||
return
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/weather/proc/weather_act(mob/living/L) //What effect does this weather have on the hapless mob?
|
||||
/**
|
||||
* Affects the mob with whatever the weather does
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/weather_act(mob/living/L)
|
||||
return
|
||||
|
||||
/**
|
||||
* Updates the overlays on impacted areas
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/update_areas()
|
||||
for(var/V in impacted_areas)
|
||||
var/area/N = V
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
end_message = "<span class='boldannounce'>The downpour gradually slows to a light shower. It should be safe outside now.</span>"
|
||||
end_sound = 'sound/ambience/acidrain_end.ogg'
|
||||
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
target_trait = ZTRAIT_MINING
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_ACIRDRAIN
|
||||
|
||||
immunity_type = "acid" // temp
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
end_duration = 300
|
||||
end_overlay = "light_ash"
|
||||
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
target_trait = ZTRAIT_MINING
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_ASHSTORM
|
||||
|
||||
immunity_type = "ash"
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
end_duration = 100
|
||||
end_message = "<span class='boldannounce'>The snowfall dies down, it should be safe to go outside again.</span>"
|
||||
|
||||
area_type = /area/awaymission/snowdin/outside
|
||||
target_trait = ZTRAIT_AWAY
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_SNOWSTORM
|
||||
|
||||
immunity_type = "snow"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user