mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Attack chain migration: /mob (#28211)
* Attack chain migration: /mob * always target zone on attack for tests * thread corgi item interactions through to parent * put away razor * standardize test names * fix harmbaton not beating + stunning * fix ID cards not unlocking bots * fix fulton * fix fulton shenanigans * fix tumor shards
This commit is contained in:
@@ -5,7 +5,9 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
desc = "A balloon that can be used to extract equipment or personnel to a Fulton Recovery Beacon. Anything not bolted down can be moved. Link the pack to a beacon by using the pack in hand."
|
||||
icon = 'icons/obj/fulton.dmi'
|
||||
icon_state = "extraction_pack"
|
||||
flags = NOBLUDGEON
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
new_attack_chain = TRUE
|
||||
var/obj/structure/extraction_point/beacon
|
||||
var/list/beacon_networks = list("station")
|
||||
var/uses_left = 3
|
||||
@@ -17,7 +19,10 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
. = ..()
|
||||
. += "It has [uses_left] use\s remaining."
|
||||
|
||||
/obj/item/extraction_pack/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/extraction_pack/activate_self(mob/user)
|
||||
if(..())
|
||||
return FINISH_ATTACK
|
||||
|
||||
var/list/possible_beacons = list()
|
||||
for(var/B in GLOB.total_extraction_beacons)
|
||||
var/obj/structure/extraction_point/EP = B
|
||||
@@ -26,7 +31,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
|
||||
if(!length(possible_beacons))
|
||||
to_chat(user, "There are no extraction beacons in existence!")
|
||||
return
|
||||
return FINISH_ATTACK
|
||||
|
||||
else
|
||||
var/A
|
||||
@@ -34,35 +39,40 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
A = tgui_input_list(user, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons)
|
||||
|
||||
if(!A)
|
||||
return
|
||||
return FINISH_ATTACK
|
||||
beacon = A
|
||||
to_chat(user, "You link the extraction pack to the beacon system.")
|
||||
return FINISH_ATTACK
|
||||
|
||||
/obj/item/extraction_pack/afterattack__legacy__attackchain(atom/movable/A, mob/living/carbon/human/user, flag, params)
|
||||
. = ..()
|
||||
/obj/item/extraction_pack/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
var/atom/movable/A = target
|
||||
if(!istype(A))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), TRUE, -1)
|
||||
user.do_attack_animation(A)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!beacon)
|
||||
to_chat(user, "<span class='warning'>[src] is not linked to a beacon, and cannot be used!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!can_use_indoors)
|
||||
var/area/area = get_area(A)
|
||||
if(!area.outdoors)
|
||||
to_chat(user, "<span class='warning'>[src] can only be used on things that are outdoors!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(area.tele_proof || !is_teleport_allowed(A.z))
|
||||
to_chat(user, "<span class='warning'>Bluespace distortions prevent the fulton from inflating!</span>")
|
||||
return
|
||||
if(!flag)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!istype(A))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
else
|
||||
if(!safe_for_living_creatures && check_for_living_mobs(A))
|
||||
to_chat(user, "<span class='warning'>[src] is not safe for use with living creatures, they wouldn't survive the trip back!</span>")
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(!isturf(A.loc)) // no extracting stuff inside other stuff
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(A.anchored || (A.move_resist > max_force_fulton))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
to_chat(user, "<span class='notice'>You start attaching the pack to [A]...</span>")
|
||||
if(do_after(user, 50, target = A))
|
||||
to_chat(user, "<span class='notice'>You attach the pack to [A] and activate it.</span>")
|
||||
@@ -144,6 +154,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
|
||||
if(uses_left <= 0)
|
||||
qdel(src)
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/fulton_core
|
||||
name = "extraction beacon assembly kit"
|
||||
|
||||
@@ -87,16 +87,16 @@
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
. += "<span class='notice'>There is \a [M] installed, using <b>[M.cost]%</b> capacity.</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
/mob/living/simple_animal/hostile/mining_drone/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner))
|
||||
to_chat(user, "<span class='notice'>You instruct [src] to drop any collected ore.</span>")
|
||||
DropOre()
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
I.melee_attack_chain(user, stored_gun, params)
|
||||
return
|
||||
..()
|
||||
I.melee_attack_chain(user, stored_gun, list2params(modifiers))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/crowbar_act(mob/user, obj/item/I)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
|
||||
Reference in New Issue
Block a user