Fixes blobs and other stuff (#1513)

Was supposed to contain a fix for Vaurca surgery, but I decided to greenlight this ASAP once I detected a critical bug with how blobs worked.
Fixes #1509
Fixes #1470
Fixes #1506
Fixes #1501
Fixes #1484
Fixes #1466

Also replaces a lot of Vaurca checks with isvaurca() so that Shells don't start doing weird shit.
This commit is contained in:
LordFowl
2017-01-11 15:24:39 -05:00
committed by skull132
parent a6f87cbde3
commit 3cf94c66fc
17 changed files with 73 additions and 25 deletions

View File

@@ -82,7 +82,7 @@
flick("e_flash", M.flash)
//Vaurca damage 15/01/16
var/mob/living/carbon/human/H = M
if(H.species.get_bodytype() == "Vaurca")
if(isvaurca(H))
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E)
return

View File

@@ -55,7 +55,7 @@
M.Weaken(10)
//Vaurca damage 15/01/16
var/mob/living/carbon/human/H = M
if(H.species.get_bodytype() == "Vaurca")
if(isvaurca(H))
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E)
return

View File

@@ -209,9 +209,9 @@
pack = new /obj/item/weapon/storage/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list("potassium" = 1.5, "nitrogen" = 1.5, "silicon" = 1.5))
fill_cigarre_package(pack, list("potassium" = 1.5, "ammonia" = 1.5, "silicon" = 1.5))
// Mindbreaker
fill_cigarre_package(pack, list("silicon" = 4.5, "hydrogen" = 4.5))
fill_cigarre_package(pack, list("silicon" = 4.5, "hydrazine" = 4.5, "anti_toxin" = 4.5))
pack.desc += " 'MB' has been scribbled on it."

View File

@@ -160,6 +160,7 @@
/obj/proc/hide(var/hide)
invisibility = hide ? INVISIBILITY_MAXIMUM : initial(invisibility)
level = hide ? 1 : initial(level)
/obj/proc/hides_under_flooring()
return level == 1

View File

@@ -12,7 +12,7 @@
/obj/structure/lattice/initialize()
..()
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open)))
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open) || istype(src.loc, /turf/simulated/floor/asteroid)))
///// Z-Level Stuff
qdel(src)
for(var/obj/structure/lattice/LAT in src.loc)

View File

@@ -14,14 +14,13 @@
var/maxHealth = 30
var/health
var/regen_rate = 5
var/regen_rate = 4
var/brute_resist = 4
var/laser_resist = 4 // Special resist for laser based weapons - Emitters or handheld energy weaponry. Damage is divided by this and THEN by fire_resist.
var/fire_resist = 1
var/secondary_core_growth_chance = 10.0 //% chance to grow a secondary blob core instead of whatever was suposed to grown. Secondary cores are considerably weaker, but still nasty.
var/expandType = /obj/effect/blob
var/obj/effect/blob/core/parent_core = null
var/growth_range = 0
var/blob_may_process = 1
var/hangry = 0 //if the blob will attack or not.
@@ -36,13 +35,13 @@
/obj/effect/blob/Destroy()
processing_objects.Remove(src)
parent_core.blob_count -= 1
..()
/obj/effect/blob/process()
if(!parent_core)
src.take_damage(5)
src.regen_rate = -5
src.growth_range = 0
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
return
@@ -53,6 +52,11 @@
if(istype(L, /mob/living/carbon/human))
var/mob/living/carbon/human/H = L
H.ChangeToHusk()
if(!(HUSK in H.mutations))
if(health < maxHealth)
health += rand(10,30)
if(health > maxHealth)
health = maxHealth
else if(istype(L, /mob/living/silicon))
continue
else
@@ -95,7 +99,7 @@
for(var/obj/fire/F in range(src,"3x3")) //very snowflake, but much better than actually coding complex thermodynamics for these fuckers
if(prob(50))
src.visible_message("<span class='danger'>The blob melts away under the heat of the flames!</span>")
src.take_damage(5,10)
src.take_damage(rand(5, 20) / fire_resist)
hangry -= 1
if(hangry < 0)
hangry = 0
@@ -165,7 +169,7 @@
return
if(parent_core)
if(get_dist(T,src) <= parent_core.growth_range)
if(parent_core.blob_count < parent_core.blob_limit)
if(!(locate(/obj/effect/blob/core/) in range(T, 2)) && prob(secondary_core_growth_chance) && (parent_core.core_count < parent_core.core_limit))
var/obj/effect/blob/core/secondary/S = new /obj/effect/blob/core/secondary(T)
S.parent_core = src.parent_core
@@ -173,6 +177,7 @@
else
var/obj/effect/blob/C = new expandType(T)
C.parent_core = src.parent_core
parent_core.blob_count += 1
/obj/effect/blob/proc/pulse(var/forceLeft, var/list/dirs)
regen()
@@ -181,7 +186,7 @@
var/turf/T = get_step(src, pushDir)
var/obj/effect/blob/B = (locate() in T)
if(!B)
if(prob(health+60))
if(prob(health+45))
expand(T)
return
if(forceLeft)
@@ -234,9 +239,11 @@
fire_resist = 2
var/core_count //amount of secondary cores
var/core_limit = 4 //for if a badmin ever wants the station to die, they can set this higher
var/blob_count = 1 //amount of actual blob pieces
var/blob_limit = 150 //9x4+100 + a bit, maximum amount of blobs allowed.
expandType = /obj/effect/blob/shield
growth_range = 10 // Maximal distance for new blob pieces from this core.
/obj/effect/blob/core/New()
if(!parent_core)
@@ -276,7 +283,6 @@
fire_resist = 1
laser_resist = 4
regen_rate = 1
growth_range = 3
expandType = /obj/effect/blob
/obj/effect/blob/core/secondary/New()
@@ -297,7 +303,7 @@
maxHealth = 60
brute_resist = 1
fire_resist = 2
laser_resist = 5
laser_resist = 4
/obj/effect/blob/shield/New()
update_nearby_tiles()

View File

@@ -333,6 +333,10 @@
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight)
siemens_coefficient = 0.5
/obj/item/clothing/suit/storage/vest/New()
..()
pockets.storage_slots = 4 //two slots
/obj/item/clothing/suit/storage/vest/officer
name = "officer armor vest"
desc = "A simple kevlar plate carrier belonging to Nanotrasen. This one has a security holobadge clipped to the chest."
@@ -503,6 +507,7 @@
slowdown = 3
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
siemens_coefficient = 0
pocket_slots = 3
/obj/item/clothing/suit/armor/tdome
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS

View File

@@ -433,6 +433,32 @@
if(!W || !user)
return 0
if (istype(W, /obj/item/stack/rods))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
return
var/obj/item/stack/rods/R = W
if (R.use(1))
user << "<span class='notice'>Constructing support lattice ...</span>"
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
ReplaceWithLattice()
return
if (istype(W, /obj/item/stack/tile/floor))
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
var/obj/item/stack/tile/floor/S = W
if (S.get_amount() < 1)
return
qdel(L)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
S.use(1)
ChangeTurf(/turf/simulated/floor/airless)
return
else
user << "<span class='warning'>The plating is going to need some support.</span>"
return
var/list/usable_tools = list(
/obj/item/weapon/shovel,
/obj/item/weapon/pickaxe/diamonddrill,

View File

@@ -59,6 +59,8 @@
H << "<span class='notice'>You feel your being twine with that of \the [src] as it merges with your biomass.</span>"
H.status_flags |= PASSEMOTES
src << "<span class='notice'>You feel your being twine with that of \the [H] as you merge with its biomass.</span>"
for(var/obj/O in src.contents)
drop_from_inventory(O)
loc = H
else
src << span("warning", "Something went wrong while trying to merge into [H], cancelling.")
@@ -133,6 +135,8 @@
D << "<span class='notice'>You feel your being twine with that of \the [src] as you merge with its biomass.</span>"
src << "<span class='notice'>You feel your being twine with that of \the [D] as it merges with your biomass.</span>"
for(var/obj/O in D.contents)
D.drop_from_inventory(O)
D.loc = src
D.stat = CONSCIOUS

View File

@@ -283,7 +283,7 @@
for(var/obj/item/organ/I in H.internal_organs)
I.robotize()
if(H.species && H.species.get_bodytype() == "Vaurca")
if(isvaurca(H))
for (var/obj/item/organ/external/E in H.organs)
if ((E.status & ORGAN_CUT_AWAY) || (E.status & ORGAN_DESTROYED))
continue

View File

@@ -103,6 +103,7 @@
var/tracking_entities = 0 //The number of known entities currently accessing the internal camera
var/braintype = "Cyborg"
var/intenselight = 0 // Whether cyborg's integrated light was upgraded
var/selecting_module = 0 //whether the borg is in process of selecting its module or not.
var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/sensor_mode,
@@ -263,6 +264,9 @@
return module_sprites
/mob/living/silicon/robot/proc/pick_module()
if(selecting_module)
return
selecting_module = 1
if(module)
return
var/list/modules = list()
@@ -285,6 +289,7 @@
updatename()
recalculate_synth_capacities()
notify_ai(ROBOT_NOTIFICATION_NEW_MODULE, module.name)
selecting_module = 0
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(prefix)

View File

@@ -322,7 +322,8 @@
var/mob/living/carbon/human/H = null
if (ishuman(M))
H = M //20/1/16 Insulation (vaurca)
if(H.species.get_bodytype() == "Vaurca") return 0
if(isvaurca(H))
return 0
var/area/source_area
if(istype(power_source,/area))
source_area = power_source

View File

@@ -568,7 +568,7 @@
/obj/item/stack/material/phoron = "phoron",
/obj/item/stack/material/gold = "gold",
/obj/item/stack/material/silver = "silver",
/obj/item/stack/material/mhydrogen = "hydrogen"
/obj/item/stack/material/mhydrogen = "hydrazine" //doesn't really make much sense but thank Bay
)
/obj/machinery/reagentgrinder/New()

View File

@@ -396,7 +396,7 @@
name = "Ipecac"
id = "ipecac"
result = "ipecac"
required_reagents = list("hydrogen" = 1, "anti_toxin" = 1, "ethanol" = 1)
required_reagents = list("hydrazine" = 1, "anti_toxin" = 1, "ethanol" = 1)
result_amount = 3
/datum/chemical_reaction/soporific
@@ -2082,7 +2082,7 @@
name = "Luminol"
id = "luminol"
result = "luminol"
required_reagents = list("hydrogen" = 2, "carbon" = 2, "ammonia" = 2)
required_reagents = list("hydrazine" = 2, "carbon" = 2, "ammonia" = 2)
result_amount = 6
/////////////////////////////////////////Brightdawns super cool coffee drinks//////////////////////////////////////////////

View File

@@ -211,7 +211,7 @@
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
if(W.reagents.has_reagent("hydrazine", 1) || W.reagents.has_reagent("water", 1))
if(my_effect.trigger == TRIGGER_WATER)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_WATER && prob(25))

View File

@@ -47,7 +47,7 @@ obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/
name = "beaker 'oxygen'"
New()
..()
reagents.add_reagent("oxygen",50)
reagents.add_reagent("acetone",50)
update_icon()
/obj/item/weapon/reagent_containers/glass/beaker/sodium

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB