The clown's new name may no longer be things like floor or wall and it now checks nonhuman mobs for duplicate names.

Cleaned up Move() a bit still needs some work.
To help balance them a bit Cyborgs may no longer pick the standard iconstate unless they are the standard module.
Might have fixed space wind.
Donuts added to the secbelt item list. 


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2304 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
mport2004@gmail.com
2011-10-01 12:16:57 +00:00
parent a65a26bdb3
commit 995fb5f788
12 changed files with 425 additions and 649 deletions
-207
View File
@@ -706,213 +706,6 @@
abstract = 1.0
item_state = "nothing"
w_class = 5.0
/*
/obj/item/weapon/gun
name = "gun"
icon = 'gun.dmi'
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
item_state = "gun"
m_amt = 2000
throwforce = 5
w_class = 2.0
throw_speed = 4
throw_range = 10
origin_tech = "combat=1"
/obj/item/weapon/gun/shotgun
name = "shotgun"
icon_state = "shotgun"
var/shellsmax
var/shellsunlimited = 0
var/index
var/list/shells = list() //this is a list. All craftsmanship is of good quality. At least, it's better than two/eight vars, Uhangi! -- Barhandar //it is, thanks bro --uhangi
w_class = 4.0 //dammit urist no
force = 7.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
var/pumped = 0
shellsmax = 2
origin_tech = "combat=2"
/obj/item/weapon/gun/shotgun/combat
name = "combat shotgun"
icon_state = "cshotgun"
w_class = 4.0
force = 12.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
shellsmax = 8
origin_tech = "combat=3"
/obj/item/weapon/gun/energy
name = "energy"
var/charges = 10.0
var/maximum_charges = 10.0
origin_tech = "combat=2;magnets=2"
/obj/item/weapon/gun/energy/taser_gun
name = "taser gun"
icon_state = "taser"
w_class = 3.0
item_state = "gun"
force = 10.0
throw_speed = 2
throw_range = 10
charges = 4
maximum_charges = 4
m_amt = 2000
origin_tech = "combat=2;magnets=2"
/obj/item/weapon/gun/energy/teleport_gun
name = "teleport gun"
desc = "A hacked together combination of a taser and a handheld teleportation unit."
icon_state = "taser"
w_class = 3.0
item_state = "gun"
force = 10.0
throw_speed = 2
throw_range = 10
charges = 4
maximum_charges = 4
m_amt = 2000
var/failchance = 5
var/obj/item/target = null
origin_tech = "combat=2;magnets=2;bluespace=3"
/obj/item/weapon/gun/energy/crossbow // Laaazy
name = "mini energy-crossbow"
desc = "A weapon favored by many of the syndicates stealth specialists."
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
force = 4.0
throw_speed = 2
throw_range = 10
charges = 3
maximum_charges = 3
m_amt = 2000
origin_tech = "combat=2;magnets=2;syndicate=2"
/obj/item/weapon/gun/energy/laser_gun
name = "laser gun"
icon_state = "laser"
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 7.0
m_amt = 2000
origin_tech = "combat=3;magnets=2"
var/shot_delay = 0 //used for borg guns, adds that much in deciseconds delay between shots
var/next_attack = 0 //used for the delay
/obj/item/weapon/gun/energy/laser_gun/captain
icon_state = "caplaser"
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
origin_tech = null
/obj/item/weapon/gun/revolver
desc = "There are 0 bullets left. Uses 357"
name = "revolver"
icon_state = "revolver"
var/bullets = 0.0
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 24.0
m_amt = 2000
origin_tech = "combat=3;materials=2"
/obj/item/weapon/gun/revolver/mateba
desc = "There are 0 bullets left. Uses 357"
name = "revolver"
icon_state = "mateba"
origin_tech = "combat=3;materials=2"
/obj/item/weapon/gun/c96
desc = "There are 0 rounds left. Uses 7.63x25 Mauser"
name = "c96"
icon_state = "c96"
var/obj/item/weapon/ammo/a763m/magazine
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 12.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/p08
desc = "There are 0 rounds left. Uses 9x19 Parabellum"
name = "p08"
icon_state = "p08empty"
var/obj/item/weapon/ammo/a9x19p/magazine
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 16.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/glock
desc = "There are 0 rounds left. Uses .45 ACP"
name = "glock"
icon_state = "glock"
var/obj/item/weapon/ammo/a45/magazine
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 6.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/m1911
desc = "There are 0 rounds left. Uses .45 ACP"
name = "m1911"
icon_state = "m1911"
var/obj/item/weapon/ammo/a45/magazine
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 14.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/carbine
desc = "There are 0 rounds left. Uses 5.56x45mm NATO"
name = "carbine"
icon_state = "carbinenomag"
var/obj/item/weapon/ammo/assaultmag/magazine
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
w_class = 4.0
throw_speed = 2
throw_range = 10
force = 6.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/ak331
desc = "There are 0 rounds left. Uses 5.56x45mm NATO"
name = "ak331"
icon_state = "ak331nomag"
var/obj/item/weapon/ammo/assaultmag/magazine
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
w_class = 4.0
throw_speed = 2
throw_range = 10
force = 18.0
m_amt = 2000
// origin_tech = "combat=2;materials=2"
/obj/item/weapon/gun/detectiverevolver
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
name = ".38 revolver"
icon_state = "detective"
var/bullets = 5.0
w_class = 3.0
throw_speed = 2
throw_range = 10
force = 14.0
m_amt = 1000
origin_tech = "combat=2;materials=2"
*/
/obj/item/weapon/hand_tele
name = "hand tele"
+14 -5
View File
@@ -692,14 +692,23 @@ Turf and target are seperate in case you want to teleport some distance from a t
newname = randomname
if (newname)
if (newname == "Unknown")
var/badname = 0
switch(newname)
if("Unknown") badname = 1
if("floor") badname = 1
if("wall") badname = 1
if("r-wall") badname = 1
if("space") badname = 1
if("_") badname = 1
if(badname)
M << "That name is reserved."
return clname(M)
for (var/mob/living/carbon/A in world)
if (A.real_name == newname)
M << "There's already a clown with that name."
for (var/mob/A in world)
if(A.real_name == newname)
M << "That name is reserved."
return clname(M)
if (length(newname) >= 26)
if(length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
M.real_name = newname
+2 -1
View File
@@ -111,5 +111,6 @@
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_magazine"
"/obj/item/ammo_magazine",
"/obj/item/weapon/reagent_containers/food/snacks/donut"
)
+171 -186
View File
@@ -74,24 +74,13 @@
/turf/Entered(atom/movable/M as mob|obj)
if((ismob(M)) && (M.flags & NOGRAV))
AntiGrav(M)
return
if(ismob(M) && !istype(src, /turf/space))
var/mob/tmob = M
tmob.inertia_dir = 0
..()
// Clowns have it rough enough, disabling their slipping -- TLE
/*
if(prob(1) && ishuman(M))
var/mob/living/carbon/human/tmob = M
if (!tmob.lying && istype(tmob.shoes, /obj/item/clothing/shoes/clown_shoes))
if(istype(tmob.head, /obj/item/clothing/head/helmet))
tmob << "\red You stumble and fall to the ground. Thankfully, that helmet protected you."
tmob.weakened = max(rand(1,2), tmob.weakened)
else
tmob << "\red You stumble and hit your head."
tmob.weakened = max(rand(3,10), tmob.weakened)
tmob.stuttering = max(rand(0,3), tmob.stuttering)
tmob.make_dizzy(150)
*/
for(var/atom/A as mob|obj|turf|area in src)
spawn( 0 )
if ((A && M))
@@ -104,6 +93,40 @@
return
return
/turf/proc/AntiGrav(atom/movable/A as mob|obj)//Could be better right now I just want to get it done
if (!(A.last_move)) return
if ((istype(A, /mob/) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1)))
var/mob/M = A
var/spacemove = M.Process_Spacemove(0)
if(spacemove)
var/prob_slip = 5
if(M.stat) prob_slip = 50
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if((istype(H.shoes, /obj/item/clothing/shoes/magboots) && H.shoes.flags&NOSLIP) || (spacemove == 2))
prob_slip = 0
if(!M.l_hand) prob_slip -= 2
else if(M.l_hand.w_class <= 2) prob_slip -= 1
if (!M.r_hand) prob_slip -= 2
else if(M.r_hand.w_class <= 2) prob_slip -= 1
prob_slip = round(prob_slip)
if(prob(prob_slip))
M << "\blue <B>You slipped!</B>"
M.inertia_dir = M.last_move
step(M, M.inertia_dir)
return
else
M.inertia_dir = 0 //no inertia
else
spawn(5)
if((A && !( A.anchored ) && A.loc == src))
if(M.inertia_dir) //they keep moving the same direction
step(M, M.inertia_dir)
else
M.inertia_dir = M.last_move
step(M, M.inertia_dir) //TODO: DEFERRED
return
/turf/proc/levelupdate()
for(var/obj/O in src)
@@ -158,8 +181,7 @@
/turf/simulated/Entered(atom/A, atom/OL)
if (istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if(M.lying)
return
if(M.lying) return
if(istype(M, /mob/living/carbon/human)) // Split this into two seperate if checks, when non-humans were being checked it would throw a null error -- TLE
if(istype(M:shoes, /obj/item/clothing/shoes/clown_shoes))
if(M.m_intent == "run")
@@ -173,7 +195,7 @@
playsound(src, "clownstep", 20, 1)
switch (src.wet)
if(1)
if (istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP))
M.pulling = null
step(M, M.dir)
@@ -273,7 +295,6 @@
return
/turf/simulated/wall/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
@@ -1176,194 +1197,48 @@ turf/simulated/floor/return_siding_icon_state()
/turf/space/Entered(atom/movable/A as mob|obj)
..()
if ((!(A) || src != A.loc || istype(null, /obj/beam)))
return
if ((!(A) || src != A.loc || istype(null, /obj/beam))) return
if (!(A.last_move))
return
// if (locate(/obj/movable, src))
// return 1
if (!(A.last_move)) return
if ((istype(A, /mob/) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1)))
var/mob/M = A
if ((!( M.handcuffed) && M.canmove))
var/spacemove = M.Process_Spacemove(0)
if(spacemove)
var/prob_slip = 5
var/mag_eq = 0
if(M.stat) prob_slip = 50
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && H.shoes.flags&NOSLIP)
mag_eq = 1
if (locate(/obj/grille, oview(1, M)) || locate(/obj/lattice, oview(1, M)) )
if(mag_eq)
if((istype(H.shoes, /obj/item/clothing/shoes/magboots) && H.shoes.flags&NOSLIP) || (spacemove == 2))
prob_slip = 0
else
if (!( M.l_hand ))
prob_slip -= 2
else if (M.l_hand.w_class <= 2)
prob_slip -= 1
if (!( M.r_hand ))
prob_slip -= 2
else if (M.r_hand.w_class <= 2)
prob_slip -= 1
else if (locate(/turf/unsimulated, oview(1, M)) || locate(/turf/simulated, oview(1, M)))
if(mag_eq)
prob_slip = 0
else
if (!( M.l_hand ))
prob_slip -= 1
else if (M.l_hand.w_class <= 2)
prob_slip -= 0.5
if (!( M.r_hand ))
prob_slip -= 1
else if (M.r_hand.w_class <= 2)
prob_slip -= 0.5
if(!M.l_hand) prob_slip -= 2
else if(M.l_hand.w_class <= 2) prob_slip -= 1
if (!M.r_hand) prob_slip -= 2
else if(M.r_hand.w_class <= 2) prob_slip -= 1
prob_slip = round(prob_slip)
if (prob_slip < 5) //next to something, but they might slip off
if (prob(prob_slip) )
M << "\blue <B>You slipped!</B>"
M.inertia_dir = M.last_move
step(M, M.inertia_dir)
return
else
M.inertia_dir = 0 //no inertia
else //not by a wall or anything, they just keep going
spawn(5)
if ((A && !( A.anchored ) && A.loc == src))
if(M.inertia_dir) //they keep moving the same direction
step(M, M.inertia_dir)
else
M.inertia_dir = M.last_move
step(M, M.inertia_dir)
else //can't move, they just keep going (COPY PASTED CODE WOO)
if(prob(prob_slip))
M << "\blue <B>You slipped!</B>"
M.inertia_dir = M.last_move
step(M, M.inertia_dir)
return
else
M.inertia_dir = 0 //no inertia
else
spawn(5)
if ((A && !( A.anchored ) && A.loc == src))
if((A && !( A.anchored ) && A.loc == src))
if(M.inertia_dir) //they keep moving the same direction
step(M, M.inertia_dir)
else
M.inertia_dir = M.last_move
step(M, M.inertia_dir) //TODO: DEFERRED
if(ticker && ticker.mode)
if(ticker.mode.name == "nuclear emergency")
return
else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox")
var/cur_x
var/cur_y
var/next_x
var/next_y
var/target_z
var/list/y_arr
if(src.x <= 1)
if(istype(A, /obj/meteor)||istype(A, /obj/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (--cur_x||global_map.len)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = world.maxx - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.x >= world.maxx)
if(istype(A, /obj/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (++cur_x > global_map.len ? 1 : cur_x)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y <= 1)
if(istype(A, /obj/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (--cur_y||y_arr.len)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = world.maxy - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y >= world.maxy)
if(istype(A, /obj/meteor)||istype(A, /obj/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (++cur_y > y_arr.len ? 1 : cur_y)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
return
if(ticker.mode.name == "nuclear emergency") return
else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A)
else
if (src.x <= 2)
if(istype(A, /obj/meteor)||istype(A, /obj/space_dust))
del(A)
@@ -1434,6 +1309,116 @@ turf/simulated/floor/return_siding_icon_state()
if ((A && A.loc))
A.loc.Entered(A)
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
var/cur_y
var/next_x
var/next_y
var/target_z
var/list/y_arr
if(src.x <= 1)
if(istype(A, /obj/meteor)||istype(A, /obj/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (--cur_x||global_map.len)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = world.maxx - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.x >= world.maxx)
if(istype(A, /obj/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
next_x = (++cur_x > global_map.len ? 1 : cur_x)
y_arr = global_map[next_x]
target_z = y_arr[cur_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Target Z = [target_z]"
world << "Next X = [next_x]"
//debug
*/
if(target_z)
A.z = target_z
A.x = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y <= 1)
if(istype(A, /obj/meteor))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (--cur_y||y_arr.len)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = world.maxy - 2
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
else if (src.y >= world.maxy)
if(istype(A, /obj/meteor)||istype(A, /obj/space_dust))
del(A)
return
var/list/cur_pos = src.get_global_map_pos()
if(!cur_pos) return
cur_x = cur_pos["x"]
cur_y = cur_pos["y"]
y_arr = global_map[cur_x]
next_y = (++cur_y > y_arr.len ? 1 : cur_y)
target_z = y_arr[next_y]
/*
//debug
world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]"
world << "Next Y = [next_y]"
world << "Target Z = [target_z]"
//debug
*/
if(target_z)
A.z = target_z
A.y = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
return
/obj/vaultspawner
var/maxX = 6
var/maxY = 6
@@ -2710,3 +2710,14 @@ It can still be worn/put on as normal.
/mob/living/carbon/human/IsAdvancedToolUser()
return 1//Humans can use guns and such
/mob/living/carbon/human/Process_Spacemove()
if(..()) return 1
if(restrained()) return 0
if(istype(back, /obj/item/weapon/tank/jetpack))
var/obj/item/weapon/tank/jetpack/J = back
if(J.allow_thrust(0.01, src))
inertia_dir = 0
return 2
return 0
@@ -112,6 +112,9 @@
return
return
/mob/living/carbon/metroid/Process_Spacemove()
return 2
/mob/living/carbon/metroid/Stat()
..()
+14 -37
View File
@@ -62,7 +62,6 @@
/mob/living/silicon/robot/proc/pick_module()
if(module)
return
//var/mod = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Janitor", "Service", "Brobot")
var/mod = input("Please, select a module!", "Robot", null, null) in list("Standard", "Engineering", "Medical", "Miner", "Janitor","Service", "Security")
if(module)
return
@@ -73,16 +72,6 @@
icon_state = "robot"
modtype = "Stand"
/* if("Hydroborg")
module = new /obj/item/weapon/robot_module/hydroborg(src)
hands.icon_state = "hydroborg"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Hydroborg")
if(icontype== "Hydroborg")
icon_state = "hydroborg"
else if(icontype == "Kent")
icon_state = "toiletbot"
modtype = "Hydroborg"*/
if("Service")
module = new /obj/item/weapon/robot_module/butler(src)
hands.icon_state = "service"
@@ -105,24 +94,20 @@
icon_state = "Miner"
modtype = "Miner"
if("Medical")
module = new /obj/item/weapon/robot_module/medical(src)
hands.icon_state = "medical"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Standard", "Kent", "Medbot")
// icon_state = "MedBot"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Kent", "Medbot")
if(icontype == "Kent")
icon_state = "toiletbot"
else if(icontype == "Medbot")
icon_state = "Medbot"
else
icon_state = "robot"
modtype = "Med"
if("Security")
module = new /obj/item/weapon/robot_module/security(src)
hands.icon_state = "security"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Standard", "Armored", "Robocop", "Robocop Red", "Heavy Duty")
var/icontype = input("Select an icon!", "Robot", null, null) in list("Armored", "Robocop", "Robocop Red", "Heavy Duty")
if(icontype == "Armored")
icon_state = "Security"
else if(icontype == "Robocop")
@@ -131,18 +116,14 @@
icon_state = "Security3"
else if(icontype == "Heavy Duty")
icon_state = "secborg"
else
icon_state = "robot"
modtype = "Sec"
if("Engineering")
module = new /obj/item/weapon/robot_module/engineering(src)
hands.icon_state = "engineer"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Standard", "Engineer", "Engiseer")
if(icontype == "Standard")
icon_state = "robot"
else if(icontype == "Engineer")
var/icontype = input("Select an icon!", "Robot", null, null) in list("Engineer", "Engiseer")
if(icontype == "Engineer")
icon_state = "Engineering"
else
icon_state = "Engineering2"
@@ -151,22 +132,9 @@
if("Janitor")
module = new /obj/item/weapon/robot_module/janitor(src)
hands.icon_state = "janitor"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Standard", "Chryssalid")
if(icontype == "Standard")
icon_state = "robot"
else
icon_state = "Janbot"
icon_state = "Janbot"
modtype = "Jan"
/* if("Brobot")
module = new /obj/item/weapon/robot_module/brobot(src)
hands.icon_state = "brobot"
var/icontype = input("Select an icon!", "Robot", null, null) in list("Standard", "Bro",)
if(icontype == "Bro")
icon_state = "Brobot"
else
icon_state = "robot"
modtype = "Bro"*/
overlays -= "eyes" //Takes off the eyes that it started with
updateicon()
@@ -976,6 +944,15 @@ Frequency:
gib(1)
/mob/living/silicon/robot/Process_Spacemove()
if(..()) return 1
if(!module) return 0
for(var/obj/item/weapon/tank/jetpack/J in module.modules)
if(J && istype(J, /obj/item/weapon/tank/jetpack))
if(J.allow_thrust(0.01))
inertia_dir = 0
return 1
return 0
///mob/living/silicon/robot/proc/eyecheck()
// return
+197 -204
View File
@@ -1758,6 +1758,12 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
W.attack_self(mob)
return
/client/Southwest()
if(!istype(mob, /mob/living/carbon)) return
if((mob.stat || mob.restrained()) || !(isturf(mob.loc))) return
mob:toggle_throw_mode()
return
/client/Northwest()
if(!isrobot(mob))
mob.drop_item_v()
@@ -1770,218 +1776,213 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return O.relaymove(mob, 16)
return
/client/proc/Move_object(direct)
if(mob.control_object.density)
step(mob.control_object,direct)
mob.control_object.dir = direct
else
mob.control_object.loc = get_step(mob.control_object,direct)
return
/client/Move(n, direct)
if(mob.control_object) // Hacking in something to control objects -- TLE
if(mob.control_object.density)
step(mob.control_object,direct)
mob.control_object.dir = direct
else
mob.control_object.loc = get_step(mob.control_object,direct)
if(isobserver(mob))
return mob.Move(n,direct)
if (moving)
return 0
if (world.time < move_delay)
return
if (!( mob ))
return
if (mob.stat==2)
if(mob.control_object) Move_object(direct)
if(isobserver(mob)) return mob.Move(n,direct)
if(moving) return 0
if(world.time < move_delay) return
if(!mob) return
if(mob.stat==2) return
if(isAI(mob)) return AIMove(n,direct,mob)
if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var
if(mob.incorporeal_move)//Move though walls
Process_Incorpmove(direct)
return
if(isAI(mob))
return AIMove(n,direct,mob)
// if(ishivemainframe(mob))
// return MainframeMove(n,direct,mob)
if(Process_Grab()) return
if(!mob.canmove) return
if(mob.anchored)/*If mob is not AI and is anchored. This means most anchored mobs will not be able to move.
This is a fix for ninja energy_net to where mobs can not move but can still act to destroy it.
If needed, this should be changed in the appropriate manner. I think the only time you would need to anchor a mob
is when they are not meant to move.*/
return
if (mob.incorporeal_move)
var/turf/mobloc = get_turf(mob.loc)
switch(mob.incorporeal_move)//1 is for all mobs. 2 is for ninjas only.
if(1)
mob.loc = get_step(mob, direct)
mob.dir = direct
if(2)
//For Ninja crazy porting powers. Moves either 1 or 2 tiles.
if(prob(50))
var/locx
var/locy
switch(direct)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+2)
if(locy>world.maxy)
return
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-2)
if(locy<1)
return
if(EAST)
locy = mobloc.y
locx = (mobloc.x+2)
if(locx>world.maxx)
return
if(WEST)
locy = mobloc.y
locx = (mobloc.x-2)
if(locx<1)
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,mob,'mob.dmi',,"shadow",,mob.dir)
limit--
if(limit<=0) break
if(istype(mob.loc, /turf/space))
if(!mob.Process_Spacemove(1)) return 0
else if(mob.flags & NOGRAV)
if(!mob.Process_Spacemove(0)) return 0
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
var/atom/O = mob.loc
return O.relaymove(mob, direct)
if(isturf(mob.loc))
if(mob.restrained())//Why being pulled while cuffed prevents you from moving
for(var/mob/M in range(mob, 1))
if(((M.pulling == mob && (!( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
src << "\blue You're restrained! You can't move!"
return 0
move_delay = world.time//set move delay
switch(mob.m_intent)
if("run")
if(mob.drowsyness > 0)
move_delay += 6
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveRunDelay
else
spawn(0)
anim(mobloc,mob,'mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.dir = direct
return
move_delay += 1
if("walk")
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveWalkDelay
else
move_delay += 7
move_delay += mob.movement_delay()
if (mob.monkeyizing)
return
//We are now going to move
moving = 1
//Something with pulling things
if(locate(/obj/item/weapon/grab, mob))
move_delay = max(move_delay, world.time + 7)
var/list/L = mob.ret_grab()
if(istype(L, /list))
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))
else
for(var/mob/M in L)
M.other_mobs = 1
if(mob != M)
M.animate_movement = 3
for(var/mob/M in L)
spawn( 0 )
step(M, direct)
return
spawn( 1 )
M.other_mobs = null
M.animate_movement = 2
return
var/is_monkey = ismonkey(mob)
if (locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
var/list/grabbing = list( )
if (istype(mob.l_hand, /obj/item/weapon/grab))
else
if(mob.confused)
step(mob, pick(cardinal))
else
. = ..()
for(var/obj/speech_bubble/S in range(1, mob))
if(S.parent == mob)
S.loc = mob.loc
moving = 0
return .
return
//Called by Move()
/client/proc/Process_Grab()
if(locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
var/list/grabbing = list()
if(istype(mob.l_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = mob.l_hand
grabbing += G.affecting
if (istype(mob.r_hand, /obj/item/weapon/grab))
if(istype(mob.r_hand, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = mob.r_hand
grabbing += G.affecting
for(var/obj/item/weapon/grab/G in mob.grabbed_by)
if (G.state == 1)
if (!( grabbing.Find(G.assailant) ))
del(G)
else
if (G.state == 2)
move_delay = world.time + 10
if ((prob(25) && (!( is_monkey ) || prob(25))))
mob.visible_message("\red [mob] has broken free of [G.assailant]'s grip!")
del(G)
if((G.state == 1)&&(!grabbing.Find(G.assailant))) del(G)
if(G.state == 2)
move_delay = world.time + 10
if(!prob(25)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s grip!")
del(G)
if(G.state == 3)
move_delay = world.time + 10
if(!prob(5)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s headlock!")
del(G)
return 0
/client/proc/Process_Incorpmove(direct)
var/turf/mobloc = get_turf(mob)
switch(mob.incorporeal_move)
if(1)
mob.loc = get_step(mob, direct)
mob.dir = direct
if(2)
if(prob(50))
var/locx
var/locy
switch(direct)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+2)
if(locy>world.maxy)
return
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-2)
if(locy<1)
return
if(EAST)
locy = mobloc.y
locx = (mobloc.x+2)
if(locx>world.maxx)
return
if(WEST)
locy = mobloc.y
locx = (mobloc.x-2)
if(locx<1)
return
else
return
else
if (G.state == 3)
move_delay = world.time + 10
if ((prob(5) && !( is_monkey ) || prob(25)))
mob.visible_message("\red [mob] has broken free of [G.assailant]'s headlock!")
del(G)
else
return
if (mob.canmove)
if(mob.m_intent == "face")
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,mob,'mob.dmi',,"shadow",,mob.dir)
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,mob,'mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.dir = direct
return 1
var/j_pack = 0
if ((istype(mob.loc, /turf/space) && !istype(mob, /mob/living/carbon/metroid)))
if (!( mob.restrained() ))
if (!( (locate(/obj/grille) in oview(1, mob)) || (locate(/turf/simulated) in oview(1, mob)) || (locate(/obj/lattice) in oview(1, mob)) ))
if (istype(mob.back, /obj/item/weapon/tank/jetpack))
var/obj/item/weapon/tank/jetpack/J = mob.back
j_pack = J.allow_thrust(0.01, mob)
if(j_pack)
mob.inertia_dir = 0
if (!( j_pack ))
return 0
else
return 0
else
return 0
//For moving in space
//Called by /client/Move
//Return 1 for movement 0 for none
/mob/proc/Process_Spacemove(var/gravity = 1)
if(restrained()) return 0
// if(locate(/obj/grille) in oview(1, mob))
if(((locate(/turf/simulated) in oview(1, src)) && gravity) || (locate(/turf/simulated/wall) in oview(1, src)))
inertia_dir = 0
return 1
if (isturf(mob.loc))
move_delay = world.time
if ((j_pack && j_pack < 1))
move_delay += 5
switch(mob.m_intent)
if("run")
if (mob.drowsyness > 0)
move_delay += 6
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveRunDelay
else
move_delay += 1
if("face")
mob.dir = direct
return
if("walk")
if(mob.organStructure && mob.organStructure.legs)
move_delay += mob.organStructure.legs.moveWalkDelay
else
move_delay += 7
if(locate(/obj/lattice) in oview(1, src))
inertia_dir = 0
return 1
for(var/obj/O in oview(1, src))
if((O) && (O.density))
inertia_dir = 0
return 1
return 0
move_delay += mob.movement_delay()
if (mob.restrained())
for(var/mob/M in range(mob, 1))
if (((M.pulling == mob && (!( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, mob.grabbed_by.len)))
src << "\blue You're restrained! You can't move!"
return 0
moving = 1
if (locate(/obj/item/weapon/grab, mob))
move_delay = max(move_delay, world.time + 7)
var/list/L = mob.ret_grab()
if (istype(L, /list))
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))
else
for(var/mob/M in L)
M.other_mobs = 1
if (mob != M)
M.animate_movement = 3
for(var/mob/M in L)
spawn( 0 )
step(M, direct)
return
spawn( 1 )
M.other_mobs = null
M.animate_movement = 2
return
else
if(mob.confused)
step(mob, pick(cardinal))
else
. = ..()
for(var/obj/speech_bubble/S in range(1, mob))
if(S.parent == mob)
S.loc = mob.loc
moving = null
return .
else
if (isobj(mob.loc) || ismob(mob.loc))
var/atom/O = mob.loc
if (mob.canmove)
return O.relaymove(mob, direct)
else
return
return
/client/New()
if(findtextEx(key, "Telnet @"))
src << "Sorry, this game does not support Telnet."
@@ -2009,22 +2010,14 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
src << "<div class=\"motd\">[join_motd]</div>"
authorize()
//goonauth() -- Skie, commented out because not goons anymore.
///beta_tester_auth()
update_world()
//new admin bit - Nannek
if (admins.Find(ckey))
if(admins.Find(ckey))
holder = new /obj/admins(src)
holder.rank = admins[ckey]
update_admins(admins[ckey])
if (ticker && ticker.mode && ticker.mode.name =="sandbox" && authenticated)
if(ticker && ticker.mode && ticker.mode.name =="sandbox" && authenticated)
mob.CanBuild()
if(holder && (holder.level >= 3))
verbs += /mob/proc/Delete
/client/Del()
spawn(0)
@@ -2082,7 +2075,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
spawn()
if(key)
if (istype(src, /mob/living/silicon))
if(istype(src, /mob/living/silicon))
robogibs(loc, viruses)
else if (istype(src, /mob/living/carbon/alien))
xgibs(loc, viruses)
@@ -2090,9 +2083,9 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
gibs(loc, viruses)
else
if (istype(src, /mob/living/silicon))
if(istype(src, /mob/living/silicon))
robogibs(loc, viruses)
else if (istype(src, /mob/living/carbon/alien))
else if(istype(src, /mob/living/carbon/alien))
xgibs(loc, viruses)
else
gibs(loc, viruses)
+7 -5
View File
@@ -454,18 +454,20 @@ datum/preferences
HTML += "<tt><center>"
HTML += "<b>Choose occupation chances</b><br>Unavailable occupations are in red.<br>"
for(var/job in occupations)
if(!occupation[job])
occupation[job] = 0
if(jobban_isbanned(user, job))
HTML += "<font color=red>[job]</font><br>"
continue
if((job in command_positions) || (job=="AI"))//Bold head jobs
if((occupation["Assistant"] != 0) && (job != "Assistant"))
HTML += "<font color=orange>[job]</font><br>"
continue
if((job in command_positions) || (job == "AI"))//Bold head jobs
HTML += "<b>[job]<a href=\"byond://?src=\ref[user];preferences=1;occ=1;job=[job]\"></b>"
else
HTML += "[job]<a href=\"byond://?src=\ref[user];preferences=1;occ=1;job=[job]\">"
if(!occupation[job])
occupation[job] = 0
if(job=="Assistant")//Assistant is special
if(job == "Assistant")//Assistant is special
if(occupation[job] != 0)
HTML += "<font color=green>\[Yes]</font>"
else
@@ -210,9 +210,8 @@ var/global/list/uneatable = list(
for(var/turf/X in orange(consume_range,src))
consume(X)
for(var/atom/movable/X in orange(grav_pull,src))
if(is_type_in_list(X, uneatable))
continue
if((!X:anchored && (!istype(X,/mob/living/carbon/human)))|| (src.current_size >= 9))
if(is_type_in_list(X, uneatable)) continue
if(((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human)))|| (src.current_size >= 9))
step_towards(X,src)
else if(istype(X,/mob/living/carbon/human))
var/mob/living/carbon/human/H = X
+4
View File
@@ -123,6 +123,10 @@
//turf-only flags
#define NOJAUNT 1
//Cant seem to find a mob bitflags area other than the powers one
#define NOGRAV 1
// bitflags for clothing parts
#define HEAD 1
#define UPPER_TORSO 2