Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Yautja Cleanser Vials #8068

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
#define SMARTGUNNER_BACKPACK_OVERRIDE (1<<15)
/// The item will incur click delay if an empty adjacent tile is clicked
#define ADJACENT_CLICK_DELAY (1<<16)
/// Is in the process of falling apart.
#define ITEM_DISSOLVING (1<<17)
//==========================================================================================


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GLOBAL_LIST_INIT(cm_vending_equipment_yautja, list(
list("Essential Hunting Supplies", 0, null, null, null),
list("Hunting Equipment", 0, list(/obj/item/clothing/under/chainshirt/hunter, /obj/item/storage/backpack/yautja, /obj/item/storage/medicomp/full, /obj/item/device/yautja_teleporter), MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),
list("Hunting Equipment", 0, list(/obj/item/clothing/under/chainshirt/hunter, /obj/item/storage/backpack/yautja, /obj/item/storage/medicomp/full, /obj/item/device/yautja_teleporter, /obj/item/tool/yautja_cleaner), MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),
list("Armor", 0, list(/obj/item/clothing/suit/armor/yautja/hunter, /obj/item/clothing/mask/gas/yautja/hunter, /obj/item/clothing/accessory/mask, /obj/item/clothing/shoes/yautja/hunter/knife), MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY),

list("Main Weapons (CHOOSE 1)", 0, null, null, null),
Expand Down
44 changes: 43 additions & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@
. += desc
if(desc_lore)
. += SPAN_NOTICE("This has an <a href='byond://?src=\ref[src];desc_lore=1'>extended lore description</a>.")
if(flags_item & ITEM_DISSOLVING)
. += SPAN_WARNING("It is currently dissolving into bits!")

/obj/item/attack_hand(mob/user)
if (!user)
Expand Down Expand Up @@ -354,7 +356,6 @@
/obj/item/attackby(obj/item/W, mob/user)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACKED, W, user) & COMPONENT_CANCEL_ITEM_ATTACK)
return

if(istype(W,/obj/item/storage))
var/obj/item/storage/S = W
if(S.storage_flags & STORAGE_CLICK_GATHER && isturf(loc))
Expand Down Expand Up @@ -1124,6 +1125,47 @@
animate(time = 1)
animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT)

/obj/item/proc/handle_dissolve(mob/user)
if(!HAS_TRAIT(user, TRAIT_YAUTJA_TECH))
to_chat(user, SPAN_WARNING("You have no idea what this even does..."))
return FALSE
if(istype(src, /obj/item/tool/yautja_cleaner))
to_chat(user, SPAN_WARNING("You cannot dissolve more dissolving fluid..."))
return FALSE
if(user.alpha < 255)
to_chat(user, SPAN_BOLDWARNING("It would not be safe to attempt this while cloaked!"))
return FALSE
if(anchored)
to_chat(user, SPAN_WARNING("\The [src] cannot be moved by any means, why dissolve it?"))
return FALSE

var/mob/living/location = loc
var/mob/living/loc_loc = loc.loc
if(istype(location) || istype(loc_loc))
to_chat(user, SPAN_WARNING("You cannot dissolve this while it is being held!"))
return FALSE

dissolve(user)
return TRUE

/obj/item/proc/dissolve(mob/user)
user.visible_message(SPAN_DANGER("[user] uncaps a vial and begins to pour out a vibrant blue liquid over \the [src]!"),
SPAN_NOTICE("You begin to spread dissolving gel onto \the [src]!"))
if(do_after(user, 5 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE))
user.visible_message(SPAN_DANGER("[user] pours blue liquid all over \the [src]!"),
SPAN_NOTICE("You cover \the [src] with dissolving gel!"))
playsound(src.loc, 'sound/effects/acid_sizzle1.ogg', 25)
add_filter("dissolve_gel", 1, list("type" = "outline", "color" = "#3333FFff", "size" = 1))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), src), 15 SECONDS)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, visible_message), SPAN_WARNING("[src] crumbles into pieces!")), 15 SECONDS)
flags_item |= ITEM_DISSOLVING
log_attack("[key_name(user)] dissolved [src] with Yautja Cleaner!")
return TRUE
else
user.visible_message(SPAN_WARNING("[user] stops pouring liquid on to \the [src]!"),
SPAN_WARNING("You decide not to cover \the [src] with dissolving gel."))
return FALSE

///Called by /mob/living/carbon/swap_hand() when hands are swapped
/obj/item/proc/hands_swapped(mob/living/carbon/swapper_of_hands)
return
2 changes: 2 additions & 0 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
//This proc is called when you want to place an item into the storage item.
/obj/item/storage/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/tool/yautja_cleaner) && user.a_intent == INTENT_HARM)
return
return attempt_item_insertion(W, FALSE, user)

/obj/item/storage/equipped(mob/user, slot, silent)
Expand Down
20 changes: 18 additions & 2 deletions code/modules/cm_preds/yaut_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
icon_state = "halfarmor[armor_number]_[armor_material]"
LAZYSET(item_state_slots, WEAR_JACKET, "halfarmor[armor_number]_[armor_material]")



/obj/item/clothing/suit/armor/yautja/hunter
name = "clan armor"
desc = "A suit of armor with light padding. It looks old, yet functional."
Expand Down Expand Up @@ -1099,6 +1097,24 @@
new_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELITE, ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)
access = new_access

/obj/item/tool/yautja_cleaner
name = "cleanser gel vial"
desc = "Used for dissolving the gear of the fallen whilst in the field."
icon = 'icons/obj/items/hunter/pred_gear.dmi'
icon_state = "blue_gel"
force = 0
throwforce = 1
w_class = SIZE_SMALL
flags_item = ITEM_PREDATOR
black_market_value = 150

/obj/item/tool/yautja_cleaner/afterattack(obj/item/target, mob/user, proximity)
if(!isitem(target))
return
if(istype(target, /obj/item/storage) && user.a_intent !=INTENT_HARM)
return
target.handle_dissolve(user)

/obj/item/storage/medicomp
name = "medicomp"
desc = "A complex kit of alien tools and medicines."
Expand Down
1 change: 0 additions & 1 deletion code/modules/cm_preds/yaut_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,6 @@
if(refund) spikes++
return TRUE


/obj/item/weapon/gun/energy/yautja
icon = 'icons/obj/items/hunter/pred_gear.dmi'
icon_state = null
Expand Down
Binary file modified icons/obj/items/hunter/pred_gear.dmi
Binary file not shown.