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

View File

@@ -172,7 +172,19 @@ client
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
if(istype(A,/mob))
var/mob/M = A
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=key'>[M.key ? M.key : "No key"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
body += {"
<br><font size='1'>
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brute"]'>[M.getBruteLoss()]</a>
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["fire"]'>[M.getFireLoss()]</a>
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["toxin"]'>[M.getToxLoss()]</a>
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["oxygen"]'>[M.getOxyLoss()]</a>
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["clone"]'>[M.getCloneLoss()]</a>
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=\ref["brain"]'>[M.getBrainLoss()]</a>
</font>
"}
else
body += "<b>[D]</b>"
@@ -351,7 +363,6 @@ client
// not sure if this is completely right...
if(0) //(L.vars.len > 0)
html += "<ol>"
html += "</ol>"
else
html += "<ul>"
@@ -364,6 +375,7 @@ client
html += debug_variable(index, L[index], level + 1)
index++
html += "</ul>"
else
html += "[name] = <span class='value'>[value]</span>"
@@ -470,6 +482,7 @@ client
if(!src.holder)
return
src.cmd_admin_gib(MOB)
else if (href_list["build_mode"])
if(!href_list["build_mode"])
return
@@ -482,6 +495,7 @@ client
return
togglebuildmode(MOB)
href_list["datumrefresh"] = href_list["build_mode"]
else if (href_list["delall"])
if(!href_list["delall"])
return
@@ -656,6 +670,31 @@ client
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
var/mob/M = locate(href_list["mobToDamage"])
var/Text = locate(href_list["adjustDamage"])
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(Text == "brute")
M.adjustBruteLoss(amount)
else if(Text == "fire")
M.adjustFireLoss(amount)
else if(Text == "toxin")
M.adjustToxLoss(amount)
else if(Text == "oxygen")
M.adjustOxyLoss(amount)
else if(Text == "brain")
M.adjustBrainLoss(amount)
else if(Text == "clone")
M.adjustCloneLoss(amount)
else
usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]"
return
if(amount != 0)
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [M] ")
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [M] ", 1)
href_list["datumrefresh"] = href_list["mobToDamage"]
else
..()

View File

@@ -27,10 +27,7 @@
if(prob(1))
if (affected_mob.nutrition > 100)
affected_mob.Stun(rand(4,6))
affected_mob << "\red You throw up!"
for(var/mob/O in viewers(world.view, affected_mob))
if(O == affected_mob)
continue
O.show_message(text("<b>\red [] throws up!</b>", affected_mob), 1)
playsound(affected_mob.loc, 'splat.ogg', 50, 1)
var/turf/location = affected_mob.loc

View File

@@ -52,6 +52,8 @@
icon_closed = "emergency"
icon_opened = "emergencyopen"
/obj/structure/closet/emcloset/legacy
/obj/structure/closet/firecloset
name = "Fire Closet"
desc = "A bulky (yet mobile) closet. Comes with supplies to fight fire."

View File

@@ -257,11 +257,24 @@
active_power_usage = 400
/obj/machinery/door_control
name = "Remote Door Control"
name = "remote door-control"
desc = "It controls doors, remotely."
icon = 'stationobjs.dmi'
icon_state = "doorctrl0"
desc = "A remote control switch for a door."
desc = "A remote control-switch for a door."
var/id = null
var/range = 10
var/normaldoorcontrol = 0
var/desiredstate = 0 // Zero is closed, 1 is open.
var/specialfunctions = 1
/*
Bitflag, 1= open
2= idscan,
4= bolts
8= shock
16= door safties
*/
anchored = 1.0
use_power = 1
idle_power_usage = 2

View File

@@ -1,5 +1,3 @@
/atom/proc/MouseDrop_T()
return
@@ -260,9 +258,11 @@
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
if( istype(src, /turf/simulated) )
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src)
// Make toxins vomit look different
if(toxvomit)
this.icon_state = "vomittox_[pick(1,4)]"
for(var/datum/disease/D in M.viruses)
var/datum/disease/newDisease = new D.type
this.viruses += newDisease

View File

@@ -0,0 +1,69 @@
/obj/machinery/computer/area_atmos
name = "Area Air Control"
desc = "A computer used to control the stationary scrubbers and pumps in the area."
icon_state = "computer_generic"
var/scrubber_state = 0 //0 = off; 1 = on
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
src.add_fingerprint(usr)
var/dat = text("<center>Area Air Control:<br> <b><A href='?src=\ref[src];scrubbers=[1]'>Turn area scrubbers [scrubber_state?"off":"on"]</A></b></center>")
user << browse("[dat]", "window=miningshuttle;size=200x100")
Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["scrubbers"])
toggle_scrubbers()
usr << "\blue Area scrubbers turned [scrubber_state?"on":"off"]"
proc/toggle_scrubbers()
if( (ishuman(usr)||issilicon(usr)) && !usr.stat && !usr.restrained() )
scrubber_state = !scrubber_state
var/turf/T = get_turf(src)
if(!T.loc) return
var/area/A = T.loc
if (A.master)
A = A.master
for( var/obj/machinery/portable_atmospherics/scrubber/stationary/SCRUBBER in world )
var/turf/T2 = get_turf(SCRUBBER)
if ( T2 && T2.loc)
var/area/A2 = T2.loc
if ( istype(A2) && A2.master && A2.master == A )
SCRUBBER.on = scrubber_state
SCRUBBER.update_icon()
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
src.add_fingerprint(usr)
var/dat
dat = text("<center>Mining shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
user << browse("[dat]", "window=miningshuttle;size=200x100")
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["move"])
if(ticker.mode.name == "blob")
if(ticker.mode:declared)
usr << "Under directive 7-10, [station_name()] is quarantined until further notice."
return
if (!mining_shuttle_moving)
usr << "\blue Shuttle recieved message and will be sent shortly."
move_mining_shuttle()
else
usr << "\blue Shuttle is already moving."

View File

@@ -10,6 +10,27 @@
volume = 750
stationary
name = "Stationary Air Scrubber"
icon_state = "scrubber:0"
anchored = 1
volume = 30000
volume_rate = 5000
attack_hand(var/mob/user as mob)
usr << "\blue You can't directly interact with this machine. Use the area atmos computer."
update_icon()
src.overlays = 0
if(on)
icon_state = "scrubber:1"
else
icon_state = "scrubber:0"
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
return
/obj/machinery/portable_atmospherics/scrubber/update_icon()
src.overlays = 0

View File

@@ -15,17 +15,52 @@
use_power(5)
icon_state = "doorctrl1"
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == src.id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
if(normaldoorcontrol)
for(var/obj/machinery/door/airlock/D in range(range))
if(D.id_tag == src.id)
if(desiredstate == 1)
if(specialfunctions & OPEN)
if (D.density)
spawn( 0 )
D.open()
return
if(specialfunctions & IDSCAN)
D.aiDisabledIdScanner = 1
if(specialfunctions & BOLTS)
spawn(5)
D.locked = 1
if(specialfunctions & SHOCK)
D.secondsElectrified = -1
else
if(specialfunctions & OPEN)
if (!D.density)
spawn( 0 )
D.close()
return
if(specialfunctions & IDSCAN)
D.aiDisabledIdScanner = 0
if(specialfunctions & BOLTS)
spawn(5)
D.locked = 0
if(specialfunctions & SHOCK)
D.secondsElectrified = 0
else
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == src.id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
desiredstate = !desiredstate
spawn(15)
if(!(stat & NOPOWER))
icon_state = "doorctrl0"

View File

@@ -57,9 +57,10 @@
density = 1
var/lasers = 0
var/lasertype = 1
// 1 = laser
// 2 = cannon
// 1 = lasers
// 2 = cannons
// 3 = pulse
// 4 = change (HONK)
var/health = 18
var/id = ""
var/obj/machinery/turretcover/cover = null
@@ -212,6 +213,8 @@
A = new /obj/item/projectile/beam/heavylaser( loc )
if(3)
A = new /obj/item/projectile/beam/pulse( loc )
if(4)
A = new /obj/item/projectile/change( loc )
A.original = target.loc
use_power(500)
else
@@ -296,11 +299,13 @@
icon_state = "motion3"
anchored = 1
density = 0
req_access = list(access_ai_upload)
var/enabled = 1
var/id = ""
var/lethal = 0
var/locked = 1
var/control_area //can be area name, path or nothing.
var/ailock = 0 // AI cannot use this
req_access = list(access_ai_upload)
var/similar_controls
var/turrets
@@ -348,7 +353,10 @@
user << "\red Access denied."
/obj/machinery/turretid/attack_ai(mob/user as mob)
return attack_hand(user)
if(!ailock)
return attack_hand(user)
else
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
/obj/machinery/turretid/attack_hand(mob/user as mob)
if ( (get_dist(src, user) > 1 ))

View File

@@ -14,3 +14,7 @@
while(prob(60) && counter < 3)
new /obj/item/clothing/mask/breath(src)
counter++
/obj/structure/closet/emcloset/legacy/New()
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)

View File

@@ -85,12 +85,13 @@
/obj/structure/closet/secure_closet/warden
name = "Warden's Locker"
req_access = list(access_armory)
icon_state = "hossecure1"
icon_closed = "hossecure"
icon_locked = "hossecure1"
icon_opened = "hossecureopen"
icon_broken = "hossecurebroken"
icon_off = "hossecureoff"
icon_state = "wardensecure1"
icon_closed = "wardensecure"
icon_locked = "wardensecure1"
icon_opened = "wardensecureopen"
icon_broken = "wardensecurebroken"
icon_off = "wardensecureoff"
New()
..()

View File

@@ -515,8 +515,9 @@ Code:
for (var/obj/item/weapon/mop/M in world)
var/turf/ml = get_turf(M)
if (ml.z != cl.z)
continue
if(ml)
if (ml.z != cl.z)
continue
ldat += "Mop - <b>\[[ml.x],[ml.y]\]</b> - [M.reagents.total_volume ? "Wet" : "Dry"]<br>"

View File

@@ -93,6 +93,7 @@ FLASHBANG
var
active = 0
det_time = 30
banglet = 0
proc
bang(var/turf/T , var/mob/living/carbon/M)
prime()
@@ -206,14 +207,16 @@ FLASHBANG
if (M.eye_stat >= 20)
M << "\red Your eyes start to burn badly!"
M.disabilities |= 1
if (prob(M.eye_stat - 20 + 1))
M << "\red You can't see anything!"
M.disabilities |= 128
if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
if (prob(M.eye_stat - 20 + 1))
M << "\red You can't see anything!"
M.disabilities |= 128
if (M.ear_damage >= 15)
M << "\red Your ears start to ring badly!"
if (prob(M.ear_damage - 10 + 5))
M << "\red You can't hear anything!"
M.disabilities |= 32
if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
if (prob(M.ear_damage - 10 + 5))
M << "\red You can't hear anything!"
M.disabilities |= 32
else
if (M.ear_damage >= 5)
M << "\red Your ears start to ring!"
@@ -232,9 +235,7 @@ FLASHBANG
for(var/mob/living/carbon/M in viewers(T, null))
bang(T, M)
//Blob damage here
for(var/obj/effect/blob/B in view(8,T))
for(var/obj/effect/blob/B in view(8,T)) //Blob damage here
var/damage = round(30/(get_dist(B,T)+1))
B.health -= damage
B.update()
@@ -255,6 +256,12 @@ FLASHBANG
return
attack_hand()
walk(src, null, null)
..()
return
clown_check(var/mob/living/user)
if ((user.mutations & CLUMSY) && prob(50))
user << "\red Huh? How does this thing work?!"
@@ -266,12 +273,80 @@ FLASHBANG
return 0
return 1
/obj/item/weapon/flashbang/clusterbang
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
name = "Clusterbang"
icon = 'grenade.dmi'
icon_state = "clusterbang"
var/child = 0
attack_self(mob/user as mob)
if(!active)
//world << "cluster attack self"
user << "\red You prime the clusterbang! [det_time/10] seconds!"
src.active = 1
src.icon_state = "clusterbang1"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
spawn(src.det_time)
arm(user)
return
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.equipped() == src)&&(!active))
//world << "cluster after attack"
arm(user)
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
return
/obj/item/weapon/flashbang/clusterbang/proc/arm(mob/user as mob)
//world << "Armed!"
var/numspawned = rand(4,8)
// world << numspawned
var/again = 0
if(!child)
for(var/more = numspawned,more > 0,more--)
if(prob(35))
again++
numspawned --
for(,numspawned > 0, numspawned--)
//world << "Spawned Flashbang!"
spawn(0)
var/obj/item/weapon/flashbang/F = new /obj/item/weapon/flashbang(src)
F.loc = src.loc
F.icon_state = "flashbang1"
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
F.active = 1
F.banglet = 1
var/stepdist = rand(1,3)
walk_away(F,src,stepdist)
var/dettime = rand(15,60)
spawn(dettime)
F.prime()
for(,again > 0, again--)
//world << "Spawned CFlashbang!"
spawn(0)
var/obj/item/weapon/flashbang/clusterbang/F = new /obj/item/weapon/flashbang/clusterbang(src)
F.loc = src.loc
F.active = 1
F.child = 1
F.icon_state = "clusterbang1"
var/stepdist = rand(1,4)
walk_away(F,src,stepdist)
spawn(30)
F.arm()
spawn(70)
prime()
return

View File

@@ -906,6 +906,7 @@ CIRCULAR SAW
else
M.take_organ_damage(15)
M.disabilities &= ~128
M.eye_stat = 0
M:eye_op_stage = 0.0
return

View File

@@ -13,6 +13,7 @@
var/l_hacking = 0
var/emagged = 0
var/open = 0
var/internalstorage = 3
w_class = 3.0
/obj/item/weapon/secstorage/examine()
@@ -116,7 +117,7 @@
else
user << "You short out the lock on [src]."
return
if ((W.w_class > 3 || istype(W, /obj/item/weapon/secstorage)))
if ((W.w_class > internalstorage || istype(W, /obj/item/weapon/secstorage)))
return
if ((istype(W, /obj/item/weapon/screwdriver)) && (src.locked == 1))
sleep(6)

View File

@@ -7,7 +7,8 @@
icon_sparking = "safespark"
flags = FPRINT | TABLEPASS
force = 8.0
w_class = 4.0
w_class = 8.0
internalstorage = 8
anchored = 1.0
density = 0
@@ -16,5 +17,9 @@
new /obj/item/weapon/paper(src)
new /obj/item/weapon/pen(src)
/obj/item/weapon/secstorage/ssafe/HoS/New()
..()
new /obj/item/weapon/storage/lockbox/clusterbang(src)
/obj/item/weapon/secstorage/ssafe/attack_hand(mob/user as mob)
return attack_self(user)

View File

@@ -1,5 +1,5 @@
/obj/item/weapon/storage/lockbox
name = "Lockbox"
name = "lockbox"
desc = "A locked box."
icon_state = "lockbox+l"
item_state = "syringe_kit"
@@ -80,4 +80,14 @@
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implantcase/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)
new /obj/item/weapon/implanter/loyalty(src)
/obj/item/weapon/storage/lockbox/clusterbang
name = "lockbox (clusterbang)"
desc = "You have a bad feeling about opening this."
req_access = list(access_security)
New()
..()
new /obj/item/weapon/flashbang/clusterbang(src)

View File

@@ -84,7 +84,9 @@ obj/structure
Tsrc.ReplaceWithWall()
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
W:use(2)
for(var/turf/simulated/wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
if (W) W:use(2)
del(src)
return
@@ -99,6 +101,8 @@ obj/structure
Tsrc.ReplaceWithRWall()
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
if (W)
W:use(1)
del(src)

View File

@@ -64,8 +64,9 @@
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
var/area/a = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (a.has_gravity == 0))
if(!src.lastarea)
src.lastarea = get_area(src.loc)
if((istype(src.loc, /turf/space)) || (src.lastarea.has_gravity == 0))
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)

View File

@@ -80,6 +80,7 @@
/turf/Entered(atom/movable/M as mob|obj)
// var/loopsanity = 100
if(ismob(M))
if(!M:lastarea)
M:lastarea = get_area(M.loc)

View File

@@ -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)

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."

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

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 @@
*/
*/

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"
*/
*/

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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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()

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

View File

@@ -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)

View File

@@ -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

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)

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)

View File

@@ -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)

View File

@@ -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)

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()

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

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
/*

View File

@@ -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()

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

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

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 ..()

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