Botany Fixes and Telescopic Scythes

- Ports https://github.com/Baystation12/Baystation12/pull/9184 from
Baystation

- Prevents deconstruction of soil and invisible soil
- Fixes #1011

- Adds a verb to eject tanks from hydroponics trays if one is inserted
- Don't think anyone has actually done this, but it has been possible
for a LONG time and will be more useful once I get the atmos portion of
botany working

- Fixes grown items not leaving behind their trash
- Notably banana peels and corn cobs. Clowns and hillbillies rejoice!

- Adds 15% chance for a watermelon to leave behind a pack of it's seeds
when eaten.
- Slicing watermelon will not produce seeds ever

- Replaces the Janitorial ERT members' plant-b-gone sprays with new
Telescopic Scythes!
- Can be collapsed to fit on a belt or fit in pockets/bags
- While collapsed, it loses a large amount of it's damage, is not
considered sharp or as having an edge, and cannot cut vines like a
normal scythe. Extended ones are functionally identical to normal
scythes
- Extending and collapsing a telescopic scythe has some awesome sounds
from Freesound.org
This commit is contained in:
FalseIncarnate
2015-05-12 23:00:02 -04:00
parent 884fb4e4ca
commit b602e3d5e3
12 changed files with 203 additions and 87 deletions
+70 -70
View File
@@ -17,39 +17,39 @@ var/can_call_ert
if(!check_rights(R_EVENT))
return
if(!ticker)
usr << "\red The game hasn't started yet!"
return
if(ticker.current_state == 1)
usr << "\red The round hasn't started yet!"
return
if(send_emergency_team)
usr << "\red Central Command has already dispatched an emergency response team!"
return
if(alert("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes")
return
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
switch(alert("The station is not in red alert. Do you still want to dispatch a response team?",,"Yes","No"))
if("No")
return
if(send_emergency_team)
usr << "\red Central Command has already dispatched an emergency response team!"
return
if(pick_ert_type())
return
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
log_admin("[key_name(usr)] used Dispatch Response Team.")
trigger_armed_response_team(1)
/client/proc/pick_ert_type()
var/erttype = input("Which type of Emergency Response Team would you like to dispatch?","Emergency Response Team Type", "") as null|anything in response_team_types
if(!erttype)
@@ -68,15 +68,15 @@ var/can_call_ert
if(!istype(usr,/mob/dead/observer) && !istype(usr,/mob/new_player))
usr << "You need to be an observer or new player to use this."
return
if(!send_emergency_team)
usr << "No emergency response team is currently being sent."
return
if(jobban_isbanned(usr, "Emergency Response Team"))
usr << "<span class='warning'>You are jobbanned from the emergency reponse team!</span>"
return
var/player_age_check = check_client_age(usr.client, responseteam_age)
if(player_age_check && config.use_age_restriction_for_antags)
usr << "<span class='warning'>This role is not yet available to you. You need to wait another [player_age_check] days.</span>"
@@ -86,11 +86,11 @@ var/can_call_ert
usr << "\blue <B>Upon using the antagHUD you forfeited the ability to join the round.</B>"
return
if(response_team_members.len > 6)
if(response_team_members.len > 6)
usr << "The emergency response team is already full!"
return
for (var/obj/effect/landmark/L in landmarks_list)
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Response Team")
L.name = null
@@ -122,13 +122,13 @@ var/can_call_ert
var/deadcount = 0
for(var/mob/living/carbon/human/H in mob_list)
if(H.client) // Monkeys and mice don't have a client, amirite?
if(H.stat == 2)
if(H.stat == 2)
deadcount++
total++
if(total == 0)
if(total == 0)
return 0
else
else
return round(100 * deadcount / total)
// counts the number of antagonists in %
@@ -140,9 +140,9 @@ var/can_call_ert
antagonists++
total++
if(total == 0)
if(total == 0)
return 0
else
else
return round(100 * antagonists / total)
// Increments the ERT chance automatically, so that the later it is in the round,
@@ -174,7 +174,7 @@ var/can_call_ert
send_team_chance += percentage_antagonists() // the more antagonists, the higher the chance
send_team_chance = min(send_team_chance, 100)
if(force)
if(force)
send_team_chance = 100
// there's only a certain chance a team will be sent
@@ -190,7 +190,7 @@ var/can_call_ert
sleep(600 * 5)
send_emergency_team = 0 // Can no longer join the ERT.
/*
/*
var/area/security/nuke_storage/nukeloc = locate() //To find the nuke in the vault
var/obj/machinery/nuclearbomb/nuke = locate() in nukeloc
if(!nuke)
@@ -289,9 +289,9 @@ var/can_call_ert
else
del(H)
//M.rebuild_appearance()
//M.rebuild_appearance()
*/
var/new_gender = alert(usr, "Please select your gender.", "Character Generation", "Male", "Female")
if (new_gender)
if(new_gender == "Male")
@@ -347,7 +347,7 @@ var/can_call_ert
equip_emergencyresponsesquad(M, "Commander", class)
else
equip_emergencyresponsesquad(M, class)
return M
/proc/equip_emergencyresponsesquad(var/mob/living/carbon/human/M, var/role, var/role2)
@@ -364,13 +364,13 @@ var/can_call_ert
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/galoshes(M), slot_shoes)
else
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/commander(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/commander(M), slot_back)
@@ -389,8 +389,8 @@ var/can_call_ert
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer/advpinpointer(M), slot_in_backpack)
switch(role2)
@@ -398,62 +398,62 @@ var/can_call_ert
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/shield/riot/tele(M), slot_in_backpack)
if("Medical")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/combat/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/fire(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/toxin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_r_hand)
if("Engineering")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/inflatable(M), slot_r_hand)
if("Janitorial")
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/janitor, slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/janitor/full, slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/lights/mixed(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/plantbgone(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/scythe/tele(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/glass/bucket(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
new /obj/structure/mopbucket/full(get_turf(M))
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/security(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
@@ -472,11 +472,11 @@ var/can_call_ert
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-security"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs, slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs, slot_l_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/night(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
@@ -488,18 +488,18 @@ var/can_call_ert
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/medical(M)
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/medical(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/medical(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/night(M), slot_glasses)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
W.assignment = "Emergency Response Team Member"
W.registered_name = M.real_name
W.name = "[M.real_name]'s ID Card (Emergency Response Team - Medic)"
W.icon_state = "centcom"
@@ -512,29 +512,29 @@ var/can_call_ert
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-medical"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/fire(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/toxin(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/combat/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_r_hand)
if("Engineering")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/engineer(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M)
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/engineer(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
@@ -553,29 +553,29 @@ var/can_call_ert
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-engineer"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd/combat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/rcd_ammo/large(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/glass/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
if("Janitorial")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/galoshes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/purple(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/janitor(M), slot_wear_suit)
var/obj/item/clothing/suit/space/rig/R = M.wear_suit
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/janitor(M)
R.helmet = new /obj/item/clothing/head/helmet/space/rig/ert/janitor(M)
M.equip_to_slot_or_del(R.helmet, slot_head)
R.helmet.flags |= NODROP
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/swat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/janitor(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/janitor(M), slot_glasses)
@@ -594,19 +594,19 @@ var/can_call_ert
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-janitor"
M.equip_to_slot_or_del(pda, slot_wear_pda)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/lights/mixed(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/spray/plantbgone(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/scythe/tele(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/glass/bucket(src), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/janitor/full, slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/mop/advanced(M), slot_r_hand)
new /obj/structure/mopbucket/full(get_turf(M))
/*/mob/living/carbon/human/proc/equip_strike_team(leader_selected = 0) Old ERT equip verb.
+15
View File
@@ -54,9 +54,24 @@
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
update_desc()
update_trash()
if(reagents.total_volume > 0)
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/update_trash()
if(!seed)
return
trash = seed.trash_type
if(seed.kitchen_tag)
if(seed.kitchen_tag == "watermelon") // 15% chance to leave behind a pack of watermelon seeds
if(prob(15))
var/obj/item/seeds/seeds = new()
seeds.seed = seed
seeds.update_seed()
trash = seeds
else
trash = null
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/update_desc()
if(!seed)
+1 -1
View File
@@ -13,7 +13,7 @@
spawn(75)
if(!host.ckey && !host.client)
host.death() // This seems redundant, but a lot of mobs don't
host.stat = 2 // handle death() properly. Better safe than etc.
host.stat = DEAD // handle death() properly. Better safe than etc.
host.visible_message("<span class='danger'>[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.</span>")
var/total_yield = rand(1,3)
@@ -1,7 +1,7 @@
#define DEFAULT_SEED "glowshroom"
#define VINE_GROWTH_STAGES 5
/proc/spacevine_infestation()
/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15)
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
@@ -14,8 +14,15 @@
var/turf/simulated/floor/T = pick(turfs)
var/datum/seed/seed = plant_controller.create_random_seed(1)
seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines.
seed.set_trait(TRAIT_POTENCY,rand(70,100)) // Guarantee a wide spread and powerful effects.
new /obj/effect/plant(T,seed)
seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects.
seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max))
//make vine zero start off fully matured
var/obj/effect/plant/vine = new(T,seed)
vine.health = vine.max_health
vine.mature_time = 0
vine.process()
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")
/obj/effect/dead_plant
@@ -56,6 +63,7 @@
var/spread_chance = 40
var/spread_distance = 3
var/evolve_chance = 2
var/mature_time
var/last_tick = 0
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
@@ -114,7 +122,8 @@
if(max_growth > 2 && prob(50))
max_growth-- //Ensure some variation in final sprite, makes the carpet of crap look less wonky.
spread_chance = seed.get_trait(TRAIT_POTENCY) * 4
mature_time = world.time + seed.get_trait(TRAIT_MATURATION) + 15 //prevent vines from maturing until at least a few seconds after they've been created.
spread_chance = seed.get_trait(TRAIT_POTENCY) * 3
spread_distance = ((growth_type>0) ? round(spread_chance*0.6) : round(spread_chance*0.3))
update_icon()
@@ -180,7 +189,8 @@
if(growth>2 && growth == max_growth)
layer = 5
opacity = 1
if(seed.get_trait(TRAIT_SPREAD) == 2)
opacity = 1
if(!isnull(seed.chems["woodpulp"]))
density = 1
else
@@ -257,4 +267,4 @@
die_off()
/obj/effect/plant/proc/is_mature()
return (health >= (max_health/3))
return (health >= (max_health/3) && world.time > mature_time)
@@ -72,7 +72,10 @@
update_neighbors()
if(is_mature() && neighbors.len && prob(spread_chance))
for(var/i=1,i<=seed.get_trait(TRAIT_YIELD),i++)
//spread to 1-3 adjacent turfs depending on yield trait.
var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3)
for(var/i in 1 to max_spread)
if(prob(spread_chance))
sleep(rand(3,5))
if(!neighbors.len)
@@ -7,8 +7,11 @@
if(!istype(M))
return
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/2))))
entangle(M)
if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
spawn(1)
entangle(M)
/obj/effect/plant/attack_hand(mob/user as mob)
// Todo, cause damage.
@@ -60,13 +63,11 @@
if(buckled_mob)
return
if(!Adjacent(victim))
if(victim.buckled)
return
victim.buckled = src
victim.update_canmove()
buckled_mob = victim
if(!victim.anchored && !victim.buckled && victim.loc != get_turf(src))
//grabbing people
if(!victim.anchored && Adjacent(victim) && victim.loc != get_turf(src))
var/can_grab = 1
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
@@ -75,4 +76,10 @@
if(can_grab)
src.visible_message("<span class='danger'>Tendrils lash out from \the [src] and drag \the [victim] in!</span>")
victim.loc = src.loc
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
//entangling people
if(victim.loc == src.loc)
victim.buckled = src
victim.update_canmove()
buckled_mob = victim
victim << "<span class='danger'>Tendrils [pick("wind", "tangle", "tighten")] around you!</span>"
+18
View File
@@ -830,3 +830,21 @@
closed_system = !closed_system
user << "You [closed_system ? "close" : "open"] the tray's lid."
update_icon()
/obj/machinery/portable_atmospherics/hydroponics/verb/eject_tank_verb()
set name = "Eject Internal Tank"
set category = "Object"
set src in view(1)
eject_tank(usr)
/obj/machinery/portable_atmospherics/hydroponics/proc/eject_tank(var/mob/living/user)
if(!user || user.stat || user.restrained())
return
if(!holding)
usr << "\red There is no tank loaded into the [src] to eject."
if(istype(holding, /obj/item/weapon/tank))
usr << "\blue You eject the [holding.name] from the [src]."
holding.loc = loc
holding = null
@@ -9,6 +9,8 @@
/obj/machinery/portable_atmospherics/hydroponics/soil/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/weapon/tank))
return
else if(istype(O,/obj/item/weapon/crowbar))
return
else
..()
@@ -17,6 +19,7 @@
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/remove_label
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/eject_tank_verb
/obj/machinery/portable_atmospherics/hydroponics/soil/CanPass()
return 1
+61 -1
View File
@@ -301,6 +301,7 @@
throw_speed = 2
throw_range = 3
w_class = 4.0
var/extend = 1
flags = NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
@@ -309,12 +310,71 @@
/obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(istype(A, /obj/effect/plant))
if(istype(A, /obj/effect/plant) && extend == 1)
for(var/obj/effect/plant/B in orange(A,1))
if(prob(80))
B.die_off(1)
qdel(A)
/obj/item/weapon/scythe/tele
icon_state = "tscythe0"
name = "telescopic scythe"
desc = "A sharp and curved blade on a collapsable fibremetal handle, this tool is the pinnacle of covert reaping technology."
force = 3.0
sharp = 0
edge = 0
throw_speed = 2
throw_range = 3
w_class = 2.0
extend = 0
flags = NOSHIELD
slot_flags = SLOT_BELT
origin_tech = "materials=3;combat=3"
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = "swing_hit"
/obj/item/weapon/scythe/tele/attack_self(mob/user as mob)
extend = !extend
if(extend)
user << "<span class ='warning'>With a flick of the wrist, you extend the scythe. It's reaping time!</span>"
icon_state = "tscythe1"
item_state = "scythe0"
slot_flags &= ~SLOT_BELT
w_class = 4 //doesnt fit in backpack when its on for balance
force = 13 //normal scythe damage
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/bladeslice.ogg'
//Extend sound (blade unsheath)
playsound(src.loc, 'sound/weapons/blade_unsheath.ogg', 50, 1) //Sound credit to Qat of Freesound.org
else
user << "<span class ='notice'>You collapse the scythe, folding it for easy storage.</span>"
icon_state = "tscythe0"
item_state = "tscythe0" //no sprite in other words
slot_flags |= SLOT_BELT
w_class = 2
force = 3 //not so robust now
attack_verb = list("hit", "poked")
hitsound = "swing_hit"
//Collapse sound (blade sheath)
playsound(src.loc, 'sound/weapons/blade_sheath.ogg', 50, 1) //Sound credit to Q.K. of Freesound.org
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
if (!blood_DNA) return
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
var/icon/I = new /icon(src.icon, src.icon_state)
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
blood_overlay = I
overlays += blood_overlay
return
/obj/item/weapon/rsp
name = "\improper Rapid-Seed-Producer (RSP)"
desc = "A device used to rapidly deploy seeds."