Merge pull request #844 from Erthilo/TGUpdates

TG Updates up to r2962
This commit is contained in:
CIB
2012-04-16 08:05:11 -07:00
56 changed files with 513 additions and 300 deletions
@@ -1531,6 +1531,7 @@ datum
M:eye_blurry = max(M:eye_blurry-5 , 0)
M:eye_blind = max(M:eye_blind-5 , 0)
M:disabilities &= ~1
M:eye_stat = max(M:eye_stat-5, 0)
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// if(data >= 100)
+19
View File
@@ -12,6 +12,25 @@
var/obj/item/weapon/cell/cell = 0
body_parts_covered = HANDS
/obj/item/clothing/gloves/boxing
name = "boxing gloves"
desc = "Because you really needed another excuse to punch your crewmates."
icon_state = "boxing"
item_state = "boxing"
/obj/item/clothing/gloves/boxing/green
icon_state = "boxinggreen"
item_state = "boxinggreen"
/obj/item/clothing/gloves/boxing/blue
icon_state = "boxingblue"
item_state = "boxingblue"
/obj/item/clothing/gloves/boxing/yellow
icon_state = "boxingyellow"
item_state = "boxingyellow"
/obj/item/clothing/gloves/white
name = "White Gloves"
desc = "These look pretty fancy."
+1 -1
View File
@@ -19,7 +19,7 @@
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
slowdown = 1.0
allowed = list(/obj/item/weapon/tank/emergency_oxygen)
allowed = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/pen,/obj/item/device/flashlight/pen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
+15 -1
View File
@@ -23,6 +23,8 @@
wanderer = 1
//Will open doors it bumps ignoring access
opensdoors = 0
//Will randomly travel through vents
ventcrawl = 0
//Internal tracking ignore
frustration = 0
@@ -34,6 +36,10 @@
target = null
oldtarget_name = null
target_lastloc = null
thinkspeed = 15
chasespeed = 4
wanderspeed = 10
//The last guy who attacked it
attacker = null
//Will not attack this thing
@@ -49,6 +55,11 @@
atksame = 0
atkmech = 0
//Attacks syndies/traitors (distinguishes via mind)
atksynd = 1
//Attacks things NOT in its obj/req_access list
atkreq = 0
//Damage multipliers
brutevuln = 1
firevuln = 1
@@ -61,7 +72,10 @@
//Basic attack message when they move to attack and attack
angertext = "charges at"
attacktext = "attacks"
deathtext = "dies!"
chasestate = null // the icon state to use when attacking or chasing a target
attackflick = null // the icon state to flick when it attacks
attack_sound = null // the sound it makes when it attacks!
attack_speed = 25 // delay of attack
@@ -121,4 +135,4 @@
*/
*/
+57 -18
View File
@@ -13,7 +13,7 @@
if("thinking")
src.attack = 0
src.target = null
sleep(15)
sleep(thinkspeed)
walk_to(src,0)
if (src.aggressive) seek_target()
if (src.wanderer && !src.target) src.task = "wandering"
@@ -29,11 +29,13 @@
var/mob/living/carbon/M = src.target
ChaseAttack()
src.task = "attacking"
if(chasestate)
icon_state = chasestate
src.anchored = 1
src.target_lastloc = M.loc
else
var/turf/olddist = get_dist(src, src.target)
walk_to(src, src.target,1,speed)
walk_to(src, src.target,1,chasespeed)
if ((get_dist(src, src.target)) >= (olddist))
src.frustration++
else
@@ -45,6 +47,8 @@
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
src.anchored = 0
src.task = "chasing"
if(chasestate)
icon_state = chasestate
else
if (get_dist(src, src.target) <= 1)
var/mob/living/carbon/M = src.target
@@ -58,20 +62,25 @@
src.attacking = 0
else
if(M!=null)
if(M.health < 0)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
if(ismob(src.target))
if(M.health < 0)
src.task = "thinking"
src.target = null
src.anchored = 0
src.last_found = world.time
src.frustration = 0
src.attacking = 0
else
src.anchored = 0
src.attacking = 0
src.task = "chasing"
if(chasestate)
icon_state = chasestate
if("wandering")
if(chasestate)
icon_state = initial(icon_state)
patrol_step()
sleep(10)
sleep(wanderspeed)
spawn(8)
process()
return
@@ -114,29 +123,57 @@
if (src.target)
src.task = "chasing"
break
// Ignore syndicates and traitors if specified
if(!atksynd && C.mind)
var/datum/mind/synd_mind = C.mind
if( synd_mind.special_role == "Syndicate" || synd_mind.special_role == "traitor" )
continue
if((C.name == src.oldtarget_name) && (world.time < src.last_found + 100)) continue
if(istype(C, /mob/living/carbon/) && !src.atkcarbon) continue
if(istype(C, /mob/living/silicon/) && !src.atksilicon) continue
if(atkreq)
if(src.allowed(C)) continue
if(C.health < 0) continue
if(istype(C, /mob/living/carbon/) && src.atkcarbon) src.attack = 1
if(istype(C, /mob/living/silicon/) && src.atksilicon) src.attack = 1
if(atkreq)
if(!src.allowed(C)) src.attack = 1
if(src.attack)
T = C
break
if(!src.attack)
for(var/obj/effect/critter/C in view(src.seekrange,src))
if(istype(C, /obj/effect/critter) && !src.atkcritter) continue
if(istype(C, /obj/mecha) && !src.atkmech) continue
if(!src.atkcritter) continue
if(C.health <= 0) continue
if(istype(C, /obj/effect/critter) && src.atkcritter)
if(src.atkcritter)
if((istype(C, src.type) && !src.atksame) || (C == src)) continue
src.attack = 1
if(istype(C, /obj/mecha) && src.atkmech) src.attack = 1
if(src.attack)
T = C
break
if(!src.attack)
for(var/obj/mecha/C in view(src.seekrange,src))
if(!C.occupant) continue
if(atkreq && C.occupant)
if(src.allowed(C.occupant)) continue
if(!atksynd && C.occupant)
if(C.occupant.mind)
var/datum/mind/synd_mind = C.occupant.mind
if( synd_mind.special_role == "Syndicate" || synd_mind.special_role == "traitor" )
continue
if(!src.atkmech) continue
if(C.health <= 0) continue
if(src.atkmech) src.attack = 1
if(src.attack)
T = C
break
if(src.attack)
src.target = T
src.oldtarget_name = T:name
@@ -152,10 +189,11 @@
RunAttack()
src.attacking = 1
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src]</B> [src.attacktext] [src.target]!", 1)
if(ismob(src.target))
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src]</B> [src.attacktext] [src.target]!", 1)
var/damage = rand(melee_damage_lower, melee_damage_upper)
if(istype(target, /mob/living/carbon/human))
@@ -174,7 +212,8 @@
if(isobj(src.target))
if(istype(target, /obj/mecha))
src.target:take_damage(rand(melee_damage_lower,melee_damage_upper))
//src.target:take_damage(rand(melee_damage_lower,melee_damage_upper))
src.target:attack_critter(src)
else
src.target:TakeDamage(rand(melee_damage_lower,melee_damage_upper))
spawn(attack_speed)
@@ -200,4 +239,4 @@
smoke.set_up(10, 0, src.loc)
smoke.start()
src.task = "thinking"
*/
*/
+6 -5
View File
@@ -13,7 +13,7 @@ Contains the procs that control attacking critters
if("fire") damage = W.force * firevuln
if("brute") damage = W.force * brutevuln
TakeDamage(damage)
if(src.defensive) Target_Attacker(user)
if(src.defensive && alive) Target_Attacker(user)
return
@@ -51,9 +51,10 @@ Contains the procs that control attacking critters
if(!target) return
src.target = target
src.oldtarget_name = target:name
if(task != "chasing" || task != "attacking")
for(var/mob/O in viewers(src, null))
O.show_message("\red <b>[src]</b> [src.angertext] at [target:name]!", 1)
if(task != "chasing" && task != "attacking")
if(angertext && angertext != "")
for(var/mob/O in viewers(src, null))
O.show_message("\red <b>[src]</b> [src.angertext] at [target:name]!", 1)
src.task = "chasing"
return
@@ -75,7 +76,7 @@ Contains the procs that control attacking critters
src.anchored = 0
src.density = 0
walk_to(src,0)
src.visible_message("<b>[src]</b> dies!")
src.visible_message("<b>[src]</b> [deathtext]")
Harvest(var/obj/item/weapon/W, var/mob/living/user)
@@ -31,30 +31,4 @@
if (mind) mind.store_memory("Time of death: [tod]", 0)
else src << "We seem to have misplaced your mind datum, so we can't add this to your memory, but you died at [tod]"
var/cancel
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
spawn (50)
cancel = 0
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn (300)
log_game("Rebooting because of no live players")
world.Reboot()
return ..(gibbed)
@@ -34,30 +34,4 @@
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
mind.store_memory("Time of death: [tod]", 0)
var/cancel
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
spawn (50)
cancel = 0
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn (300)
log_game("Rebooting because of no live players")
world.Reboot()
return ..(gibbed)
@@ -15,25 +15,8 @@
see_invisible = 2
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
var/cancel
store_memory("Time of death: [tod]", 0)
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if (key)
spawn(50)
if(key && stat == 2)
@@ -56,32 +56,6 @@
message_admins("\red Traitor [key_name_admin(src)] has died.")
log_game("Traitor [key_name(src)] has died.")
var/cancel
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
spawn (50)
cancel = 0
for (var/mob/M in world)
if (M.client && !M.stat)
cancel = 1
break
if (!cancel && !abandon_allowed)
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn (300)
log_game("Rebooting because of no live players")
world.Reboot()
return ..(gibbed)
/mob/living/carbon/human/proc/ChangeToHusk()
+1 -1
View File
@@ -1282,7 +1282,7 @@
if (druggy)
client.screen += hud_used.druggy
if (istype(head, /obj/item/clothing/head/helmet/welding))
if ((istype(head, /obj/item/clothing/head/helmet/welding)) )
if(!head:up && tinted_weldhelh)
client.screen += hud_used.darkMask
@@ -1,7 +1,7 @@
/mob/living/carbon/metroid/death(gibbed)
if(src.stat == 2)
return
var/cancel
if(!gibbed)
if(istype(src, /mob/living/carbon/metroid/adult))
@@ -32,27 +32,8 @@
drop_item()
src.hand = h
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
//mind.store_memory("Time of death: [tod]", 0)
ticker.mode.check_win()
//src.icon_state = "dead"
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if (src.key)
spawn(50)
if(src.key && src.stat == 2)
@@ -359,7 +359,10 @@
Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
if(bodytemperature <= 50) // sqrting negative numbers is bad
adjustFireLoss(200)
else
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
else
Tempstun = 0
+1 -20
View File
@@ -1,7 +1,7 @@
/mob/living/carbon/monkey/death(gibbed)
if(src.stat == 2)
return
var/cancel
if (src.healths)
src.healths.icon_state = "health5"
if(!gibbed)
@@ -21,27 +21,8 @@
drop_item()
src.hand = h
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
//mind.store_memory("Time of death: [tod]", 0)
ticker.mode.check_win()
//src.icon_state = "dead"
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if (src.key)
spawn(50)
if(src.key && src.stat == 2)
+1 -18
View File
@@ -1,5 +1,4 @@
/mob/living/silicon/ai/death(gibbed)
var/cancel
stat = 2
canmove = 0
if(blind)
@@ -49,24 +48,8 @@
loc.icon_state = "aicard-404"
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
mind.store_memory("Time of death: [tod]", 0)
if(mind) mind.store_memory("Time of death: [tod]", 0)
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if (key)
spawn(50)
if(key && stat == 2)
@@ -1,5 +1,4 @@
/mob/living/silicon/pai/death(gibbed)
var/cancel
src.stat = 2
src.canmove = 0
if(src.blind)
@@ -13,22 +12,6 @@
//var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
//mind.store_memory("Time of death: [tod]", 0)
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if(key)
spawn(50)
src.ghostize(1)
@@ -1,5 +1,4 @@
/mob/living/silicon/robot/death(gibbed)
var/cancel
if (!gibbed)
src.emote("deathgasp")
src.stat = 2
@@ -28,22 +27,6 @@
sql_report_cyborg_death(src)
for(var/mob/M in world)
if ((M.client && !( M.stat )))
cancel = 1
break
if (!( cancel ))
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
feedback_set_details("end_error","no live players")
feedback_set_details("round_end","[time2text(world.realtime)]")
if(blackbox)
blackbox.save_all_data_to_sql()
spawn( 300 )
log_game("Rebooting because of no live players")
world.Reboot()
return
if (src.key)
spawn(50)
if(src.key && src.stat == 2)
+28
View File
@@ -105,6 +105,34 @@
/mob/proc/death(gibbed)
timeofdeath = world.time
var/cancel = 0
for(var/mob/M in world)
if(M.client && (M.stat != DEAD))
cancel = 1
break
if(!cancel)
world << "<B>Everyone is dead! Resetting in 30 seconds!</B>"
spawn(300)
for(var/mob/M in world)
if(M.client && (M.stat != DEAD))
world << "Aborting world restart!"
return
feedback_set_details("end_error","no live players")
if(blackbox)
blackbox.save_all_data_to_sql()
sleep(50)
log_game("Rebooting because of no live players")
world.Reboot()
return
return ..(gibbed)
/mob/proc/restrained()
+2
View File
@@ -252,6 +252,7 @@ proc/slur(phrase)
p++//for each letter p is increased to find where the next letter will be.
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
proc/Gibberish(t, p)
/* Turn text into complete gibberish! */
var/returntext = ""
@@ -269,6 +270,7 @@ proc/Gibberish(t, p)
return returntext
/proc/ninjaspeak(n)
/*
The difference with stutter is that this proc can stutter more than 1 letter
+17 -17
View File
@@ -172,8 +172,10 @@
//if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV))
// if(!mob.Process_Spacemove(0)) return 0
var/area/a = get_area(mob.loc)
if((istype(mob.loc, /turf/space)) || (a.has_gravity == 0))
if(!mob.lastarea)
mob.lastarea = get_area(mob.loc)
if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0))
if(!mob.Process_Spacemove(0)) return 0
@@ -215,16 +217,17 @@
if(L.len == 2)
L -= mob
var/mob/M = L[1]
if ((get_dist(mob, M) <= 1 || M.loc == mob.loc))
var/turf/T = mob.loc
. = ..()
if (isturf(M.loc))
var/diag = get_dir(mob, M)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(mob, M) > 1 || diag))
step(M, get_dir(M.loc, T))
if(M)
if ((get_dist(mob, M) <= 1 || M.loc == mob.loc))
var/turf/T = mob.loc
. = ..()
if (isturf(M.loc))
var/diag = get_dir(mob, M)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(mob, M) > 1 || diag))
step(M, get_dir(M.loc, T))
else
for(var/mob/M in L)
M.other_mobs = 1
@@ -351,16 +354,13 @@
if(istype(turf,/turf/space))
continue
var/area/a = get_area(turf)
if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to.
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0) && !(istype(src:shoes, /obj/item/clothing/shoes/magboots) && (src:shoes:flags & NOSLIP)))
continue
else
if((istype(turf,/turf/simulated/floor)) && (a.has_gravity == 0)) // No one else gets a chance.
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0)) // No one else gets a chance.
continue
/*
@@ -24,6 +24,8 @@
var/starting_loc = pick(newplayer_start)
if(!starting_loc) starting_loc = locate(1,1,1)
loc = starting_loc
lastarea = starting_loc
sight |= SEE_TURFS
var/list/watch_locations = list()
+4 -6
View File
@@ -505,16 +505,14 @@
PN.merge_powernets(TPN)
for(var/obj/machinery/power/apc/N in loc)
if(!N)
continue
if(!N) continue
var/obj/machinery/power/M
M = N.terminal
if(!M) continue
if(M.netnum == 0)
if(netnum == 0)
continue
if(!M.netnum)
if(!netnum)continue
var/datum/powernet/PN = powernets[netnum]
PN.nodes += M
M.netnum = netnum
+1 -1
View File
@@ -4,7 +4,7 @@
desc = "A device which uses Hawking Radiation and plasma to produce power."
icon = 'singularity.dmi'
icon_state = "ca"
anchored = 1
anchored = 0
density = 1
directwired = 1
// use_power = 0
+3 -3
View File
@@ -5,7 +5,7 @@
desc = "An Odd Device which produces a Gravitational Singularity when set up."
icon = 'singularity.dmi'
icon_state = "TheSingGen"
anchored = 1
anchored = 0
density = 1
use_power = 0
var
@@ -42,11 +42,11 @@
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
"You hear ratchet")
"You hear a ratchet")
else
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
"You unsecure the [src.name] from the floor.", \
"You hear ratchet")
"You hear a ratchet")
return
return ..()
+1
View File
@@ -23,6 +23,7 @@
component_parts += new /obj/item/weapon/cable_coil(src)
component_parts += new /obj/item/weapon/cable_coil(src)
RefreshParts()
src.initialize(); //Agouri
RefreshParts()
var/tot_rating = 0