Up-port: Various runtimes (#15802)

* Various runtimes (#7873)

* Some more preferences setup runtimes (#7884)

* Bug in #7884 making markings not show (#7888)
This commit is contained in:
Raeschen
2024-03-10 09:40:08 +10:00
committed by GitHub
parent 34cf76b7a7
commit 484ffed97a
9 changed files with 118 additions and 60 deletions
@@ -124,6 +124,8 @@ I think I covered everything.
var/small_icon = 'icons/mob/bigdragon_small.dmi'
var/small_icon_state = "dragon_small"
var/flames
var/firebreathtimer
var/chargetimer
tame_items = list(
/obj/item/weapon/coin/gold = 100,
@@ -263,6 +265,10 @@ I think I covered everything.
/mob/living/simple_mob/vore/bigdragon/runechat_y_offset(width, height)
return (..()*size_multiplier) + 40
/mob/living/simple_mob/vore/bigdragon/death()
. = ..()
canceltimers()
///
/// Verbs
///
@@ -766,10 +772,14 @@ I think I covered everything.
do_windup_animation(A, charge_warmup)
//callbacks are more reliable than byond's process scheduler
addtimer(CALLBACK(src, PROC_REF(chargeend), A), charge_warmup)
chargetimer = addtimer(CALLBACK(src, PROC_REF(chargeend), A), charge_warmup, TIMER_STOPPABLE)
/mob/living/simple_mob/vore/bigdragon/proc/chargeend(var/atom/A, var/explicit = 0, var/gentle = 0)
//make sure our target still exists and is on a turf
if(QDELETED(A) || !isturf(get_turf(A)))
set_AI_busy(FALSE)
return
status_flags |= LEAPING
flying = 1 //So we can thunk into things
hovering = 1 // So we don't hurt ourselves running off cliffs
@@ -804,10 +814,14 @@ I think I covered everything.
set_AI_busy(TRUE)
flames = 1
build_icons()
addtimer(CALLBACK(src, PROC_REF(firebreathend), A), charge_warmup)
firebreathtimer = addtimer(CALLBACK(src, PROC_REF(firebreathend), A), charge_warmup, TIMER_STOPPABLE)
playsound(src, "sound/magic/Fireball.ogg", 50, 1)
/mob/living/simple_mob/vore/bigdragon/proc/firebreathend(var/atom/A)
//make sure our target still exists and is on a turf
if(QDELETED(A) || !isturf(get_turf(A)))
set_AI_busy(FALSE)
return
var/obj/item/projectile/P = new /obj/item/projectile/bullet/dragon(get_turf(src))
src.visible_message("<span class='danger'>\The [src] spews fire at \the [A]!</span>")
playsound(src, "sound/weapons/Flamer.ogg", 50, 1)
@@ -891,6 +905,9 @@ I think I covered everything.
vore_selected = gut2 //Just incase it eats someone right after being tamed
ai_holder = new /datum/ai_holder/simple_mob/healbelly/retaliate/dragon(src)
//Cancel any charges or firebreaths winding up
canceltimers()
/datum/ai_holder/simple_mob/healbelly
intelligence_level = 3
can_breakthrough = 0
@@ -1036,6 +1053,17 @@ I think I covered everything.
vore_selected = gut1
D.give_target(attacker)
/mob/living/simple_mob/vore/bigdragon/proc/canceltimers()
//Cancel any charges or firebreaths winding up
if(firebreathtimer)
deltimer(firebreathtimer)
firebreathtimer = null
if(chargetimer)
deltimer(chargetimer)
chargetimer = null
//re-enable the AI
set_AI_busy(FALSE)
//Smack people it warns
/datum/ai_holder/simple_mob/healbelly/retaliate/dragon/proc/dissuade(var/chump)
if(chump in check_trajectory(chump, holder, pass_flags = PASSTABLE))
+12
View File
@@ -1220,12 +1220,24 @@
return 0
//Exploitable Info Update
/obj
var/datum/weakref/exploit_for //if this obj is an exploit for somebody, this points to them
/mob/proc/amend_exploitable(var/obj/item/I)
if(istype(I))
exploit_addons |= I
var/exploitmsg = html_decode("\n" + "Has " + I.name + ".")
exploit_record += exploitmsg
I.exploit_for = WEAKREF(src)
/obj/Destroy()
if(exploit_for)
var/mob/exploited = exploit_for.resolve()
exploited?.exploit_addons -= src
exploit_for = null
. = ..()
/obj/Destroy()