Files
Paradise/code/game/objects/items/robot_parts.dm
T
Rygzengrho fa8844dd49 New nutrition system:
UI icon for your nutrition status. If not working - will be fixed a little later.
Walking makes you hungry faster. Running makes you hungry even faster.
Big hunger makes you slower.
Overeating for a prolonged period makes you fat.
Meat from gibber depends on nutrition of person who was put into it. Fatties go first.
If a person is in a sleeper or Cryo Cell, all his processes running 5 times slower.
Fixed bug when multiple persons could move into one sleeper.
Warden is now choosable after the game started.
Added ED-209 assembly process. Frame - Metal sheet - leg - leg - weld - security vest - helmet - proximity - wires - taser - battery. Security should reprogram it to patrol after that.
Added ED-209 sounds.
Added Airlock Electronics. When you want to make airlock - you take one, swipe your ID, if it is ok, you choose desired access and put it into the assembly instead of multitool. Also when disassembling, you get one.
Added prototype of chemical explosions system. WIP.
Added Imidazoline, Glycerol, Niroglicerin.
Added Explosion verb to the admins.
Added Attack Log verb. Does not work yet. WIP
Added output of jobban messages to the jobbaned person.
Standing/lying icon updates accordingly to your state.
Bucket now has volume 90. It was strange that beaker was larger than a bucket.
Changed Master Controller to introduce the new status output - loop frequency. If it will lag - revert just master controller file back.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@522 316c924e-a436-60f5-8080-3fe189b3f50e
2010-12-03 10:52:37 +00:00

214 lines
5.4 KiB
Plaintext

/obj/item/robot_parts
name = "robot parts"
icon = 'robot_parts.dmi'
item_state = "buildpipe"
icon_state = "blank"
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT
/obj/item/robot_parts/l_arm
name = "robot left arm"
icon_state = "l_arm"
/obj/item/robot_parts/r_arm
name = "robot right arm"
icon_state = "r_arm"
/obj/item/robot_parts/l_leg
name = "robot left leg"
icon_state = "l_leg"
/obj/item/robot_parts/r_leg
name = "robot right leg"
icon_state = "r_leg"
/obj/item/robot_parts/chest
name = "robot chest"
icon_state = "chest"
var/wires = 0.0
var/obj/item/weapon/cell/cell = null
/obj/item/robot_parts/head
name = "robot head"
icon_state = "head"
var/obj/item/device/flash/flash1 = null
var/obj/item/device/flash/flash2 = null
/obj/item/robot_parts/robot_suit
name = "robot suit"
icon_state = "robo_suit"
var/obj/item/robot_parts/l_arm/l_arm = null
var/obj/item/robot_parts/r_arm/r_arm = null
var/obj/item/robot_parts/l_leg/l_leg = null
var/obj/item/robot_parts/r_leg/r_leg = null
var/obj/item/robot_parts/chest/chest = null
var/obj/item/robot_parts/head/head = null
var/obj/item/brain/brain = null
/obj/item/robot_parts/robot_suit/New()
..()
src.updateicon()
/obj/item/robot_parts/robot_suit/proc/updateicon()
src.overlays = null
if(src.l_arm)
src.overlays += "l_arm+o"
if(src.r_arm)
src.overlays += "r_arm+o"
if(src.chest)
src.overlays += "chest+o"
if(src.l_leg)
src.overlays += "l_leg+o"
if(src.r_leg)
src.overlays += "r_leg+o"
if(src.head)
src.overlays += "head+o"
/obj/item/robot_parts/robot_suit/proc/check_completion()
if(src.l_arm && src.r_arm)
if(src.l_leg && src.r_leg)
if(src.chest && src.head)
return 1
return 0
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/sheet/metal))
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = user
if (user.r_hand == W)
user.u_equip(W)
user.r_hand = B
else
user.u_equip(W)
user.l_hand = B
B.layer = 20
user << "You armed the robot frame"
del(W)
del(src)
if(istype(W, /obj/item/robot_parts/l_leg))
user.drop_item()
W.loc = src
src.l_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_leg))
user.drop_item()
W.loc = src
src.r_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/l_arm))
user.drop_item()
W.loc = src
src.l_arm = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_arm))
user.drop_item()
W.loc = src
src.r_arm = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/chest))
if(W:wires && W:cell)
user.drop_item()
W.loc = src
src.chest = W
src.updateicon()
else if(!W:wires)
user << "\blue You need to attach wires to it first!"
else
user << "\blue You need to attach a cell to it first!"
if(istype(W, /obj/item/robot_parts/head))
if(W:flash2 && W:flash1)
user.drop_item()
W.loc = src
src.head = W
src.updateicon()
else
user << "\blue You need to attach a flash to it first!"
if(istype(W, /obj/item/brain))
if(src.check_completion())
if(!istype(src.loc,/turf))
user << "\red You can't put the brain in, it has to be standing on the ground to be perfectly precise."
return
user.drop_item()
W.loc = src
src.brain = W
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(src.loc))
if (src.brain.owner)
O.gender = src.brain.owner.gender
//O.start = 1
O.invisibility = 0
O.name = "Cyborg"
O.real_name = "Cyborg"
if (src.brain.owner.client)
O.lastKnownIP = src.brain.owner.client.address
src.brain.owner.client.mob = O
else
for(var/mob/dead/observer/G in world)
if(G.corpse == src.brain.owner && G.client)
G.client.mob = O
del(G)
break
O.loc = src.loc
O << "<B>You are playing a Robot. The Robot can interact with most electronic objects in its view point.</B>"
O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>"
O << "To use something, simply double-click it."
O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
//SN src = null
O.job = "Cyborg"
O.cell = src.chest.cell
O.cell.loc = O
del(src)
else
user << "\blue The brain must go in after everything else!"
return
/obj/item/robot_parts/chest/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/cell))
if(src.cell)
user << "\blue You have already inserted a cell!"
return
else
user.drop_item()
W.loc = src
src.cell = W
user << "\blue You insert the cell!"
if(istype(W, /obj/item/weapon/cable_coil))
if(src.wires)
user << "\blue You have already inserted wire!"
return
else
var/obj/item/weapon/cable_coil/coil = W
coil.use(1)
src.wires = 1.0
user << "\blue You insert the wire!"
return
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/flash))
if(src.flash1 && src.flash2)
user << "\blue You have already inserted the eyes!"
return
else if(src.flash1)
user.drop_item()
W.loc = src
src.flash2 = W
user << "\blue You insert the flash into the eye socket!"
else
user.drop_item()
W.loc = src
src.flash1 = W
user << "\blue You insert the flash into the eye socket!"
return