Conflicts III

This commit is contained in:
Xhuis
2016-05-15 00:59:44 -04:00
1216 changed files with 177002 additions and 22834 deletions

View File

@@ -5,31 +5,37 @@
icon_state = "blank"
flags = CONDUCT
slot_flags = SLOT_BELT
var/body_zone
/obj/item/robot_parts/l_arm
name = "cyborg left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
body_zone = "l_arm"
/obj/item/robot_parts/r_arm
name = "cyborg right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
body_zone = "r_arm"
/obj/item/robot_parts/l_leg
name = "cyborg left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
body_zone = "l_leg"
/obj/item/robot_parts/r_leg
name = "cyborg right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
body_zone = "r_leg"
/obj/item/robot_parts/chest
name = "cyborg torso"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
body_zone = "chest"
var/wired = 0
var/obj/item/weapon/stock_parts/cell/cell = null
@@ -37,6 +43,7 @@
name = "cyborg head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
body_zone = "head"
var/obj/item/device/assembly/flash/handheld/flash1 = null
var/obj/item/device/assembly/flash/handheld/flash2 = null
@@ -86,21 +93,22 @@
return 0
/obj/item/robot_parts/robot_suit/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
if(istype(W, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = W
if (M.use(1))
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = get_turf(src)
user << "<span class='notice'>You arm the robot frame.</span>"
if (user.get_inactive_hand()==src)
user.unEquip(src)
user.put_in_inactive_hand(B)
qdel(src)
else
user << "<span class='warning'>You need one sheet of metal to start building ED-209!</span>"
return
if(istype(W, /obj/item/robot_parts/l_leg))
if(!l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
if (M.use(1))
var/obj/item/weapon/ed209_assembly/B = new /obj/item/weapon/ed209_assembly
B.loc = get_turf(src)
user << "<span class='notice'>You arm the robot frame.</span>"
if (user.get_inactive_hand()==src)
user.unEquip(src)
user.put_in_inactive_hand(B)
qdel(src)
else
user << "<span class='warning'>You need one sheet of metal to start building ED-209!</span>"
return
else if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg)
return
if(!user.unEquip(W))
@@ -109,7 +117,7 @@
src.l_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_leg))
else if(istype(W, /obj/item/robot_parts/r_leg))
if(src.r_leg)
return
if(!user.unEquip(W))
@@ -118,7 +126,7 @@
src.r_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/l_arm))
else if(istype(W, /obj/item/robot_parts/l_arm))
if(src.l_arm)
return
if(!user.unEquip(W))
@@ -127,7 +135,7 @@
src.l_arm = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_arm))
else if(istype(W, /obj/item/robot_parts/r_arm))
if(src.r_arm)
return
if(!user.unEquip(W))
@@ -136,7 +144,7 @@
src.r_arm = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/chest))
else if(istype(W, /obj/item/robot_parts/chest))
if(src.chest)
return
if(W:wired && W:cell)
@@ -150,7 +158,7 @@
else
user << "<span class='warning'>You need to attach a cell to it first!</span>"
if(istype(W, /obj/item/robot_parts/head))
else if(istype(W, /obj/item/robot_parts/head))
if(src.head)
return
if(W:flash2 && W:flash1)
@@ -162,13 +170,13 @@
else
user << "<span class='warning'>You need to attach a flash to it first!</span>"
if (istype(W, /obj/item/device/multitool))
else if (istype(W, /obj/item/device/multitool))
if(check_completion())
Interact(user)
else
user << "<span class='warning'>The endoskeleton must be assembled before debugging can begin!</span>"
if(istype(W, /obj/item/device/mmi))
else if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
if(!istype(loc,/turf))
@@ -258,9 +266,10 @@
else
user << "<span class='warning'>The MMI must go in after everything else!</span>"
if(istype(W,/obj/item/weapon/pen))
else if(istype(W,/obj/item/weapon/pen))
user << "<span class='warning'>You need to use a multitool to name [src]!</span>"
return
else
return ..()
/obj/item/robot_parts/robot_suit/proc/Interact(mob/user)
var/t1 = text("Designation: <A href='?src=\ref[];Name=1'>[(created_name ? "[created_name]" : "Default Cyborg")]</a><br>\n",src)
@@ -312,7 +321,6 @@
return
/obj/item/robot_parts/chest/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(src.cell)
user << "<span class='warning'>You have already inserted a cell!</span>"
@@ -323,7 +331,7 @@
W.loc = src
src.cell = W
user << "<span class='notice'>You insert the cell.</span>"
if(istype(W, /obj/item/stack/cable_coil))
else if(istype(W, /obj/item/stack/cable_coil))
if(src.wired)
user << "<span class='warning'>You have already inserted wire!</span>"
return
@@ -333,10 +341,10 @@
user << "<span class='notice'>You insert the wire.</span>"
else
user << "<span class='warning'>You need one length of coil to wire it!</span>"
return
else
return ..()
/obj/item/robot_parts/head/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/device/assembly/flash/handheld))
var/obj/item/device/assembly/flash/handheld/F = W
if(src.flash1 && src.flash2)
@@ -354,5 +362,6 @@
else
src.flash1 = F
user << "<span class='notice'>You insert the flash into the eye socket.</span>"
return
else
return ..()