Merge branch 'master' into development

This commit is contained in:
skull132
2017-04-29 01:51:38 +03:00
25 changed files with 316 additions and 99 deletions
+9
View File
@@ -211,6 +211,15 @@
return 1
/obj/item/device/assembly_holder/New()
..()
listening_objects += src
/obj/item/device/assembly_holder/Destroy()
listening_objects -= src
return ..()
/obj/item/device/assembly_holder/hear_talk(mob/living/M as mob, msg, verb, datum/language/speaking)
if(a_right)
a_right.hear_talk(M,msg,verb,speaking)
+9 -1
View File
@@ -7,6 +7,14 @@
var/listening = 0
var/recorded //the activation message
/obj/item/device/assembly/voice/New()
..()
listening_objects += src
/obj/item/device/assembly/voice/Destroy()
listening_objects -= src
return ..()
/obj/item/device/assembly/voice/hear_talk(mob/living/M as mob, msg)
if(listening)
recorded = msg
@@ -33,4 +41,4 @@
/obj/item/device/assembly/voice/toggle_secure()
. = ..()
listening = 0
listening = 0
+12 -9
View File
@@ -34,21 +34,24 @@
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)
if(istype(O,/obj/item/organ/brain) && !(istype(O,/obj/item/organ/brain/golem)) && !brainmob) //Time to stick a brain in it --NEO /MMI'ing a scroll of paper makes 0 sense
if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO
var/obj/item/organ/brain/B = O
if(B.health <= 0)
user << "\red That brain is well and truly dead."
user << "<span class='warning'>That brain is well and truly dead.</span>"
return
else if(!B.lobotomized && B.can_lobotomize)
user << "<span class='warning'>The brain won't fit until you perform a lobotomy!</span>"
return
else if(!B.can_lobotomize)
user << "<span class='warning'>The [B] is incompatible with [src]!</span>"
else if(!B.brainmob)
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain.</span>"
return
for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [user] sticks \a [O] into \the [src]."))
user.visible_message("<span class='notice'>[user] sticks \a [B] into \the [src].</span>")
brainmob = O:brainmob
O:brainmob = null
brainmob = B.brainmob
B.brainmob = null
brainmob.loc = src
brainmob.container = src
brainmob.stat = 0
@@ -56,7 +59,7 @@
living_mob_list += brainmob
user.drop_item()
brainobj = O
brainobj = B
brainobj.loc = src
name = "Man-Machine Interface: [brainmob.real_name]"
@@ -14,6 +14,8 @@
origin_tech = list(TECH_BIO = 3)
attack_verb = list("attacked", "slapped", "whacked")
var/mob/living/carbon/brain/brainmob = null
var/lobotomized = 0
var/can_lobotomize = 1
/obj/item/organ/pariah_brain
name = "brain remnants"
@@ -90,12 +92,44 @@
target.key = brainmob.key
..()
/obj/item/organ/brain/proc/lobotomize(mob/user as mob)
lobotomized = 1
if(owner)
owner << "<span class='danger'>As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...</span>"
owner << "<b>You have been lobotomized. Your memories and your former life have been surgically removed from your brain, and while you are lobotomized you remember nothing that ever came before this moment.</b>"
else if(brainmob)
brainmob << "<span class='danger'>As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...</span>"
brainmob << "<b>You have been lobotomized. Your memories and your former life have been surgically removed from your brain, and while you are lobotomized you remember nothing that ever came before this moment.</b>"
return
/obj/item/organ/brain/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/surgicaldrill))
if(!lobotomized)
user.visible_message("<span class='danger'>[user] drills [src] deftly with [W], severing part of the brain!</span>")
lobotomize(user)
else
user << "<span class='notice'>The brain has already been operated on!</span>"
..()
/obj/item/organ/brain/process()
..()
if(!owner)
return
if(lobotomized && (owner.getBrainLoss() < 50)) //lobotomized brains cannot be healed with chemistry. Part of the brain is irrevocably missing. Can be fixed magically with cloning, ofc.
owner.setBrainLoss(50)
/obj/item/organ/brain/slime
name = "slime core"
desc = "A complex, organic knot of jelly and crystalline particles."
robotic = 2
icon = 'icons/mob/slimes.dmi'
icon_state = "green slime extract"
can_lobotomize = 0
/obj/item/organ/brain/golem
name = "chelm"
@@ -103,3 +137,4 @@
robotic = 2
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll"
can_lobotomize = 0
+2 -21
View File
@@ -225,10 +225,9 @@ proc/get_radio_key_from_channel(var/channel)
if (speech_sound)
sound_vol *= 0.5
var/turf/T = get_turf(src)
var/list/listening = list()
var/list/listening_obj = list()
var/turf/T = get_turf(src)
if(T)
//make sure the air can transmit speech - speaker's side
@@ -241,26 +240,8 @@ proc/get_radio_key_from_channel(var/channel)
italics = 1
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
var/list/hear = hear(message_range,T)
var/list/hearturfs = list()
get_mobs_and_objs_in_view_fast(T, message_range, listening, listening_obj)
for(var/I in hear)
if(ismob(I))
var/mob/M = I
listening += M
hearturfs += M.locs[1]
else if(isobj(I))
var/obj/O = I
hearturfs += O.locs[1]
listening_obj |= O
for(var/mob/M in player_list)
if(src.client && M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS))
listening |= M
continue
if(M.loc && M.locs[1] in hearturfs)
listening |= M
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
+3 -1
View File
@@ -163,6 +163,8 @@ var/list/ai_verbs_default = list(
else
if (B.brainmob.mind)
B.brainmob.mind.transfer_to(src)
if(B.brainobj)
B.brainobj.lobotomized = 1
on_mob_init()
@@ -271,7 +273,7 @@ var/list/ai_verbs_default = list(
aiPDA.ownjob = "AI"
aiPDA.owner = pickedName
aiPDA.name = pickedName + " (" + aiPDA.ownjob + ")"
setup_icon() //this is because the ai custom name is related to the ai name, so, we just call the setup icon after someone named their ai
/*
@@ -128,6 +128,8 @@
icontype = "Basic"
updatename(modtype)
updateicon()
if(mmi && mmi.brainobj)
mmi.brainobj.lobotomized = 1
radio = new /obj/item/device/radio/borg(src)
common_radio = radio
@@ -1,12 +1,12 @@
//Corgi
/mob/living/simple_animal/corgi
name = "\improper corgi"
name = "corgi"
real_name = "corgi"
desc = "It's a corgi."
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak = list("YAP!", "Woof!", "Bark!", "AUUUUUU!")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
@@ -19,7 +19,7 @@
response_harm = "kicks"
see_in_dark = 5
mob_size = 5
max_nutrition = 250//Dogs are insatiable eating monsters. This scales with their mob size too
max_nutrition = 250 //Dogs are insatiable eating monsters. This scales with their mob size too
stomach_size_mult = 30
seek_speed = 6
possession_candidate = 1
@@ -29,7 +29,7 @@
/mob/living/simple_animal/corgi/New()
..()
nutrition = max_nutrition * 0.3//Ian doesn't start with a full belly so will be hungry at roundstart
nutrition = max_nutrition * 0.3 //Ian doesn't start with a full belly so will be hungry at roundstart
nutrition_step = mob_size * 0.12
//IAN! SQUEEEEEEEEE~
@@ -55,12 +55,10 @@
sleep(1)
/mob/living/simple_animal/corgi/beg(var/atom/thing, var/atom/holder)
visible_emote("stares at the [thing] that [holder] has with sad puppy eyes.",0)
/obj/item/weapon/reagent_containers/food/snacks/meat/corgi
name = "Corgi meat"
desc = "Tastes like... well you know..."
@@ -1,11 +1,12 @@
//Foxxy
/mob/living/simple_animal/corgi/fox
name = "fox"
real_name = "fox"
desc = "It's a fox. I wonder what it says?"
icon_state = "fox"
icon_living = "fox"
icon_dead = "fox_dead"
speak = list("Ack-Ack","Ack-Ack-Ack-Ackawoooo","Geckers","Awoo","Tchoff")
speak = list("Ack-Ack.", "Ack-Ack-Ack-Ackawoooo!", "Awoo!", "Tchoff.")
speak_emote = list("geckers", "barks")
emote_hear = list("howls","barks")
emote_see = list("shakes its head", "shivers")
@@ -18,8 +19,9 @@
response_disarm = "gently pushes aside"
response_harm = "kicks"
mob_size = 4
//Captain fox
/mob/living/simple_animal/corgi/fox/Chauncey
name = "Chauncey"
real_name = "Chauncey"
desc = "Chauncey, the Captain's trustworthy fox. I wonder what it says?"
+18 -13
View File
@@ -158,21 +158,26 @@
var/range = world.view
if(hearing_distance)
range = hearing_distance
var/list/hear = get_mobs_or_objects_in_view(range,src)
for(var/I in hear)
if(isobj(I))
spawn(0)
if(I) //It's possible that it could be deleted in the meantime.
var/obj/O = I
O.show_message( message, 2, deaf_message, 1)
else if(ismob(I))
var/mob/M = I
var/msg = message
if(self_message && M==src)
msg = self_message
M.show_message( msg, 2, deaf_message, 1)
var/turf/T = get_turf(src)
var/list/mobs = list()
var/list/objs = list()
get_mobs_and_objs_in_view_fast(T, range, mobs, objs)
for(var/m in mobs)
var/mob/M = m
if(self_message && M==src)
M.show_message(self_message,2,deaf_message,1)
continue
M.show_message(message,2,deaf_message,1)
for(var/o in objs)
var/obj/O = o
O.show_message(message,2,deaf_message,1)
/mob/proc/findname(msg)
for(var/mob/M in mob_list)
-3
View File
@@ -189,9 +189,6 @@
parent_organ = "chest"
dead_icon = "heart-off"
/obj/item/organ/internal/vaurca/process()
return
/obj/item/organ/vaurca/neuralsocket
name = "neural socket"
organ_tag = "neural socket"
@@ -65,12 +65,20 @@
)
)
/obj/item/weapon/gun/energy/lawgiver/New()
..()
listening_objects += src
/obj/item/weapon/gun/energy/lawgiver/Destroy()
listening_objects -= src
return ..()
/obj/item/weapon/gun/energy/lawgiver/proc/play_message()
while (message_enabled && !message_disable) //Shut down command issued. Inform user that boardcasting has been stopped
usr.audible_message("<span class='warning'>[usr]'s [src.name] broadcasts: [message]</span>","")
playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
sleep(message_delay)
usr << "\red Broadcasting Message disabled"
usr << "<span class='warning'>Broadcasting Message disabled</span>"
message_enabled = 0
message_disable = 0
@@ -80,7 +88,7 @@
else
src.dna = user.dna.unique_enzymes
src.owner_name = user.real_name
user << "\blue You feel your palm heat up as the gun reads your DNA profile."
user << "<span class='notice'>You feel your palm heat up as the gun reads your DNA profile.</span>"
desc += "<br>Linked to: [user.real_name]"
return
@@ -93,7 +101,7 @@
var/obj/item/organ/external/RA = H.get_organ("r_arm")
var/active_hand = H.hand
playsound(user, 'sound/weapons/lawgiver_idfail.ogg', 40, 1)
user << "\red You hear a soft beep from the gun and 'ID FAIL' flashes across the screen."
user << "<span class='danger'>You hear a soft beep from the gun and 'ID FAIL' flashes across the screen.</span>"
user << "<span class='danger'>You feel a tiny prick in your hand!</span>"
user.drop_item()
//Blow up Unauthorized Users Hand
@@ -132,50 +140,50 @@
sel_mode = 1
projectile_type=/obj/item/projectile/bullet/pistol
fire_sound='sound/weapons/Gunshot_smg.ogg'
usr << "\red [src.name] is now set to single shot mode."
usr << "<span class='warning'>[src.name] is now set to single shot mode.</span>"
else if(findtext(msg,"rapidfire"))
sel_mode = 2
projectile_type=/obj/item/projectile/bullet/pistol
fire_sound='sound/weapons/Gunshot_smg.ogg'
usr << "\red [src.name] is now set to rapid fire mode."
usr << "<span class='warning'>[src.name] is now set to rapid fire mode.</span>"
else if(findtext(msg,"highex") || findtext(msg,"grenade"))
sel_mode = 3
projectile_type=/obj/item/projectile/bullet/gyro/law
fire_sound='sound/effects/Explosion1.ogg'
usr << "\red [src.name] is now set to high explosive mode."
usr << "<span class='warning'>[src.name] is now set to high explosive mode.</span>"
else if(findtext(msg,"stun"))
sel_mode = 4
projectile_type=/obj/item/projectile/beam/stun
fire_sound='sound/weapons/Taser.ogg'
usr << "\red [src.name] is now set to stun mode."
usr << "<span class='warning'>[src.name] is now set to stun mode.</span>"
else if(findtext(msg,"hotshot") || findtext(msg,"incendiary"))
sel_mode = 5
projectile_type=/obj/item/projectile/bullet/shotgun/incendiary
fire_sound='sound/weapons/Gunshot.ogg'
usr << "\red [src.name] is now set to incendiary mode."
usr << "<span class='warning'>[src.name] is now set to incendiary mode.</span>"
else if(findtext(msg,"armorpiercing") || findtext(msg,"execution"))
sel_mode = 6
projectile_type=/obj/item/projectile/bullet/rifle/a556
fire_sound='sound/weapons/Gunshot.ogg'
usr << "\red [src.name] is now set to armorpiercing mode."
usr << "<span class='warning'>[src.name] is now set to armorpiercing mode.</span>"
else if(findtext(msg,"pellets"))
sel_mode = 7
projectile_type=/obj/item/projectile/bullet/pellet/shotgun
fire_sound='sound/weapons/Gunshot.ogg'
usr << "\red [src.name] is now set to pellet mode."
usr << "<span class='warning'>[src.name] is now set to pellet mode.</span>"
/* Other Stuff */
else if(findtext(msg,"reset") && (findtext(msg,"user") || findtext(msg,"dna")))
dna = null
desc = default_desc
usr << "\red [src.name]´s owner has been reset. Do not attempt to fire [src.name] without rebinding a new owner"
usr << "<span class='warning'>[src.name]´s owner has been reset. Do not attempt to fire [src.name] without rebinding a new owner.</span>"
else if((findtext(msg,"disable") || findtext(msg,"deactivate")) && findtext(msg,"crowdcontrol"))
message_disable = 1
usr << "\red [src.name]´s crowdcontrol deactivation sequence started"
usr << "<span class='warning'>[src.name]´s crowdcontrol deactivation sequence started.</span>"
else if((findtext(msg,"enable") || findtext(msg,"activate")) && findtext(msg,"crowdcontrol"))
if(message_enabled) //Check if a message is already broadcasting -> abort
usr << "\red [src.name] is already broadcasting a message."
usr << "<span class='warning'>[src.name] is already broadcasting a message.</span>"
return
usr << "\red [src.name]´s crowdcontrol activation sequence started"
usr << "<span class='warning'>[src.name]´s crowdcontrol activation sequence started.</span>"
message = "Citizens stay calm. Stand back from the crime scene. Interference with the crime scene carries an automatic brig sentence."
message_enabled = 1
message_disable = 0
@@ -10,6 +10,7 @@
processing_objects.Add(src)
spawning_id = pick("blood","holywater","lube","stoxin","ethanol","ice","glycerol","fuel","cleaner")
/obj/item/weapon/reagent_containers/glass/replenishing/process()
reagents.add_reagent(spawning_id, 0.3)
@@ -23,6 +24,12 @@
/obj/item/clothing/mask/gas/poltergeist/New()
processing_objects.Add(src)
listening_objects += src
/obj/item/clothing/mask/gas/poltergeist/Destroy()
processing_objects.Remove(src)
listening_objects -= src
return ..()
/obj/item/clothing/mask/gas/poltergeist/process()
if(heard_talk.len && istype(src.loc, /mob/living) && prob(10))
@@ -57,6 +64,12 @@
/obj/item/weapon/vampiric/New()
..()
processing_objects.Add(src)
listening_objects += src
/obj/item/weapon/vampiric/Destroy()
processing_objects.Remove(src)
listening_objects -= src
return ..()
/obj/item/weapon/vampiric/process()
//see if we've identified anyone nearby
@@ -146,6 +159,10 @@
processing_objects.Add(src)
loc_last_process = src.loc
/obj/effect/decal/cleanable/blood/splatter/animated/Destroy()
processing_objects.Remove(src)
return ..()
/obj/effect/decal/cleanable/blood/splatter/animated/process()
if(target_turf && src.loc != target_turf)
step_towards(src,target_turf)
@@ -175,6 +192,10 @@
/obj/effect/shadow_wight/New()
processing_objects.Add(src)
/obj/effect/shadow_wight/Destroy()
processing_objects.Remove(src)
return ..()
/obj/effect/shadow_wight/process()
if(src.loc)
src.loc = get_turf(pick(orange(1,src)))
@@ -200,4 +221,4 @@
processing_objects.Remove(src)
/obj/effect/shadow_wight/Bump(var/atom/obstacle)
obstacle << "\red You feel a chill run down your spine!"
obstacle << "<span class='warning'>You feel a chill run down your spine!</span>"
+44 -1
View File
@@ -101,7 +101,7 @@
/datum/surgery_step/internal/detatch_organ
allowed_tools = list(
/obj/item/weapon/scalpel = 100,
/obj/item/weapon/scalpel = 100,
/obj/item/weapon/material/knife = 75,
/obj/item/weapon/material/shard = 50
)
@@ -342,6 +342,49 @@
"<span class='warning'>Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(BRUISE, 20)
/datum/surgery_step/internal/lobotomize
allowed_tools = list(
/obj/item/weapon/scalpel/manager = 95,
/obj/item/weapon/surgicaldrill = 75,
/obj/item/weapon/pickaxe/ = 5
)
min_duration = 100
max_duration = 120
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (!..())
return 0
target.op_stage.current_organ = null
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
if(sponge && sponge.can_lobotomize && !sponge.lobotomized)
target.op_stage.current_organ = sponge
return ..()
else
return 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/brain/B = target.op_stage.current_organ
user.visible_message("[user] begins lobotomizing [target]'s [B.name] with \the [tool].", \
"You start lobotomizing [target]'s [B.name] with \the [tool].")
target.custom_pain("Someone's scraping away at your [B.name]!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/brain/B = target.op_stage.current_organ
user.visible_message("<span class='notice'>[user] has lobotomized [target]'s \the [B.name] with \the [tool].</span>" , \
"<span class='notice'>You have lobotomized [target]'s [B.name] with \the [tool].</span>")
B.lobotomize(user)
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<span class='warning'>[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='warning'>Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(BRUISE, 20)
//////////////////////////////////////////////////////////////////
// HEART SURGERY //
//////////////////////////////////////////////////////////////////