Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Port changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RigglePrime committed Sep 20, 2023
1 parent da0700d commit 9a08db8
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 46 deletions.
18 changes: 6 additions & 12 deletions modular_event/base/disable_atmos.dm
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions modular_event/base/disable_leftover_screentips.dm
Original file line number Diff line number Diff line change
@@ -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
29 changes: 0 additions & 29 deletions modular_event/base/event_aheal/code/action.dm

This file was deleted.

111 changes: 111 additions & 0 deletions modular_event/base/event_aheal_recall_spells/code/action.dm
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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)
15 changes: 15 additions & 0 deletions modular_event/base/event_area.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions modular_event/base/vending_safety.dm
Original file line number Diff line number Diff line change
@@ -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.")

0 comments on commit 9a08db8

Please sign in to comment.