This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da0700d
commit 9a08db8
Showing
8 changed files
with
154 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
modular_event/base/event_aheal_recall_spells/code/action.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
11 changes: 8 additions & 3 deletions
11
...lar_event/base/event_aheal/code/living.dm → .../event_aheal_recall_spells/code/living.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") |