mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixed the signpost shuttle bug.
Critters have been added and livestock removed Xbow damage raised to 30 a shot Centcom Survival Kit is once again a box Sec uniforms moved into their own locker After IRC talk Guns that are created in the protolathe now spawn inside of a lockbox They can be unlocked by an ID with Armory access or an Emag. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2045 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
log_admin("[key_name(usr)] has left build mode.")
|
||||
M.client.buildmode = 0
|
||||
M.client.show_popup_menus = 1
|
||||
for(var/obj/buildholder/H)
|
||||
for(var/obj/bmode/buildholder/H)
|
||||
if(H.cl == M.client)
|
||||
del(H)
|
||||
else
|
||||
@@ -14,14 +14,14 @@
|
||||
M.client.buildmode = 1
|
||||
M.client.show_popup_menus = 0
|
||||
|
||||
var/obj/buildholder/H = new/obj/buildholder()
|
||||
var/obj/builddir/A = new/obj/builddir(H)
|
||||
var/obj/bmode/buildholder/H = new/obj/bmode/buildholder()
|
||||
var/obj/bmode/builddir/A = new/obj/bmode/builddir(H)
|
||||
A.master = H
|
||||
var/obj/buildhelp/B = new/obj/buildhelp(H)
|
||||
var/obj/bmode/buildhelp/B = new/obj/bmode/buildhelp(H)
|
||||
B.master = H
|
||||
var/obj/buildmode/C = new/obj/buildmode(H)
|
||||
var/obj/bmode/buildmode/C = new/obj/bmode/buildmode(H)
|
||||
C.master = H
|
||||
var/obj/buildquit/D = new/obj/buildquit(H)
|
||||
var/obj/bmode/buildquit/D = new/obj/bmode/buildquit(H)
|
||||
D.master = H
|
||||
|
||||
H.builddir = A
|
||||
@@ -34,161 +34,154 @@
|
||||
M.client.screen += D
|
||||
H.cl = M.client
|
||||
|
||||
/obj/builddir
|
||||
/obj/bmode//Cleaning up the tree a bit
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 20
|
||||
dir = NORTH
|
||||
icon = 'buildmode.dmi'
|
||||
var/obj/bmode/buildholder/master = null
|
||||
|
||||
/obj/bmode/builddir
|
||||
icon_state = "build"
|
||||
screen_loc = "NORTH,WEST"
|
||||
var/obj/buildholder/master = null
|
||||
/obj/buildhelp
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 20
|
||||
dir = NORTH
|
||||
Click()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
dir = EAST
|
||||
if(EAST)
|
||||
dir = SOUTH
|
||||
if(SOUTH)
|
||||
dir = WEST
|
||||
if(WEST)
|
||||
dir = NORTHWEST
|
||||
if(NORTHWEST)
|
||||
dir = NORTH
|
||||
return
|
||||
|
||||
/obj/bmode/buildhelp
|
||||
icon = 'buildmode.dmi'
|
||||
icon_state = "buildhelp"
|
||||
screen_loc = "NORTH,WEST+1"
|
||||
var/obj/buildholder/master = null
|
||||
/obj/buildmode
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 20
|
||||
dir = NORTH
|
||||
icon = 'buildmode.dmi'
|
||||
icon_state = "buildmode1"
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
var/obj/buildholder/master = null
|
||||
var/varholder = "name"
|
||||
var/valueholder = "derp"
|
||||
var/objholder = "/obj/closet"
|
||||
/obj/buildquit
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 20
|
||||
dir = NORTH
|
||||
icon = 'buildmode.dmi'
|
||||
Click()
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Left Mouse Button = Construct / Upgrade"
|
||||
usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade"
|
||||
usr << "\blue Left Mouse Button + ctrl = R-Window"
|
||||
usr << "\blue Left Mouse Button + alt = Airlock"
|
||||
usr << ""
|
||||
usr << "\blue Use the button in the upper left corner to"
|
||||
usr << "\blue change the direction of built objects."
|
||||
usr << "\blue ***********************************************************"
|
||||
if(2)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Right Mouse Button on buildmode button = Set object type"
|
||||
usr << "\blue Left Mouse Button on turf/obj = Place objects"
|
||||
usr << "\blue Right Mouse Button = Delete objects"
|
||||
usr << ""
|
||||
usr << "\blue Use the button in the upper left corner to"
|
||||
usr << "\blue change the direction of built objects."
|
||||
usr << "\blue ***********************************************************"
|
||||
if(3)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value"
|
||||
usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value"
|
||||
usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value"
|
||||
usr << "\blue ***********************************************************"
|
||||
if(4)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Left Mouse Button on turf/obj/mob = Throw"
|
||||
usr << "\blue Right Mouse Button on turf/obj/mob = Select"
|
||||
usr << "\blue ***********************************************************"
|
||||
return
|
||||
|
||||
/obj/bmode/buildquit
|
||||
icon_state = "buildquit"
|
||||
screen_loc = "NORTH,WEST+3"
|
||||
var/obj/buildholder/master = null
|
||||
|
||||
/obj/buildquit/Click()
|
||||
togglebuildmode(master.cl.mob)
|
||||
Click()
|
||||
togglebuildmode(master.cl.mob)
|
||||
|
||||
/obj/buildholder
|
||||
/obj/bmode/buildholder
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/client/cl = null
|
||||
var/obj/builddir/builddir = null
|
||||
var/obj/buildhelp/buildhelp = null
|
||||
var/obj/buildmode/buildmode = null
|
||||
var/obj/buildquit/buildquit = null
|
||||
var/obj/bmode/builddir/builddir = null
|
||||
var/obj/bmode/buildhelp/buildhelp = null
|
||||
var/obj/bmode/buildmode/buildmode = null
|
||||
var/obj/bmode/buildquit/buildquit = null
|
||||
var/atom/movable/throw_atom = null
|
||||
|
||||
/obj/builddir/Click()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
dir = EAST
|
||||
if(EAST)
|
||||
dir = SOUTH
|
||||
if(SOUTH)
|
||||
dir = WEST
|
||||
if(WEST)
|
||||
dir = NORTHWEST
|
||||
if(NORTHWEST)
|
||||
dir = NORTH
|
||||
/obj/bmode/buildmode
|
||||
icon_state = "buildmode1"
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
var/varholder = "name"
|
||||
var/valueholder = "derp"
|
||||
var/objholder = "/obj/closet"
|
||||
|
||||
/obj/buildhelp/Click()
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Left Mouse Button = Construct / Upgrade"
|
||||
usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade"
|
||||
usr << "\blue Left Mouse Button + ctrl = R-Window"
|
||||
usr << "\blue Left Mouse Button + alt = Airlock"
|
||||
usr << ""
|
||||
usr << "\blue Use the button in the upper left corner to"
|
||||
usr << "\blue change the direction of built objects."
|
||||
usr << "\blue ***********************************************************"
|
||||
if(2)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Right Mouse Button on buildmode button = Set object type"
|
||||
usr << "\blue Left Mouse Button on turf/obj = Place objects"
|
||||
usr << "\blue Right Mouse Button = Delete objects"
|
||||
usr << ""
|
||||
usr << "\blue Use the button in the upper left corner to"
|
||||
usr << "\blue change the direction of built objects."
|
||||
usr << "\blue ***********************************************************"
|
||||
if(3)
|
||||
usr << "\blue ***********************************************************"
|
||||
usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value"
|
||||
usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value"
|
||||
usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value"
|
||||
usr << "\blue ***********************************************************"
|
||||
Click(location, control, params)
|
||||
var/list/pa = params2list(params)
|
||||
|
||||
/obj/buildmode/Click(location, control, params)
|
||||
var/list/pa = params2list(params)
|
||||
if(pa.Find("left"))
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
master.cl.buildmode = 2
|
||||
src.icon_state = "buildmode2"
|
||||
if(2)
|
||||
master.cl.buildmode = 3
|
||||
src.icon_state = "buildmode3"
|
||||
if(3)
|
||||
master.cl.buildmode = 4
|
||||
src.icon_state = "buildmode4"
|
||||
if(4)
|
||||
master.cl.buildmode = 1
|
||||
src.icon_state = "buildmode1"
|
||||
|
||||
if(pa.Find("left"))
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
master.cl.buildmode = 2
|
||||
src.icon_state = "buildmode2"
|
||||
if(2)
|
||||
master.cl.buildmode = 3
|
||||
src.icon_state = "buildmode3"
|
||||
if(3)
|
||||
master.cl.buildmode = 1
|
||||
src.icon_state = "buildmode1"
|
||||
else if(pa.Find("right"))
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
return
|
||||
if(2)
|
||||
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/closet")
|
||||
var/list/removed_paths = list("/obj/bhole")
|
||||
if(objholder in removed_paths)
|
||||
alert("That path is not allowed.")
|
||||
objholder = "/obj/closet"
|
||||
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
|
||||
objholder = "/obj/closet"
|
||||
if(3)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
|
||||
if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))
|
||||
else if(pa.Find("right"))
|
||||
switch(master.cl.buildmode)
|
||||
if(1)
|
||||
return
|
||||
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||
if(!thetype) return
|
||||
switch(thetype)
|
||||
if("text")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
|
||||
if("number")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
||||
if("mob-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in world
|
||||
if("obj-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
|
||||
if(2)
|
||||
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/closet")
|
||||
var/list/removed_paths = list("/obj/bhole")
|
||||
if(objholder in removed_paths)
|
||||
alert("That path is not allowed.")
|
||||
objholder = "/obj/closet"
|
||||
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
|
||||
objholder = "/obj/closet"
|
||||
if(3)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name")
|
||||
if(master.buildmode.varholder in locked && !(usr.client.holder.rank in list("Game Master", "Game Admin")))
|
||||
return
|
||||
var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference")
|
||||
if(!thetype) return
|
||||
switch(thetype)
|
||||
if("text")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text
|
||||
if("number")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num
|
||||
if("mob-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in world
|
||||
if("obj-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
|
||||
|
||||
|
||||
/proc/build_click(var/mob/user, buildmode, location, control, params, var/obj/object)
|
||||
|
||||
var/obj/buildholder/holder = null
|
||||
|
||||
for(var/obj/buildholder/H)
|
||||
var/obj/bmode/buildholder/holder = null
|
||||
for(var/obj/bmode/buildholder/H)
|
||||
if(H.cl == user.client)
|
||||
holder = H
|
||||
break
|
||||
|
||||
if(!holder) return
|
||||
var/list/pa = params2list(params)
|
||||
|
||||
|
||||
switch(buildmode)
|
||||
|
||||
if(1)
|
||||
if(istype(object,/turf) && pa.Find("left") && !pa.Find("alt") && !pa.Find("ctrl") )
|
||||
if(istype(object,/turf/space))
|
||||
@@ -203,7 +196,6 @@
|
||||
var/turf/T = object
|
||||
T.ReplaceWithRWall()
|
||||
return
|
||||
|
||||
else if(pa.Find("right"))
|
||||
if(istype(object,/turf/simulated/wall))
|
||||
var/turf/T = object
|
||||
@@ -220,10 +212,8 @@
|
||||
else if(istype(object,/obj))
|
||||
del(object)
|
||||
return
|
||||
|
||||
else if(istype(object,/turf) && pa.Find("alt") && pa.Find("left"))
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
|
||||
else if(istype(object,/turf) && pa.Find("ctrl") && pa.Find("left"))
|
||||
switch(holder.builddir.dir)
|
||||
if(NORTH)
|
||||
@@ -253,7 +243,6 @@
|
||||
if(pa.Find("left")) //I cant believe this shit actually compiles.
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
// message_admins("[key_name_admin(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]", 1)
|
||||
object.vars[holder.buildmode.varholder] = holder.buildmode.valueholder
|
||||
blink(object)
|
||||
else
|
||||
@@ -261,14 +250,20 @@
|
||||
if(pa.Find("right"))
|
||||
if(object.vars.Find(holder.buildmode.varholder))
|
||||
log_admin("[key_name(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]")
|
||||
// message_admins("[key_name_admin(usr)] modified [object.name]'s [holder.buildmode.varholder] to [holder.buildmode.valueholder]", 1)
|
||||
object.vars[holder.buildmode.varholder] = initial(object.vars[holder.buildmode.varholder])
|
||||
blink(object)
|
||||
else
|
||||
usr << "\red [initial(object.name)] does not have a var called '[holder.buildmode.varholder]'"
|
||||
|
||||
if(4)
|
||||
if(pa.Find("left"))
|
||||
holder.throw_atom = object
|
||||
if(pa.Find("right"))
|
||||
if(holder.throw_atom)
|
||||
holder.throw_atom.throw_at(object, 10, 1)
|
||||
|
||||
/proc/blink(atom/A)
|
||||
A.icon += rgb(0,75,75)
|
||||
spawn(10)
|
||||
spawn(5)
|
||||
if(A)
|
||||
A.icon = initial(A.icon)
|
||||
|
||||
@@ -1,329 +0,0 @@
|
||||
/obj/item/projectile/hivebotbullet
|
||||
damage = 5
|
||||
mobdamage = list(BRUTE = 5, BURN = 0, TOX = 0, OXY = 0, CLONE = 0)
|
||||
|
||||
/obj/hivebot
|
||||
name = "Hivebot"
|
||||
desc = "A small robot"
|
||||
icon = 'Hivebot.dmi'
|
||||
icon_state = "basic"
|
||||
layer = 5.0
|
||||
density = 1
|
||||
anchored = 0
|
||||
var
|
||||
alive = 1
|
||||
health = 10
|
||||
task = "thinking"
|
||||
aggressive = 1
|
||||
wanderer = 1
|
||||
opensdoors = 1
|
||||
frustration = 0
|
||||
last_found = null
|
||||
target = null
|
||||
oldtarget_name = null
|
||||
target_lastloc = null
|
||||
atkcarbon = 1
|
||||
atksilicon = 0
|
||||
attack = 0
|
||||
attacking = 0
|
||||
steps = 0
|
||||
firevuln = 0.5
|
||||
brutevuln = 1
|
||||
seekrange = 8
|
||||
basic_damage = 2
|
||||
armor = 5
|
||||
proc
|
||||
patrol_step()
|
||||
process()
|
||||
seek_target()
|
||||
Die()
|
||||
ChaseAttack(mob/M)
|
||||
RunAttack(mob/M)
|
||||
Shoot(var/target, var/start, var/user, var/bullet = 0)
|
||||
TakeDamage(var/damage = 0)
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/living/user as mob)
|
||||
..()
|
||||
if (!src.alive) return
|
||||
var/damage = 0
|
||||
switch(W.damtype)
|
||||
if("fire") damage = W.force * firevuln
|
||||
if("brute") damage = W.force * brutevuln
|
||||
TakeDamage(damage)
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (!src.alive) return
|
||||
if (user.a_intent == "hurt")
|
||||
TakeDamage(2 * brutevuln)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <b>[user]</b> punches [src]!", 1)
|
||||
playsound(src.loc, pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'), 100, 1)
|
||||
|
||||
|
||||
patrol_step()
|
||||
var/moveto = locate(src.x + rand(-1,1),src.y + rand(-1, 1),src.z)
|
||||
if (istype(moveto, /turf/simulated/floor) || istype(moveto, /turf/simulated/shuttle/floor) || istype(moveto, /turf/unsimulated/floor)) step_towards(src, moveto)
|
||||
if(src.aggressive) seek_target()
|
||||
steps += 1
|
||||
if (steps == rand(5,20)) src.task = "thinking"
|
||||
|
||||
|
||||
Bump(M as mob|obj)
|
||||
spawn(0)
|
||||
if ((istype(M, /obj/machinery/door)))
|
||||
var/obj/machinery/door/D = M
|
||||
if (src.opensdoors)
|
||||
D.open()
|
||||
src.frustration = 0
|
||||
else src.frustration ++
|
||||
else if ((istype(M, /mob/living/)) && (!src.anchored))
|
||||
src.loc = M:loc
|
||||
src.frustration = 0
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
Bumped(M as mob|obj)
|
||||
spawn(0)
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
TakeDamage(Proj.damage)
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
src.Die()
|
||||
return
|
||||
if(2.0)
|
||||
TakeDamage(20)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
emp_act(serverity)
|
||||
src.Die()//Currently why not
|
||||
return
|
||||
|
||||
|
||||
meteorhit()
|
||||
src.Die()
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
if(prob(25))
|
||||
src.Die()
|
||||
return
|
||||
|
||||
|
||||
process()
|
||||
set background = 1
|
||||
if (!src.alive) return
|
||||
switch(task)
|
||||
if("thinking")
|
||||
src.attack = 0
|
||||
src.target = null
|
||||
sleep(15)
|
||||
walk_to(src,0)
|
||||
if (src.aggressive) seek_target()
|
||||
if (src.wanderer && !src.target) src.task = "wandering"
|
||||
if("chasing")
|
||||
if (src.frustration >= 8)
|
||||
src.target = null
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
src.task = "thinking"
|
||||
walk_to(src,0)
|
||||
if (target)
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
ChaseAttack(M)
|
||||
src.task = "attacking"
|
||||
src.anchored = 1
|
||||
src.target_lastloc = M.loc
|
||||
else
|
||||
var/turf/olddist = get_dist(src, src.target)
|
||||
walk_to(src, src.target,1,4)
|
||||
if ((get_dist(src, src.target)) >= (olddist))
|
||||
src.frustration++
|
||||
else
|
||||
src.frustration = 0
|
||||
sleep(5)
|
||||
else src.task = "thinking"
|
||||
if("attacking")
|
||||
// see if he got away
|
||||
if ((get_dist(src, src.target) > 1) || ((src.target:loc != src.target_lastloc)))
|
||||
src.anchored = 0
|
||||
src.task = "chasing"
|
||||
else
|
||||
if (get_dist(src, src.target) <= 1)
|
||||
var/mob/living/carbon/M = src.target
|
||||
if (!src.attacking) RunAttack(src.target)
|
||||
if (!src.aggressive)
|
||||
src.task = "thinking"
|
||||
src.target = null
|
||||
src.anchored = 0
|
||||
src.last_found = world.time
|
||||
src.frustration = 0
|
||||
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
|
||||
else
|
||||
src.anchored = 0
|
||||
src.attacking = 0
|
||||
src.task = "chasing"
|
||||
if("wandering")
|
||||
patrol_step()
|
||||
sleep(10)
|
||||
spawn(8)
|
||||
process()
|
||||
return
|
||||
|
||||
|
||||
New()
|
||||
spawn(0) process()
|
||||
..()
|
||||
|
||||
|
||||
seek_target()
|
||||
src.anchored = 0
|
||||
for (var/mob/living/C in view(src.seekrange,src))
|
||||
if (src.target)
|
||||
src.task = "chasing"
|
||||
break
|
||||
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 (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 (src.attack)
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
src.task = "chasing"
|
||||
break
|
||||
else
|
||||
continue
|
||||
|
||||
|
||||
Die()
|
||||
if (!src.alive) return
|
||||
src.alive = 0
|
||||
walk_to(src,0)
|
||||
src.visible_message("<b>[src]</b> blows apart!")
|
||||
var/turf/Ts = get_turf(src)
|
||||
new /obj/decal/cleanable/robot_debris(Ts)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(src)
|
||||
|
||||
|
||||
TakeDamage(var/damage = 0)
|
||||
var/tempdamage = (damage-armor)
|
||||
if(tempdamage > 0)
|
||||
src.health -= tempdamage
|
||||
else
|
||||
src.health--
|
||||
if(src.health <= 0)
|
||||
src.Die()
|
||||
|
||||
|
||||
ChaseAttack(mob/M)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> leaps at [src.target]!", 1)
|
||||
|
||||
|
||||
RunAttack(mob/M)
|
||||
src.attacking = 1
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src]</B> claws at [src.target]!", 1)
|
||||
src.target:bruteloss += basic_damage
|
||||
spawn(25)
|
||||
src.attacking = 0
|
||||
|
||||
|
||||
Shoot(var/target, var/start, var/user, var/bullet = 0)
|
||||
if(target == start)
|
||||
return
|
||||
|
||||
var/obj/item/projectile/hivebotbullet/A = new /obj/item/projectile/hivebotbullet(user:loc)
|
||||
playsound(user, 'Gunshot.ogg', 100, 1)
|
||||
|
||||
if(!A) return
|
||||
|
||||
if (!istype(target, /turf))
|
||||
del(A)
|
||||
return
|
||||
A.current = target
|
||||
A.yo = target:y - start:y
|
||||
A.xo = target:x - start:x
|
||||
spawn( 0 )
|
||||
A.process()
|
||||
return
|
||||
|
||||
|
||||
/obj/hivebot/range
|
||||
name = "Hivebot"
|
||||
desc = "A smallish robot, this one is armed!"
|
||||
var/rapid = 0
|
||||
|
||||
seek_target()
|
||||
src.anchored = 0
|
||||
for (var/mob/living/C in view(src.seekrange,src))
|
||||
if (!src.alive) break
|
||||
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 (src.attack)
|
||||
src.target = C
|
||||
src.oldtarget_name = C.name
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <b>[src]</b> fires at [src.target]!", 1)
|
||||
|
||||
var/tturf = get_turf(target)
|
||||
if(rapid)
|
||||
spawn(1)
|
||||
Shoot(tturf, src.loc, src)
|
||||
spawn(4)
|
||||
Shoot(tturf, src.loc, src)
|
||||
spawn(6)
|
||||
Shoot(tturf, src.loc, src)
|
||||
else
|
||||
Shoot(tturf, src.loc, src)
|
||||
|
||||
src.attack = 0
|
||||
sleep(12)
|
||||
seek_target()
|
||||
src.task = "thinking"
|
||||
break
|
||||
else continue
|
||||
|
||||
/obj/hivebot/range/rapid
|
||||
rapid = 1
|
||||
|
||||
/obj/hivebot/range/strong
|
||||
name = "Strong Hivebot"
|
||||
desc = "A robot, this one is armed and looks tough!"
|
||||
health = 50
|
||||
armor = 10
|
||||
|
||||
/obj/hivebot/range/borgkill
|
||||
health = 20
|
||||
atksilicon = 1
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
/obj/hivebot/tele//this still needs work
|
||||
name = "Beacon"
|
||||
desc = "Some odd beacon thing"
|
||||
icon = 'Hivebot.dmi'
|
||||
icon_state = "def_radar-off"
|
||||
health = 200
|
||||
task = "thinking"
|
||||
aggressive = 0
|
||||
wanderer = 0
|
||||
armor = 5
|
||||
|
||||
var
|
||||
bot_type = "norm"
|
||||
bot_amt = 10
|
||||
spawn_delay = 600
|
||||
set_spawn = 0
|
||||
auto_spawn = 1
|
||||
proc
|
||||
warpbots()
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
||||
smoke.set_up(5, 0, src.loc)
|
||||
smoke.start()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>The [src] warps in!</B>", 1)
|
||||
playsound(src.loc, 'EMPulse.ogg', 25, 1)
|
||||
if(auto_spawn)
|
||||
spawn(spawn_delay)
|
||||
warpbots()
|
||||
|
||||
|
||||
warpbots()
|
||||
icon_state = "def_radar"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red The [src] turns on!", 1)
|
||||
while(bot_amt > 0)
|
||||
bot_amt--
|
||||
switch(bot_type)
|
||||
if("norm")
|
||||
new /obj/hivebot(get_turf(src))
|
||||
if("range")
|
||||
new /obj/hivebot/range(get_turf(src))
|
||||
if("rapid")
|
||||
new /obj/hivebot/range/rapid(get_turf(src))
|
||||
spawn(100)
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
process()
|
||||
if(set_spawn)
|
||||
warpbots()
|
||||
..()
|
||||
|
||||
|
||||
/obj/hivebot/tele/massive
|
||||
bot_type = "norm"
|
||||
bot_amt = 30
|
||||
auto_spawn = 0
|
||||
|
||||
|
||||
/obj/hivebot/tele/range
|
||||
bot_type = "range"
|
||||
bot_amt = 10
|
||||
|
||||
|
||||
/obj/hivebot/tele/rapid
|
||||
bot_type = "rapid"
|
||||
bot_amt = 10
|
||||
Reference in New Issue
Block a user