merging upstream master into local repo

This commit is contained in:
VistaPOWA
2014-01-11 17:14:48 +01:00
95 changed files with 2646 additions and 2416 deletions
+23 -20
View File
@@ -179,27 +179,30 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Follow" // "Haunt"
set desc = "Follow and haunt a mob."
if(istype(usr, /mob/dead/observer))
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
if(target && target != usr)
following = target
spawn(0)
var/turf/pos = get_turf(src)
while(src.loc == pos)
var/list/mobs = getmobs()
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
var/mob/target = mobs[input]
ManualFollow(target)
var/turf/T = get_turf(target)
if(!T)
break
if(following != target)
break
if(!client)
break
src.loc = T
pos = src.loc
sleep(15)
following = null
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(var/atom/movable/target)
if(target && target != src)
if(following && following == target)
return
following = target
src << "\blue Now following [target]"
spawn(0)
var/turf/pos = get_turf(src)
while(loc == pos && target && following == target && client)
var/turf/T = get_turf(target)
if(!T)
break
// To stop the ghost flickering.
if(loc != T)
loc = T
pos = loc
sleep(15)
following = null
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
@@ -28,14 +28,8 @@
if(!gibbed)
emote("deathgasp") //let the world KNOW WE ARE DEAD
//For ninjas exploding when they die./N
if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized )
src << browse(null, "window=spideros")//Just in case.
var/location = loc
explosion(location, 1, 2, 3, 4)
update_canmove()
if(client) blind.layer = 0
if(client) blind.layer = 0
tod = worldtime2text() //weasellos time of death patch
if(mind) mind.store_memory("Time of death: [tod]", 0)
@@ -136,7 +136,7 @@ emp_act
O.show_message(text("\blue [user] has fixed some of the dents on [src]'s [affecting.getDisplayName()]!"), 1) //Tell everyone [src]'s limb (by its real name) has been repaired
return //So we don't attack them as well
else
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condidtion</span>"
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condition</span>"
return
else
user << "<span class='warning'>Need more welding fuel!</span>"
@@ -154,7 +154,7 @@ emp_act
O.show_message(text("\blue [user] has fixed some of the burnt wires on [src]'s [affecting.getDisplayName()]!"), 1)
return //So we don't attack them as well
else
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condidtion</span>"
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condition</span>"
return
//-------------------- End of Cyber limb stuff ---------------------\\
@@ -114,3 +114,6 @@
/mob/living/carbon/human/IsAdvancedToolUser()
return 1//Humans can use guns and such
/mob/living/carbon/human/InCritical()
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
+36 -16
View File
@@ -1,4 +1,3 @@
//Lallander was here
/mob/living/carbon/human/whisper(message as text)
if(!IsVocal())
@@ -24,16 +23,12 @@
return
if (src.stat == 2)
if (src.stat == DEAD)
return src.say_dead(message)
if (src.stat)
return
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && src.name != GetVoice())
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_id_name("Unknown")])"
if (src.name != GetVoice())
alt_name = " (as [get_id_name("Unknown")])"
// Mute disability
if (src.sdisabilities & MUTE)
return
@@ -41,6 +36,24 @@
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
var/whispers = "whispers"
var/critical = InCritical()
// We are unconscious but not in critical, so don't allow them to whisper.
if(stat == UNCONSCIOUS && !critical)
return
// If whispering your last words, limit the whisper based on how close you are to death.
if(critical)
var/health_diff = round(-config.health_threshold_dead + health)
// If we cut our message short, abruptly end it with a-..
var/message_len = length(message)
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
message = Ellipsis(message, 10, 1)
whispers = "whispers in their final breath"
var/italics = 1
var/message_range = 1
@@ -57,7 +70,8 @@
var/list/listening = hearers(message_range, src)
listening -= src
listening += src
if(!critical)
listening += src
var/list/eavesdropping = hearers(2, src)
eavesdropping -= src
eavesdropping -= listening
@@ -79,9 +93,9 @@
for (var/mob/M in watching)
if (M.say_understands(src))
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.name]</span> [whispers] something.</span>"
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers] something.</span>"
M.show_message(rendered, 2)
if (length(heard_a))
@@ -90,7 +104,7 @@
if (italics)
message_a = "<i>[message_a]</i>"
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message_a]\"</span></span>"
for (var/mob/M in heard_a)
M.show_message(rendered, 2)
@@ -106,7 +120,7 @@
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers, <span class='message'>\"[message_b]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers], <span class='message'>\"[message_b]\"</span></span>"
for (var/mob/M in heard_b)
M.show_message(rendered, 2)
@@ -115,18 +129,24 @@
if (M.say_understands(src))
var/message_c
message_c = stars(message)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message_c]\"</span></span>"
M.show_message(rendered, 2)
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers] something.</span>"
M.show_message(rendered, 2)
if (italics)
message = "<i>[message]</i>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message]\"</span></span>"
for (var/mob/M in dead_mob_list)
if (!(M.client))
continue
if (M.stat > 1 && !(M in heard_a))
M.show_message(rendered, 2)
// We whispered our final breath, now we die and show the message you have sent
// since it might have been cut off and it would be annoying not being able to know.
if(critical)
src << rendered
succumb(1)
+9 -5
View File
@@ -5,15 +5,19 @@
cur_area.mob_activate(src)
/mob/living/verb/succumb()
/mob/living/verb/succumb(var/whispered as null)
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.attack_log += "[src] has succumbed to death with [health] points of health!"
if (InCritical())
src.attack_log += "[src] has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!"
src.adjustOxyLoss(src.health + 200)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
if(!whispered)
src << "\blue You have given up life and succumbed to death."
death()
/mob/living/proc/InCritical()
return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS)
/mob/living/ex_act(severity)
if(client && !blinded)
flick("flash", src.flash)
@@ -559,4 +563,4 @@
/mob/living/proc/get_visible_name()
return name
return name
@@ -23,6 +23,8 @@
if(client)
client.screen -= O
contents -= O
if(module)
O.loc = module //Return item to module so it appears in its contents, so it can be taken out again.
if(module_active == O)
module_active = null
@@ -37,6 +39,36 @@
inv3.icon_state = "inv3"
return 1
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
if(!(locate(O) in src.module.modules) && O != src.module.emag)
return
if(activated(O))
src << "<span class='notice'>Already activated</span>"
return
if(!module_state_1)
module_state_1 = O
O.layer = 20
O.screen_loc = inv1.screen_loc
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(!module_state_2)
module_state_2 = O
O.layer = 20
O.screen_loc = inv2.screen_loc
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(!module_state_3)
module_state_3 = O
O.layer = 20
O.screen_loc = inv3.screen_loc
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
else
src << "<span class='notice'>You need to disable a module first!</span>"
/mob/living/silicon/robot/proc/uneq_active()
uneq_module(module_active)
+8 -25
View File
@@ -15,6 +15,9 @@
var/obj/screen/inv2 = null
var/obj/screen/inv3 = null
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
var/obj/screen/robot_modules_background
//3 Modules can be activated at any one time.
var/obj/item/weapon/robot_module/module = null
var/module_active = null
@@ -67,6 +70,10 @@
wires = new(src)
robot_modules_background = new()
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
updatename("Default")
updateicon()
@@ -863,31 +870,7 @@
if (href_list["act"])
var/obj/item/O = locate(href_list["act"])
if(!(locate(O) in src.module.modules) && O != src.module.emag)
return
if(activated(O))
src << "Already activated"
return
if(!module_state_1)
module_state_1 = O
O.layer = 20
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(!module_state_2)
module_state_2 = O
O.layer = 20
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(!module_state_3)
module_state_3 = O
O.layer = 20
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
else
src << "You need to disable a module first!"
activate_module(O)
installed_modules()
if (href_list["deact"])
@@ -2,16 +2,19 @@
/mob/living/simple_animal/cat
name = "cat"
desc = "Kitty!!"
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
speak = list("Meow!","Esp!","Purr!","HSSSSS")
icon_state = "cat2"
icon_living = "cat2"
icon_dead = "cat2_dead"
gender = MALE
speak = list("Meow!", "Esp!", "Purr!", "HSSSSS")
speak_emote = list("purrs", "meows")
emote_hear = list("meows","mews")
emote_hear = list("meows", "mews")
emote_see = list("shakes its head", "shivers")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
species = /mob/living/simple_animal/cat
childtype = /mob/living/simple_animal/cat/kitten
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
response_help = "pets"
response_disarm = "gently pushes aside"
@@ -21,6 +24,10 @@
/mob/living/simple_animal/cat/Runtime
name = "Runtime"
desc = "GCAT"
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
gender = FEMALE
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
@@ -38,6 +45,8 @@
..()
make_babies()
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
@@ -55,4 +64,15 @@
break
if(movement_target)
stop_automated_movement = 1
walk_to(src,movement_target,0,3)
walk_to(src,movement_target,0,3)
/mob/living/simple_animal/cat/Proc
name = "Proc"
/mob/living/simple_animal/cat/kitten
name = "kitten"
desc = "D'aaawwww"
icon_state = "kitten"
icon_living = "kitten"
icon_dead = "kitten_dead"
gender = NEUTER
@@ -6,6 +6,7 @@
icon_state = "corgi"
icon_living = "corgi"
icon_dead = "corgi_dead"
gender = MALE
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
speak_emote = list("barks", "woofs")
emote_hear = list("barks", "woofs", "yaps","pants")
@@ -18,6 +19,8 @@
response_disarm = "bops"
response_harm = "kicks"
see_in_dark = 5
childtype = /mob/living/simple_animal/corgi/puppy
species = /mob/living/simple_animal/corgi
var/obj/item/inventory_head
var/obj/item/inventory_back
var/facehugger
@@ -482,28 +485,9 @@
/mob/living/simple_animal/corgi/Lisa/Life()
..()
make_babies()
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 15)
turns_since_scan = 0
var/alone = 1
var/ian = 0
for(var/mob/M in oviewers(7, src))
if(istype(M, /mob/living/simple_animal/corgi/Ian))
if(M.client)
alone = 0
break
else
ian = M
else
alone = 0
break
if(alone && ian && puppies < 4)
if(near_camera(src) || near_camera(ian))
return
new /mob/living/simple_animal/corgi/puppy(loc)
if(prob(1))
emote(pick("dances around","chases her tail"))
spawn(0)
@@ -57,6 +57,11 @@
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
//Hot simple_animal baby making vars
var/childtype = null
var/scan_ready = 1
var/species //Sorry, no spider+corgi buttbabies.
/mob/living/simple_animal/New()
..()
verbs -= /mob/verb/observe
@@ -481,4 +486,27 @@
/mob/living/simple_animal/revive()
health = maxHealth
..()
..()
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
if(gender != FEMALE || stat || !scan_ready || !childtype || !species)
return
scan_ready = 0
spawn(400)
scan_ready = 1
var/alone = 1
var/mob/living/simple_animal/partner
var/children = 0
for(var/mob/M in oview(7, src))
if(istype(M, childtype)) //Check for children FIRST.
children++
else if(istype(M, species))
if(M.client)
continue
else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_;
partner = M
else if(istype(M, /mob/))
alone = 0
continue
if(alone && partner && children < 3)
new childtype(loc)
+3
View File
@@ -44,4 +44,7 @@
client.eye = src
client.perspective = MOB_PERSPECTIVE
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
+4
View File
@@ -30,4 +30,8 @@
send2irc("Server", "[cheesy_message]")
..()
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
return 1
+1 -1
View File
@@ -166,4 +166,4 @@
var/robot_talk_understand = 0
var/alien_talk_understand = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/turf/listed_turf = null //the current turf being examined in the stat panel
@@ -278,6 +278,10 @@
icon_state = null
gender = MALE
parted
name = "Side Part"
icon_state = "hair_part"
/////////////////////////////
// Facial Hair Definitions //
/////////////////////////////