mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Migrates /obj/item/stack to the new attack chain (#31709)
* e * stuff not in the stack folder * A * Update gift_wrappaper.dm * golg * dancing around SHOULD_NOT_SLEEP and storage still being legacy * Update asteroid_floors.dm * Update medical_packs.dm * Update medical_packs.dm
This commit is contained in:
@@ -76,23 +76,22 @@
|
||||
energy_type = /datum/robot_storage/energy/jani_landmine
|
||||
is_cyborg = TRUE
|
||||
|
||||
/obj/item/stack/caution/proximity_sign/malf/afterattack__legacy__attackchain(atom/target, mob/user, proximity)
|
||||
/obj/item/stack/caution/proximity_sign/malf/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!check_allowed_items(target, 1))
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(T.is_blocked_turf(exclude_mobs = TRUE)) //can't put mines on a tile that has dense stuff
|
||||
to_chat(user, SPAN_NOTICE("The space is occupied! You cannot place a mine there!"))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(1)) //Can't place a landmine if you don't have a landmine
|
||||
to_chat(user, SPAN_NOTICE("[src] is out of landmines! It can be refilled at a cyborg charger."))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 20, TRUE)
|
||||
var/obj/item/caution/proximity_sign/M = new /obj/item/caution/proximity_sign(get_turf(target), src)
|
||||
M.timing = TRUE
|
||||
START_PROCESSING(SSobj, M)
|
||||
to_chat(user, SPAN_NOTICE("You place a landmine with [src]. You have 15 seconds until it is armed."))
|
||||
return M
|
||||
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -20,67 +20,81 @@
|
||||
if(get_amount() <= 0)
|
||||
if(is_cyborg)
|
||||
to_chat(user, SPAN_WARNING("You don't have enough energy to dispense more [singular_name]\s!"))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(!iscarbon(M) && !isanimal_or_basicmob(M))
|
||||
to_chat(user, SPAN_DANGER("[src] cannot be applied to [M]!"))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, SPAN_DANGER("You don't have the dexterity to do this!"))
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
|
||||
if(!H.can_inject(user, TRUE))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(!affecting)
|
||||
to_chat(user, SPAN_DANGER("That limb is missing!"))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(affecting.is_robotic())
|
||||
to_chat(user, SPAN_DANGER("This can't be used on a robotic limb."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
if(M == user && !unique_handling)
|
||||
user.visible_message(SPAN_NOTICE("[user] starts to apply [src] on [H]..."))
|
||||
if(!do_mob(user, H, delay))
|
||||
return TRUE
|
||||
return
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
if(isanimal_or_basicmob(M))
|
||||
var/mob/living/critter = M
|
||||
if(!(critter.healable))
|
||||
to_chat(user, SPAN_NOTICE("You cannot use [src] on [critter]!"))
|
||||
return
|
||||
else if(critter.health == critter.maxHealth)
|
||||
return FALSE
|
||||
|
||||
if(critter.health == critter.maxHealth)
|
||||
to_chat(user, SPAN_NOTICE("[critter] is at full health."))
|
||||
return
|
||||
else if(heal_brute < 1)
|
||||
return FALSE
|
||||
|
||||
if(heal_brute < 1)
|
||||
to_chat(user, SPAN_NOTICE("[src] won't help [critter] at all."))
|
||||
return
|
||||
return FALSE
|
||||
|
||||
critter.heal_organ_damage(heal_brute, heal_burn)
|
||||
user.visible_message(SPAN_GREEN("[user] applies [src] on [critter]."), \
|
||||
SPAN_GREEN("You apply [src] on [critter]."))
|
||||
|
||||
user.visible_message(
|
||||
SPAN_GREEN("[user] applies [src] on [critter]."),
|
||||
SPAN_GREEN("You apply [src] on [critter].")
|
||||
)
|
||||
use(1)
|
||||
return TRUE
|
||||
|
||||
else
|
||||
M.heal_organ_damage(heal_brute, heal_burn)
|
||||
user.visible_message(SPAN_GREEN("[user] applies [src] on [M]."), \
|
||||
SPAN_GREEN("You apply [src] on [M]."))
|
||||
use(1)
|
||||
M.heal_organ_damage(heal_brute, heal_burn)
|
||||
user.visible_message(
|
||||
SPAN_GREEN("[user] applies [src] on [M]."),
|
||||
SPAN_GREEN("You apply [src] on [M].")
|
||||
)
|
||||
use(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/medical/attack__legacy__attackchain(mob/living/M, mob/user)
|
||||
return apply(M, user)
|
||||
/obj/item/stack/medical/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!ismob(target))
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/medical/attack_self__legacy__attackchain(mob/user)
|
||||
return apply(user, user)
|
||||
apply(target, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/medical/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
apply(user, user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/medical/proc/heal(mob/living/M, mob/user)
|
||||
var/mob/living/carbon/human/H = M
|
||||
@@ -134,40 +148,45 @@
|
||||
stop_bleeding = 1800
|
||||
dynamic_icon_state = TRUE
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(I.sharp)
|
||||
/obj/item/stack/medical/bruise_pack/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(used.sharp)
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, SPAN_WARNING("You need at least two gauzes to do this!"))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
new /obj/item/stack/sheet/cloth(user.drop_location())
|
||||
user.visible_message("[user] cuts [src] into pieces of cloth with [I].", \
|
||||
SPAN_NOTICE("You cut [src] into pieces of cloth with [I]."), \
|
||||
SPAN_ITALICS("You hear cutting."))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] cuts [src] into pieces of cloth with [used]."),
|
||||
SPAN_NOTICE("You cut [src] into pieces of cloth with [used]."),
|
||||
SPAN_ITALICS("You hear cutting.")
|
||||
)
|
||||
use(2)
|
||||
else
|
||||
return ..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/apply(mob/living/M, mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
for(var/obj/item/organ/external/E in H.bodyparts)
|
||||
if(E.open >= ORGAN_ORGANIC_OPEN)
|
||||
to_chat(user, SPAN_WARNING("[E] is cut open, you'll need more than a bandage!"))
|
||||
return
|
||||
affecting.germ_level = 0
|
||||
if(!ishuman(M))
|
||||
return FALSE
|
||||
|
||||
if(stop_bleeding)
|
||||
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
for(var/obj/item/organ/external/E in H.bodyparts)
|
||||
if(E.open >= ORGAN_ORGANIC_OPEN)
|
||||
to_chat(user, SPAN_WARNING("[E] is cut open, you'll need more than a bandage!"))
|
||||
return FALSE
|
||||
|
||||
heal(H, user)
|
||||
|
||||
H.UpdateDamageIcon()
|
||||
use(1)
|
||||
affecting.germ_level = 0
|
||||
if(stop_bleeding)
|
||||
if(!H.bleedsuppress) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
heal(H, user)
|
||||
H.UpdateDamageIcon()
|
||||
use(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/improvised
|
||||
name = "improvised gauze"
|
||||
@@ -214,22 +233,21 @@
|
||||
merge_type = /obj/item/stack/medical/ointment
|
||||
|
||||
/obj/item/stack/medical/ointment/apply(mob/living/M, mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
..()
|
||||
if(!ishuman(M))
|
||||
return TRUE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
if(affecting.open >= ORGAN_ORGANIC_OPEN)
|
||||
to_chat(user, SPAN_WARNING("[affecting] is cut open, you'll need more than some ointment!"))
|
||||
return TRUE
|
||||
|
||||
if(affecting.open == ORGAN_CLOSED)
|
||||
affecting.germ_level = 0
|
||||
|
||||
heal(H, user)
|
||||
|
||||
H.UpdateDamageIcon()
|
||||
use(1)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("[affecting] is cut open, you'll need more than some ointment!"))
|
||||
affecting.germ_level = 0
|
||||
heal(H, user)
|
||||
H.UpdateDamageIcon()
|
||||
use(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user)
|
||||
var/obj/item/organ/external/affecting = ..()
|
||||
@@ -313,39 +331,44 @@
|
||||
var/other_delay = 0
|
||||
|
||||
/obj/item/stack/medical/splint/apply(mob/living/M, mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
var/limb = affecting.name
|
||||
if(!ishuman(M))
|
||||
return FALSE
|
||||
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
to_chat(user, SPAN_DANGER("[H]'s [limb] is already splinted!"))
|
||||
if(tgui_alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Splint removal", list("Yes", "No")) == "Yes")
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
H.handle_splints()
|
||||
to_chat(user, SPAN_NOTICE("You remove the splint from [H]'s [limb]."))
|
||||
return TRUE
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
var/limb = affecting.name
|
||||
if(affecting.status & ORGAN_SPLINTED)
|
||||
to_chat(user, SPAN_DANGER("[H]'s [limb] is already splinted!"))
|
||||
if(tgui_alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Splint removal", list("Yes", "No")) == "Yes")
|
||||
affecting.status &= ~ORGAN_SPLINTED
|
||||
H.handle_splints()
|
||||
to_chat(user, SPAN_NOTICE("You remove the splint from [H]'s [limb]."))
|
||||
return FALSE
|
||||
|
||||
if((M == user && delay > 0) || (M != user && other_delay > 0))
|
||||
user.visible_message(SPAN_NOTICE("[user] starts to apply [src] to [H]'s [limb]."), \
|
||||
SPAN_NOTICE("You start to apply [src] to [H]'s [limb]."), \
|
||||
SPAN_NOTICE("You hear something being wrapped."))
|
||||
if((M == user && delay > 0) || (M != user && other_delay > 0))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] starts to apply [src] to [H]'s [limb]."),
|
||||
SPAN_NOTICE("You start to apply [src] to [H]'s [limb]."),
|
||||
SPAN_NOTICE("You hear something being wrapped.")
|
||||
)
|
||||
if(M == user && !do_mob(user, H, delay))
|
||||
return FALSE
|
||||
|
||||
if(M == user && !do_mob(user, H, delay))
|
||||
return TRUE
|
||||
else if(!do_mob(user, H, other_delay))
|
||||
return TRUE
|
||||
if(!do_mob(user, H, other_delay))
|
||||
return FALSE
|
||||
|
||||
user.visible_message(SPAN_NOTICE("[user] applies [src] to [H]'s [limb]."), \
|
||||
SPAN_NOTICE("You apply [src] to [H]'s [limb]."))
|
||||
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
affecting.splinted_count = H.step_count
|
||||
H.handle_splints()
|
||||
use(1)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] applies [src] to [H]'s [limb]."),
|
||||
SPAN_NOTICE("You apply [src] to [H]'s [limb].")
|
||||
)
|
||||
affecting.status |= ORGAN_SPLINTED
|
||||
affecting.splinted_count = H.step_count
|
||||
H.handle_splints()
|
||||
use(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/medical/splint/cyborg
|
||||
energy_type = /datum/robot_storage/energy/medical/splint
|
||||
@@ -455,29 +478,33 @@
|
||||
if(.)
|
||||
qdel(target_needle)
|
||||
|
||||
/obj/item/stack/medical/suture/attackby__legacy__attackchain(obj/item/thing, mob/user, params)
|
||||
if(!can_merge(thing, TRUE))
|
||||
/obj/item/stack/medical/suture/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!can_merge(used, TRUE))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/material = thing
|
||||
var/obj/item/stack/material = used
|
||||
var/merge_amount = merge(material)
|
||||
if(merge_amount)
|
||||
if(istype(material))
|
||||
merge_amount = material.get_amount()
|
||||
to_chat(user, SPAN_NOTICE("Your [material.name] stack now contains [merge_amount] [singular_name]\s."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/medical/suture/apply(mob/living/carbon/human/target, mob/user)
|
||||
. = TRUE
|
||||
. = FALSE
|
||||
if(current_target)
|
||||
if(current_target != target)
|
||||
to_chat(user, SPAN_WARNING("You're already suturing [current_target]."))
|
||||
return
|
||||
|
||||
// Allow for cancelling of the target by clicking again
|
||||
interrupt_do_after_once(user, current_target)
|
||||
to_chat(user, SPAN_WARNING("You stop [healverb] [target.i_yourself(user)]."))
|
||||
return
|
||||
|
||||
if(!ishuman(target) || !target.can_inject(user, TRUE))
|
||||
return
|
||||
|
||||
var/heal_type = (heal_brute ? BRUTE : BURN)
|
||||
var/heal_display = (heal_brute ? BRUTE : "burn")
|
||||
if(!target.get_damage_amount(heal_type))
|
||||
@@ -488,9 +515,11 @@
|
||||
if(!current_limb)
|
||||
to_chat(user, SPAN_WARNING("That limb is missing!"))
|
||||
return
|
||||
|
||||
if(current_limb.is_robotic())
|
||||
to_chat(user, SPAN_WARNING("This can't be used on a robotic limb."))
|
||||
return
|
||||
|
||||
// Swap to another limb if the current one has no damage.
|
||||
if(!most_damaged_limb(target))
|
||||
to_chat(user, SPAN_WARNING("[target.i_you(user, TRUE)] [target.i_do(user)]n't have any [heal_display] damage that could be [healverb_past]."))
|
||||
|
||||
@@ -11,49 +11,63 @@
|
||||
max_amount = 6
|
||||
merge_type = /obj/item/stack/nanopaste
|
||||
|
||||
/obj/item/stack/nanopaste/attack__legacy__attackchain(mob/living/M as mob, mob/user as mob)
|
||||
if(!istype(M) || !istype(user))
|
||||
return 0
|
||||
if(isrobot(M)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.getBruteLoss() || R.getFireLoss())
|
||||
/obj/item/stack/nanopaste/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(ismob(target))
|
||||
if(isrobot(target)) // Repairing cyborgs.
|
||||
var/mob/living/silicon/robot/R = target
|
||||
if(!R.getBruteLoss() && !R.getFireLoss())
|
||||
to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
R.heal_overall_damage(15, 15)
|
||||
use(1)
|
||||
user.visible_message(SPAN_NOTICE("[user] applies some [src] at [R]'s damaged areas."),\
|
||||
SPAN_NOTICE("You apply some [src] at [R]'s damaged areas."))
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("All [R]'s systems are nominal."))
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] applies some [src] at [R]'s damaged areas."),
|
||||
SPAN_NOTICE("You apply some [src] at [R]'s damaged areas.")
|
||||
)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(ishuman(M)) //Repairing robotic limbs and IPCs
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/external_limb = H.get_organ(user.zone_selected)
|
||||
if(ishuman(target)) // Repairing robotic limbs and IPCs.
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/external_limb = H.get_organ(user.zone_selected)
|
||||
if(!external_limb)
|
||||
to_chat(user, SPAN_WARNING("[H] is missing that limb!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!external_limb.is_robotic())
|
||||
to_chat(user, SPAN_WARNING("That limb is not robotic!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(external_limb && external_limb.is_robotic())
|
||||
robotic_limb_repair(user, external_limb, H)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("[src] won't work on that."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/nanopaste/afterattack__legacy__attackchain(atom/A, mob/user, proximity_flag)
|
||||
if(!ismecha(A) || user.a_intent == INTENT_HARM || !proximity_flag)
|
||||
return
|
||||
var/obj/mecha/mecha = A
|
||||
if((mecha.obj_integrity >= mecha.max_integrity) && !mecha.internal_damage)
|
||||
to_chat(user, SPAN_NOTICE("[mecha] is at full integrity!"))
|
||||
return
|
||||
if(mecha.state == MECHA_MAINT_OFF)
|
||||
to_chat(user, SPAN_WARNING("[mecha] cannot be repaired without maintenance protocols active!"))
|
||||
return
|
||||
if(mecha.repairing)
|
||||
to_chat(user, SPAN_NOTICE("[mecha] is currently being repaired!"))
|
||||
return
|
||||
if(mecha.internal_damage & MECHA_INT_TANK_BREACH)
|
||||
mecha.clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
user.visible_message(SPAN_NOTICE("[user] repairs the damaged air tank."), SPAN_NOTICE("You repair the damaged air tank."))
|
||||
else if(mecha.obj_integrity < mecha.max_integrity)
|
||||
mecha.obj_integrity += min(20, mecha.max_integrity - mecha.obj_integrity)
|
||||
use(1)
|
||||
user.visible_message(SPAN_NOTICE("[user] applies some [src] to [mecha]'s damaged areas."),\
|
||||
SPAN_NOTICE("You apply some [src] to [mecha]'s damaged areas."))
|
||||
if(ismecha(target))
|
||||
var/obj/mecha/mecha = target
|
||||
if((mecha.obj_integrity >= mecha.max_integrity) && !mecha.internal_damage)
|
||||
to_chat(user, SPAN_NOTICE("[mecha] is at full integrity!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(mecha.state == MECHA_MAINT_OFF)
|
||||
to_chat(user, SPAN_WARNING("[mecha] cannot be repaired without maintenance protocols active!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(mecha.repairing)
|
||||
to_chat(user, SPAN_NOTICE("[mecha] is currently being repaired!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(mecha.internal_damage & MECHA_INT_TANK_BREACH)
|
||||
mecha.clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
user.visible_message(SPAN_NOTICE("[user] repairs the damaged air tank."), SPAN_NOTICE("You repair the damaged air tank."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(mecha.obj_integrity < mecha.max_integrity)
|
||||
mecha.obj_integrity += min(20, mecha.max_integrity - mecha.obj_integrity)
|
||||
use(1)
|
||||
user.visible_message(SPAN_NOTICE("[user] applies some [src] to [mecha]'s damaged areas."),\
|
||||
SPAN_NOTICE("You apply some [src] to [mecha]'s damaged areas."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/nanopaste/proc/robotic_limb_repair(mob/user, obj/item/organ/external/external_limb, mob/living/carbon/human/H)
|
||||
if(!external_limb.get_damage())
|
||||
@@ -93,7 +107,7 @@
|
||||
energy_type = /datum/robot_storage/energy/medical/nanopaste
|
||||
is_cyborg = TRUE
|
||||
|
||||
/obj/item/stack/nanopaste/cyborg/attack__legacy__attackchain(mob/living/M, mob/user)
|
||||
/obj/item/stack/nanopaste/cyborg/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(get_amount() <= 0)
|
||||
to_chat(user, SPAN_WARNING("You don't have enough energy to dispense more [name]!"))
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/stack/seaweed
|
||||
name = "seaweed sheet"
|
||||
desc = "Weed.. from the Sea!"
|
||||
desc = "Weed... From the Sea!"
|
||||
singular_name = "seaweed sheet"
|
||||
icon = 'icons/obj/stacks/organic.dmi'
|
||||
icon_state = "seaweed"
|
||||
@@ -10,9 +10,6 @@
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
merge_type = /obj/item/stack/seaweed
|
||||
|
||||
/obj/item/stack/seaweed/attack_self__legacy__attackchain(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/stack/seaweed/attack_self_tk()
|
||||
return
|
||||
|
||||
|
||||
@@ -65,20 +65,21 @@ GLOBAL_LIST_INIT(glass_recipes, list (
|
||||
. = ..()
|
||||
recipes = GLOB.glass_recipes
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
/obj/item/stack/sheet/glass/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = used
|
||||
if(CC.get_amount() < 5)
|
||||
to_chat(user, "<b>There is not enough wire in this coil. You need 5 lengths.</b>")
|
||||
return
|
||||
to_chat(user, SPAN_WARNING("[used] doesn't have enough cable! You need 5 lengths."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
CC.use(5)
|
||||
to_chat(user, SPAN_NOTICE("You attach wire to [src]."))
|
||||
new /obj/item/stack/light_w(user.loc)
|
||||
use(1)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
if(istype(used, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = used
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
V.use(1)
|
||||
@@ -88,7 +89,7 @@ GLOBAL_LIST_INIT(glass_recipes, list (
|
||||
G.use(1)
|
||||
if(!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -186,22 +187,22 @@ GLOBAL_LIST_INIT(pglass_recipes, list (
|
||||
. = ..()
|
||||
recipes = GLOB.pglass_recipes
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
if(!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
/obj/item/stack/sheet/plasmaglass/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stack/rods))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/rods/V = used
|
||||
var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand() == G)
|
||||
G.use(1)
|
||||
if(!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
//////////////////////////////
|
||||
// MARK: REINFORCED PLASMA GLASS
|
||||
//////////////////////////////
|
||||
|
||||
@@ -187,48 +187,62 @@ GLOBAL_LIST_INIT(sinew_recipes, list (
|
||||
/obj/item/clothing/head/hooded/explorer,
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/mining))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
/obj/item/stack/sheet/animalhide/goliath_hide/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
|
||||
var/obj/item/clothing/C = target
|
||||
var/datum/armor/current_armor = C.armor
|
||||
if(current_armor.getRating(MELEE) < 75)
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return
|
||||
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against melee attacks."))
|
||||
else
|
||||
if(current_armor.getRating(MELEE) >= 75)
|
||||
to_chat(user, SPAN_WARNING("You can't improve [C] any further!"))
|
||||
else if(istype(target, /obj/mecha/working/ripley))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_WARNING("You dont have enough [src] for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against melee attacks."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(target, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.hides < HIDES_COVERED_FULL && !D.plates && !D.drake_hides)
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return
|
||||
D.hides++
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 10, 70))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
else
|
||||
if(D.hides >= HIDES_COVERED_FULL)
|
||||
to_chat(user, SPAN_WARNING("You can't improve [D] any further!"))
|
||||
else if(isrobot(target))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(D.plates || D.drake_hides)
|
||||
to_chat(user, SPAN_WARNING("[D] is already protected by a different kind of armor!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_WARNING("You dont have enough [src] for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
D.hides++
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 10, 70))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(isrobot(target))
|
||||
var/mob/living/silicon/robot/R = target
|
||||
if(istype(R.module, /obj/item/robot_module/miner))
|
||||
var/datum/armor/current_armor = R.armor
|
||||
if(current_armor.getRating(MELEE) < 75)
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return
|
||||
R.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against melee attacks."))
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You can't improve [R] any further!"))
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("[R]'s armor can not be improved!"))
|
||||
if(!istype(R.module, /obj/item/robot_module/miner))
|
||||
to_chat(user, SPAN_WARNING("[R]'s armor can not be improved, only mining modules have hardpoints for attaching [src]!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
var/datum/armor/current_armor = R.armor
|
||||
if(current_armor.getRating(MELEE) >= 75)
|
||||
to_chat(user, SPAN_WARNING("You can't improve the armor on [R] any further!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_WARNING("You dont have enough [src] for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
R.armor = current_armor.setRating(melee_value = min(current_armor.getRating(MELEE) + 15, 75))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against melee attacks."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/armor_plate
|
||||
name = "armor plate"
|
||||
@@ -240,26 +254,29 @@ GLOBAL_LIST_INIT(sinew_recipes, list (
|
||||
layer = MOB_LAYER
|
||||
materials = list(MAT_METAL = 20000, MAT_TITANIUM = 5000)
|
||||
|
||||
/obj/item/stack/sheet/animalhide/armor_plate/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(istype(target, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.plates < PLATES_COVERED_FULL && !D.hides && !D.drake_hides)
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return
|
||||
D.plates++
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 7, 60))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 4, 50))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 4, 50))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You can't improve [D] any further!"))
|
||||
/obj/item/stack/sheet/animalhide/armor_plate/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!istype(target, /obj/mecha/working/ripley))
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/armor_plate/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
return // no steel leather for ya
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.plates >= PLATES_COVERED_FULL)
|
||||
to_chat(user, SPAN_WARNING("You can't improve [D] any further!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(D.hides || D.drake_hides)
|
||||
to_chat(user, SPAN_WARNING("[D] is already protected by a different kind of armor!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(1))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
D.plates++
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 7, 60))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 4, 50))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 4, 50))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
|
||||
/obj/item/stack/sheet/animalhide/ashdrake
|
||||
name = "ash drake hide"
|
||||
@@ -270,45 +287,58 @@ GLOBAL_LIST_INIT(sinew_recipes, list (
|
||||
layer = MOB_LAYER
|
||||
dynamic_icon_state = TRUE
|
||||
|
||||
/obj/item/stack/sheet/animalhide/ashdrake/afterattack__legacy__attackchain(atom/target, mob/user, proximity_flag)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
if(istype(target, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.drake_hides < DRAKE_HIDES_COVERED_FULL && !D.hides && !D.plates)
|
||||
if(!use(3))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return
|
||||
D.drake_hides++
|
||||
D.max_integrity += 50
|
||||
D.obj_integrity += 50
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 13, 80))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60))
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You can't improve [D] any further!"))
|
||||
/obj/item/stack/sheet/animalhide/ashdrake/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!istype(target, /obj/mecha/working/ripley))
|
||||
return ..()
|
||||
|
||||
var/obj/mecha/working/ripley/D = target
|
||||
if(D.drake_hides >= DRAKE_HIDES_COVERED_FULL)
|
||||
to_chat(user, SPAN_WARNING("You can't improve [D] any further!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(D.hides || D.plates)
|
||||
to_chat(user, SPAN_WARNING("[D] is already protected by a different kind of armor!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(3))
|
||||
to_chat(user, SPAN_NOTICE("You dont have enough [src] for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
D.drake_hides++
|
||||
D.max_integrity += 50
|
||||
D.obj_integrity += 50
|
||||
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating(MELEE) + 13, 80))
|
||||
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating(BULLET) + 7, 60))
|
||||
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating(LASER) + 7, 60))
|
||||
D.update_appearance(UPDATE_DESC|UPDATE_OVERLAYS)
|
||||
to_chat(user, SPAN_NOTICE("You strengthen [target], improving its resistance against attacks."))
|
||||
|
||||
//Step one - dehairing.
|
||||
/obj/item/stack/sheet/animalhide/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!used.sharp)
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/animalhide/attackby__legacy__attackchain(obj/item/W, mob/user, params)
|
||||
if(W.sharp)
|
||||
user.visible_message("[user] starts cutting hair off \the [src].", SPAN_NOTICE("You start cutting the hair off \the [src]..."), SPAN_ITALICS("You hear the sound of a knife rubbing against flesh."))
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
to_chat(user, SPAN_NOTICE("You cut the hair from this [src.singular_name]."))
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
|
||||
if(HS.amount < 50)
|
||||
HS.amount++
|
||||
src.use(1)
|
||||
break
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/sheet/hairlesshide/HS = new(usr.loc)
|
||||
HS.amount = 1
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] starts cutting hair off [src]."),
|
||||
SPAN_NOTICE("You start cutting the hair off [src]..."),
|
||||
SPAN_WARNING("You hear the sound of a knife rubbing against flesh!")
|
||||
)
|
||||
if(!do_after(user, 50 * used.toolspeed, target = src))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You cut the hair from this [src.singular_name]."))
|
||||
//Try locating an exisitng stack on the tile and add to there if possible
|
||||
for(var/obj/item/stack/sheet/hairlesshide/hide in usr.loc)
|
||||
if(hide.amount < 50)
|
||||
hide.amount++
|
||||
src.use(1)
|
||||
else
|
||||
..()
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
//If it gets to here it means it did not find a suitable stack on the tile.
|
||||
var/obj/item/stack/sheet/hairlesshide/hide = new(usr.loc)
|
||||
hide.amount = 1
|
||||
src.use(1)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
//Step two - washing (also handled by water reagent code and washing machine code)
|
||||
/obj/item/stack/sheet/hairlesshide/water_act(volume, temperature, source, method = REAGENT_TOUCH)
|
||||
|
||||
@@ -12,16 +12,22 @@
|
||||
flags = CONDUCT
|
||||
max_amount = 60
|
||||
|
||||
/obj/item/stack/light_w/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
var/obj/item/stack/cable_coil/CC = new(user.loc)
|
||||
CC.amount = 5
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
use(1)
|
||||
/obj/item/stack/light_w/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stack/sheet/metal))
|
||||
return ..()
|
||||
|
||||
if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
M.use(1)
|
||||
new /obj/item/stack/tile/light(user.loc)
|
||||
use(1)
|
||||
var/obj/item/stack/sheet/metal/M = used
|
||||
M.use(1)
|
||||
new /obj/item/stack/tile/light(user.loc)
|
||||
use(1)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/light_w/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(!istype(I, /obj/item/wirecutters))
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = new(user.loc)
|
||||
CC.amount = 5
|
||||
new/obj/item/stack/sheet/glass(user.loc)
|
||||
use(1)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
@@ -197,19 +197,21 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
|
||||
icon = 'icons/obj/stacks/miscellaneous.dmi'
|
||||
icon_state = "empty-sandbags"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
new_attack_chain = TRUE
|
||||
|
||||
/obj/item/emptysandbag/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/ore/glass))
|
||||
var/obj/item/stack/ore/glass/G = I
|
||||
to_chat(user, SPAN_NOTICE("You fill the sandbag."))
|
||||
var/obj/item/stack/sheet/mineral/sandbags/S = new /obj/item/stack/sheet/mineral/sandbags(drop_location())
|
||||
qdel(src)
|
||||
if(Adjacent(user) && !issilicon(user))
|
||||
user.put_in_hands(S)
|
||||
G.use(1)
|
||||
else
|
||||
/obj/item/emptysandbag/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stack/ore/glass))
|
||||
return ..()
|
||||
|
||||
to_chat(user, SPAN_NOTICE("You fill the sandbag."))
|
||||
var/obj/item/stack/sheet/mineral/sandbags/S = new /obj/item/stack/sheet/mineral/sandbags(drop_location())
|
||||
if(Adjacent(user) && ishuman(user))
|
||||
user.put_in_hands(S)
|
||||
var/obj/item/stack/ore/glass/G = used
|
||||
G.use(1)
|
||||
qdel(src)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/sheet/mineral/diamond
|
||||
name = "diamond"
|
||||
desc = "Sparkles like a twinkling star."
|
||||
@@ -311,12 +313,13 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
|
||||
log_and_set_aflame(user, I)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
|
||||
if(I.get_heat())
|
||||
log_and_set_aflame(user, I)
|
||||
else
|
||||
/obj/item/stack/sheet/mineral/plasma/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!used.get_heat())
|
||||
return ..()
|
||||
|
||||
log_and_set_aflame(user, used)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/proc/log_and_set_aflame(mob/user, obj/item/I)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user, "?")]) ([ADMIN_FLW(user, "FLW")]) in ([COORD(T)] - [ADMIN_JMP(T)]")
|
||||
|
||||
@@ -535,15 +535,16 @@ GLOBAL_LIST_INIT(cardboard_recipes, list (
|
||||
)),
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/cardboard/attackby__legacy__attackchain(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stamp/clown) && !isstorage(loc))
|
||||
/obj/item/stack/sheet/cardboard/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!istype(used, /obj/item/stamp/clown) || isstorage(loc))
|
||||
return ..()
|
||||
|
||||
if(use(1))
|
||||
var/atom/droploc = drop_location()
|
||||
if(use(1))
|
||||
playsound(I, 'sound/items/bikehorn.ogg', 50, TRUE, -1)
|
||||
to_chat(user, SPAN_NOTICE("You stamp the cardboard! It's a clown box! Honk!"))
|
||||
new/obj/item/storage/box/clown(droploc) //bugfix
|
||||
else
|
||||
. = ..()
|
||||
to_chat(user, SPAN_NOTICE("You stamp the cardboard! It's a clown box! Honk!"))
|
||||
playsound(used, 'sound/items/bikehorn.ogg', 50, TRUE, -1)
|
||||
new/obj/item/storage/box/clown(droploc)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/// BubbleWrap
|
||||
/obj/item/stack/sheet/cardboard
|
||||
@@ -621,15 +622,14 @@ GLOBAL_LIST_INIT(cult_recipes, list (
|
||||
icon_state = GET_CULT_DATA(runed_metal_icon_state, initial(icon_state))
|
||||
recipes = GLOB.cult_recipes
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/attack_self__legacy__attackchain(mob/living/user)
|
||||
if(!IS_CULTIST(user))
|
||||
/obj/item/stack/sheet/runed_metal/activate_self(mob/user)
|
||||
if(!IS_CULTIST(user) || user.holy_check())
|
||||
to_chat(user, SPAN_WARNING("Only one with forbidden knowledge could hope to work this metal..."))
|
||||
return
|
||||
if(usr.holy_check())
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!is_level_reachable(user.z))
|
||||
to_chat(user, SPAN_WARNING("The energies of this place interfere with the metal shaping!"))
|
||||
return
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
/obj/item/stack
|
||||
origin_tech = "materials=1"
|
||||
new_attack_chain = TRUE
|
||||
/// Whether this stack is a `/cyborg` subtype or not.
|
||||
var/is_cyborg = FALSE
|
||||
/// The storage datum that will be used with this stack. Used only with `/cyborg` type stacks.
|
||||
@@ -36,6 +37,24 @@
|
||||
/// Whether this stack can't stack with subtypes.
|
||||
var/parent_stack = FALSE
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src))
|
||||
return
|
||||
|
||||
if(is_cyborg)
|
||||
if(singular_name)
|
||||
. += "There is enough energy for [get_amount()] [singular_name]\s."
|
||||
else
|
||||
. += "There is enough energy for [get_amount()]."
|
||||
return
|
||||
|
||||
if(singular_name)
|
||||
. += "There are [amount] [singular_name]\s in the stack."
|
||||
else
|
||||
. += "There are [amount] [name]\s in the stack."
|
||||
. +=SPAN_NOTICE("Alt-click to take a custom amount.")
|
||||
|
||||
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
|
||||
if(dynamic_icon_state && isnull(inhand_icon_state)) //If we have a dynamic icon state, we don't want inhand icon states to follow the same pattern.
|
||||
inhand_icon_state = initial(icon_state)
|
||||
@@ -67,6 +86,21 @@
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/activate_self(mob/user)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
ui_interact(user)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(!can_merge(used, TRUE))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/material = used
|
||||
if(merge(material))
|
||||
to_chat(user, SPAN_NOTICE("Your [material.name] stack now contains [material.get_amount()] [material.singular_name]\s."))
|
||||
|
||||
/obj/item/stack/update_icon_state()
|
||||
. = ..()
|
||||
if(!dynamic_icon_state)
|
||||
@@ -97,24 +131,6 @@
|
||||
merge(hitting)
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src))
|
||||
return
|
||||
|
||||
if(is_cyborg)
|
||||
if(singular_name)
|
||||
. += "There is enough energy for [get_amount()] [singular_name]\s."
|
||||
else
|
||||
. += "There is enough energy for [get_amount()]."
|
||||
return
|
||||
|
||||
if(singular_name)
|
||||
. += "There are [amount] [singular_name]\s in the stack."
|
||||
else
|
||||
. += "There are [amount] [name]\s in the stack."
|
||||
. +=SPAN_NOTICE("Alt-click to take a custom amount.")
|
||||
|
||||
/obj/item/stack/proc/add(newamount)
|
||||
if(is_cyborg)
|
||||
source.add_charge(newamount * cost)
|
||||
@@ -140,8 +156,22 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/attack_self__legacy__attackchain(mob/user)
|
||||
ui_interact(user)
|
||||
/obj/item/stack/use(used, check = TRUE)
|
||||
if(check && is_zero_amount(TRUE))
|
||||
return FALSE
|
||||
|
||||
if(is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
|
||||
if(amount < used)
|
||||
return FALSE
|
||||
|
||||
amount -= used
|
||||
if(check && is_zero_amount(TRUE))
|
||||
return TRUE
|
||||
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/attack_self_tk(mob/user)
|
||||
ui_interact(user)
|
||||
@@ -169,31 +199,6 @@
|
||||
if(src && user.machine == src)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/stack/attackby__legacy__attackchain(obj/item/thing, mob/user, params)
|
||||
if(!can_merge(thing, TRUE))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/material = thing
|
||||
if(merge(material))
|
||||
to_chat(user, SPAN_NOTICE("Your [material.name] stack now contains [material.get_amount()] [material.singular_name]\s."))
|
||||
|
||||
/obj/item/stack/use(used, check = TRUE)
|
||||
if(check && is_zero_amount(TRUE))
|
||||
return FALSE
|
||||
|
||||
if(is_cyborg)
|
||||
return source.use_charge(used * cost)
|
||||
|
||||
if(amount < used)
|
||||
return FALSE
|
||||
|
||||
amount -= used
|
||||
if(check && is_zero_amount(TRUE))
|
||||
return TRUE
|
||||
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
to_chat(user, SPAN_WARNING("You can't do that right now!"))
|
||||
|
||||
@@ -10,22 +10,23 @@
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
|
||||
var/skin_level = 1
|
||||
|
||||
/obj/item/stack/synthetic_skin/attack__legacy__attackchain(mob/living/M as mob, mob/user as mob)
|
||||
if(!ishuman(M) || !istype(user))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = M
|
||||
/obj/item/stack/synthetic_skin/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!ishuman(target) || !istype(user))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/external/external_limb = H.get_organ(user.zone_selected)
|
||||
if(external_limb)
|
||||
user.visible_message(SPAN_NOTICE("[user] starts to apply [src] on [H]'s [external_limb.name]..."))
|
||||
if(!do_mob(user, H, 5 SECONDS))
|
||||
return FALSE
|
||||
use(1)
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(external_limb.apply_augmented_skin(skin_level))
|
||||
use(1)
|
||||
user.visible_message(SPAN_NOTICE("[user] applies some [src] on [H]'s [external_limb.name]."))
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You fail to apply a better skin cover to [H]'s [external_limb.name]."))
|
||||
return FALSE
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/synthetic_skin/level_2
|
||||
name = "level-2 synthetic skin patch"
|
||||
|
||||
@@ -10,35 +10,42 @@
|
||||
origin_tech = "materials=6;syndicate=1"
|
||||
dynamic_icon_state = TRUE
|
||||
|
||||
/obj/item/stack/telecrystal/attack__legacy__attackchain(mob/target, mob/user)
|
||||
if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
|
||||
for(var/obj/item/bio_chip/uplink/I in target)
|
||||
if(I && I.imp_in)
|
||||
I.hidden_uplink.uses += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You press [src] onto yourself and charge your hidden uplink."))
|
||||
|
||||
/obj/item/stack/telecrystal/afterattack__legacy__attackchain(obj/item/I, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(I) && I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.uses += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You slot [src] into [I] and charge its internal uplink."))
|
||||
else if(istype(I, /obj/item/cartridge/frame))
|
||||
var/obj/item/cartridge/frame/cart = I
|
||||
if(!cart.charges)
|
||||
to_chat(user, SPAN_NOTICE("[cart] is out of charges, it's refusing to accept [src]"))
|
||||
return
|
||||
cart.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You slot [src] into [cart]. The next time it's used, it will also give telecrystals"))
|
||||
|
||||
/obj/item/stack/telecrystal/examine(mob/user)
|
||||
. = ..()
|
||||
if(isAntag(user))
|
||||
. += SPAN_WARNING("Telecrystals can be activated by utilizing them on devices with an actively running uplink. They will not activate on inactive uplinks.")
|
||||
|
||||
/obj/item/stack/telecrystal/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(isitem(target))
|
||||
var/obj/item/I = target
|
||||
if(I.hidden_uplink && I.hidden_uplink.active) //No metagaming by using this on every PDA around just to see if it gets used up.
|
||||
I.hidden_uplink.uses += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You slot [src] into [target] and charge its internal uplink."))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(istype(target, /obj/item/cartridge/frame))
|
||||
var/obj/item/cartridge/frame/cart = target
|
||||
if(!cart.charges)
|
||||
to_chat(user, SPAN_NOTICE("[cart] is out of charges, it's refusing to accept [src]"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
cart.telecrystals += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You slot [src] into [cart]. The next time it's used, it will also give telecrystals"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(target != user) //You can't go around smacking people with crystals to find out if they have an uplink or not.
|
||||
return ..()
|
||||
|
||||
for(var/obj/item/bio_chip/uplink/implant in target)
|
||||
if(implant && implant.imp_in)
|
||||
implant.hidden_uplink.uses += amount
|
||||
use(amount)
|
||||
to_chat(user, SPAN_NOTICE("You press [src] onto yourself and charge your hidden uplink."))
|
||||
break
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
/obj/item/stack/telecrystal/five
|
||||
amount = 5
|
||||
|
||||
|
||||
@@ -12,33 +12,43 @@
|
||||
. = ..()
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
/obj/item/stack/tape_roll/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user)
|
||||
if(!istype(M)) //What good is a duct tape mask if you are unable to speak?
|
||||
return
|
||||
if(M.wear_mask)
|
||||
to_chat(user, "Remove [M.p_their()] mask first!")
|
||||
return
|
||||
/obj/item/stack/tape_roll/interact_with_atom(atom/target, mob/living/user, list/modifiers)
|
||||
if(!ishuman(target)) // What good is a duct tape mask if you are unable to speak?
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.wear_mask)
|
||||
to_chat(user, SPAN_WARNING("Remove [H.p_their()] mask first!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(amount < 2)
|
||||
to_chat(user, "You'll need more tape for this!")
|
||||
return
|
||||
if(!M.check_has_mouth())
|
||||
to_chat(user, "[M.p_they(TRUE)] [M.p_have()] no mouth to tape over!")
|
||||
return
|
||||
user.visible_message(SPAN_WARNING("[user] is taping [M]'s mouth closed!"),
|
||||
SPAN_NOTICE("You try to tape [M == user ? "your own" : "[M]'s"] mouth shut!"),
|
||||
SPAN_WARNING("You hear tape ripping."))
|
||||
if(!do_after(user, 50, target = M))
|
||||
return
|
||||
to_chat(user, SPAN_WARNING("You'll need more tape for this!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!H.check_has_mouth())
|
||||
to_chat(user, "[H.p_they(TRUE)] [H.p_have()] no mouth to tape over!")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.visible_message(
|
||||
SPAN_WARNING("[user] is taping [H]'s mouth closed!"),
|
||||
SPAN_NOTICE("You try to tape [H == user ? "your own" : "[H]'s"] mouth shut!"),
|
||||
SPAN_WARNING("You hear tape ripping.")
|
||||
)
|
||||
if(!do_after(user, 5 SECONDS, target = H))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(!use(2))
|
||||
to_chat(user, SPAN_NOTICE("You don't have enough tape!"))
|
||||
return
|
||||
if(M.wear_mask)
|
||||
to_chat(user, SPAN_NOTICE("[M == user ? user : M]'s mouth is already covered!"))
|
||||
return
|
||||
user.visible_message(SPAN_WARNING("[user] tapes [M]'s mouth shut!"),
|
||||
SPAN_NOTICE("You cover [M == user ? "your own" : "[M]'s"] mouth with a piece of duct tape.[M == user ? null : " That will shut them up."]"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(H.wear_mask)
|
||||
to_chat(user, SPAN_NOTICE("[H == user ? user : H]'s mouth is already covered!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
user.visible_message(SPAN_WARNING("[user] tapes [H]'s mouth shut!"),
|
||||
SPAN_NOTICE("You cover [H == user ? "your own" : "[H]'s"] mouth with a piece of duct tape.[H == user ? null : " That will shut them up."]"))
|
||||
var/obj/item/clothing/mask/muzzle/G = new /obj/item/clothing/mask/muzzle/tapegag
|
||||
M.equip_to_slot(G, ITEM_SLOT_MASK)
|
||||
H.equip_to_slot(G, ITEM_SLOT_MASK)
|
||||
G.add_fingerprint(user)
|
||||
|
||||
/obj/item/stack/tape_roll/update_icon_state()
|
||||
|
||||
@@ -134,5 +134,7 @@
|
||||
max_amount = 25
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/stack/wrapping_paper/attack_self__legacy__attackchain(mob/user)
|
||||
/obj/item/stack/wrapping_paper/activate_self(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, SPAN_NOTICE("You need to use it on a package that has already been wrapped!"))
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
Reference in New Issue
Block a user