Merge pull request #6 from CHOMPstation/master

Master merge
This commit is contained in:
Sharkmare
2019-03-20 00:20:54 +01:00
committed by GitHub
11 changed files with 308 additions and 24 deletions
+38 -5
View File
@@ -521,6 +521,11 @@
set_trait(TRAIT_WATER_CONSUMPTION, get_trait(TRAIT_WATER_CONSUMPTION) +rand(-degree,degree),50,0)
set_trait(TRAIT_JUICY, !get_trait(TRAIT_JUICY))
set_trait(TRAIT_STINGS, !get_trait(TRAIT_STINGS))
if(prob(5))
consume_gasses = list()
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
consume_gasses[gas] = rand(3,9)
source_turf.visible_message("<span class='notice'>\The [display_name] seems to be drawing in air.</span>")
if(2)
set_trait(TRAIT_IDEAL_HEAT, get_trait(TRAIT_IDEAL_HEAT) + (rand(-5,5)*degree),800,70)
set_trait(TRAIT_HEAT_TOLERANCE, get_trait(TRAIT_HEAT_TOLERANCE) + (rand(-5,5)*degree),800,70)
@@ -534,34 +539,59 @@
set_trait(TRAIT_TOXINS_TOLERANCE, get_trait(TRAIT_TOXINS_TOLERANCE)+(rand(-2,2)*degree),10,0)
if(5)
set_trait(TRAIT_WEED_TOLERANCE, get_trait(TRAIT_WEED_TOLERANCE)+(rand(-2,2)*degree),10, 0)
if(prob(5))
if(prob(10))
set_trait(TRAIT_CARNIVOROUS, get_trait(TRAIT_CARNIVOROUS)+rand(-degree,degree),2, 0)
if(get_trait(TRAIT_CARNIVOROUS))
source_turf.visible_message("<span class='notice'>\The [display_name] shudders hungrily.</span>")
if(6)
set_trait(TRAIT_WEED_TOLERANCE, get_trait(TRAIT_WEED_TOLERANCE)+(rand(-2,2)*degree),10, 0)
if(prob(5))
if(prob(10))
set_trait(TRAIT_PARASITE,!get_trait(TRAIT_PARASITE))
if(prob(10))
var/additional_chems = rand(1,3)
if(additional_chems)
var/list/banned_chems = list(
"adminordrazine",
"nutriment"
)
for(var/x=1;x<=additional_chems;x++)
var/new_chem = pick(chemical_reagents_list)
if(new_chem in banned_chems)
continue
banned_chems += new_chem
chems[new_chem] = list(rand(1,10),rand(10,20))
source_turf.visible_message("<span class='notice'>\The [display_name] produce seems to be different!</span>")
if(7)
if(get_trait(TRAIT_YIELD) != -1)
set_trait(TRAIT_YIELD, get_trait(TRAIT_YIELD)+(rand(-2,2)*degree),10,0)
if(prob(5))
exude_gasses = list()
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
exude_gasses[gas] = rand(3,9)
source_turf.visible_message("<span class='notice'>\The [display_name] seems to be releasing gas.</span>")
if(8)
set_trait(TRAIT_ENDURANCE, get_trait(TRAIT_ENDURANCE)+(rand(-5,5)*degree),100,10)
set_trait(TRAIT_PRODUCTION, get_trait(TRAIT_PRODUCTION)+(rand(-1,1)*degree),10, 1)
set_trait(TRAIT_POTENCY, get_trait(TRAIT_POTENCY)+(rand(-15,20)*degree),200, 0)
if(prob(5))
if(prob(10))
set_trait(TRAIT_SPREAD, get_trait(TRAIT_SPREAD)+rand(-1,1),2, 0)
source_turf.visible_message("<span class='notice'>\The [display_name] spasms visibly, shifting in the tray.</span>")
if(9)
set_trait(TRAIT_MATURATION, get_trait(TRAIT_MATURATION)+(rand(-1,1)*degree),30, 0)
if(prob(5))
if(prob(10))
set_trait(TRAIT_HARVEST_REPEAT, !get_trait(TRAIT_HARVEST_REPEAT))
source_turf.visible_message("<span class='notice'>\The [display_name] quivers in its tray, its produce looks more harvestable.</span>")
if(10)
if(prob(10))
set_trait(TRAIT_BIOLUM, !get_trait(TRAIT_BIOLUM))
if(get_trait(TRAIT_BIOLUM))
source_turf.visible_message("<span class='notice'>\The [display_name] begins to glow!</span>")
if(prob(25))
if(prob(50))
set_trait(TRAIT_BIOLUM_COLOUR,"#[get_random_colour(0,75,190)]")
source_turf.visible_message("<span class='notice'>\The [display_name]'s glow </span><font color='[get_trait(TRAIT_BIOLUM_COLOUR)]'>changes colour</font>!")
else
@@ -571,6 +601,9 @@
if(11)
set_trait(TRAIT_TELEPORTING,1)
if(prob(5))
set_trait(TRAIT_ALTER_TEMP,rand(-5,5))
source_turf.visible_message("<span class='notice'>\The air around the [display_name]'s seems to be of a different temperature...</span>")
return
+12
View File
@@ -866,6 +866,7 @@
name = "wheat"
seed_name = "wheat"
display_name = "wheat stalks"
mutants = list("meatwheat")
chems = list("nutriment" = list(1,25), "flour" = list(15,15))
kitchen_tag = "wheat"
@@ -881,6 +882,17 @@
set_trait(TRAIT_PLANT_ICON,"stalk2")
set_trait(TRAIT_IDEAL_LIGHT, 6)
set_trait(TRAIT_NUTRIENT_CONSUMPTION, 0.15)
/datum/seed/wheat/meatwheat
name = "meatwheat"
seed_name = "meatwheat"
display_name = "meatwheat stalks"
mutants = null
chems = list("nutriment" = list(1,25), "protein" = list(4,10))
/datum/seed/wheat/meatwheat/New()
..()
set_trait(TRAIT_PRODUCT_COLOUR,"#440000")
/datum/seed/rice
name = "rice"
+3
View File
@@ -154,6 +154,9 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds)
/obj/item/seeds/wheatseed
seed_type = "wheat"
/obj/item/seeds/meatwheatseed
seed_type = "meatwheat"
/obj/item/seeds/riceseed
seed_type = "rice"
@@ -125,8 +125,8 @@ var/list/mob_hat_cache = list()
add_language("Drone Talk", 1)
//They are unable to be upgraded, so let's give them a bit of a better battery.
cell.maxcharge = 10000
cell.charge = 10000
cell.maxcharge = 20000 //Original val 10000, doubled for ease of use of powertransmission circuit.
cell.charge = 20000
// NO BRAIN.
mmi = null
@@ -430,3 +430,18 @@ var/list/mob_hat_cache = list()
chassis = possible_chassis[choice]
verbs |= /mob/living/proc/hide
//POWER Transmission code
/mob/living/silicon/robot/drone/proc/transmitpower(var/power=250)
set category ="Robot Commands"
set name = "Transmit Power"
power = input(usr, "How much would you like to transmit? Keep in mind this is multiplied for each cell near you.", "Power Transmission", null)
if(power<=0 || power>=cell.maxcharge || power>=cell.charge) return //Safeties to not kill ourselves, also safeties to not use this to drain.
for(var/obj/item/weapon/cell/remotecell in range(1, src)) //assuming 1 = 1 tile next to us, if this works will lower to 0
if(power>=cell.charge) return //rechecking our initial safety so if we mass charge we dont die.
var/newcharge = remotecell.charge + power //What the battery is at after charge
if(newcharge<=remotecell.maxcharge) //Making sure we arent wasting power
remotecell.give(power) //give is a proc native to cells that increases charge and updates the iconstate if needed
cell.give(-power)//TO BE TESTED, no idea if negative give works, once i've tested this i'll add this as a verb-shark
else return
@@ -23,17 +23,42 @@
holder_type = /obj/item/weapon/holder/drone
//var/selected_icon = null //Can be compared to "Wideborg" will tell us in the future if we ar eusing non standardized icon.
/mob/living/silicon/robot/drone/unify/powerengineering
law_type = /datum/ai_laws/powerbank_drone
icon_state = "constructiondrone"
module_type = /obj/item/weapon/robot_module/drone/powerbank
////////////////////////////////////////
//DRONE MODULES
////////////////////////////////////////
/obj/item/weapon/robot_module/drone/unify
//yup this is nothing for now until we build more drone versions
/obj/item/weapon/robot_module/drone/powerbank
name = "Engineering Power drone module"
hide_on_manifest = 1
channels = list("Engineering" = 1)
languages = list()
/obj/item/weapon/robot_module/drone/powerbank/New() //Trading in the RCD for a Powergenerating device
..()
src.modules += new /obj/item/device/dogborg/sleeper/compactor/drone(src)
////////////////////////////////////////
//DRONE LAWS
////////////////////////////////////////
//TODO: Remake drone laws, Add subroutine clause "If no maintenance are active nor maintenance crew your duties include maintenance"
//TODO: Unify Drone law system, might be impossible due to how the ..() are structured may need to look into how to add additional laws if add_inherent fails.
/datum/ai_laws/powerbank_drone
name = "Power Protocols"
law_header = "Power Protocols"
/datum/ai_laws/powerbank_drone/New()
add_inherent_law("Do not interfere with the construction work of non-drones whenever possible.")
add_inherent_law("Repair, refit upgrade and restore power to your assigned vessel.")
add_inherent_law("Prevent unplanned damage to your assigned vessel wherever possible.")
..()
////////////////////////////////////////
//DRONE HELLO WORLD
@@ -45,7 +70,14 @@
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
src << "<b>You do not follow orders from anyone; not the AI, not humans, and not other synthetics.</b>."
/mob/living/silicon/robot/drone/powerbank/welcome_drone()
src << "<b>You are a power restoration drone, an autonomous engineering and fabrication system.</b>."
src << "You are assigned to a Sol Central construction project. The name is irrelevant. Your task is to complete power restoration and subsystem integration as soon as possible."
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
src << "<b>You do not follow orders from anyone; not the AI, not humans, and not other synthetics.</b>."
/mob/living/silicon/robot/drone/unify/powerengineering/init()
..()
flavor_text = "It's a bulky engineering drone stamped with a Sol Central glyph."
////////////////////////////////////////
//DRONE ITEMS (mostly mods of other items)
////////////////////////////////////////
@@ -67,6 +99,14 @@
/obj/machinery/computer/drone_control/mining
req_access = list(access_mining)
/obj/item/device/dogborg/sleeper/compactor/drone //Janihound gut. But for drones to generate power from garbage
name = "Minor Biocombustion Engine"
desc = "A mounted garbage compactor unit with fuel processor."
icon_state = "compactor"
injection_chems = null //So they don't have all the same chems as the medihound!
compactor = TRUE
max_item_count = 50 //Douibled since its purpose is garbage combustion
////////////////////////////////////////
//DRONE FABRICATOR, ONE FOR ALL SYSTEM.
////////////////////////////////////////
@@ -78,6 +118,7 @@
drone_type = null //Gonna try to set this later
var/list/possible_drones = list("UNIFY Module (Same as Maintenance)" = /mob/living/silicon/robot/drone/unify,
"Construction Module" = /mob/living/silicon/robot/drone/construction,
"Power Restoration Module" = /mob/living/silicon/robot/drone/unify/powerengineering,
"Mining Module" = /mob/living/silicon/robot/drone/mining,
"Security Module" = /mob/living/silicon/robot/drone/security,
"Maintenance Module" = /mob/living/silicon/robot/drone,)
@@ -86,6 +127,15 @@
//DRONE PROCS
////////////////////////////////////////
//Drone Drone Procs
/mob/living/silicon/robot/drone/unify/powerengineering/New()
..()
cell.maxcharge = 100000
cell.charge = 100000
verbs |= /mob/living/silicon/robot/drone/proc/transmitpower
/mob/living/silicon/robot/drone/unify/powerengineering/updatename()
real_name = "engineering drone ([rand(100,999)])"
name = real_name
/mob/living/silicon/robot/drone/unify/updatename()
real_name = "Unified Drone Module ([rand(100,999)])" //UDMs, sounds kinda nice, maybe call them this Lore wise?
name = real_name
@@ -10,7 +10,9 @@
icon_state = "basic"
icon_living = "basic"
icon_dead = "basic"
var/zergoverride=0
faction = "hivebot"
intelligence_level = SA_ROBOTIC
maxHealth = 3 LASERS_TO_KILL
@@ -137,12 +139,13 @@
/mob/living/simple_animal/hostile/hivebot/death()
..()
visible_message("<b>[src]</b> blows apart!")
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
qdel(src)
if(!zergoverride)//CHOMPEDIT OVerriding death for zerg
visible_message("<b>[src]</b> blows apart!")
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
qdel(src)
/mob/living/simple_animal/hostile/hivebot/speech_bubble_appearance()
return "synthetic_evil"
@@ -0,0 +1,74 @@
//Hivebot based zergs woo
#define LASERS_TO_KILL *30 //Explanation in hivebot.dm
/mob/living/simple_animal/hostile/hivebot/zerg //Base Zerg template
name = "zerg template"
desc = "The Zerg Swarm is a terrifying and ruthless amalgamation of biologically advanced, arthropodal aliens. Dedicated to the pursuit of genetic perfection."
faction = "zerg"
speed = 2
melee_damage_lower = 2
melee_damage_upper = 2
zergoverride = 1
projectilesound = 'sound/effects/splat.ogg'
projectiletype = /obj/item/projectile/energy/acid
speak = list("For the Hive!",)
emote_hear = list()
emote_see = list("looks around the area", "turns from side to side")
say_understood = list("Affirmative.", "Positive.")
say_cannot = list("Denied.", "Negative.")
say_maybe_target = list("Possible threat detected. Investigating.", "Motion detected.", "Investigating.")
say_got_target = list("Threat detected.", "Threat removal engaged.", "Engaging target.")
var/zerg_types = list("Zerg Drone" = /mob/living/simple_animal/hostile/hivebot/zerg/worker,)
/mob/living/simple_animal/hostile/hivebot/zerg/isSynthetic()
return FALSE
/mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve()
//TODDO MAke this work nicely
set name = "EVOLVE"
set desc = "Performs larva evolution."
set category = "Abilities"
var/location = get_turf(src)
chosentype = input(usr,"What type would you like to be?") as null|anything in zerg_types
if(!chosentype) return
if(!src.ckey)
death()
qdel(src)
new /mob/living/simple_animal/hostile/hivebot/zerg/worker(location)
else
var/myuser = src.key
death()
qdel(src)
var/mob/living/simple_animal/hostile/newmob = new chosentype(location)
newmob.ckey = myuser
/mob/living/simple_animal/hostile/hivebot/zerg/larva
name = "zerg larva"
desc = "Larva are a fundamental zerg type, able to turn into other types"
melee_damage_lower = 0
melee_damage_upper = 0
maxHealth = 0.2 LASERS_TO_KILL
health = 0.2 LASERS_TO_KILL
var/chosentype = null
/mob/living/simple_animal/hostile/hivebot/zerg/larva/Life()
..()
/mob/living/simple_animal/hostile/hivebot/zerg/larva/New()
..()
verbs |= /mob/living/simple_animal/hostile/hivebot/zerg/larva/proc/evolve
/mob/living/simple_animal/hostile/hivebot/zerg/larva/initialize()
spawn(1200)
if(!src.ckey)
evolve()
/mob/living/simple_animal/hostile/hivebot/zerg/worker
name = "Zerg Drone"
desc = "Drones are fundamental to economic and tech development, as they harvest resources and construct buildings."
maxHealth = 1 LASERS_TO_KILL
health = 1 LASERS_TO_KILL
melee_damage_lower = 1
melee_damage_upper = 1
@@ -95,6 +95,7 @@
/mob/living/simple_animal/hostile/tarrasque/mrx
icon = 'icons/mob/64x64.dmi'
name = "Entity X"
pixel_x = -15
desc = "The call of the abyss manifested. Doors have proven inefective against it."
hasdrops = 0
health = 2000
@@ -106,11 +107,15 @@
size_multiplier = 1.5
icon_state = "arachnid"
icon_living = "arachnid"
icon_dead = "arachnid_dead"
//icon_dead = "arachnid_dead"
icon_dead = "arachnid_stunned" //Same as dead but no blood
icon_rest = "arachnid_sleeping"
tt_desc = "Unknown Specimen"
attacktext = list("whacks","slashes","smashes")
melee_damage_lower = 0 //huh not so bad
melee_damage_upper = 50 //oh, oh no
universal_speak = 1
var/alang = LANGUAGE_GALCOM
armor = list(
"melee" = 99,
"bullet" = 99,
@@ -119,28 +124,88 @@
"bomb" = 99,
"bio" = 100,
"rad" = 100)
//Vore stuff
vore_active = 1
vore_capacity = 2
vore_pounce_chance = 10 //Rare
vore_default_flags = null
vore_default_mode = DM_DIGEST
vore_standing_too = 1
vore_icons = SA_ICON_LIVING | SA_ICON_REST
/mob/living/simple_animal/hostile/tarrasque/mrx/init_vore()
..()
var/obj/belly/B = vore_selected
B.digest_burn = 10 //Normally this can only be 6 but since we are in code we can override this to be 10 so we dont need brute.
B.digest_brute = 0
/mob/living/simple_animal/hostile/tarrasque/mrx/New()
..()
update_icon()
seedarkness = 0
src.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
add_language("Xenomorph")
verbs |= /mob/living/simple_animal/hostile/tarrasque/mrx/proc/hackervoice
verbs |= /mob/living/simple_animal/hostile/tarrasque/mrx/proc/scarethelights
/mob/living/simple_animal/hostile/tarrasque/mrx/Life()
..()
if(resting)
if(resting && !client)
resting = !resting
update_icon()
if (anchored)
set_light(l_range = 1.5, l_power = 2, l_color = COLOR_RED)
for(var/obj/machinery/door/airlock/door in range(3, src))
door.open(1)
door.lock(1)
if(!client)
for(var/obj/machinery/door/airlock/door in range(3, src))
door.open(1)
door.lock(1)
if(buckled)
resist()
buckled = null
//time for special MR X kick you in the shins and stands there code
/mob/living/simple_animal/hostile/tarrasque/mrx/DoPunch(var/atom/A)
. = ..()
if(.) // If we succeeded in hitting.
if(alang==LANGUAGE_GALCOM)
alang="Xenomorph"
else if(alang=="Xenomorph")
alang=LANGUAGE_GALCOM
for(var/obj/machinery/light/light in range(5, src))
light.flicker(10)
if(istype(A,/turf/simulated/wall))
var/turf/simulated/wall/wall = A
wall.dismantle_wall(null,null,1)
if(isliving(A))
src.say("Run tasty treat, run~", alang,"chitters") //may hiss may not, balanced
var/mob/living/L = A
L.Weaken(5)
stop_automated_movement = 1
anchored = 1
hostile = 0
spawn(100)
stop_automated_movement = 0
anchored = 0
hostile = 1
/mob/living/simple_animal/hostile/tarrasque/mrx/handle_regular_hud_updates()
..()
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
/////////////////////////////////////////
//////////////Special EX PRocs go here // Mostly for playercontrolled stuff
/////////////////////////////////////////
/mob/living/simple_animal/hostile/tarrasque/mrx/proc/hackervoice()
set name = "Door Override"
set desc = "Hacker Voice: Im in"
set category = "X Powers"
for(var/obj/machinery/door/airlock/door in range(5, src))
door.open(1)
door.lock(1)
/mob/living/simple_animal/hostile/tarrasque/mrx/proc/scarethelights()
set name = "Light Flicker"
set desc = "Hacker Voice: Im in"
set category = "X Powers"
for(var/obj/machinery/light/light in range(5, src))
light.flicker(2)