Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/_helpers/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@

if(target)
if(base_area)
ChangeArea(target, get_area(source))
target.ChangeArea(get_area(source))
. += transport_turf_contents(source, target, ignore_background, translate_air, angle = angle)
ChangeArea(source, base_area)
source.ChangeArea(base_area)
else
. += transport_turf_contents(source, target, ignore_background, translate_air, angle = angle)
//change the old turfs
Expand Down
2 changes: 1 addition & 1 deletion code/datums/extensions/abilities/ability_button.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
/obj/screen/ability/button/handle_click(mob/user, params)
if(owning_handler.prepared_ability == ability)
owning_handler.cancel_prepared_ability()
else if(ability.use_ability(user, get_turf(user), owning_handler)) // tmp, needs better/multi-step target selection
else if(ability.use_ability(user, user, owning_handler)) // tmp, needs better/multi-step target selection
update_icon()
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon)), ability.get_cooldown_time(ability.get_metadata_for_user(user)) + 1)

Expand Down
8 changes: 4 additions & 4 deletions code/datums/extensions/abilities/ability_decl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

else
// Otherwise, just apply to the target directly.
apply_effect(user, target, metadata)
apply_ability_effect(user, target, metadata)

if(end_prep_on_cast && handler.prepared_ability == src)
handler.cancel_prepared_ability()
Expand Down Expand Up @@ -325,7 +325,7 @@

return TRUE

/decl/ability/proc/apply_effect(mob/user, atom/hit_target, list/metadata, obj/item/projectile/ability/projectile)
/decl/ability/proc/apply_ability_effect(mob/user, atom/hit_target, list/metadata, obj/item/projectile/ability/projectile)
SHOULD_CALL_PARENT(TRUE)
if(use_sound)
playsound(get_turf(user), use_sound, use_sound_volume, 1)
Expand All @@ -339,7 +339,7 @@
show_ability_cast_msg(user, targets, metadata)
while(length(targets))
var/target = targets[1]
apply_effect_to(user, target, metadata)
apply_ability_effect_to(user, target, metadata)
targets = prune_targets(user, target, targets, metadata)
finish_casting(user, hit_target, metadata)

Expand All @@ -366,7 +366,7 @@
ability_overlay.set_density(FALSE)
QDEL_IN(ability_overlay, overlay_lifespan)

/decl/ability/proc/apply_effect_to(mob/user, atom/target, list/metadata)
/decl/ability/proc/apply_ability_effect_to(mob/living/user, atom/target, list/metadata)
SHOULD_CALL_PARENT(TRUE)
SHOULD_NOT_SLEEP(TRUE)
apply_visuals(user, target, metadata)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/extensions/abilities/ability_handler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
add_screen_element(category_toggle, "toggle", TRUE)
toggle_category_visibility(TRUE)

/datum/ability_handler/proc/refresh_element_positioning(row = 1, col = 1)
/datum/ability_handler/proc/refresh_element_positioning(row = 1, col = 0)
if(!LAZYLEN(screen_elements))
return 0
var/button_pos = col
Expand All @@ -134,14 +134,14 @@
for(var/ability in screen_elements)
var/obj/screen/element = screen_elements[ability]
if(istype(element, /obj/screen/ability/category))
element.screen_loc = "RIGHT-[col]:-4,TOP-[row]"
element.screen_loc = "RIGHT-[col]:-4,TOP-[row]:-24"
else if(!element.invisibility)
button_pos++
if((button_pos-col) > 5)
button_row++
.++
button_pos = col+1
element.screen_loc = "RIGHT-[button_pos]:-4,TOP-[button_row]"
element.screen_loc = "RIGHT-[button_pos]:-4,TOP-[button_row]:-24"

/datum/ability_handler/proc/toggle_category_visibility(force_state)
showing_abilities = isnull(force_state) ? !showing_abilities : force_state
Expand Down
4 changes: 2 additions & 2 deletions code/datums/extensions/abilities/ability_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
// Fire a projectile if that is how this ability works.
ability.fire_projectile_at(user, target, metadata)
else
// Otherwise, apply to the target. Range checking etc. will be handled in apply_effect().
ability.apply_effect(user, target, metadata)
// Otherwise, apply to the target. Range checking etc. will be handled in apply_ability_effect().
ability.apply_ability_effect(user, target, metadata)

// Clean up our item if needed.
if(ability.item_end_on_cast)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/extensions/abilities/ability_projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

/obj/item/projectile/ability/Bump(var/atom/A, forced=0)
if(loc && carried_ability && !expended)
carried_ability.apply_effect(owner, A, ability_metadata, src)
carried_ability.apply_ability_effect(owner, A, ability_metadata, src)
return TRUE

/obj/item/projectile/ability/on_impact(var/atom/A)
if(loc && carried_ability && !expended)
carried_ability.apply_effect(owner, A, ability_metadata, src)
carried_ability.apply_ability_effect(owner, A, ability_metadata, src)
return TRUE
26 changes: 21 additions & 5 deletions code/datums/extensions/abilities/ability_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,35 @@
return FALSE
return TRUE

/decl/ability_targeting/target_self
target_turf = FALSE

/decl/ability_targeting/target_self/validate_target(mob/user, atom/target, list/metadata, decl/ability/ability)
return target == user

/decl/ability_targeting/target_self/get_affected(mob/user, atom/hit_target, list/metadata, decl/ability/ability, obj/item/projectile/ability/projectile)
return list(user)

/decl/ability_targeting/clear_turf
ignore_dense_turfs = TRUE

/decl/ability_targeting/clear_turf/validate_target(mob/user, atom/target, list/metadata, decl/ability/ability)
. = ..() && isturf(target)
if(.)
var/turf/target_turf = target
return !target_turf.contains_dense_objects(user)
var/turf/turf_to_target = target
return !turf_to_target.contains_dense_objects(user)

/decl/ability_targeting/single_atom
target_turf = FALSE
user_is_immune = TRUE

/decl/ability_targeting/single_atom/can_target_user
user_is_immune = FALSE

/decl/ability_targeting/living_mob
target_turf = FALSE
/decl/ability_targeting/single_atom/get_affected(mob/user, atom/hit_target, list/metadata, decl/ability/ability, obj/item/projectile/ability/projectile)
return list(hit_target)

/decl/ability_targeting/living_mob/validate_target(mob/user, atom/target, list/metadata, decl/ability/ability)
/decl/ability_targeting/single_atom/living_mob/validate_target(mob/user, atom/target, list/metadata, decl/ability/ability)
. = ..() && isliving(target)
if(.)
var/mob/living/victim = target
Expand Down
34 changes: 17 additions & 17 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,43 +138,43 @@ var/global/list/areas = list()

// Changes the area of T to A. Do not do this manually.
// Area is expected to be a non-null instance.
/proc/ChangeArea(var/turf/T, var/area/A)
/turf/proc/ChangeArea(var/area/A)
if(!istype(A))
CRASH("Area change attempt failed: invalid area supplied.")
var/old_outside = T.is_outside()
var/area/old_area = get_area(T)
var/old_outside = is_outside()
var/area/old_area = get_area(src)
if(old_area == A)
return

var/old_area_ambience = old_area?.interior_ambient_light_modifier

A.contents.Add(T)
A.contents.Add(src)
if(old_area)
old_area.Exited(T, A)
for(var/atom/movable/AM as anything in T)
old_area.Exited(src, A)
for(var/atom/movable/AM as anything in src)
old_area.Exited(AM, A) // Note: this _will_ raise exited events.
A.Entered(T, old_area)
for(var/atom/movable/AM as anything in T)
A.Entered(src, old_area)
for(var/atom/movable/AM as anything in src)
A.Entered(AM, old_area) // Note: this will _not_ raise moved or entered events. If you change this, you must also change everything which uses them.

for(var/obj/machinery/M in T)
for(var/obj/machinery/M in src)
M.area_changed(old_area, A) // They usually get moved events, but this is the one way an area can change without triggering one.

T.update_registrations_on_adjacent_area_change()
update_registrations_on_adjacent_area_change()
for(var/direction in global.cardinal)
var/turf/adjacent_turf = get_step(T, direction)
var/turf/adjacent_turf = get_step(src, direction)
if(adjacent_turf)
adjacent_turf.update_registrations_on_adjacent_area_change()

// Handle updating weather and atmos if the outside status of the turf changed.
if(T.is_outside == OUTSIDE_AREA)
T.update_external_atmos_participation() // Refreshes outside status and adds exterior air to turf air if necessary.
if(is_outside == OUTSIDE_AREA)
update_external_atmos_participation() // Refreshes outside status and adds exterior air to turf air if necessary.

if(T.is_outside() != old_outside)
T.update_weather()
AMBIENCE_QUEUE_TURF(T)
if(is_outside() != old_outside)
update_weather()
AMBIENCE_QUEUE_TURF(src)
else if(A.interior_ambient_light_modifier != old_area_ambience)
AMBIENCE_QUEUE_TURF(T)
AMBIENCE_QUEUE_TURF(src)

/turf/proc/update_registrations_on_adjacent_area_change()
for(var/obj/machinery/door/firedoor/door in src)
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/space/space.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
/turf/space/LateInitialize()
if(SSmapping.base_floor_area)
var/area/new_area = locate(SSmapping.base_floor_area) || new SSmapping.base_floor_area
ChangeArea(src, new_area)
ChangeArea(new_area)
ChangeTurf(SSmapping.base_floor_type)

/turf/space/proc/toggle_transit(var/direction)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/buildmode/mode_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
if(!istype(T) || !istype(area_mode))
return FALSE
if (area_mode.selected_area)
ChangeArea(T, area_mode.selected_area)
T.ChangeArea(area_mode.selected_area)
to_chat(build_mode.user, SPAN_NOTICE("Set area of turf [T.name] to [area_mode.selected_area.proper_name]"))
return TRUE
to_chat(build_mode.user, SPAN_WARNING("Pick or create an area first"))
Expand Down
17 changes: 17 additions & 0 deletions code/modules/item_effects/item_effect_charges.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,26 @@
damage = 20
atom_damage_type = BURN
damage_flags = DAM_DISPERSED // burn all over
layer = ABOVE_LIGHTING_LAYER
plane = ABOVE_LIGHTING_PLANE
light_range = 1
light_power = 1
light_color = LIGHT_COLOR_FIRE
var/datum/composite_sound/fire_crackles/fire_loop
var/fire_lifetime = 2 SECONDS
var/fire_temperature = (288 CELSIUS) / 0.9 + 1 // hot enough to ignite wood! divided by 0.9 and plus one to ensure we can light firepits

/obj/item/projectile/fireball/Initialize()
. = ..()
fire_loop = new(list(src), FALSE)
fire_loop.start(src)

/obj/item/projectile/fireball/Destroy()
. = ..()
if(fire_loop?.started)
fire_loop.stop(src)
QDEL_NULL(fire_loop)

/obj/effect/fake_fire/variable
name = "fire"
anchored = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/maps/reader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ var/global/dmm_suite/preloader/_preloader = new
instance = new atype(null)
initialized_areas_by_type[atype] = instance
if(crds)
ChangeArea(crds, instance)
crds.ChangeArea(instance)

//then instance the /turf and, if multiple tiles are presents, simulates the DMM underlays piling effect

Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -891,20 +891,20 @@
if(!defer_language_update)
update_languages()

/mob/living/proc/get_background_datum_by_flag(background_flag)
/mob/proc/get_background_datum_by_flag(background_flag)
var/list/all_categories = global.using_map.get_background_categories()
for(var/cat_type in all_categories)
var/decl/background_category/background_cat = all_categories[cat_type]
if(background_cat.background_flags && (background_cat.background_flags & background_flag))
return get_background_datum(cat_type)

/mob/living/proc/get_background_datum(cat_type)
return null
/mob/proc/get_background_datum(cat_type)
return global.using_map.default_background_info[cat_type]

/mob/living/human/get_background_datum(cat_type)
. = LAZYACCESS(background_info, cat_type)
if(!istype(., /decl/background_detail))
. = global.using_map.default_background_info[cat_type]
. = ..()
PRINT_STACK_TRACE("get_background_datum() tried to return a non-instance value for background category '[cat_type]' - full background list: [json_encode(background_info)] default species culture list: [json_encode(global.using_map.default_background_info)]")

/mob/living/human/get_digestion_product()
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/observer/eye/blueprints_eye.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
var/area/A = new
A.SetName(area_name)
for(var/turf/T in selected_turfs)
ChangeArea(T, A)
T.ChangeArea(A)
finalize_area(A)
remove_selection() // Reset the selection for clarity.

Expand All @@ -90,7 +90,7 @@
var/datum/level_data/our_level_data = SSmapping.levels_by_z[our_turf.z]
var/area/base_area = our_level_data.get_base_area_instance()
for(var/turf/T in A.contents)
ChangeArea(T, base_area)
T.ChangeArea(base_area)
if(!(locate(/turf) in A))
qdel(A) // uh oh, is this safe?

Expand Down Expand Up @@ -316,7 +316,7 @@
var/datum/level_data/our_level_data = SSmapping.levels_by_z[our_turf.z]
var/area/base_area = our_level_data.get_base_area_instance()
for(var/turf/T in A.contents)
ChangeArea(T, base_area)
T.ChangeArea(base_area)
if(!(locate(/turf) in A))
qdel(A) // uh oh, is this safe?

Expand Down
2 changes: 1 addition & 1 deletion code/modules/multiz/level_data.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
if(change_turf)
T = T.ChangeTurf(picked_turf)
if(change_area)
ChangeArea(T, A)
T.ChangeArea(A)

///Prepare level for being used. Setup borders, lateral z connections, ambient lighting, atmosphere, etc..
/datum/level_data/proc/setup_level_data(var/skip_gen = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/overmap/_overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
square = square.ChangeTurf(overmap_edge_type)
else
square = square.ChangeTurf(overmap_turf_type)
ChangeArea(square, A)
square.ChangeArea(A)

/datum/overmap/proc/generate_overmap()
testing("Building overmap [name]...")
Expand Down
3 changes: 2 additions & 1 deletion code/modules/random_map/random_map.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ var/global/list/map_count = list()
. = (newpath && !istype(T, newpath)) ? T.ChangeTurf(newpath) : T
get_additional_spawns(map[current_cell], ., get_spawn_dir(x, y))
if(use_area)
ChangeArea(., use_area)
var/turf/turf = .
turf.ChangeArea(use_area)

/datum/random_map/proc/get_spawn_dir()
return 0
Expand Down
4 changes: 2 additions & 2 deletions code/modules/turbolift/turbolift_map.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ INITIALIZE_IMMEDIATE(/obj/abstract/turbolift_spawner)

var/area_path = areas_to_use[az]
var/area/A = locate(area_path) || new area_path()
for(var/T in floor_turfs)
ChangeArea(T, A)
for(var/turf/T as anything in floor_turfs)
T.ChangeArea(A)
cfloor.set_area_ref("\ref[A]")

// Place exterior doors.
Expand Down
1 change: 1 addition & 0 deletions maps/karzerfeste/karzerfeste.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "../../mods/content/fantasy/_fantasy.dme"
#include "../../mods/content/undead/_undead.dme"
#include "../../mods/content/biomods/_biomods.dme"
#include "../../mods/content/wyrd/_wyrd.dme"
#include "../../mods/pyrelight/_pyrelight.dme" // include after _fantasy.dme so overrides work

#include "areas/_area.dm"
Expand Down
2 changes: 1 addition & 1 deletion maps/shaded_hills/shaded_hills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "../../mods/content/scaling_descriptors.dm"
#include "../../mods/species/drakes/_drakes.dme" // include before _fantasy.dme so overrides work
#include "../../mods/content/item_sharpening/_item_sharpening.dme"
#include "../../mods/content/anima/_anima.dme" // include before _fantasy.dme so skill overrides work
#include "../../mods/content/wyrd/_wyrd.dme" // include before _fantasy.dme so skill overrides work
#include "../../mods/content/fantasy/_fantasy.dme"
#include "../../mods/content/undead/_undead.dme"
#include "../../mods/content/biomods/_biomods.dme"
Expand Down
6 changes: 0 additions & 6 deletions maps/shaded_hills/shaded_hills_skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
/obj/item/runestone
work_skill = /decl/skill/crafting/artifice

/decl/material/solid/potentia
arcana_skill = SKILL_SCIENCE

/decl/runestone_spell_archetype
arcana_skill = SKILL_SCIENCE

// Removal of space skills
/datum/map/shaded_hills/get_available_skill_types()
. = ..()
Expand Down
14 changes: 0 additions & 14 deletions mods/content/anima/_anima.dme

This file was deleted.

Loading
Loading