[MIRROR] Completely removes proc_holders from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. [MDB IGNORE] (#14666)

* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code.

* our changes

* yes

* 0

* Update blackmesa.dmm

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-07-01 21:33:30 +02:00
committed by GitHub
parent f507824ee7
commit c68fea7cba
405 changed files with 12842 additions and 11487 deletions
@@ -730,9 +730,8 @@
consumer.set_species(/datum/species/skeleton)
if(3)
to_chat(user, span_danger("Power courses through you! You can now shift your form at will."))
if(user.mind)
var/obj/effect/proc_holder/spell/targeted/shapeshift/dragon/dragon_shapeshift = new
user.mind.AddSpell(dragon_shapeshift)
var/datum/action/cooldown/spell/shapeshift/dragon/dragon_shapeshift = new(user.mind || user)
dragon_shapeshift.Grant(user)
if(4)
to_chat(user, span_danger("You feel like you could walk straight through lava now."))
ADD_TRAIT(user, TRAIT_LAVA_IMMUNE, type)
@@ -66,7 +66,7 @@
if(16)
new /obj/item/immortality_talisman(src)
if(17)
new /obj/item/book/granter/spell/summonitem(src)
new /obj/item/book/granter/action/spell/summonitem(src)
if(18)
new /obj/item/book_of_babel(src)
if(19)
@@ -97,7 +97,7 @@
if(2)
new /obj/item/lava_staff(src)
if(3)
new /obj/item/book/granter/spell/sacredflame(src)
new /obj/item/book/granter/action/spell/sacredflame(src)
if(4)
new /obj/item/dragons_blood(src)
@@ -116,7 +116,7 @@
var/loot = rand(1,2)
switch(loot)
if(1)
new /obj/item/bloodcrawlbottle(src) //SKYRAT EDIT
new /obj/item/mayhem(src)
if(2)
new /obj/item/soulscythe(src)
+40 -49
View File
@@ -716,83 +716,74 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
custom_materials = null
var/obj/effect/proc_holder/scan/scan
var/datum/action/cooldown/scan/scan_ability
/obj/item/clothing/glasses/godeye/Initialize(mapload)
. = ..()
scan = new(src)
scan_ability = new(src)
/obj/item/clothing/glasses/godeye/Destroy()
QDEL_NULL(scan_ability)
return ..()
/obj/item/clothing/glasses/godeye/equipped(mob/living/user, slot)
. = ..()
if(ishuman(user) && slot == ITEM_SLOT_EYES)
ADD_TRAIT(src, TRAIT_NODROP, EYE_OF_GOD_TRAIT)
pain(user)
user.AddAbility(scan)
scan_ability.Grant(user)
/obj/item/clothing/glasses/godeye/dropped(mob/living/user)
. = ..()
// Behead someone, their "glasses" drop on the floor
// and thus, the god eye should no longer be sticky
REMOVE_TRAIT(src, TRAIT_NODROP, EYE_OF_GOD_TRAIT)
user.RemoveAbility(scan)
scan_ability.Remove(user)
/obj/item/clothing/glasses/godeye/proc/pain(mob/living/victim)
to_chat(victim, span_userdanger("You experience blinding pain, as [src] burrows into your skull."))
victim.emote("scream")
victim.flash_act()
/obj/effect/proc_holder/scan
/datum/action/cooldown/scan
name = "Scan"
desc = "Scan an enemy, to get their location and stagger them, increasing their time between attacks."
action_background_icon_state = "bg_clock"
action_icon = 'icons/mob/actions/actions_items.dmi'
action_icon_state = "scan"
background_icon_state = "bg_clock"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "scan"
click_to_activate = TRUE
cooldown_time = 45 SECONDS
ranged_mousepointer = 'icons/effects/mouse_pointers/scan_target.dmi'
var/cooldown_time = 45 SECONDS
COOLDOWN_DECLARE(scan_cooldown)
/obj/effect/proc_holder/scan/on_lose(mob/living/user)
remove_ranged_ability()
/datum/action/cooldown/scan/IsAvailable()
return ..() && isliving(owner)
/obj/effect/proc_holder/scan/Click(location, control, params)
. = ..()
if(!isliving(usr))
return TRUE
var/mob/living/user = usr
fire(user)
/datum/action/cooldown/scan/Activate(atom/scanned)
StartCooldown(15 SECONDS)
/obj/effect/proc_holder/scan/fire(mob/living/carbon/user)
if(active)
remove_ranged_ability(span_notice("Your eye relaxes."))
else
add_ranged_ability(user, span_notice("Your eye starts spinning fast. <B>Left-click a creature to scan it!</B>"), TRUE)
if(owner.stat != CONSCIOUS)
return FALSE
if(!isliving(scanned) || scanned == owner)
owner.balloon_alert(owner, "invalid scanned!")
return FALSE
/obj/effect/proc_holder/scan/InterceptClickOn(mob/living/caller, params, atom/target)
. = ..()
if(.)
return
if(ranged_ability_user.stat)
remove_ranged_ability()
return
if(!COOLDOWN_FINISHED(src, scan_cooldown))
balloon_alert(ranged_ability_user, "not ready!")
return
if(!isliving(target) || target == ranged_ability_user)
balloon_alert(ranged_ability_user, "invalid target!")
return
var/mob/living/living_target = target
living_target.apply_status_effect(/datum/status_effect/stagger)
var/datum/status_effect/agent_pinpointer/scan_pinpointer = ranged_ability_user.apply_status_effect(/datum/status_effect/agent_pinpointer/scan)
scan_pinpointer.scan_target = living_target
living_target.set_timed_status_effect(100 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
to_chat(living_target, span_warning("You've been staggered!"))
living_target.add_filter("scan", 2, list("type" = "outline", "color" = COLOR_YELLOW, "size" = 1))
addtimer(CALLBACK(living_target, /atom/.proc/remove_filter, "scan"), 30 SECONDS)
ranged_ability_user.playsound_local(get_turf(ranged_ability_user), 'sound/magic/smoke.ogg', 50, TRUE)
balloon_alert(ranged_ability_user, "[living_target] scanned")
COOLDOWN_START(src, scan_cooldown, cooldown_time)
addtimer(CALLBACK(src, /atom/.proc/balloon_alert, ranged_ability_user, "scan recharged"), cooldown_time)
remove_ranged_ability()
var/mob/living/living_owner = owner
var/mob/living/living_scanned = scanned
living_scanned.apply_status_effect(/datum/status_effect/stagger)
var/datum/status_effect/agent_pinpointer/scan_pinpointer = living_owner.apply_status_effect(/datum/status_effect/agent_pinpointer/scan)
scan_pinpointer.scan_target = living_scanned
living_scanned.set_timed_status_effect(100 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
to_chat(living_scanned, span_warning("You've been staggered!"))
living_scanned.add_filter("scan", 2, list("type" = "outline", "color" = COLOR_YELLOW, "size" = 1))
addtimer(CALLBACK(living_scanned, /atom/.proc/remove_filter, "scan"), 30 SECONDS)
owner.playsound_local(get_turf(owner), 'sound/magic/smoke.ogg', 50, TRUE)
owner.balloon_alert(owner, "[living_scanned] scanned")
addtimer(CALLBACK(src, /atom/.proc/balloon_alert, owner, "scan recharged"), cooldown_time)
StartCooldown()
return TRUE
/datum/status_effect/agent_pinpointer/scan