mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-09 17:13:36 +00:00
* refactor: Attack chain, initial setup. * migrate curtain to make dreamchecker happy * update thurible * don't call attacked_by separately for legacy attack chain * remove duplicate proc * condense similar code, put allowances for legacy code in new procs * update docs, include diagram source * add comment on how to update diagram * fix admonition * mindflayer updates * remove commented out code * clarify all steps * after_attack should be overridable * whoops * retrofit recent changes * duh, can't restrict this yet because of tool_acts * i hate ore bags with the fire of a thousand suns * return correct value for object attack logic * Various cleanups. We don't want to attempt to pull stuff out of `/obj/item/attackby`, because those pieces are part of the related objects' migrations, not `/obj/item` itself. Attempting to do this causes knockon effects where things expected to call e.g. `/obj/item/storage/attackby` in the call chain were not ferried over to the new item interaction code, because the related objects hadn't actually been migrated over yet. I've used refactoring /obj/vehicle as the example for migrating `attackby` methods instead. * simplify some argument names * fuck it * make it do the thing * Rename CI module call * Prove that CI works * improve test output * aaand fix it again * fix curtain tool interactions * fix compile error * fix compile error * Better docs, introduce migration plan tool.
72 lines
2.3 KiB
Plaintext
72 lines
2.3 KiB
Plaintext
/obj/item/thermal_drill
|
|
name = "thermal safe drill"
|
|
desc = "A tungsten carbide thermal drill with magnetic clamps for the purpose of drilling hardened objects. Guaranteed 100% jam proof."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "hardened_drill"
|
|
w_class = WEIGHT_CLASS_GIGANTIC
|
|
force = 15.0
|
|
var/time_multiplier = 1
|
|
var/payback = FALSE
|
|
var/spotted = FALSE
|
|
var/datum/looping_sound/thermal_drill/soundloop
|
|
var/datum/effect_system/spark_spread/spark_system
|
|
var/datum/song/song
|
|
|
|
/obj/item/thermal_drill/New()
|
|
..()
|
|
soundloop = new(list(src), FALSE)
|
|
spark_system = new /datum/effect_system/spark_spread()
|
|
spark_system.set_up(1, 0, src)
|
|
spark_system.attach(src)
|
|
song = new(src, SSinstruments.synthesizer_instrument_ids)
|
|
|
|
/obj/item/thermal_drill/Destroy()
|
|
QDEL_NULL(soundloop)
|
|
QDEL_NULL(spark_system)
|
|
QDEL_NULL(song)
|
|
return ..()
|
|
|
|
/obj/item/thermal_drill/attack_self__legacy__attackchain(mob/user)
|
|
add_fingerprint(user)
|
|
ui_interact(user)
|
|
|
|
/obj/item/thermal_drill/ui_data(mob/user)
|
|
return song.ui_data(user)
|
|
|
|
/obj/item/thermal_drill/ui_interact(mob/user)
|
|
if(!payback)
|
|
return
|
|
song.ui_interact(user)
|
|
|
|
/obj/item/thermal_drill/ui_act(action, params)
|
|
if(..())
|
|
return
|
|
return song.ui_act(action, params)
|
|
|
|
/**
|
|
* Whether the instrument should stop playing
|
|
*
|
|
* Arguments:
|
|
* * user - The user
|
|
*/
|
|
/obj/item/thermal_drill/proc/should_stop_playing(mob/user)
|
|
if(!payback && spotted)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/item/thermal_drill/syndicate
|
|
name = "amplified thermal safe drill"
|
|
desc = "A tungsten carbide thermal drill with magnetic clamps for the purpose of drilling hardened objects. Comes with an inbuilt morale booster and security detector, to assist in drilling."
|
|
payback = TRUE
|
|
|
|
/obj/item/thermal_drill/diamond_drill
|
|
name = "diamond tipped thermal safe drill"
|
|
desc = "A diamond tipped thermal drill with magnetic clamps for the purpose of quickly drilling hardened objects. Guaranteed 100% jam proof."
|
|
icon_state = "diamond_drill"
|
|
time_multiplier = 0.5
|
|
|
|
/obj/item/thermal_drill/diamond_drill/syndicate
|
|
name = "amplified diamond tipped thermal safe drill"
|
|
desc = "A diamond tipped thermal drill with magnetic clamps for the purpose of quickly drilling hardened objects. Comes with an inbuilt morale booster and security detector, to assist in drilling."
|
|
payback = TRUE
|