Conflicts:
	code/modules/admin/topic.dm
This commit is contained in:
Zuhayr
2015-08-22 02:30:14 +09:30
102 changed files with 1220 additions and 1022 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
/mob/dead/observer/verb/view_manfiest()
set name = "View Crew Manifest"
set name = "Show Crew Manifest"
set category = "Ghost"
var/dat
+16
View File
@@ -24,6 +24,10 @@
for(var/turf/t in c.can_see())
visible[t] = t
for(var/mob/living/silicon/ai/AI in living_mob_list)
for(var/turf/t in AI.seen_camera_turfs())
visible[t] = t
// Create a new camera chunk, since the chunks are made as they are needed.
/datum/chunk/camera/New(loc, x, y, z)
@@ -31,3 +35,15 @@
if(c.can_use())
cameras += c
..()
/mob/living/silicon/proc/provides_camera_vision()
return 0
/mob/living/silicon/ai/provides_camera_vision()
return stat != DEAD
/mob/living/silicon/robot/provides_camera_vision()
return src.camera && src.camera.network.len
/mob/living/silicon/ai/proc/seen_camera_turfs()
return seen_turfs_in_range(src, world.view)
@@ -4,13 +4,13 @@
// Update the portable camera everytime the Robot moves.
// This might be laggy, comment it out if there are problems.
/mob/living/silicon/robot/var/updating = 0
/mob/living/silicon/var/updating = 0
/mob/living/silicon/robot/Move()
var/oldLoc = src.loc
. = ..()
if(.)
if(src.camera && src.camera.network.len)
if(provides_camera_vision())
if(!updating)
updating = 1
spawn(BORG_CAMERA_BUFFER)
@@ -18,6 +18,21 @@
cameranet.updatePortableCamera(src.camera)
updating = 0
/mob/living/silicon/AI/Move()
var/oldLoc = src.loc
. = ..()
if(.)
if(provides_camera_vision())
if(!updating)
updating = 1
spawn(BORG_CAMERA_BUFFER)
if(oldLoc != src.loc)
cameranet.updateVisibility(oldLoc, 0)
cameranet.updateVisibility(loc, 0)
updating = 0
#undef BORG_CAMERA_BUFFER
// CAMERA
// An addition to deactivate which removes/adds the camera from the chunk list based on if it works or not.
@@ -42,8 +57,19 @@
update_coverage(1)
/obj/machinery/camera/Destroy()
cameranet.cameras -= src
clear_all_networks()
cameranet.cameras -= src
..()
#undef BORG_CAMERA_BUFFER
// Mobs
/mob/living/silicon/ai/rejuvenate()
var/was_dead = stat == DEAD
..()
if(was_dead && stat != DEAD)
// Arise!
cameranet.updateVisibility(src, 0)
/mob/living/silicon/ai/death(gibbed)
if(..())
// If true, the mob went from living to dead (assuming everyone has been overriding as they should...)
cameranet.updateVisibility(src, 0)
+6 -2
View File
@@ -41,12 +41,15 @@ mob/eye/Destroy()
updateallghostimages()
..()
// Movement code. Returns 0 to stop air movement from moving it.
/mob/eye/Move(n, direct)
if(owner == src)
EyeMove(n, direct)
return EyeMove(n, direct)
return 0
/mob/eye/airflow_hit(atom/A)
airflow_speed = 0
airflow_dest = null
/mob/eye/examinate()
set popup_menu = 0
set src = usr.contents
@@ -110,3 +113,4 @@ mob/eye/Destroy()
sprint = min(sprint + 0.5, max_sprint)
else
sprint = initial
return 1
+7 -10
View File
@@ -11,27 +11,24 @@
/datum/chunk/cult/acquireVisibleTurfs(var/list/visible)
for(var/mob/living/L in living_mob_list)
for(var/turf/t in L.seen_turfs())
for(var/turf/t in L.seen_cult_turfs())
visible[t] = t
/mob/living/proc/seen_turfs()
/mob/living/proc/seen_cult_turfs()
return seen_turfs_in_range(src, 3)
/mob/living/carbon/human/seen_turfs()
/*if(src.isSynthetic())
return list()*/
/mob/living/carbon/human/seen_cult_turfs()
if(mind in cult.current_antagonists)
return seen_turfs_in_range(src, client ? client.view : 7)
return seen_turfs_in_range(src, world.view)
return ..()
/mob/living/silicon/seen_turfs()
/mob/living/silicon/seen_cult_turfs()
return list()
/mob/living/simple_animal/seen_turfs()
/mob/living/simple_animal/seen_cult_turfs()
return seen_turfs_in_range(src, 1)
/mob/living/simple_animal/shade/narsie/seen_turfs()
/mob/living/simple_animal/shade/narsie/seen_cult_turfs()
return view(2, src)
/proc/seen_turfs_in_range(var/source, var/range)
@@ -1311,9 +1311,10 @@
set desc = "Pop a joint back into place. Extremely painful."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
if(!isliving(usr) || !usr.canClick())
return
usr.next_move = world.time + 20
usr.setClickCooldown(20)
if(usr.stat > 0)
usr << "You are unconcious and cannot do that!"
@@ -227,7 +227,7 @@ emp_act
else
visible_message("\red <B>[src] has been attacked in the [hit_area] with [I.name] by [user]!</B>")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
var/armor = run_armor_check(affecting, "melee", I.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].")
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if ((weapon_sharp || weapon_edge) && prob(getarmor(target_zone, "melee")))
@@ -342,7 +342,7 @@ emp_act
var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
if(armor < 2)
apply_damage(throw_damage, dtype, zone, armor, is_sharp(O), has_edge(O), O)
+12 -10
View File
@@ -27,10 +27,11 @@
spawn() escape_legcuffs()
/mob/living/carbon/proc/escape_handcuffs()
if(!(last_special <= world.time)) return
//if(!(last_special <= world.time)) return
next_move = world.time + 100
last_special = world.time + 100
//These two lines represent a significant buff to grabs...
if(!canClick()) return
setClickCooldown(100)
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
break_handcuffs()
@@ -60,11 +61,11 @@
)
drop_from_inventory(handcuffed)
/mob/living/carbon/proc/escape_legcuffs()
if(!(last_special <= world.time)) return
/mob/living/carbon/proc/escape_legcuffs()
if(!canClick())
return
next_move = world.time + 100
last_special = world.time + 100
setClickCooldown(100)
if(can_break_cuffs()) //Don't want to do a lot of logic gating here.
break_legcuffs()
@@ -149,14 +150,15 @@
return ..()
/mob/living/carbon/escape_buckle()
if(!canClick())
return
setClickCooldown(100)
if(!buckled) return
if(!(last_special <= world.time)) return
if(!restrained())
..()
else
next_move = world.time + 100
last_special = world.time + 100
visible_message(
"<span class='danger'>[usr] attempts to unbuckle themself!</span>",
"<span class='warning'>You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)</span>"
+2 -2
View File
@@ -574,7 +574,7 @@ default behaviour is:
set category = "IC"
if(can_resist())
next_move = world.time + 20
setClickCooldown(20)
process_resist()
/mob/living/proc/can_resist()
@@ -582,7 +582,7 @@ default behaviour is:
//so just check weakened instead.
if(stat || weakened)
return 0
if(next_move > world.time)
if(!canClick())
return 0
return 1
+16 -4
View File
@@ -10,24 +10,36 @@
1 - halfblock
2 - fullblock
*/
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/absorb_text = null, var/soften_text = null)
/mob/living/proc/run_armor_check(var/def_zone = null, var/attack_flag = "melee", var/armour_pen = 0, var/absorb_text = null, var/soften_text = null)
if(armour_pen >= 100)
return 0 //might as well just skip the processing
var/armor = getarmor(def_zone, attack_flag)
var/absorb = 0
//Roll armour
if(prob(armor))
absorb += 1
if(prob(armor))
absorb += 1
//Roll penetration
if(prob(armour_pen))
absorb -= 1
if(prob(armour_pen))
absorb -= 1
if(absorb >= 2)
if(absorb_text)
show_message("[absorb_text]")
else
show_message("\red Your armor absorbs the blow!")
show_message("<span class='warning'>Your armor absorbs the blow!</span>")
return 2
if(absorb == 1)
if(absorb_text)
show_message("[soften_text]",4)
else
show_message("\red Your armor softens the blow!")
show_message("<span class='warning'>Your armor softens the blow!</span>")
return 1
return 0
@@ -64,7 +76,7 @@
return
//Armor
var/absorb = run_armor_check(def_zone, P.check_armour)
var/absorb = run_armor_check(def_zone, P.check_armour, P.armor_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.check_armour)))
@@ -0,0 +1,2 @@
/mob/living/silicon/ai/SelfMove(turf/n, direct)
return 0
@@ -35,7 +35,7 @@
return
/mob/living/captive_brain/can_resist()
return !(stat || next_move > world.time)
return !(stat || !canClick())
/mob/living/captive_brain/process_resist()
//Resisting control by an alien mind.
@@ -269,7 +269,6 @@
/mob/living/simple_animal/attackby(var/obj/item/O, var/mob/user)
if(istype(O, /obj/item/stack/medical))
user.changeNext_move(4)
if(stat != DEAD)
var/obj/item/stack/medical/MED = O
if(health < maxHealth)
@@ -286,12 +285,12 @@
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/material/knife) || istype(O, /obj/item/weapon/material/knife/butch))
harvest(user)
else
else
attacked_with_item(O, user)
//TODO: refactor mob attackby(), attacked_by(), and friends.
/mob/living/simple_animal/proc/attacked_with_item(var/obj/item/O, var/mob/user)
user.changeNext_move(8)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!O.force)
visible_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
return
@@ -308,7 +307,7 @@
usr << "<span class='danger'>This weapon is ineffective, it does no damage.</span>"
visible_message("<span class='danger'>\The [src] has been attacked with \the [O] by [user].</span>")
user.do_attack_animation(src)
user.do_attack_animation(src)
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
+2 -4
View File
@@ -277,8 +277,6 @@
if (W)
W.attack_self(src)
update_inv_r_hand()
if(next_move < world.time)
next_move = world.time + 2
return
/*
@@ -886,9 +884,9 @@ mob/proc/yank_out_object()
set desc = "Remove an embedded item at the cost of bleeding and pain."
set src in view(1)
if(!isliving(usr) || usr.next_move > world.time)
if(!isliving(usr) || !usr.canClick())
return
usr.next_move = world.time + 20
usr.setClickCooldown(20)
if(usr.stat == 1)
usr << "You are unconcious and cannot do that!"
+4 -4
View File
@@ -209,7 +209,7 @@
return
if(state == GRAB_UPGRADING)
return
if(assailant.next_move > world.time)
if(!assailant.canClick())
return
if(world.time < (last_action + UPGRADE_COOLDOWN))
return
@@ -250,7 +250,7 @@
hud.name = "kill"
affecting.Stun(10) //10 ticks of ensured grab
else if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "kill1"
state = GRAB_KILL
@@ -259,10 +259,10 @@
assailant.attack_log += "\[[time_stamp()]\] <font color='red'>Strangled (kill intent) [affecting.name] ([affecting.ckey])</font>"
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
assailant.next_move = world.time + 10
affecting.setClickCooldown(10)
affecting.losebreath += 1
affecting.set_dir(WEST)
adjust_position()
adjust_position()
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
+3
View File
@@ -10,6 +10,9 @@
return (!mover.density || !density || lying)
return
/mob/proc/setMoveCooldown(var/timeout)
if(client)
client.move_delay = max(world.time + timeout, client.move_delay)
/client/North()
..()