Merge branch 'master' of https://github.com/tgstation/-tg-station into syndicateshotgunsreturn

Conflicts:
	icons/mob/items_lefthand.dmi
	icons/mob/items_righthand.dmi
This commit is contained in:
paprka
2014-10-01 20:10:58 -07:00
38 changed files with 600 additions and 297 deletions
+82 -81
View File
@@ -214,20 +214,21 @@
var/mob/living/buckled_mob
var/list/mutations = list()
New()
return
/obj/effect/spacevine/New()
return
Destroy()
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_death(src)
if(master)
master.vines -= src
master.growth_queue -= src
if(!master.vines.len)
var/obj/item/seeds/kudzuseed/KZ = new(loc)
KZ.mutations |= mutations
mutations = list()
..()
/obj/effect/spacevine/Destroy()
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_death(src)
if(master)
master.vines -= src
master.growth_queue -= src
if(!master.vines.len)
var/obj/item/seeds/kudzuseed/KZ = new(loc)
KZ.mutations |= mutations
mutations = list()
SetOpacity(0)
..()
/obj/effect/spacevine/proc/on_chem_effect(datum/reagent/R)
var/override = 0
@@ -347,84 +348,84 @@
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
//meaning if you get the spacevines' size to something less than 20 plots, it won't grow anymore.
New(loc, list/muts, mttv)
if(!istype(src.loc,/turf/simulated/floor))
qdel(src)
/obj/effect/spacevine_controller/New(loc, list/muts, mttv)
if(!istype(src.loc,/turf/simulated/floor))
qdel(src)
spawn_spacevine_piece(src.loc, , muts)
processing_objects.Add(src)
init_subtypes(/datum/spacevine_mutation/, mutations_list)
if(mttv != null)
mutativness = mttv
spawn_spacevine_piece(src.loc, , muts)
processing_objects.Add(src)
init_subtypes(/datum/spacevine_mutation/, mutations_list)
if(mttv != null)
mutativness = mttv
Destroy()
processing_objects.Remove(src)
..()
/obj/effect/spacevine_controller/Destroy()
processing_objects.Remove(src)
..()
proc/spawn_spacevine_piece(var/turf/location, obj/effect/spacevine/parent, list/muts)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
if(muts && muts.len)
SV.mutations |= muts
if(parent)
SV.mutations |= parent.mutations
SV.color = parent.color
if(prob(mutativness))
SV.mutations |= pick(mutations_list)
var/datum/spacevine_mutation/randmut = pick(SV.mutations)
SV.color = randmut.hue
/obj/effect/spacevine_controller/proc/spawn_spacevine_piece(var/turf/location, obj/effect/spacevine/parent, list/muts)
var/obj/effect/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
if(muts && muts.len)
SV.mutations |= muts
if(parent)
SV.mutations |= parent.mutations
SV.color = parent.color
if(prob(mutativness))
SV.mutations |= pick(mutations_list)
var/datum/spacevine_mutation/randmut = pick(SV.mutations)
SV.color = randmut.hue
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.on_birth(SV)
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.on_birth(SV)
process()
if(!vines)
qdel(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
qdel(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
/obj/effect/spacevine_controller/process()
if(!vines)
qdel(src) //space vines exterminated. Remove the controller
return
if(!growth_queue)
qdel(src) //Sanity check
return
if(vines.len >= 250 && !reached_collapse_size)
reached_collapse_size = 1
if(vines.len >= 30 && !reached_slowdown_size )
reached_slowdown_size = 1
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
else
length = 0
else
var/length = 0
if(reached_collapse_size)
length = 0
else if(reached_slowdown_size)
if(prob(25))
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
else
length = 0
else
length = 1
length = min( 30 , max( length , vines.len / 5 ) )
var/i = 0
var/list/obj/effect/spacevine/queue_end = list()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.process_mutation(SV)
if(SV.energy < 2) //If tile isn't fully grown
if(prob(20))
SV.grow()
else //If tile is fully grown
SV.buckle_mob()
for( var/obj/effect/spacevine/SV in growth_queue )
i++
queue_end += SV
growth_queue -= SV
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.process_mutation(SV)
if(SV.energy < 2) //If tile isn't fully grown
if(prob(20))
SV.grow()
else //If tile is fully grown
SV.buckle_mob()
//if(prob(25))
SV.spread()
if(i >= length)
break
//if(prob(25))
SV.spread()
if(i >= length)
break
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
growth_queue = growth_queue + queue_end
//sleep(5)
//src.process()
/obj/effect/spacevine/proc/grow()
if(!energy)
+1 -1
View File
@@ -2,7 +2,7 @@
//Things like airguitar can be done without arms, and the flap thing makes so little sense it's a keeper.
//Intended to be called by a higher up emote proc if the requested emote isn't in the custom emotes.
/mob/living/emote(var/act,var/m_type=1,var/message = null)
/mob/living/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if (findtext(act, "-", 1, null))
@@ -90,10 +90,10 @@
/mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/construct/builder))
health += 5
M.emote("mends some of \the <EM>[src]'s</EM> wounds.")
M.emote("me", 1, "mends some of \the <EM>[src]'s</EM> wounds.")
else if(src != M)
if(M.melee_damage_upper <= 0)
M.emote("[M.friendly] \the <EM>[src]</EM>")
M.emote("me", 1, "[M.friendly] \the <EM>[src]</EM>")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
@@ -39,7 +39,7 @@
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(!M.stat)
M.splat()
emote("splats \the [M]")
emote("me", 1, "splats \the [M]")
movement_target = null
stop_automated_movement = 0
break
@@ -66,7 +66,7 @@
for (var/mob/M in viewers(src, null))
M.show_message("<span class='danger'>[user] gently taps [src] with [O].</span>")
if(health>0 && prob(15))
emote("looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression")
emote("me", 1, "looks at [user] with [pick("an amused","an annoyed","a confused","a resentful", "a happy", "an excited")] expression")
return
..()
@@ -388,10 +388,10 @@
movement_target.attack_animal(src)
else if(ishuman(movement_target.loc) )
if(prob(20))
emote("stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
emote("me", 1, "stares at [movement_target.loc]'s [movement_target] with a sad puppy-face")
if(prob(1))
emote(pick("dances around","chases its tail"))
emote("me", 1, pick("dances around","chases its tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -512,7 +512,7 @@
if(!stat && !resting && !buckled)
if(prob(1))
emote(pick("dances around","chases her tail"))
emote("me", 1, pick("dances around","chases her tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -529,7 +529,7 @@
if(change > 0)
if(M && stat != DEAD) // Added check to see if this mob (the corgi) is dead to fix issue 2454
flick_overlay(image('icons/mob/animal.dmi',src,"heart-ani2",MOB_LAYER+1), list(M.client), 20)
emote("yaps happily")
emote("me", 1, "yaps happily")
else
if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case)
emote("growls")
emote("me", 1, "growls")
@@ -1,10 +1,14 @@
#define HANDS_LAYER 1
#define TOTAL_LAYERS 1
#define HEAD_LAYER 2
#define TOTAL_LAYERS 2
#define DRONE_NET_CONNECT "<span class='notice'>DRONE NETWORK: [name] connected.</span>"
#define DRONE_NET_DISCONNECT "<span class='danger'>DRONE NETWORK: [name] is not responding.</span>"
/mob/living/simple_animal/drone
name = "drone"
name = "Drone"
desc = "A maintenance drone, an expendable robot built to perform station repairs."
icon = 'icons/mob/drone.dmi'
icon_state = "drone_grey"
@@ -30,21 +34,34 @@
var/laws = \
"1. You may not involve yourself in the matters of another being, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.\n"+\
"2. You may not harm any being, regardless of intent or circumstance.\n"+\
"3. You must maintain, repair, improve, and power the station to the best of your abilities."
"3. Your goals are to build, maintain, repair, improve, and power to the best of your abilities, You must never actively work against these goals."
var/light_on = 0
var/alarms = list("Atmosphere" = list(), "Fire" = list(), "Power" = list())
var/obj/item/internal_storage //Drones can store one item, of any size/type in their body
var/obj/item/head
var/obj/item/default_storage = /obj/item/weapon/storage/toolbox/drone //If this exists, it will spawn in internal storage
var/obj/item/default_hatmask //If this exists, it will spawn in the hat/mask slot if it can fit
/mob/living/simple_animal/drone/New()
..()
name = "Drone ([rand(100,999)])"
name = name + " ([rand(100,999)])"
real_name = name
access_card = new /obj/item/weapon/card/id(src)
var/datum/job/captain/C = new /datum/job/captain
access_card.access = C.get_access()
if(default_storage)
var/obj/item/I = new default_storage(src)
equip_to_slot_or_del(I, "drone_storage_slot")
if(default_hatmask)
var/obj/item/I = new default_hatmask(src)
equip_to_slot_or_del(I, slot_head)
alert_drones(DRONE_NET_CONNECT)
/mob/living/simple_animal/drone/attack_hand(mob/user)
if(isdrone(user))
var/mob/living/simple_animal/drone/D = user
@@ -54,22 +71,27 @@
if(d_input)
switch(d_input)
if("Reactivate")
D.visible_message("<span class='notice'>[D] begins to reactivate [src]</span>")
if(!client)
D << "<span class='notice'>This drone's OS has blue screened, there is no point in repairing them.</span>"
return
D.visible_message("<span class='notice'>[D] begins to reactivate [src].</span>")
if(do_after(user,30,needhand = 1))
health = maxHealth
stat = CONSCIOUS
icon_state = icon_living
D.visible_message("<span class='notice'>[D] reactivates [src]!</span>")
alert_drones(DRONE_NET_CONNECT)
else
D << "<span class='notice'>You need to remain still to reactivate [src]</span>"
D << "<span class='notice'>You need to remain still to reactivate [src].</span>"
if("Cannibalize")
if(D.health < D.maxHealth)
D.visible_message("<span class='notice'>[D] begins to cannibalize parts from [src].</span>")
if(do_after(D, 60,5,0))
D.visible_message("<span class='notice'>[D] repairs itself using [src]'s remains!</span>")
D.adjustBruteLoss(D.health - D.maxHealth)
gib()
D.adjustBruteLoss(-src.maxHealth)
new /obj/effect/decal/cleanable/oil/streak(get_turf(src))
qdel(src)
else
D << "<span class='notice'>You need to remain still to canibalize [src].</span>"
else
@@ -81,6 +103,9 @@
if(ishuman(user))
if(stat == DEAD)
..()
return
if(user.get_active_hand())
user << "<span class='notice'>Your hands are full.</span>"
return
@@ -112,44 +137,18 @@
/mob/living/simple_animal/drone/IsAdvancedToolUser()
return 1
/mob/living/simple_animal/drone/binarycheck()
return 1
/mob/living/simple_animal/drone/radio(message, message_mode)
if(message_mode != MODE_BINARY) //so they can hear binary but can't talk in it
..()
/mob/living/simple_animal/drone/UnarmedAttack(atom/A, proximity)
if(istype(A,/obj/item/weapon/gun))
src << "<span class='warning'>Your subroutines prevent you from picking up [A].</span>"
return
A.attack_hand(src)
/mob/living/simple_animal/drone/attack_ui(slot_id)
if(slot_id == "drone_storage_slot")
var/obj/item/I = get_active_hand()
var/mob/user = src
if(I)
if(!internal_storage)
user.drop_item()
internal_storage = I
I.loc = user
user.visible_message("<span class='notice'>[user] places \a [I] into their internal storage.</span>")
else
user << "<span class='notice'>Your internal storage is full.</span>"
else
if(internal_storage)
var/obj/item/dummy_item = internal_storage
user.put_in_hands(dummy_item)
internal_storage = null
update_inv_internal_storage()
return 1
if(message_mode == MODE_BINARY)
drone_chat(message)
return ITALICS | REDUCE_RANGE
else
..()
/mob/living/simple_animal/drone/UnarmedAttack(atom/A, proximity)
A.attack_hand(src)
/mob/living/simple_animal/drone/swap_hand()
var/obj/item/held_item = get_active_hand()
if(held_item)
@@ -169,17 +168,6 @@
hud_used.r_hand_hud_object.icon_state = "hand_r_active"
/mob/living/simple_animal/drone/put_in_l_hand(obj/item/I)
. = ..()
l_hand.screen_loc = ui_lhand
update_inv_hands()
/mob/living/simple_animal/drone/put_in_r_hand(obj/item/I)
. = ..()
r_hand.screen_loc = ui_rhand
update_inv_hands()
/mob/living/simple_animal/drone/verb/check_laws()
set category = "Drone"
set name = "Check Laws"
@@ -187,11 +175,9 @@
src << "<b>Drone Laws</b>"
src << laws
/mob/living/simple_animal/drone/verb/toggle_light()
set category = "Drone"
set name = "Toggle drone light"
if(light_on)
AddLuminosity(-4)
else
@@ -201,8 +187,42 @@
src << "<span class='notice'>Your light is now [light_on ? "on" : "off"]</span>"
/mob/living/simple_animal/drone/verb/drone_ping()
set category = "Drone"
set name = "Drone ping"
var/alert_s = input(src,"Alert severity level","Drone ping",null) as null|anything in list("Low","Medium","High","Critical")
var/area/A = get_area(loc)
if(alert_s && A && stat != DEAD)
var/msg = "<span class='boldnotice'>DRONE PING: [name]: [alert_s] priority alert in [A.name]!</span>"
alert_drones(msg)
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
for(var/mob/M in player_list)
var/send_msg = 0
if(istype(M, /mob/living/simple_animal/drone) && M.stat != DEAD)
for(var/F in src.faction)
if(F in M.faction)
send_msg = 1
break
else if(dead_can_hear && (M.stat == DEAD) && (M.client.prefs.toggles & CHAT_GHOSTEARS) && !istype(M, /mob/new_player))
send_msg = 1
if(send_msg)
M << msg
/mob/living/simple_animal/drone/proc/drone_chat(msg)
var/rendered = "<i><span class='game say'>DRONE CHAT: <span class='name'>[name]</span>: [msg]</span></i>"
alert_drones(rendered, 1)
/mob/living/simple_animal/drone/Login()
..()
update_inv_hands()
update_inv_head()
update_inv_internal_storage()
check_laws()
if(!picked)
@@ -213,23 +233,109 @@
drop_l_hand()
drop_r_hand()
if(internal_storage)
var/obj/item/dummy_item = internal_storage
dummy_item.loc = get_turf(src)
internal_storage = null
update_inv_internal_storage()
unEquip(internal_storage)
if(head)
unEquip(head)
alert_drones(DRONE_NET_DISCONNECT)
/mob/living/simple_animal/drone/gib()
dust()
/mob/living/simple_animal/drone/unEquip(obj/item/I, force)
if(..(I,force))
update_inv_hands()
if(I == head)
head = null
update_inv_head()
if(I == internal_storage)
internal_storage = null
update_inv_internal_storage()
return 1
return 0
/mob/living/simple_animal/drone/can_equip(obj/item/I, slot)
switch(slot)
if(slot_head)
if(head)
return 0
if(!((I.slot_flags & SLOT_HEAD) || (I.slot_flags & SLOT_MASK)))
return 0
return 1
if("drone_storage_slot")
if(internal_storage)
return 0
return 1
..()
/mob/living/simple_animal/drone/get_item_by_slot(slot_id)
switch(slot_id)
if(slot_head)
return head
if("drone_storage_slot")
return internal_storage
..()
/mob/living/simple_animal/drone/equip_to_slot(obj/item/I, slot)
if(!slot) return
if(!istype(I)) return
if(I == l_hand)
l_hand = null
else if(I == r_hand)
r_hand = null
update_inv_hands()
I.screen_loc = null // will get moved if inventory is visible
I.loc = src
I.equipped(src, slot)
I.layer = 20
switch(slot)
if(slot_head)
head = I
update_inv_head()
if("drone_storage_slot")
internal_storage = I
update_inv_internal_storage()
else
src << "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>"
return
/mob/living/simple_animal/drone/emp_act()
Stun(5)
src << "<span class='alert'><b>ER@%R: MME^RY CO#RU9T!</b> R&$b@0tin)...</span>"
while(stunned)
sleep(5)
check_laws()
/mob/living/simple_animal/drone/proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if(stat != DEAD)
var/list/L = src.alarms[class]
for (var/I in L)
if (I == A.name)
var/list/alarm = L[I]
var/list/sources = alarm[2]
if (!(alarmsource in sources))
sources += alarmsource
return
L[A.name] = list(A, list(alarmsource))
src << "--- [class] alarm detected in [A.name]!"
/mob/living/simple_animal/drone/proc/cancelAlarm(var/class, area/A as area, obj/origin)
if(stat != DEAD)
var/list/L = alarms[class]
var/cleared = 0
for (var/I in L)
if (I == A.name)
var/list/alarm = L[I]
var/list/srcs = alarm[2]
if (origin in srcs)
srcs -= origin
if (srcs.len == 0)
cleared = 1
L -= I
if(cleared)
src << "--- [class] alarm in [A.name] has been cleared."
/mob/living/simple_animal/drone/proc/pick_colour()
var/colour = input("Choose your colour!", "Colour", "grey") in list("grey", "blue", "red", "green", "pink", "orange")
@@ -258,6 +364,11 @@
hands_overlays += image("icon"='icons/mob/items_righthand.dmi', "icon_state"="[r_state]", "layer"=-HANDS_LAYER)
if(client && hud_used)
r_hand.layer = 20
r_hand.screen_loc = ui_rhand
client.screen |= r_hand
if(l_hand)
var/l_state = l_hand.item_state
if(!l_state)
@@ -265,22 +376,53 @@
hands_overlays += image("icon"='icons/mob/items_lefthand.dmi', "icon_state"="[l_state]", "layer"=-HANDS_LAYER)
if(client && hud_used)
l_hand.layer = 20
l_hand.screen_loc = ui_lhand
client.screen |= l_hand
if(hands_overlays.len)
drone_overlays[HANDS_LAYER] = hands_overlays
apply_overlay(HANDS_LAYER)
/mob/living/simple_animal/drone/proc/update_inv_internal_storage()
if(client && hud_used)
for(var/obj/screen/inventory/drone_storage in client.screen)
if(drone_storage.slot_id == "drone_storage_slot")
drone_storage.overlays = list()
if(internal_storage)
drone_storage.overlays += image("icon"=internal_storage.icon, "icon_state"=internal_storage.icon_state)
break
if(internal_storage && client && hud_used)
internal_storage.screen_loc = ui_drone_storage
client.screen += internal_storage
#undef HANDS_LAYER
#undef TOTAL_LAYERS
/mob/living/simple_animal/drone/update_inv_head()
remove_overlay(HEAD_LAYER)
if(head)
if(client && hud_used)
head.screen_loc = ui_drone_head
client.screen += head
var/image/head_overlay = image("icon"='icons/mob/head.dmi', "icon_state"="[head.icon_state]", "layer"=-HEAD_LAYER)
if(istype(head, /obj/item/clothing/mask))
head_overlay.icon = 'icons/mob/mask.dmi'
head_overlay.color = head.color
head_overlay.alpha = head.alpha
head_overlay.pixel_y = -15
drone_overlays[HEAD_LAYER] = head_overlay
apply_overlay(HEAD_LAYER)
//These procs serve as redirection so that the drone updates as expected when other things call these procs
/mob/living/simple_animal/drone/update_inv_l_hand()
update_inv_hands()
/mob/living/simple_animal/drone/update_inv_r_hand()
update_inv_hands()
/mob/living/simple_animal/drone/update_inv_wear_mask()
update_inv_head()
/mob/living/simple_animal/drone/canUseTopic()
if(stat)
@@ -302,6 +444,12 @@
else
mode()
#undef HANDS_LAYER
#undef HEAD_LAYER
#undef TOTAL_LAYERS
#undef DRONE_NET_CONNECT
#undef DRONE_NET_DISCONNECT
//DRONE SHELL
/obj/item/drone_shell
@@ -312,12 +460,16 @@
origin_tech = "programming=2;biotech=4"
var/construction_cost = list("metal"=800, "glass"=350)
var/construction_time=150
var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned
/obj/item/drone_shell/attack_ghost(mob/user)
if(jobban_isbanned(user,"pAI"))
return
var/mob/living/simple_animal/drone/D = new(get_turf(loc))
var/be_drone = alert("Become a drone? (Warning, You can no longer be cloned!)",,"Yes","No")
if(be_drone == "No")
return
var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc))
D.key = user.key
qdel(src)
@@ -351,3 +503,39 @@
/obj/item/clothing/head/drone_holder/container_resist()
uncurl()
//More types of drones
/mob/living/simple_animal/drone/syndrone
name = "Syndrone"
desc = "A modified maintenance drone. This one brings with it the feeling of terror."
icon_state = "drone_synd"
icon_living = "drone_synd"
picked = TRUE
health = 30
maxHealth = 120 //If you murder other drones and cannibalize them you can get much stronger
faction = list("syndicate")
laws = \
"1. Interfere.\n"+\
"2. Kill.\n"+\
"3. Destroy."
default_storage = /obj/item/device/radio/uplink
default_hatmask = /obj/item/clothing/head/helmet/space/hardsuit/syndi
/mob/living/simple_animal/drone/syndrone/New()
..()
if(internal_storage && internal_storage.hidden_uplink)
internal_storage.hidden_uplink.uses = 5
internal_storage.name = "syndicate uplink"
/mob/living/simple_animal/drone/syndrone/Login()
..()
src << "<span class='notice'>You can kill and eat other drones to increase your health!</span>" //Inform the evil lil guy
/obj/item/drone_shell/syndrone
name = "syndrone shell"
desc = "A shell of a syndrone, a modified maintenance drone designed to infiltrate and annihilate."
icon_state = "syndrone_item"
drone_type = /mob/living/simple_animal/drone/syndrone
@@ -1,4 +1,4 @@
//Corgi
//Corgi //best comment 2014
/mob/living/simple_animal/pug
name = "\improper pug"
real_name = "pug"
@@ -24,7 +24,7 @@
if(!stat && !resting && !buckled)
if(prob(1))
emote(pick("chases its tail"))
emote("me", 1, pick("chases its tail"))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
dir = i
@@ -60,7 +60,7 @@
/mob/living/simple_animal/hostile/bear/FindTarget()
. = ..()
if(.)
emote("stares alertly at [.]")
emote("me", 1, "stares alertly at [.]")
stance = HOSTILE_STANCE_ATTACK
/mob/living/simple_animal/hostile/bear/LoseTarget()
@@ -44,7 +44,7 @@
/mob/living/simple_animal/hostile/carp/FindTarget()
. = ..()
if(.)
emote("nashes at [.]")
emote("me", 1, "nashes at [.]")
/mob/living/simple_animal/hostile/carp/AttackingTarget()
. =..()
@@ -37,7 +37,7 @@
/mob/living/simple_animal/hostile/faithless/FindTarget()
. = ..()
if(.)
emote("wails at [.]")
emote("me", 1, "wails at [.]")
/mob/living/simple_animal/hostile/faithless/AttackingTarget()
. =..()
@@ -38,7 +38,7 @@
/mob/living/simple_animal/hostile/mimic/FindTarget()
. = ..()
if(.)
emote("growls at [.]")
emote("me", 1, "growls at [.]")
/mob/living/simple_animal/hostile/mimic/Die()
..()
@@ -39,7 +39,7 @@
/mob/living/simple_animal/hostile/tree/FindTarget()
. = ..()
if(.)
emote("growls at [.]")
emote("me", 1, "growls at [.]")
/mob/living/simple_animal/hostile/tree/AttackingTarget()
. =..()
@@ -419,7 +419,7 @@
//Search for item to steal
parrot_interest = search_for_item()
if(parrot_interest)
emote("looks in [parrot_interest]'s direction and takes flight")
emote("me", 1, "looks in [parrot_interest]'s direction and takes flight")
parrot_state = PARROT_SWOOP | PARROT_STEAL
icon_state = "parrot_fly"
return
@@ -441,7 +441,7 @@
if(AM)
if(istype(AM, /obj/item) || isliving(AM)) //If stealable item
parrot_interest = AM
emote("turns and flies towards [parrot_interest]")
emote("me", 1, "turns and flies towards [parrot_interest]")
parrot_state = PARROT_SWOOP | PARROT_STEAL
return
else //Else it's a perch
@@ -739,7 +739,7 @@
held_item = null
if(health < maxHealth)
adjustBruteLoss(-10)
emote("[src] eagerly downs the cracker")
emote("me", 1, "[src] eagerly downs the cracker")
return 1
@@ -134,23 +134,23 @@
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
else
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
emote(pick(emote_see),1)
emote("me", 1, pick(emote_see))
else
emote(pick(emote_hear),2)
emote("me", 2, pick(emote_see))
//Atmos
@@ -243,18 +243,17 @@
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
/mob/living/simple_animal/emote(var/act, var/m_type=1, var/message = null)
if(stat)
return
if(act == "scream")
act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
visible_message("<B>[src]</B> [act].")
return
..(act)
message = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
act = "me"
..(act, m_type, message)
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.emote("[M.friendly] [src]")
M.emote("me", 1, "[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
+1 -4
View File
@@ -22,10 +22,7 @@
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(ishuman(src) || isrobot(src))
usr.emote("me",1,message)
else
usr.emote(message)
usr.emote("me",1,message)
/mob/proc/say_dead(var/message)
var/name = src.real_name