diff --git a/code/game/objects/effects/sm_crystals.dm b/code/game/objects/effects/sm_crystals.dm
new file mode 100644
index 00000000000..d725b23d0bc
--- /dev/null
+++ b/code/game/objects/effects/sm_crystals.dm
@@ -0,0 +1,179 @@
+//separate dm since hydro is getting bloated already
+
+/obj/effect/supermatter_crystal
+ name = "supermatter growth"
+ anchored = 1
+ opacity = 0
+ density = 0
+ icon = 'icons/obj/lighting.dmi'
+ icon_state = "supermatter_crystalf"
+ layer = 2.1
+ light_color = "#8A8A00"
+
+ var/endurance = 100
+ var/delay = 1200
+ var/floor = 0
+ var/spreadChance = 10
+ var/spreadIntoAdjacentChance = 10
+ var/lastTick = 0
+ var/spreaded = 1
+ var/deleted = 0
+
+/obj/effect/supermatter_crystal/single
+ spreadChance = 0
+
+/obj/effect/supermatter_crystal/New()
+ ..()
+ light_color = "#8A8A00"
+
+ dir = CalcDir()
+
+ if(!floor)
+ switch(dir) //offset to make it be on the wall rather than on the floor
+ if(NORTH)
+ pixel_y = 32
+ if(SOUTH)
+ pixel_y = -32
+ if(EAST)
+ pixel_x = 32
+ if(WEST)
+ pixel_x = -32
+ icon_state = "supermatter_crystal"
+ else
+ if( prob( 10 )) // Only 10% of all floor crystals survive, so there's not a forest of 'em
+ icon_state = "supermatter_crystalf"
+ name = "supermatter crystal"
+ density = 1
+ else
+ deleted = 1
+ del( src )
+
+ processing_objects += src
+
+ set_light(3)
+ lastTick = world.timeofday
+
+/obj/effect/supermatter_crystal/Del()
+ if( !deleted )
+ visible_message("\red \The [src] shatters!")
+ new /obj/item/weapon/shard/supermatter( src.loc )
+
+ processing_objects -= src
+ ..()
+
+/obj/effect/supermatter_crystal/process()
+ if(!spreaded)
+ return
+
+ if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
+ lastTick = world.timeofday
+ spreaded = 0
+
+ for(var/mob/living/l in range( src, 2 ))
+ var/rads = 5
+ l.apply_effect(rads, IRRADIATE)
+
+ for(var/i=1,i<=3,i++)
+ if(prob(spreadChance))
+ var/list/possibleLocs = list()
+ var/spreadsIntoAdjacent = 0
+
+ if(prob(spreadIntoAdjacentChance))
+ spreadsIntoAdjacent = 1
+
+ for(var/turf/simulated/floor/floor in view(3,src))
+ if(spreadsIntoAdjacent || !locate(/obj/effect/supermatter_crystal) in view(1,floor))
+ possibleLocs += floor
+
+ if(!possibleLocs.len)
+ break
+
+ var/turf/newLoc = pick(possibleLocs)
+
+ var/crystalCount = 0 //hacky
+ var/placeCount = 1
+ for(var/obj/effect/supermatter_crystal/shroom in newLoc)
+ crystalCount++
+ for(var/wallDir in cardinal)
+ var/turf/isWall = get_step(newLoc,wallDir)
+ if(isWall.density)
+ placeCount++
+ if(crystalCount >= placeCount)
+ continue
+
+ var/obj/effect/supermatter_crystal/child = new /obj/effect/supermatter_crystal(newLoc)
+ if( child )
+ child.delay = delay
+ child.endurance = endurance
+
+ spreaded++
+
+/obj/effect/supermatter_crystal/proc/CalcDir(turf/location = loc)
+ for(var/wallDir in cardinal)
+ var/turf/newTurf = get_step(location,wallDir)
+ if(newTurf.density)
+ return wallDir
+
+/*
+ var/direction = 16
+
+ for(var/wallDir in cardinal)
+ var/turf/newTurf = get_step(location,wallDir)
+ if(newTurf.density)
+ direction |= wallDir
+
+ for(var/obj/effect/supermatter_crystal/crystal in location)
+ if(crystal == src)
+ continue
+ if(crystal.floor) //special
+ direction &= ~16
+ else
+ direction &= ~crystal.dir
+
+ var/list/dirList = list()
+
+ for(var/i=1,i<=16,i <<= 1)
+ if(direction & i)
+ dirList += i
+
+ if(dirList.len)
+ var/newDir = pick(dirList)
+ if(newDir == 16)
+ floor = 1
+ newDir = 1
+ return newDir
+*/
+ floor = 1
+ return 1
+
+/obj/effect/supermatter_crystal/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ ..()
+
+ endurance -= W.force
+
+ CheckEndurance()
+
+/obj/effect/supermatter_crystal/ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ return
+ if(2.0)
+ if (prob(50))
+ del(src)
+ return
+ if(3.0)
+ if (prob(5))
+ del(src)
+ return
+ else
+ return
+
+/obj/effect/supermatter_crystal/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > 300)
+ endurance -= 5
+ CheckEndurance()
+
+/obj/effect/supermatter_crystal/proc/CheckEndurance()
+ if(endurance <= 0)
+ del(src)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/sm_shard.dm b/code/game/objects/items/weapons/sm_shard.dm
new file mode 100644
index 00000000000..a4367cba413
--- /dev/null
+++ b/code/game/objects/items/weapons/sm_shard.dm
@@ -0,0 +1,103 @@
+
+/obj/item/weapon/shard/supermatter
+ name = "supermatter shard"
+ desc = "A shard of supermatter. Incredibly dangerous, though not large enough to go critical."
+ force = 10.0
+ throwforce = 20.0
+ icon_state = "supermatter"
+ sharp = 1
+ edge = 1
+ w_class = 2
+ flags = CONDUCT
+ light_color = "#8A8A00"
+ var/brightness = 2
+
+/obj/item/weapon/shard/supermatter/New()
+ src.icon_state = pick("supermatter")
+ switch(src.icon_state)
+ if("supermattersmall")
+ src.pixel_x = rand(-12, 12)
+ src.pixel_y = rand(-12, 12)
+ if("supermattermedium")
+ src.pixel_x = rand(-8, 8)
+ src.pixel_y = rand(-8, 8)
+ if("supermatterlarge")
+ src.pixel_x = rand(-5, 5)
+ src.pixel_y = rand(-5, 5)
+ else
+
+ set_light(brightness)
+
+/obj/item/weapon/shard/supermatter/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if( istype( W, /obj/item/weapon/tongs ))
+ var/obj/item/weapon/tongs/T = W
+ T.pick_up( src )
+ T.icon_state = "tongs_supermatter"
+ return
+
+ ..()
+
+/obj/item/weapon/shard/supermatter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
+ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
+ return ..()
+
+/obj/item/weapon/shard/supermatter/Crossed(AM as mob|obj)
+ if(ismob(AM))
+ var/mob/M = AM
+ M << "\red You step on \the [src]!"
+ playsound(src.loc, 'sound/effects/glass_step_sm.ogg', 70, 1) // not sure how to handle metal shards with sounds
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+
+ if(H.species.flags & IS_SYNTHETIC) //Thick skin.
+ return
+
+ if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
+ var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
+ if(affecting.status & ORGAN_ROBOT)
+ return
+ if(affecting.take_damage(5, 20))
+ H.UpdateDamageIcon()
+ H.updatehealth()
+ if(!(H.species && (H.species.flags & NO_PAIN)))
+ H.Weaken(3)
+ ..()
+
+
+/obj/item/weapon/shard/supermatter/attack_hand(var/mob/user)
+ if(!istype(user,/mob/living/carbon/human/nucleation))
+ user << pick( "\red You think twice before touching that without protection.",
+ "\red You don't want to touch that without some protection.",
+ "\red You probably should get something else to pick that up.",
+ "\red You aren't sure that's a good idea.",
+ "\red You aren't in the mood to get vaporized today.",
+ "\red You really don't feel like frying your hand off.",
+ "\red You assume that's a bad idea." )
+ return
+
+ ..()
+
+/obj/item/weapon/tongs
+ name = "tongs"
+ desc = "Tungsten-alloy tongs used for handling dangerous materials."
+ force = 7.0
+ throwforce = 12.0
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "tongs"
+ edge = 1
+ w_class = 2
+ flags = CONDUCT
+ var/obj/item/held = null // The item currently being held
+
+/obj/item/weapon/tongs/proc/pick_up( var/obj/item/I )
+ held = I
+ I.loc = src
+ playsound(loc, 'sound/effects/tong_pickup.ogg', 50, 1, -1)
+
+/obj/item/weapon/tongs/attack_self(var/mob/user as mob)
+ if( held )
+ var/turf/T = get_turf(user.loc)
+ held.loc = T
+ held = null
+ icon_state = initial(icon_state)
+ ..()
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 5f4cfbe49c9..243d90f9ddd 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -117,14 +117,33 @@
icon_state = "cutters-y"
item_state = "cutters_yellow"
-/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
- if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)))
- usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
- "You cut \the [C]'s restraints with \the [src]!",\
- "You hear cable being cut.")
- C.handcuffed = null
- C.update_inv_handcuffed()
- return
+/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/C as mob, mob/user as mob)
+ if(C.handcuffed)
+ if(C.species.name == "Wryn" && (locate(C.internal_organs_by_name["antennae"]) in C.internal_organs))
+
+ var/turf/p_loc = user.loc
+ var/turf/p_loc_m = C.loc
+
+ user.visible_message("\blue [user] begins to cut off [C]'s antennae.")
+ C << "\red [user] begins to cut off your antennae!"
+ do_after(C, 150)
+ if(p_loc == user.loc && p_loc_m == C.loc)
+ del(C.internal_organs_by_name["antennae"])
+ C.remove_language("Wryn Hivemind")
+ new /obj/item/organ/wryn/hivenode(user.loc)
+ user << "\blue You hear a loud crunch as you mercilessly off cut [C]'s antennae."
+ C << "\red You hear a loud crunch as the wirecutters rip through your antennae."
+ C << "\red Its so quiet..."
+ C.h_style = "Bald"
+ C.update_hair()
+ else
+ if(istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
+ usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
+ "You cut \the [C]'s restraints with \the [src]!",\
+ "You hear cable being cut.")
+ C.handcuffed = null
+ C.update_inv_handcuffed()
+ return
else
..()
diff --git a/code/game/smoothwall.dm b/code/game/smoothwall.dm
index e98c839150a..65ada91e40d 100644
--- a/code/game/smoothwall.dm
+++ b/code/game/smoothwall.dm
@@ -114,6 +114,12 @@
shroom.icon_state = "glowshroomf"
shroom.pixel_x = 0
shroom.pixel_y = 0
+ for(var/obj/effect/supermatter_crystal/crystal in get_step(src,direction))
+ if(!crystal.floor) //crystals drop to the floor
+ crystal.floor = 1
+ crystal.icon_state = "supermatter_crystalf"
+ crystal.pixel_x = 0
+ crystal.pixel_y = 0
..()
/turf/simulated/wall/relativewall()
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 77e005c0422..93c4a366bf6 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -970,7 +970,7 @@ datum/preferences
if("age")
age = rand(AGE_MIN, AGE_MAX)
if("hair")
- if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine")
+ if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Wryn")
r_hair = rand(0,255)
g_hair = rand(0,255)
b_hair = rand(0,255)
@@ -996,7 +996,7 @@ datum/preferences
if(species == "Human")
s_tone = random_skin_tone()
if("s_color")
- if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People")
+ if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People" || species == "Wryn")
r_skin = rand(0,255)
g_skin = rand(0,255)
b_skin = rand(0,255)
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 05519f99a7e..9c2f0beb67a 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -45,7 +45,7 @@
//Set species_restricted list
switch(target_species)
if("Human", "Skrell") //humanoid bodytypes
- species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
+ species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Wryn")
else
species_restricted = list(target_species)
@@ -161,7 +161,7 @@ BLIND // can't see anything
var/transfer_prints = FALSE
var/pickpocket = 0 //Master pickpocket?
var/clipped = 0
- species_restricted = list("exclude","Unathi","Tajaran")
+ species_restricted = list("exclude","Unathi","Tajaran","Wryn")
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wirecutters))
@@ -295,7 +295,7 @@ BLIND // can't see anything
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
- species_restricted = list("exclude","Unathi","Tajaran")
+ species_restricted = list("exclude","Unathi","Tajaran","Wryn")
/obj/item/proc/negates_gravity()
return 0
@@ -328,7 +328,7 @@ BLIND // can't see anything
heat_protection = HEAD
max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
- species_restricted = list("exclude","Diona","Vox")
+ species_restricted = list("exclude","Diona","Vox","Wryn")
loose = 0 // What kind of idiot designs a pressurized suit where the helmet can fall off?
flash_protect = 2
@@ -351,7 +351,7 @@ BLIND // can't see anything
heat_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
- species_restricted = list("exclude","Diona","Vox")
+ species_restricted = list("exclude","Diona","Vox","Wryn")
//Under clothing
/obj/item/clothing/under
diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm
index 0bdb722f213..f92c7fcde21 100644
--- a/code/modules/clothing/spacesuits/rig.dm
+++ b/code/modules/clothing/spacesuits/rig.dm
@@ -13,7 +13,7 @@
action_button_name = "Toggle Helmet Light"
//Species-specific stuff.
- species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox")
+ species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox","Wryn")
sprite_sheets = list(
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
"Tajaran" = 'icons/mob/species/tajaran/helmet.dmi',
@@ -51,7 +51,7 @@
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
- species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox")
+ species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox","Wryn")
sprite_sheets = list(
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
"Tajaran" = 'icons/mob/species/tajaran/suit.dmi',
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index 3b9c98c4846..60b2c20636a 100644
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -326,6 +326,26 @@
key = "0"
syllables = list ("honk","squeak","bonk","toot","narf","zub","wee","wub","norf")
+/datum/language/wryn
+ name = "Wryn Hivemind"
+ desc = "Wryn have the strange ability to commune over a psychic hivemind."
+ speech_verb = "chitters"
+ ask_verb = "chitters"
+ exclaim_verb = "chitters"
+ colour = "alien"
+ key = "y"
+ flags = RESTRICTED | HIVEMIND
+
+/datum/language/wryn/check_special_condition(var/mob/other)
+
+ var/mob/living/carbon/M = other
+ if(!istype(M))
+ return 1
+ if(locate(/obj/item/organ/wryn/hivenode) in M.internal_organs)
+ return 1
+
+ return 0
+
/datum/language/xenocommon
name = "Xenomorph"
colour = "alien"
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index e66554ba79a..aa1a9160804 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -22,6 +22,9 @@
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
+ if(istype(O, /obj/item/organ/brain/crystal ))
+ user << "\red This brain is too malformed to be able to use with the [src]."
+ return
if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO
if(!O:brainmob)
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 49b448a9c6f..3ae591eeadd 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -110,6 +110,14 @@
h_style = "Bald"
..(new_loc, "Golem")
+/mob/living/carbon/human/wryn/New(var/new_loc)
+ h_style = "Antennae"
+ ..(new_loc, "Wryn")
+
+/mob/living/carbon/human/nucleation/New(var/new_loc)
+ h_style = "Nucleation Crystals"
+ ..(new_loc, "Nucleation")
+
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 39c02d350ca..668e778bad1 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -117,6 +117,30 @@
return
//end vampire codes
+ if(src.species.name == "Wryn")
+ if(src.handcuffed)
+ if(!(locate(src.internal_organs_by_name["antennae"]) in src.internal_organs)) return
+ var/turf/p_loc = M.loc
+ var/turf/p_loc_m = src.loc
+
+ M.visible_message("\blue [M] begins to violently pull off [src]'s antennae.")
+ src << "\red [M] grips your antennae and starts violently pulling!"
+ do_after(src, 250)
+ if(p_loc == M.loc && p_loc_m == src.loc)
+ del(src.internal_organs_by_name["antennae"])
+ src.remove_language("Wryn Hivemind")
+ new /obj/item/organ/wryn/hivenode(M.loc)
+ M << "\blue You hear a loud crunch as you mercilessly pull off [src]'s antennae."
+ src << "\red You hear a loud crunch as your antennae is ripped off your head by [M]."
+ src << "\red Its so quiet..."
+ src.h_style = "Bald"
+ src.update_hair()
+
+ M.attack_log += text("\[[time_stamp()]\] removed antennae [src.name] ([src.ckey])")
+ src.attack_log += text("\[[time_stamp()]\] Has had their antennae removed by [M.name] ([M.ckey])")
+ msg_admin_attack("[key_name(M)] removed [key_name(src)]'s antennae")
+ return 0
+
M.do_attack_animation(src)
add_logs(src, M, "[pick(attack.attack_verb)]ed")
diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm
index b7f1bea99a8..09ba17866ee 100644
--- a/code/modules/mob/living/carbon/human/human_movement.dm
+++ b/code/modules/mob/living/carbon/human/human_movement.dm
@@ -6,7 +6,29 @@
tally -= 2
if(species.slowdown)
- tally = species.slowdown
+ if(src.species.name == "Wryn") //handles Wryn specific movement
+ if(!istype(get_turf(src), /turf/space)) //Space is 20c whut..
+ var/loc_temp = T0C
+ var/datum/gas_mixture/environment = loc.return_air()
+ if(istype(src.loc, /obj/mecha))
+ var/obj/mecha/M = src.loc
+ loc_temp = M.return_temperature()
+ else
+ loc_temp = environment.temperature
+
+ switch(loc_temp) //messy switch statement to assign the proper speed
+ if(0 to 213.15) tally = -6 //you deserve this, god speed to you
+ if(213.15 to 250.15) tally = -5 //must get colder..
+ if(260.15 to 273.15) tally = -4
+ if(273.15 to 283.15) tally = -3 //pretty fast, though will likely never happen
+ if(283.15 to 300.15) tally = 2 //slower than humans at normal room temperatures
+ if(300.15 to 310.15) tally = 5
+ if(317.15 to 400) tally = 8
+ else tally = 12 //Stop running into fire you stupid bug
+ else
+ tally = -7
+ else
+ tally = species.slowdown
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index e51a4e3c357..3f5c2ad7cbc 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -264,6 +264,16 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
gene.OnMobLife(src)
if (radiation)
+
+ if((locate(src.internal_organs_by_name["resonant crystal"]) in src.internal_organs))
+ var/rads = radiation/25
+ radiation -= rads
+ radiation -= 0.1
+ reagents.add_reagent("radium", rads/10)
+ if( prob(10) )
+ src << "\blue You feel relaxed."
+ return
+
if (radiation > 100)
radiation = 100
if(!(species.flags & RAD_ABSORB))
@@ -276,7 +286,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
radiation = 0
else
-
if(species.flags & RAD_ABSORB)
var/rads = radiation/25
radiation -= rads
diff --git a/code/modules/mob/living/carbon/human/species/apollo.dm b/code/modules/mob/living/carbon/human/species/apollo.dm
new file mode 100644
index 00000000000..8ba52a155fa
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/apollo.dm
@@ -0,0 +1,87 @@
+/datum/species/wryn
+ name = "Wryn"
+ icobase = 'icons/mob/human_races/r_wryn.dmi'
+ deform = 'icons/mob/human_races/r_wryn.dmi'
+ language = "Wryn Hivemind"
+ tail = "wryntail"
+ unarmed_type = /datum/unarmed_attack/punch/weak
+ primitive = /mob/living/carbon/monkey/wryn
+ darksight = 3
+ slowdown = 1
+ warning_low_pressure = -300
+ hazard_low_pressure = 1
+ blurb = "The wryn (r-in, singular r-in) are a humanoid race that possess many bee-like features. Originating from Alveare they \
+ have adapted extremely well to cold environments though have lost most of their muscles over generations.\
+ In order to communicate and work with multi-species crew Wryn were forced to take on names. Wryn have tended towards using only \
+ first names, these names are generally simplistic and easy to pronounce. Wryn have rarely had to communicate using their mouths, \
+ so in order to integrate with the multi-species crew they have been taught broken sol?."
+
+ cold_level_1 = 200 //Default 260 - Lower is better
+ cold_level_2 = 150 //Default 200
+ cold_level_3 = 115 //Default 120
+
+ heat_level_1 = 300 //Default 360 - Higher is better
+ heat_level_2 = 310 //Default 400
+ heat_level_3 = 317 //Default 1000
+
+ body_temperature = 286
+
+ has_organ = list(
+ "heart" = /obj/item/organ/heart,
+ "brain" = /obj/item/organ/brain,
+ "eyes" = /obj/item/organ/eyes,
+ "appendix" = /obj/item/organ/appendix,
+ "antennae" = /obj/item/organ/wryn/hivenode
+ )
+
+ flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
+
+
+ base_color = "#704300"
+ flesh_color = "#704300"
+ blood_color = "#FFFF99"
+
+
+/datum/species/wryn/handle_death(var/mob/living/carbon/human/H)
+ for(var/mob/living/carbon/C in world)
+ if(locate(/obj/item/organ/wryn/hivenode) in C.internal_organs)
+ C << "\red Your antennae tingle as you are overcome with pain..."
+ C << "\red It feels like part of you has died."
+
+
+
+/datum/species/nucleation
+ name = "Nucleation"
+ icobase = 'icons/mob/human_races/r_nucleation.dmi'
+ unarmed_type = /datum/unarmed_attack/punch
+ blurb = "A sub-race of unforunates who have been exposed to too much supermatter radiation. As a result, \
+ supermatter crystal clusters have begun to grow across their bodies. Research to find a cure for this ailment \
+ has been slow, and so this is a common fate for veteran engineers. The supermatter crystals produce oxygen, \
+ negating the need for the individual to breath. Their massive change in biology, however, renders most medicines \
+ obselete. Ionizing radiation seems to cause resonance in some of their crystals, which seems to encourage regeneration \
+ and produces a calming effect on the individual. Nucleations are highly stigmatized, and are treated much in the same \
+ way as lepers were back on Earth."
+ language = "Sol Common"
+ burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores
+ brute_mod = 2 // damn, double wham, double dam
+ flags = IS_WHITELISTED | NO_BREATHE | NO_BLOOD | NO_PAIN | HAS_LIPS | NO_SCAN
+
+ has_organ = list(
+ "heart" = /obj/item/organ/heart,
+ "crystalized brain" = /obj/item/organ/brain/crystal,
+ "eyes" = /obj/item/organ/eyes/luminescent_crystal,
+ "strange crystal" = /obj/item/organ/nucleation/strange_crystal,
+ "resonant crystal" = /obj/item/organ/nucleation/resonant_crystal
+ )
+
+/datum/species/nucleation/handle_post_spawn(var/mob/living/carbon/human/H)
+ H.light_color = "#1C1C00"
+ H.set_light(2)
+ return ..()
+
+/datum/species/nucleation/handle_death(var/mob/living/carbon/human/H)
+ var/turf/T = get_turf(H)
+ H.visible_message("\red[H]'s body explodes, leaving behind a pile of microscopic crystals!")
+ supermatter_delamination(T, 2, 0, 0) // Create a small supermatter burst upon death
+ new /obj/item/weapon/shard/supermatter( T )
+ del(H)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index b07e9e0c5a2..4375800af54 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -38,6 +38,13 @@
icon_state = "stokkey1"
uni_append = list(0x044,0xC5D) // 044C5D
+/mob/living/carbon/monkey/wryn
+ name = "lajavi"
+ voice_name = "lajavi"
+ speak_emote = list("hisses")
+ icon_state = "wrynkey1"
+ uni_append = list(0x022,0xF5D) // 022F5D
+
/mob/living/carbon/monkey/New()
var/datum/reagents/R = new/datum/reagents(330)
reagents = R
diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm
index 69c7979e62c..b14a37d04f8 100644
--- a/code/modules/mob/living/carbon/species.dm
+++ b/code/modules/mob/living/carbon/species.dm
@@ -745,6 +745,10 @@
/datum/unarmed_attack/punch
attack_verb = list("punch")
+/datum/unarmed_attack/punch/weak
+ attack_verb = list("flail")
+ damage = 1
+
/datum/unarmed_attack/diona
attack_verb = list("lash", "bludgeon")
diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm
index 45627bc7d9b..6ba963c5f1b 100644
--- a/code/modules/mob/new_player/sprite_accessories.dm
+++ b/code/modules/mob/new_player/sprite_accessories.dm
@@ -689,6 +689,51 @@
icon_state = "vox_keetquills"
species_allowed = list("Vox")
+// Apollo-specific
+
+ //Wryn antennae
+
+ wry_antennae_default
+ name = "Antennae"
+ icon_state = "wryn_antennae"
+ species_allowed = list("Wryn")
+
+ //Nucleation "hairstyles"
+
+ nuc_crystals
+ name = "Nucleation Crystals"
+ icon_state = "nuc_crystal"
+ species_allowed = list("Nucleation")
+
+ nuc_betaburns
+ name = "Nucleation Beta Burns"
+ icon_state = "nuc_betaburns"
+ species_allowed = list("Nucleation")
+
+ nuc_fallout
+ name = "Nucleation Fallout"
+ icon_state = "nuc_fallout"
+ species_allowed = list("Nucleation")
+
+ nuc_frission
+ name = "Nucleation Frission"
+ icon_state = "nuc_frission"
+ species_allowed = list("Nucleation")
+
+ nuc_radical
+ name = "Nucleation Free Radical"
+ icon_state = "nuc_radical"
+ species_allowed = list("Nucleation")
+
+ nuc_gammaray
+ name = "Nucleation Gamma Ray"
+ icon_state = "nuc_gammaray"
+ species_allowed = list("Nucleation")
+
+ nuc_neutron
+ name = "Nucleation Neutron Bomb"
+ icon_state = "nuc_neutron"
+ species_allowed = list("Nucleation")
/datum/sprite_accessory/facial_hair
diff --git a/code/modules/organs/organ_alien.dm b/code/modules/organs/organ_alien.dm
index 89d17f6ced4..213043b698a 100644
--- a/code/modules/organs/organ_alien.dm
+++ b/code/modules/organs/organ_alien.dm
@@ -336,3 +336,51 @@
name = "vox cortical stack"
/obj/item/organ/stack/vox/stack
+
+
+//WRYN ORGAN
+
+/obj/item/organ/wryn/hivenode
+ name = "antennae"
+ parent_organ = "head"
+
+/obj/item/organ/wryn/hivenode
+ name = "antennae"
+ organ_tag = "antennae"
+ icon = 'icons/mob/human_races/r_wryn.dmi'
+ icon_state = "antennae"
+
+
+//NUCLEATION ORGAN
+
+/obj/item/organ/nucleation
+ name = "nucleation organ"
+ icon = 'icons/obj/surgery.dmi'
+ desc = "A crystalized human organ. /red It has a strangely iridescent glow."
+
+/obj/item/organ/nucleation/resonant_crystal
+ name = "resonant crystal"
+ icon_state = "resonant-crystal"
+ organ_tag = "resonant crystal"
+ parent_organ = "head"
+
+/obj/item/organ/nucleation/strange_crystal
+ name = "strange crystal"
+ icon_state = "stramge-crystal"
+ organ_tag = "strange crystal"
+ parent_organ = "chest"
+
+/obj/item/organ/eyes/luminescent_crystal
+ name = "luminescent eyes"
+ icon_state = "crystal-eyes"
+ organ_tag = "luminescent eyes"
+ light_color = "#1C1C00"
+ parent_organ = "head"
+
+ New()
+ set_light(2)
+
+/obj/item/organ/brain/crystal
+ name = "crystalized brain"
+ icon_state = "crystal-brain"
+ organ_tag = "crystalized brain"
\ No newline at end of file
diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm
index a1844d19760..7d8a81ad3ef 100644
--- a/code/modules/supermatter/supermatter.dm
+++ b/code/modules/supermatter/supermatter.dm
@@ -1,23 +1,35 @@
-#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
-#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
-#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
-#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
-#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
+#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more
+#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
+#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
+#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
+#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
+
+/*
+ How to tweak the SM
+
+ POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power.
+ CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage.
+
+ CHARGING_FACTOR Controls how much emitter shots excite the SM.
+ DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures.
+*/
//Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game.
-#define POWER_FACTOR 0.35 //Obtained from testing. Aiming to make the ideal running output (600 kW) run the SM to ~85% of the safety level.
-
-#define CHARGING_FACTOR 0.55
-#define DAMAGE_RATE_LIMIT 5 //damage rate cap at power = 900, scales linearly with power
+#define POWER_FACTOR 1.0
+#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays
+#define CRITICAL_TEMPERATURE 800 //K
+#define CHARGING_FACTOR 0.05
+#define DAMAGE_RATE_LIMIT 3 //damage rate cap at power = 300, scales linearly with power
//These would be what you would get at point blank, decreases with distance
#define DETONATION_RADS 200
#define DETONATION_HALLUCINATION 600
+#define TRANSFORM_DISTANCE_MOD 2 // Size/this is maximum distance from SM during burst for transformation to Nucleation
-#define WARNING_DELAY 30 //seconds between warnings.
+#define WARNING_DELAY 30 //seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -35,6 +47,7 @@
var/damage = 0
var/damage_archived = 0
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
+ var/safe_warned = 0
var/warning_point = 100
var/warning_alert = "Danger! Crystal hyperstructure instability!"
var/emergency_point = 700
@@ -47,15 +60,20 @@
var/grav_pulling = 0
var/pull_radius = 14
+ // Time in ticks between delamination ('exploding') and exploding (as in the actual boom)
+ var/pull_time = 100
+ var/explosion_power = 8
var/emergency_issued = 0
- var/explosion_power = 8
+ // Time in 1/10th of seconds since the last sent warning
+ var/lastwarning = 0
+
+ // This stops spawning redundand explosions. Also incidentally makes supermatter unexplodable if set to 1.
+ var/exploded = 0
- var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
var/power = 0
-
- var/oxygen = 0 // Moving this up here for easier debugging.
+ var/oxygen = 0
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
@@ -67,21 +85,7 @@
var/obj/item/device/radio/radio
- shard //Small subtype, less efficient and more sensitive, but less boom.
- name = "Supermatter Shard"
- desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
- icon_state = "darkmatter_shard"
- base_icon_state = "darkmatter_shard"
-
- warning_point = 50
- emergency_point = 500
- explosion_point = 900
-
- gasefficency = 0.125
-
- pull_radius = 5
- explosion_power = 3 //3,6,9,12? Or is that too small?
-
+ var/debug = 0
/obj/machinery/power/supermatter/New()
. = ..()
@@ -93,17 +97,46 @@
. = ..()
/obj/machinery/power/supermatter/proc/explode()
+ message_admins("Supermatter exploded at ([x],[y],[z] - JMP)",0,1)
+ log_game("Supermatter exploded at ([x],[y],[z])")
anchored = 1
grav_pulling = 1
- spawn(100)
- explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1)
+ exploded = 1
+ spawn(pull_time)
+ var/turf/epicenter = get_turf(src)
+ explosion(epicenter, explosion_power, explosion_power*2, explosion_power*3, explosion_power*4, 1)
+ supermatter_delamination( epicenter, explosion_power*4, 1 )
del src
return
-//Changes color and luminosity of the light to these values if they were not already set
+//Changes color and light_range of the light to these values if they were not already set
/obj/machinery/power/supermatter/proc/shift_light(var/lum, var/clr)
- if(lum != light_range || clr != light_color)
- set_light(lum, l_color = clr)
+ if(light_color != clr)
+ light_color = clr
+ if(light_range != lum)
+ set_light(lum)
+
+/obj/machinery/power/supermatter/proc/announce_warning()
+ var/integrity = damage / explosion_point
+ integrity = round(100 - integrity * 100)
+ integrity = integrity < 0 ? 0 : integrity
+ var/alert_msg = " Integrity at [integrity]%"
+
+ if(damage > emergency_point)
+ alert_msg = emergency_alert + alert_msg
+ lastwarning = world.timeofday - WARNING_DELAY * 4
+ else if(damage >= damage_archived) // The damage is still going up
+ safe_warned = 0
+ alert_msg = warning_alert + alert_msg
+ lastwarning = world.timeofday
+ else if(!safe_warned)
+ safe_warned = 1 // We are safe, warn only once
+ alert_msg = safe_alert
+ lastwarning = world.timeofday
+ else
+ alert_msg = null
+ if(alert_msg)
+ radio.autosay(alert_msg, "Supermatter Monitor")
/obj/machinery/power/supermatter/process()
@@ -115,105 +148,85 @@
if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
- if(istype(L, /turf/space)) // Stop processing this stuff if we've been ejected.
- return
-
- if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
-
- shift_light(5, warning_color)
- if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
- var/stability = num2text(round((damage / explosion_point) * 100))
-
- if(damage > emergency_point)
- shift_light(7, emergency_color)
- radio.autosay(addtext(emergency_alert, " Instability: ",stability,"%"), "Supermatter Monitor")
- lastwarning = world.timeofday
-
- else if(damage >= damage_archived) // The damage is still going up
- radio.autosay(addtext(warning_alert," Instability: ",stability,"%"), "Supermatter Monitor")
- lastwarning = world.timeofday - 150
-
- else // Phew, we're safe
- radio.autosay(safe_alert, "Supermatter Monitor")
- lastwarning = world.timeofday
-
- if(damage > explosion_point)
- for(var/mob/living/mob in living_mob_list)
- if(loc.z == mob.loc.z)
- if(istype(mob, /mob/living/carbon/human))
- //Hilariously enough, running into a closet should make you get hit the hardest.
- var/mob/living/carbon/human/H = mob
- H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
- var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
- mob.apply_effect(rads, IRRADIATE)
-
+ if(damage > explosion_point)
+ if(!exploded)
+ if(!istype(L, /turf/space))
+ announce_warning()
explode()
+ else if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
+ shift_light(5, warning_color)
+ if(damage > emergency_point)
+ shift_light(7, emergency_color)
+ if(!istype(L, /turf/space) && (world.timeofday - lastwarning) >= WARNING_DELAY * 10)
+ announce_warning()
else
shift_light(4,initial(light_color))
if(grav_pulling)
supermatter_pull()
- //Ok, get the air from the turf
- var/datum/gas_mixture/env = L.return_air()
+ //Ok, get the air from the turf
+ var/datum/gas_mixture/removed = null
+ var/datum/gas_mixture/env = null
- //Remove gas from surrounding area
- var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles())
+ //ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react.
+ //We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 300 (based on testing, equals roughly 5% per SM alert announcement).
+ var/damage_inc_limit = (power/300)*(explosion_point/1000)*DAMAGE_RATE_LIMIT
- if(!removed || !removed.total_moles())
- damage += max((power-1600)/10, 0)
- power = min(power, 1600)
- return 1
+ if(!istype(L, /turf/space))
+ env = L.return_air()
+ removed = env.remove(gasefficency * env.total_moles()) //Remove gas from surrounding area
- damage_archived = damage
- damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
- //Ok, 100% oxygen atmosphere = best reaction
- //Maxes out at 100% oxygen pressure
- oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
-
- var/temp_factor = 50
-
- if(oxygen > 0.8)
- // with a perfect gas mix, make the power less based on heat
- icon_state = "[base_icon_state]_glow"
+ if(!env || !removed || !removed.total_moles())
+ damage += max((power - 15*POWER_FACTOR)/10, 0)
+ else if (grav_pulling) //If supermatter is detonating, remove all air from the zone
+ env.remove(env.total_moles())
else
- // in normal mode, base the produced energy around the heat
- temp_factor = 30
- icon_state = base_icon_state
+ damage_archived = damage
- power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
+ damage = max( damage + min( ( (removed.temperature - CRITICAL_TEMPERATURE) / 150 ), damage_inc_limit ) , 0 )
+ //Ok, 100% oxygen atmosphere = best reaction
+ //Maxes out at 100% oxygen pressure
+ oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles(), 1), 0)
- //We've generated power, now let's transfer it to the collectors for storing/usage
- transfer_energy()
+ //calculate power gain for oxygen reaction
+ var/temp_factor
+ var/equilibrium_power
+ if (oxygen > 0.8)
+ //If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 400
+ equilibrium_power = 400
+ icon_state = "[base_icon_state]_glow"
+ else
+ //If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 250
+ equilibrium_power = 250
+ icon_state = base_icon_state
- var/device_energy = power * REACTION_POWER_MODIFIER
+ temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800
+ power = max( (removed.temperature * temp_factor) * oxygen + power, 0)
- //To figure out how much temperature to add each tick, consider that at one atmosphere's worth
- //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
- //that the device energy is around 2140. At that stage, we don't want too much heat to be put out
- //Since the core is effectively "cold"
+ //We've generated power, now let's transfer it to the collectors for storing/usage
+ transfer_energy()
- //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
- //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
- removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
+ var/device_energy = power * REACTION_POWER_MODIFIER
- removed.temperature = max(0, min(removed.temperature, 2500))
- //Calculate how much gas to release
- removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
+ //Calculate how much gas to release
+ removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
- removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
+ removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
- env.merge(removed)
+ env.merge(removed)
- for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
+
+ for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
- l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1, get_dist(l, src)) ) ) )
+ l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
- for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
- var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
- l.apply_effect(irradiate=rads)
+ //adjusted range so that a power of 300 (pretty high) results in 8 tiles, roughly the distance from the core to the engine monitoring room.
+ for(var/mob/living/l in range(src, round(sqrt(power / 5))))
+ var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
+ l.apply_effect(rads, IRRADIATE)
- power -= (power/500)**3
+ power -= (power/DECAY_FACTOR)**3 //energy losses due to radiation
return 1
@@ -225,17 +238,12 @@
// Then bring it inside to explode instantly upon landing on a valid turf.
- if(Proj.flag != "bullet")
- power += Proj.damage * config_bullet_energy * CHARGING_FACTOR
+ if(istype(Proj, /obj/item/projectile/beam))
+ power += Proj.damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR
else
damage += Proj.damage * config_bullet_energy
return 0
-
-/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
- return attack_hand(user)
-
-
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
if(Adjacent(user))
return attack_hand(user)
@@ -247,6 +255,9 @@
user << "You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update."
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
+ if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
+
user.visible_message("\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.",\
"You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\
"You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")
@@ -255,11 +266,13 @@
/obj/machinery/power/supermatter/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
- if(get_dist(R, src) <= 15) // Better than using orange() every process
- R.receive_pulse(power * POWER_FACTOR)
+ var/distance = get_dist(R, src)
+ if(distance <= 15)
+ //for collectors using standard plasma tanks at 1013 kPa, the actual power generated will be this power*POWER_FACTOR*20*29 = power*POWER_FACTOR*580
+ R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2)
return
-/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
+/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
user.visible_message("\The [user] touches \a [W] to \the [src] as a silence fills the room...",\
"You touch \the [W] to \the [src] when everything suddenly goes silent.\"\n\The [W] flashes into dust as you flinch away from \the [src].",\
"Everything suddenly goes silent.")
@@ -272,6 +285,8 @@
/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj)
if(istype(AM, /mob/living))
+ if(istype(AM,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\
"You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\
"You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")
@@ -283,6 +298,9 @@
/obj/machinery/power/supermatter/proc/Consume(var/mob/living/user)
+ if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
+ return
+
if(istype(user))
user.dust()
power += 200
@@ -299,11 +317,10 @@
else
l.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2)
var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) )
- l.apply_effect(rads, IRRADIATE, 0) // Permit blocking
+ l.apply_effect(rads, IRRADIATE)
/obj/machinery/power/supermatter/proc/supermatter_pull()
-
//following is adapted from singulo code
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -335,4 +352,110 @@
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
- return
\ No newline at end of file
+ return
+
+
+proc/supermatter_delamination(var/turf/epicenter, var/size, var/transform_mobs = 0, var/adminlog = 1)
+ spawn(0)
+ var/start = world.timeofday
+ epicenter = get_turf(epicenter)
+ if(!epicenter) return
+
+ if(adminlog)
+ message_admins("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z] - JMP)")
+ log_game("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ")
+
+ playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(size*2,1) )
+ playsound(epicenter, "explosion", 100, 1, round(size,1) )
+
+ if(defer_powernet_rebuild != 2)
+ defer_powernet_rebuild = 1
+
+ var/x = epicenter.x
+ var/y = epicenter.y
+ var/z = epicenter.z
+
+ epicenter.ChangeTurf( /turf/simulated/floor/plating/smatter )
+
+ for(var/mob/living/mob in orange( epicenter, size*2 )) // Irradiate area twice the size of the main blast
+ if(epicenter.z == mob.loc.z)
+ if( ishuman(mob) )
+ //Hilariously enough, running into a closet should make you get hit the hardest.
+ var/mob/living/carbon/human/H = mob
+ H.hallucination += max(50, min(size*10, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, epicenter) + 1)) ) )
+ var/rads = size*10 * sqrt( 1 / (get_dist(mob, epicenter) + 1) )
+ mob.apply_effect(rads, IRRADIATE)
+
+ for(var/i=0, i