mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-07-19 03:33:00 +01:00
254 lines
9.4 KiB
Plaintext
254 lines
9.4 KiB
Plaintext
// Plant analyzer
|
|
/obj/item/plant_analyzer
|
|
name = "plant analyzer"
|
|
desc = "A scanner used to evaluate a plant's various areas of growth."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "hydro"
|
|
item_state = "analyzer"
|
|
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
|
w_class = WEIGHT_CLASS_TINY
|
|
slot_flags = ITEM_SLOT_BELT
|
|
materials = list(MAT_METAL=30, MAT_GLASS=20)
|
|
var/scan_mode = FALSE
|
|
|
|
/obj/item/plant_analyzer/attack_self(mob/user)
|
|
. = ..()
|
|
scan_mode = !scan_mode
|
|
to_chat(user, "<span class='notice'>You switch [src] to [scan_mode ? "scan for chemical reagents and traits" : "scan for plant growth statistics"].</span>")
|
|
|
|
// *************************************
|
|
// Hydroponics Tools
|
|
// *************************************
|
|
|
|
/obj/item/reagent_containers/spray/weedspray // -- Skie
|
|
desc = "It's a toxic mixture, in spray form, to kill small weeds."
|
|
icon = 'icons/obj/hydroponics/equipment.dmi'
|
|
name = "weed spray"
|
|
icon_state = "weedspray"
|
|
item_state = "spraycan"
|
|
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
|
volume = 100
|
|
list_reagents = list(/datum/reagent/toxin/plantbgone/weedkiller = 100)
|
|
|
|
/obj/item/reagent_containers/spray/weedspray/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
return (TOXLOSS)
|
|
|
|
/obj/item/reagent_containers/spray/pestspray // -- Skie
|
|
desc = "It's some pest eliminator spray! <I>Do not inhale!</I>"
|
|
icon = 'icons/obj/hydroponics/equipment.dmi'
|
|
name = "pest spray"
|
|
icon_state = "pestspray"
|
|
item_state = "plantbgone"
|
|
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
|
volume = 100
|
|
list_reagents = list(/datum/reagent/toxin/pestkiller = 100)
|
|
|
|
/obj/item/reagent_containers/spray/pestspray/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is huffing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
return (TOXLOSS)
|
|
|
|
/obj/item/cultivator
|
|
name = "cultivator"
|
|
desc = "It's used for removing weeds or scratching your back."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "cultivator"
|
|
item_state = "cultivator"
|
|
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
|
flags_1 = CONDUCT_1
|
|
force = 5
|
|
throwforce = 7
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
materials = list(MAT_METAL=50)
|
|
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
|
|
/obj/item/cultivator/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is scratching [user.p_their()] back as hard as [user.p_they()] can with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
return (BRUTELOSS)
|
|
|
|
/obj/item/hatchet
|
|
name = "hatchet"
|
|
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
|
|
icon = 'icons/obj/items_and_weapons.dmi'
|
|
icon_state = "hatchet"
|
|
item_state = "hatchet"
|
|
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
|
flags_1 = CONDUCT_1
|
|
force = 12
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
throwforce = 15
|
|
throw_speed = 3
|
|
throw_range = 4
|
|
materials = list(MAT_METAL = 15000)
|
|
attack_verb = list("chopped", "torn", "cut")
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
sharpness = IS_SHARP
|
|
|
|
/obj/item/hatchet/Initialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/butchering, 70, 100)
|
|
|
|
/obj/item/hatchet/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is chopping at [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
|
return (BRUTELOSS)
|
|
|
|
/obj/item/scythe
|
|
icon_state = "scythe0"
|
|
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
|
name = "scythe"
|
|
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
|
force = 13
|
|
throwforce = 5
|
|
throw_speed = 2
|
|
throw_range = 3
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
flags_1 = CONDUCT_1
|
|
armour_penetration = 20
|
|
slot_flags = ITEM_SLOT_BACK
|
|
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
var/swiping = FALSE
|
|
|
|
/obj/item/scythe/Initialize()
|
|
. = ..()
|
|
AddComponent(/datum/component/butchering, 90, 105)
|
|
|
|
/obj/item/scythe/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
if(iscarbon(user))
|
|
var/mob/living/carbon/C = user
|
|
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
|
if(BP)
|
|
BP.drop_limb()
|
|
playsound(src,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
|
return (BRUTELOSS)
|
|
|
|
/obj/item/scythe/pre_attack(atom/A, mob/living/user, params)
|
|
if(swiping || !istype(A, /obj/structure/spacevine) || get_turf(A) == get_turf(user))
|
|
return ..()
|
|
else
|
|
var/turf/user_turf = get_turf(user)
|
|
var/dir_to_target = get_dir(user_turf, get_turf(A))
|
|
var/stam_gain = 0
|
|
swiping = TRUE
|
|
var/static/list/scythe_slash_angles = list(0, 45, 90, -45, -90)
|
|
for(var/i in scythe_slash_angles)
|
|
var/turf/T = get_step(user_turf, turn(dir_to_target, i))
|
|
for(var/obj/structure/spacevine/V in T)
|
|
if(user.Adjacent(V))
|
|
melee_attack_chain(user, V)
|
|
stam_gain += 5 //should be hitcost
|
|
swiping = FALSE
|
|
stam_gain += 2 //Initial hitcost
|
|
user.adjustStaminaLoss(-stam_gain)
|
|
|
|
// *************************************
|
|
// Nutrient defines for hydroponics
|
|
// *************************************
|
|
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient
|
|
name = "bottle of nutrient"
|
|
volume = 50
|
|
amount_per_transfer_from_this = 10
|
|
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient/Initialize()
|
|
. = ..()
|
|
pixel_x = rand(-5, 5)
|
|
pixel_y = rand(-5, 5)
|
|
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient/ez
|
|
name = "bottle of E-Z-Nutrient"
|
|
desc = "Contains a fertilizer that causes mild mutations with each harvest."
|
|
list_reagents = list(/datum/reagent/plantnutriment/eznutriment = 50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient/l4z
|
|
name = "bottle of Left 4 Zed"
|
|
desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants."
|
|
list_reagents = list(/datum/reagent/plantnutriment/left4zednutriment = 50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient/rh
|
|
name = "bottle of Robust Harvest"
|
|
desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations."
|
|
list_reagents = list(/datum/reagent/plantnutriment/robustharvestnutriment = 50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/nutrient/empty
|
|
name = "bottle"
|
|
|
|
/obj/item/reagent_containers/glass/bottle/killer
|
|
volume = 50
|
|
amount_per_transfer_from_this = 10
|
|
possible_transfer_amounts = list(1,2,5,10,15,25,50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/killer/weedkiller
|
|
name = "bottle of weed killer"
|
|
desc = "Contains a herbicide."
|
|
list_reagents = list(/datum/reagent/toxin/plantbgone/weedkiller = 50)
|
|
|
|
/obj/item/reagent_containers/glass/bottle/killer/pestkiller
|
|
name = "bottle of pest spray"
|
|
desc = "Contains a pesticide."
|
|
list_reagents = list(/datum/reagent/toxin/pestkiller = 50)
|
|
|
|
/*
|
|
/obj/item/plant_debugger
|
|
name = "plant debugger"
|
|
desc = "You should never be able to see this."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "hydro"
|
|
flags_1 = ABSTRACT
|
|
var/mode = 0
|
|
var/list/traits_list = list(
|
|
/datum/plant_gene/trait/modified_color/monochrome/yellow,
|
|
/datum/plant_gene/trait/modified_color/monochrome/green,
|
|
/datum/plant_gene/trait/modified_color/vibrant,
|
|
/datum/plant_gene/trait/modified_color/random,
|
|
/datum/plant_gene/trait/modified_color/monochrome/dark/,
|
|
/datum/plant_gene/trait/modified_color/monochrome/dark/red,
|
|
/datum/plant_gene/trait/modified_color/monochrome/dark/green,
|
|
/datum/plant_gene/trait/modified_color/monochrome/dark/blue)
|
|
var/trait_to_add = null
|
|
|
|
/obj/item/plant_debugger/attack_self(mob/user)
|
|
. = ..()
|
|
mode++
|
|
if(mode > traits_list.len)
|
|
mode = 1
|
|
trait_to_add = traits_list[mode]
|
|
to_chat(user, "Now injecting: [trait_to_add]")
|
|
|
|
/obj/item/plant_debugger/pre_attack(atom/A, mob/living/user, params)
|
|
if(!istype(A, /obj/machinery/hydroponics))
|
|
return
|
|
var/obj/machinery/hydroponics/H = A
|
|
if(!H.myseed)
|
|
to_chat(user, "This tray does not have a seed in it!")
|
|
return
|
|
for(var/G in H.myseed.genes)
|
|
if(istype(G, /datum/plant_gene/trait/modified_color))
|
|
var/datum/plant_gene/trait/T = new trait_to_add
|
|
G = T
|
|
T.apply_vars(H.myseed)
|
|
H.update_icon()
|
|
to_chat(user, "Converted old modified_color to [trait_to_add]")
|
|
return
|
|
var/datum/plant_gene/trait/T = new trait_to_add
|
|
H.myseed.genes += T
|
|
T.apply_vars(H.myseed)
|
|
H.update_icon()
|
|
to_chat(user, "Added [trait_to_add]")
|
|
|
|
/obj/item/plant_debugger/attack()
|
|
return
|
|
*/
|