Merge pull request #2779 from Fox-McCloud/nettles

Re-Adds Weapon Based Nettles and Ports Glowcaps, holy water, and salpetre (hydro)
This commit is contained in:
TheDZD
2015-12-09 17:28:34 -05:00
11 changed files with 166 additions and 52 deletions

View File

@@ -56,4 +56,5 @@
#define TRAIT_BIOLUM 36
#define TRAIT_BIOLUM_COLOUR 37
#define TRAIT_IMMUTABLE 38
#define TRAIT_RARITY 39
#define TRAIT_RARITY 39
#define TRAIT_BATTERY_RECHARGE 40

View File

@@ -258,7 +258,7 @@
whitelist = list(/obj/item/weapon/banhammer,/obj/item/weapon/sord,/obj/item/weapon/butch,/obj/item/weapon/claymore,/obj/item/weapon/holo/esword,
/obj/item/weapon/flamethrower,/obj/item/weapon/grenade,/obj/item/weapon/gun,/obj/item/weapon/hatchet,/obj/item/weapon/katana,
/obj/item/weapon/kitchenknife,/obj/item/weapon/melee,/obj/item/weapon/nullrod,/obj/item/weapon/pickaxe,/obj/item/weapon/twohanded,
/obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/deathnettle)
/obj/item/weapon/c4,/obj/item/weapon/scalpel,/obj/item/weapon/shield,/obj/item/weapon/grown/nettle/death)
/datum/cargoprofile/tools
name = "Devices & Tools"

View File

@@ -429,6 +429,22 @@
user.put_in_hands(NF)
qdel(src)
return
if("nettle")
var/obj/item/weapon/grown/nettle/nettle = new /obj/item/weapon/grown/nettle(user.loc)
nettle.force = round((5 + potency / 5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(nettle)
qdel(src)
return
if("deathnettle")
var/obj/item/weapon/grown/nettle/death/DN = new /obj/item/weapon/grown/nettle/death(user.loc)
DN.force = round((5 + potency / 2.5), 1)
user << "You straighten up the plant."
user.unEquip(src)
user.put_in_hands(DN)
qdel(src)
return
if("cashpod")
user << "You crack open the cash pod..."
var/value = round(seed.get_trait(TRAIT_POTENCY))
@@ -475,4 +491,21 @@
return
reagents.remove_any(rand(1,3)) //Todo, make it actually remove the reagents the seed uses.
seed.do_thorns(H,src)
seed.do_sting(H,src,pick("r_hand","l_hand"))
seed.do_sting(H,src,pick("r_hand","l_hand"))
/obj/item/weapon/reagent_containers/food/snacks/grown/On_Consume()
if(seed && seed.get_trait(TRAIT_BATTERY_RECHARGE))
if(!reagents.total_volume)
var/batteries_recharged = 0
for(var/obj/item/weapon/stock_parts/cell/C in usr.GetAllContents())
var/newcharge = (potency*0.01)*C.maxcharge
if(C.charge < newcharge)
C.charge = newcharge
if(isobj(C.loc))
var/obj/O = C.loc
O.update_icon() //update power meters and such
batteries_recharged = 1
if(batteries_recharged)
usr << "<span class='notice'>Battery has recovered.</span>"
..()

View File

@@ -32,28 +32,77 @@
rtotal += round(potency/reagent_data[2])
reagents.add_reagent(rid,max(1,rtotal))
/obj/item/weapon/grown/deathnettle // -- Skie
plantname = "deathnettle"
desc = "The \red glowing \black nettle incites \red<B>rage</B>\black in you just from looking at it!"
/obj/item/weapon/grown/nettle //abstract type
name = "nettle"
desc = "It's probably <B>not</B> wise to touch it with bare hands..."
icon = 'icons/obj/weapons.dmi'
name = "deathnettle"
icon_state = "deathnettle"
icon_state = "nettle"
damtype = "fire"
force = 30
throwforce = 1
w_class = 2.0
force = 15
hitsound = 'sound/weapons/bladeslice.ogg'
throwforce = 5
w_class = 1
throw_speed = 1
throw_range = 3
origin_tech = "combat=3"
origin_tech = "combat=1"
attack_verb = list("stung")
New()
..()
spawn(5)
force = round((5+potency/2.5), 1)
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is eating some of the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|TOXLOSS)
/obj/item/weapon/grown/nettle/pickup(mob/living/user)
if(!iscarbon(user))
return 0
var/mob/living/carbon/C = user
if(ishuman(user))
var/mob/living/carbon/human/H = C
if(H.gloves)
return 0
var/organ = ((user.hand ? "l_":"r_") + "arm")
var/obj/item/organ/external/affecting = H.get_organ(organ)
if(affecting.take_damage(0,force))
user.UpdateDamageIcon()
else
C.take_organ_damage(0,force)
C << "<span class='userdanger'>The nettle burns your bare hand!</span>"
return 1
/obj/item/weapon/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity)
if(!proximity) return
if(force > 0)
force -= rand(1, (force / 3) + 1) // When you whack someone with it, leaves fall off
else
usr << "All the leaves have fallen off the nettle from violent whacking."
usr.unEquip(src)
qdel(src)
/obj/item/weapon/grown/nettle/death
name = "deathnettle"
desc = "The <span class='danger'>glowing</span> \black nettle incites <span class='boldannounce'>rage</span>\black in you just from looking at it!"
icon_state = "deathnettle"
force = 30
throwforce = 15
origin_tech = "combat=3"
/obj/item/weapon/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
user.Paralyse(5)
user << "<span class='userdanger'>You are stunned by the Deathnettle when you try picking it up!</span>"
/obj/item/weapon/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
if(!..()) return
if(istype(M, /mob/living))
M << "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>"
add_logs(M, user, "attacked", src)
M.eye_blurry += force/7
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
M.drop_item()
/obj/item/weapon/corncob
name = "corn cob"

View File

@@ -43,4 +43,7 @@
plantname = "aloe"
/obj/item/weapon/reagent_containers/food/snacks/grown/comfrey
plantname = "comfrey"
plantname = "comfrey"
/obj/item/weapon/reagent_containers/food/snacks/grown/glowcap
plantname = "glowcap"

View File

@@ -42,6 +42,7 @@
set_trait(TRAIT_MATURATION, 0) // Time taken before the plant is mature.
set_trait(TRAIT_PRODUCTION, 0) // Time before harvesting can be undertaken again.
set_trait(TRAIT_TELEPORTING, 0) // Uses the bluespace tomato effect.
set_trait(TRAIT_BATTERY_RECHARGE, 0) // Used for glowcaps; recharges batteries on a user.
set_trait(TRAIT_BIOLUM, 0) // Plant is bioluminescent.
set_trait(TRAIT_ALTER_TEMP, 0) // If set, the plant will periodically alter local temp by this amount.
set_trait(TRAIT_PRODUCT_ICON, 0) // Icon to use for fruit coming from this plant.
@@ -675,7 +676,7 @@
P.values["[TRAIT_EXUDE_GASSES]"] = exude_gasses
traits_to_copy = list(TRAIT_POTENCY)
if(GENE_OUTPUT)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM)
traits_to_copy = list(TRAIT_PRODUCES_POWER,TRAIT_BIOLUM,TRAIT_BATTERY_RECHARGE)
if(GENE_ATMOSPHERE)
traits_to_copy = list(TRAIT_HEAT_TOLERANCE,TRAIT_LOWKPA_TOLERANCE,TRAIT_HIGHKPA_TOLERANCE)
if(GENE_HARDINESS)

View File

@@ -132,6 +132,7 @@
chems = list("plantmatter" = list(1,50), "sacid" = list(0,1))
kitchen_tag = "nettle"
preset_icon = "nettle"
final_form = 0
/datum/seed/nettle/New()
..()
@@ -654,7 +655,7 @@
name = "glowshroom"
seed_name = "glowshroom"
display_name = "glowshrooms"
mutants = null
mutants = list("glowcap")
chems = list("radium" = list(1,20))
preset_icon = "glowshroom"
@@ -672,6 +673,20 @@
set_trait(TRAIT_PLANT_ICON,"mushroom7")
set_trait(TRAIT_RARITY,20)
/datum/seed/mushroom/glowshroom/glowcap
name = "glowcap"
seed_name = "glowcap"
display_name = "glowcaps"
mutants = null
preset_icon = "glowcap"
/datum/seed/mushroom/glowshroom/glowcap/New()
..()
set_trait(TRAIT_BIOLUM_COLOUR,"#8E0300")
set_trait(TRAIT_PRODUCT_COLOUR,"#C65680")
set_trait(TRAIT_PLANT_COLOUR,"#B72D68")
set_trait(TRAIT_BATTERY_RECHARGE,1)
/datum/seed/mushroom/plastic
name = "plastic"
seed_name = "plastellium"

View File

@@ -179,6 +179,9 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/glowshroom
seed_type = "glowshroom"
/obj/item/seeds/glowcap
seed_type = "glowcap"
/obj/item/seeds/plumpmycelium
seed_type = "plumphelmet"

View File

@@ -92,39 +92,41 @@
"adminordrazine" = -5
)
var/global/list/water_reagents = list(
"water" = 1,
"adminordrazine" = 1,
"milk" = 0.9,
"beer" = 0.7,
"fluorine" = -0.5,
"chlorine" = -0.5,
"phosphorus" = -0.5,
"water" = 1,
"sodawater" = 1,
"fishwater" = 1,
"water" = list(1, 0),
"adminordrazine" = list(1, 0),
"milk" = list(0.9, 0),
"beer" = list(0.7, 0),
"fluorine" = list(-0.5, 0),
"chlorine" = list(-0.5, 0),
"phosphorus" = list(-0.5, 0),
"water" = list(1, 0),
"sodawater" = list(1, 0),
"fishwater" = list(1, 0),
"holywater" = list(1, 0.1),
)
// Beneficial reagents also have values for modifying yield_mod and mut_mod (in that order).
var/global/list/beneficial_reagents = list(
// "reagent" = list(health, yield_Mod, mut_mod),
"beer" = list( -0.05, 0, 0 ),
"fluorine" = list( -2, 0, 0 ),
"chlorine" = list( -1, 0, 0 ),
"phosphorus" = list( -0.75, 0, 0 ),
"sodawater" = list( 0.1, 0, 0 ),
"sacid" = list( -1, 0, 0 ),
"facid" = list( -2, 0, 0 ),
"atrazine" = list( -2, 0, 0.2),
"cryoxadone" = list( 3, 0, 0 ),
"ammonia" = list( 0.5, 0, 0 ),
"diethylamine" = list( 1, 0, 0 ),
"nutriment" = list( 0.25, 0.15, 0 ),
"protein" = list( 0.25, 0.15, 0 ),
"plantmatter" = list( 0.25, 0.15, 0 ),
"radium" = list( -1.5, 0, 0.2),
"adminordrazine" = list( 1, 1, 1 ),
"robustharvest" = list( 0, 0.2, 0 ),
"left4zed" = list( 0, 0, 0.2)
// "reagent" = list(health, yield_Mod, mut_mod, production, potency),
"beer" = list( -0.05, 0, 0, 0, 0),
"fluorine" = list( -2, 0, 0, 0, 0),
"chlorine" = list( -1, 0, 0, 0, 0),
"phosphorus" = list( -0.75, 0, 0, 0, 0),
"sodawater" = list( 0.1, 0, 0, 0, 0),
"sacid" = list( -1, 0, 0, 0, 0),
"facid" = list( -2, 0, 0, 0, 0),
"atrazine" = list( -2, 0, 0.2, 0, 0),
"cryoxadone" = list( 3, 0, 0, 0, 0),
"ammonia" = list( 0.5, 0, 0, 0, 0),
"diethylamine" = list( 1, 0, 0, 0, 0),
"nutriment" = list( 0.25, 0.15, 0, 0, 0),
"protein" = list( 0.25, 0.15, 0, 0, 0),
"plantmatter" = list( 0.25, 0.15, 0, 0, 0),
"radium" = list( -1.5, 0, 0.2, 0, 0),
"adminordrazine" = list( 1, 1, 1, 0, 0),
"robustharvest" = list( 0, 0.2, 0, 0, 0),
"left4zed" = list( 0, 0, 0.2, 0, 0),
"saltpetre" = list( 0.25, 0, 0, -0.02, 0.01),
)
//--FalseIncarnate
@@ -274,6 +276,9 @@
health += beneficial_reagents[R.id][1] * reagent_total
yield_mod = min(100, yield_mod + (beneficial_reagents[R.id][2] * reagent_total))
mutation_mod += beneficial_reagents[R.id][3] * reagent_total
if(seed.get_trait(TRAIT_PRODUCTION) > 1)
seed.set_trait(TRAIT_PRODUCTION, max(2, seed.get_trait(TRAIT_PRODUCTION) + beneficial_reagents[R.id][4] * reagent_total))
seed.set_trait(TRAIT_POTENCY, min(100, seed.get_trait(TRAIT_POTENCY) + beneficial_reagents[R.id][5] * reagent_total))
// Mutagen is distinct from the previous types and mostly has a chance of proccing a mutation.
@@ -303,9 +308,10 @@
// Handle water and water refilling.
var/water_added = 0
if(water_reagents[R.id])
var/water_input = water_reagents[R.id] * reagent_total
var/water_input = water_reagents[R.id][1] * reagent_total
water_added += water_input
waterlevel += water_input
health += water_reagents[R.id][2] * reagent_total
// Water dilutes toxin level.
if(water_added > 0)

View File

@@ -234,6 +234,9 @@
if(grown_seed.get_trait(TRAIT_PRODUCES_POWER))
dat += "<br>The fruit will function as a battery if prepared appropriately."
if(grown_seed.get_trait(TRAIT_BATTERY_RECHARGE))
dat += "<br>The fruit hums with an odd electrical energy."
if(grown_seed.get_trait(TRAIT_STINGS))
dat += "<br>The fruit is covered in stinging spines."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB