diff --git a/modular_event/base/disable_atmos.dm b/modular_event/base/disable_atmos.dm index dd1244a3129..521c50d5042 100644 --- a/modular_event/base/disable_atmos.dm +++ b/modular_event/base/disable_atmos.dm @@ -1,23 +1,17 @@ /datum/controller/subsystem/air can_fire = FALSE -/datum/controller/subsystem/air/add_to_active(turf/open/T, blockchanges) - // add_to_active gets non-open turfs passed through turf/open :woozy: - if (istype(T)) - T.air?.parse_gas_string(T.real_initial_gas_mix) +/datum/controller/subsystem/air/add_to_active(turf/open/T, blockchanges = FALSE) + if(istype(T) && T.air) + T.air = T.create_gas_mixture() /obj/effect/hotspot/Initialize() ..() return INITIALIZE_HINT_QDEL -/turf - var/real_initial_gas_mix = OPENTURF_DEFAULT_ATMOS - /turf/open/Initialize(mapload) planetary_atmos = FALSE + if(!blocks_air) + initial_gas_mix = OPENTURF_DEFAULT_ATMOS + air = create_gas_mixture() return ..() - -// Avoid all initial gas mixes, without doing it on Initialize and eating up memory -/datum/gas_mixture/copy_from_turf(turf/model) - parse_gas_string(model.real_initial_gas_mix) - return TRUE diff --git a/modular_event/base/disable_leftover_screentips.dm b/modular_event/base/disable_leftover_screentips.dm index 9d2fb62b6d1..94551c0fe61 100644 --- a/modular_event/base/disable_leftover_screentips.dm +++ b/modular_event/base/disable_leftover_screentips.dm @@ -1,8 +1,12 @@ // This is for whatever implements MouseEnter to still not have screentips -/datum/preference/toggle/enable_screentips/apply_to_client(client/client, value) +/datum/preference/choiced/enable_screentips/apply_to_client(client/client, value) client.mob?.hud_used?.screentips_enabled = FALSE /datum/hud/New(mob/owner) . = ..() - screentips_enabled = FALSE + screentips_enabled = SCREENTIP_PREFERENCE_DISABLED + +/atom/Initialize(mapload, ...) + . = ..() + flags_1 |= NO_SCREENTIPS_1 diff --git a/modular_event/base/event_aheal/code/action.dm b/modular_event/base/event_aheal/code/action.dm deleted file mode 100644 index 60136295fd0..00000000000 --- a/modular_event/base/event_aheal/code/action.dm +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This datum defines an action that can be used by any mob/living to instantly admin heal themselves. - * By default it has a 30 second cooldown. - */ -/datum/action/cooldown/aheal - name = "Fully Heal Self" - icon_icon = 'modular_event/base/event_aheal/icons/button.dmi' - button_icon_state = "arena_heal" - cooldown_time = 30 SECONDS - -/datum/action/cooldown/aheal/UpdateButton(status_only, force) - button_icon_state = IsAvailable() ? initial(button_icon_state) : "arena_heal_used" - return ..() - -/datum/action/cooldown/aheal/Activate(atom/target) - var/mob/living/user = usr - - // custom lightning bolt for sound - var/turf/lightning_source = get_step(get_step(user, NORTH), NORTH) - lightning_source.Beam(user, icon_state="lightning[rand(1,12)]", time = 5) - playsound(get_turf(user), 'sound/magic/charge.ogg', 50, TRUE) - if (ishuman(user)) - var/mob/living/carbon/human/human_target = user - human_target.electrocution_animation(LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH) - user.revive(TRUE, TRUE) - - StartCooldown() - - return TRUE diff --git a/modular_event/base/event_aheal_recall_spells/code/action.dm b/modular_event/base/event_aheal_recall_spells/code/action.dm new file mode 100644 index 00000000000..dcfe45adf8d --- /dev/null +++ b/modular_event/base/event_aheal_recall_spells/code/action.dm @@ -0,0 +1,111 @@ +/** + * This datum defines an action that can be used by any mob/living to instantly admin heal themselves. + * By default it has a 30 second cooldown. + */ +/datum/action/cooldown/aheal + name = "Fully Heal Self" + icon_icon = 'modular_event/base/event_aheal_recall_spells/icons/button.dmi' + button_icon_state = "arena_heal" + cooldown_time = 30 SECONDS + +/datum/action/cooldown/aheal/UpdateButton(status_only, force) + button_icon_state = IsAvailable() ? initial(button_icon_state) : "arena_heal_used" + return ..() + +/datum/action/cooldown/aheal/Activate(atom/target) + var/mob/living/user = usr + var/area/user_area = get_area(user) + var/static/arena_areas = typecacheof(/area/centcom/tdome) + if(is_type_in_typecache(user_area.type, arena_areas)) + to_chat(user, span_boldwarning("You cannot use this ability inside [user_area]!")) + return FALSE + + // custom lightning bolt for sound + var/turf/lightning_source = get_step(get_step(user, NORTH), NORTH) + lightning_source.Beam(user, icon_state="lightning[rand(1,12)]", time = 5) + playsound(get_turf(user), 'sound/magic/charge.ogg', 50, TRUE) + if (ishuman(user)) + var/mob/living/carbon/human/human_target = user + human_target.electrocution_animation(LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH) + user.revive(TRUE, TRUE) + + StartCooldown() + + return TRUE + +/datum/action/cooldown/spell/summonitem/before_cast(atom/cast_on) + . = ..() + var/mob/living/user = usr + var/area/user_area = get_area(user) + var/static/arena_areas = typecacheof(/area/centcom/tdome) + if(is_type_in_typecache(user_area.type, arena_areas)) + to_chat(user, span_boldwarning("You cannot use this ability inside [user_area]!")) + return SPELL_CANCEL_CAST + +/datum/action/cooldown/spell/summonitem/try_recall_item(mob/living/caster) + var/obj/item_to_retrieve = marked_item + + if(item_to_retrieve.loc) + // I don't want to know how someone could put something + // inside itself but these are wizards so let's be safe + var/infinite_recursion = 0 + + // if it's in something, you get the whole thing. + while(!isturf(item_to_retrieve.loc) && infinite_recursion < 10) + if(isitem(item_to_retrieve.loc)) + var/obj/item/mark_loc = item_to_retrieve.loc + // Being able to summon abstract things because + // your item happened to get placed there is a no-no + if(mark_loc.item_flags & ABSTRACT) + break + + // If its on someone, properly drop it + if(ismob(item_to_retrieve.loc)) + var/mob/holding_mark = item_to_retrieve.loc + + // Items in silicons warp the whole silicon + if(issilicon(holding_mark)) + holding_mark.loc.visible_message(span_warning("[holding_mark] suddenly disappears!")) + holding_mark.forceMove(caster.loc) + holding_mark.loc.visible_message(span_warning("[holding_mark] suddenly appears!")) + item_to_retrieve = null + break + + holding_mark.dropItemToGround(item_to_retrieve) + + else if(isobj(item_to_retrieve.loc)) + var/obj/retrieved_item = item_to_retrieve.loc + // Can't bring anchored things + if(retrieved_item.anchored) + break + // Edge cases for moving certain machinery... + if(istype(retrieved_item, /obj/machinery/portable_atmospherics)) + var/obj/machinery/portable_atmospherics/atmos_item = retrieved_item + atmos_item.disconnect() + atmos_item.update_appearance() + + // Otherwise bring the whole thing with us + item_to_retrieve = retrieved_item + + infinite_recursion += 1 + + else + // Organs are usually stored in nullspace + if(isorgan(item_to_retrieve)) + var/obj/item/organ/organ = item_to_retrieve + if(organ.owner) + // If this code ever runs I will be happy + log_combat(caster, organ.owner, "magically removed [organ.name] from", addition = "COMBAT MODE: [uppertext(caster.combat_mode)]") + organ.Remove(organ.owner) + + if(!item_to_retrieve) + return + + item_to_retrieve.loc?.visible_message(span_warning("[item_to_retrieve] suddenly disappears!")) + + if(isitem(item_to_retrieve) && caster.put_in_hands(item_to_retrieve)) + item_to_retrieve.loc.visible_message(span_warning("[item_to_retrieve] suddenly appears in [caster]'s hand!")) + else + item_to_retrieve.forceMove(caster.drop_location()) + item_to_retrieve.loc.visible_message(span_warning("[item_to_retrieve] suddenly appears!")) + playsound(get_turf(item_to_retrieve), 'sound/magic/summonitems_generic.ogg', 50, TRUE) diff --git a/modular_event/base/event_aheal/code/living.dm b/modular_event/base/event_aheal_recall_spells/code/living.dm similarity index 60% rename from modular_event/base/event_aheal/code/living.dm rename to modular_event/base/event_aheal_recall_spells/code/living.dm index 18d28eb46e5..71d907775ec 100644 --- a/modular_event/base/event_aheal/code/living.dm +++ b/modular_event/base/event_aheal_recall_spells/code/living.dm @@ -1,18 +1,23 @@ /mob/living /// The holder for this mob living's admin heal action. It should never be set to null or modified except on qdel var/datum/action/cooldown/aheal/aheal_action = new + var/datum/action/cooldown/spell/summonitem/recall_action = new /mob/living/Destroy() aheal_action.Remove(src) QDEL_NULL(aheal_action) + recall_action.Remove(src) + QDEL_NULL(recall_action) return ..() /mob/living/Login() . = ..() aheal_action.Grant(src) + recall_action.Grant(src) /mob/living/Logout() . = ..() - if(!aheal_action) - return - aheal_action.Remove(src) + if(aheal_action) + aheal_action.Remove(src) + if(recall_action) + recall_action.Remove(src) diff --git a/modular_event/base/event_aheal/icons/button.dmi b/modular_event/base/event_aheal_recall_spells/icons/button.dmi similarity index 100% rename from modular_event/base/event_aheal/icons/button.dmi rename to modular_event/base/event_aheal_recall_spells/icons/button.dmi diff --git a/modular_event/base/event_area.dm b/modular_event/base/event_area.dm index 5216d0688d2..53127382c65 100644 --- a/modular_event/base/event_area.dm +++ b/modular_event/base/event_area.dm @@ -7,6 +7,21 @@ static_lighting = FALSE base_lighting_alpha = 255 +/area/event/oceanarium + name = "Oceanarium" + static_lighting = TRUE + base_lighting_alpha = 0 + +/area/event/cavern + name = "Cavern" + static_lighting = TRUE + base_lighting_alpha = 0 + +/area/event/nightclub + name = "Club" + static_lighting = TRUE + base_lighting_alpha = 0 + // Make arrivals area fullbright, since this is where latejoins go /area/shuttle/arrival requires_power = FALSE diff --git a/modular_event/base/vending_safety.dm b/modular_event/base/vending_safety.dm new file mode 100644 index 00000000000..44fa7dc6b7c --- /dev/null +++ b/modular_event/base/vending_safety.dm @@ -0,0 +1,8 @@ +/obj/machinery/vending/Initialize(mapload) + . = ..() + tiltable = FALSE + +/obj/machinery/vending/examine(mob/user) + . = ..() + if(!tiltable) + . += span_notice("This extra safe model cannot be tilted.")