Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+64 -231
View File
@@ -8,29 +8,16 @@
/obj/item/borg/stun
name = "electrically-charged arm"
icon_state = "elecarm"
var/charge_cost = 30
/obj/item/borg/stun/attack(mob/living/M, mob/living/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK))
playsound(M, 'sound/weapons/Genhit.ogg', 50, 1)
return FALSE
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
if(!R.cell.use(charge_cost))
return
/obj/item/borg/stun/attack(mob/living/M, mob/living/silicon/robot/user)
if(!user.cell.use(30)) return
user.do_attack_animation(M)
M.Weaken(5)
M.apply_effect(STUTTER, 5)
M.Stun(5)
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
add_logs(user, M, "stunned", src, "(INTENT: [uppertext(user.a_intent)])")
/obj/item/borg/cyborghug
@@ -40,11 +27,10 @@
var/mode = 0 //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH
var/ccooldown = 0
var/scooldown = 0
var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default.
var/boop = FALSE
var/shockallowed = 0//Can it be a stunarm when emagged. Only PK borgs get this by default.
/obj/item/borg/cyborghug/attack_self(mob/living/user)
if(iscyborg(user))
if(isrobot(user))
var/mob/living/silicon/robot/P = user
if(P.emagged&&shockallowed == 1)
if(mode < 3)
@@ -69,20 +55,15 @@
switch(mode)
if(0)
if(M.health >= 0)
if(user.zone_selected == "head")
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
"<span class='notice'>You playfully boop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1)
else if(ishuman(M))
if(ishuman(M))
if(M.lying)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
user.visible_message("<span class='notice'>[user] shakes [M] trying to get \him up!</span>", \
"<span class='notice'>You shake [M] trying to get \him up!</span>")
else
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
user.visible_message("<span class='notice'>[user] hugs [M] to make \him feel better!</span>", \
"<span class='notice'>You hug [M] to make \him feel better!</span>")
if(M.resting)
M.resting = FALSE
M.resting = 0
M.update_canmove()
else
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
@@ -92,17 +73,13 @@
if(M.health >= 0)
if(ishuman(M))
if(M.lying)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
else if(user.zone_selected == "head")
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
"<span class='warning'>You bop [M] on the head!</span>")
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
user.visible_message("<span class='notice'>[user] shakes [M] trying to get \him up!</span>", \
"<span class='notice'>You shake [M] trying to get \him up!</span>")
else
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
"<span class='warning'>You hug [M] firmly to make \him feel better! [M] looks uncomfortable...</span>")
if(M.resting)
M.resting = FALSE
M.resting = 0
M.update_canmove()
else
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
@@ -117,7 +94,7 @@
"<span class='danger'>You electrocute [M] with your touch!</span>")
M.update_canmove()
else
if(!iscyborg(M))
if(!isrobot(M))
M.adjustFireLoss(10)
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
"<span class='danger'>You shock [M]!</span>")
@@ -126,9 +103,9 @@
"<span class='danger'>You shock [M] to no effect.</span>")
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1)
user.cell.charge -= 500
scooldown = TRUE
scooldown = 1
spawn(20)
scooldown = FALSE
scooldown = 0
if(3)
if(!ccooldown)
if(M.health >= 0)
@@ -139,17 +116,14 @@
user.visible_message("<span class='userdanger'>[user] crushes [M]!</span>", \
"<span class='danger'>You crush [M]!</span>")
playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1)
M.adjustBruteLoss(15)
M.adjustBruteLoss(10)
user.cell.charge -= 300
ccooldown = TRUE
ccooldown = 1
spawn(10)
ccooldown = FALSE
ccooldown = 0
/obj/item/borg/cyborghug/peacekeeper
shockallowed = TRUE
/obj/item/borg/cyborghug/medical
boop = TRUE
shockallowed = 1
/obj/item/borg/charger
name = "power connector"
@@ -174,7 +148,7 @@
update_icon()
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag)
if(!proximity_flag || !iscyborg(user))
if(!proximity_flag || !isrobot(user))
return
if(mode == "draw")
if(is_type_in_list(target, charge_machines))
@@ -280,7 +254,7 @@
desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH"
icon_state = "megaphone"
var/cooldown = 0
var/emagged = FALSE
var/emagged = 0
/obj/item/device/harmalarm/emag_act(mob/user)
emagged = !emagged
@@ -295,207 +269,70 @@
user << "<font color='red'>The device is still recharging!</font>"
return
if(iscyborg(user))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
if(R.cell.charge < 1200)
user << "<font color='red'>You don't have enough charge to do this!</font>"
return
R.cell.charge -= 1000
if(R.emagged)
safety = FALSE
safety = 0
if(safety == TRUE)
if(safety == 1)
user.visible_message("<font color='red' size='2'>[user] blares out a near-deafening siren from its speakers!</font>", \
"<span class='userdanger'>The siren pierces your hearing and confuses you!</span>", \
"<span class='danger'>The siren pierces your hearing!</span>")
for(var/mob/living/carbon/M in get_hearers_in_view(9, user))
if(M.get_ear_protection() == FALSE)
for(var/mob/living/M in get_hearers_in_view(9, user))
if(iscarbon(M))
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(istype(H.ears, /obj/item/clothing/ears/earmuffs))
continue
M.confused += 6
audible_message("<font color='red' size='7'>HUMAN HARM</font>")
M << "<font color='red' size='7'>HUMAN HARM</font>"
playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3)
cooldown = world.time + 200
log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
if(iscyborg(user))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.connected_ai << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>"
return
if(safety == FALSE)
user.audible_message("<font color='red' size='7'>BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT</font>")
for(var/mob/living/carbon/C in get_hearers_in_view(9, user))
var/bang_effect = C.soundbang_act(2, 0, 0, 5)
switch(bang_effect)
if(1)
C.confused += 5
C.stuttering += 10
C.Jitter(10)
if(2)
C.Weaken(2)
C.confused += 10
C.stuttering += 15
C.Jitter(25)
if(safety == 0)
for(var/mob/living/M in get_hearers_in_view(9, user))
if(iscarbon(M))
var/earsafety = 0
if(istype(M, /mob/living/carbon/alien))
continue
if(ishuman(M))
var/mob/living/carbon/human/S = M
if(istype(S.ears, /obj/item/clothing/ears/earmuffs))
continue
if(S.check_ear_prot())
earsafety = 1
if(earsafety)
M.confused += 5
M.stuttering += 10
M.adjustEarDamage(0, 5)
M.Jitter(10)
user.visible_message("<font color='red' size='3'>[user] blares out a sonic screech from its speakers!</font>", \
"<span class='userdanger'>You hear a sharp screech, before your thoughts are interrupted and you find yourself extremely disorientated.</span>", \
"<span class='danger'>You hear a sonic screech and suddenly can't seem to walk straight!")
else
M.Weaken(2)
M.confused += 10
M.stuttering += 15
M.adjustEarDamage(0, 20)
M.Jitter(25)
user.visible_message("<font color='red' size='3'>[user] blares out a sonic screech from its speakers!</font>", \
"<span class='userdanger'>You hear a sharp screech before your thoughts are interrupted and you collapse, your ears ringing!</span>", \
"<span class='danger'>You hear a sonic screech and collapse, your ears riniging!")
M << "<font color='red' size='7'>BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT</font>"
playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3)
cooldown = world.time + 600
log_game("[user.ckey]([user]) used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])")
/obj/item/borg/lollipop
name = "lollipop fabricator"
desc = "Reward good humans with this. Toggle in-module to switch between dispensing and high velocity ejection modes."
icon_state = "lollipop"
var/candy = 30
var/candymax = 30
var/charge_delay = 10
var/charging = 0
var/mode = 1
var/firedelay = 0
var/hitspeed = 2
var/hitdamage = 0
var/emaggedhitdamage = 3
/obj/item/borg/lollipop/equipped()
check_amount()
/obj/item/borg/lollipop/dropped()
check_amount()
/obj/item/borg/lollipop/proc/check_amount() //Doesn't even use processing ticks.
if(charging)
return
if(candy < candymax)
addtimer(src, "charge_lollipops", charge_delay, TIMER_NORMAL)
charging = TRUE
/obj/item/borg/lollipop/proc/charge_lollipops()
candy++
charging = FALSE
check_amount()
/obj/item/borg/lollipop/proc/dispense(atom/A, mob/user)
if(candy <= 0)
user << "<span class='warning'>No lollipops left in storage!</span>"
return FALSE
var/turf/T = get_turf(A)
if(!T || !istype(T) || !isopenturf(T))
return FALSE
if(isobj(A))
var/obj/O = A
if(O.density)
return FALSE
new /obj/item/weapon/reagent_containers/food/snacks/lollipop(T)
candy--
check_amount()
user << "<span class='notice'>Dispensing lollipop...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
return TRUE
/obj/item/borg/lollipop/proc/shootL(atom/target, mob/living/user, params)
if(candy <= 0)
user << "<span class='warning'>Not enough gumballs left!</span>"
return FALSE
candy--
var/obj/item/ammo_casing/caseless/lollipop/A = new /obj/item/ammo_casing/caseless/lollipop(src)
A.BB.damage = hitdamage
A.BB.speed = 0.5
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
A.fire_casing(target, user, params, 0, 0, null, 0)
user.visible_message("<span class='warning'>[user] blasts a flying lollipop at [target]!</span>")
check_amount()
/obj/item/borg/lollipop/proc/shootG(atom/target, mob/living/user, params) //Most certainly a good idea.
if(candy <= 0)
user << "<span class='warning'>Not enough gumballs left!</span>"
return FALSE
candy--
var/obj/item/ammo_casing/caseless/gumball/A = new /obj/item/ammo_casing/caseless/gumball(src)
A.BB.damage = hitdamage
A.BB.speed = 0.5
A.BB.color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
playsound(src.loc, 'sound/weapons/bulletflyby3.ogg', 50, 1)
A.fire_casing(target, user, params, 0, 0, null, 0)
user.visible_message("<span class='warning'>[user] shoots a high-velocity gumball at [target]!</span>")
check_amount()
/obj/item/borg/lollipop/afterattack(atom/target, mob/living/user, proximity, click_params)
check_amount()
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
if(!R.cell.use(12))
user << "<span class='warning'>Not enough power.</span>"
return FALSE
if(R.emagged)
hitdamage = emaggedhitdamage
switch(mode)
if(1)
if(!proximity)
return FALSE
dispense(target, user)
if(2)
shootL(target, user, click_params)
if(3)
shootG(target, user, click_params)
hitdamage = initial(hitdamage)
/obj/item/borg/lollipop/attack_self(mob/living/user)
switch(mode)
if(1)
mode++
user << "<span class='notice'>Module is now throwing lollipops.</span>"
if(2)
mode++
user << "<span class='notice'>Module is now blasting gumballs.</span>"
if(3)
mode = 1
user << "<span class='notice'>Module is now dispensing lollipops.</span>"
..()
/obj/item/ammo_casing/caseless/gumball
name = "Gumball"
desc = "Why are you seeing this?!"
projectile_type = /obj/item/projectile/bullet/reusable/gumball
click_cooldown_override = 2
/obj/item/projectile/bullet/reusable/gumball
name = "gumball"
desc = "Oh noes! A fast-moving gumball!"
icon_state = "gumball"
ammo_type = /obj/item/weapon/reagent_containers/food/snacks/gumball/cyborg
/obj/item/projectile/bullet/reusable/gumball/handle_drop()
if(!dropped)
var/turf/T = get_turf(src)
var/obj/item/weapon/reagent_containers/food/snacks/gumball/S = new ammo_type(T)
S.color = color
dropped = TRUE
/obj/item/ammo_casing/caseless/lollipop //NEEDS RANDOMIZED COLOR LOGIC.
name = "Lollipop"
desc = "Why are you seeing this?!"
projectile_type = /obj/item/projectile/bullet/reusable/lollipop
click_cooldown_override = 2
/obj/item/projectile/bullet/reusable/lollipop
name = "lollipop"
desc = "Oh noes! A fast-moving lollipop!"
icon_state = "lollipop_1"
ammo_type = /obj/item/weapon/reagent_containers/food/snacks/lollipop/cyborg
var/color2 = rgb(0, 0, 0)
/obj/item/projectile/bullet/reusable/lollipop/New()
var/obj/item/weapon/reagent_containers/food/snacks/lollipop/S = new ammo_type(src)
color2 = S.headcolor
var/image/head = image(icon = 'icons/obj/projectiles.dmi', icon_state = "lollipop_2")
head.color = color2
add_overlay(head)
/obj/item/projectile/bullet/reusable/lollipop/handle_drop()
if(!dropped)
var/turf/T = get_turf(src)
var/obj/item/weapon/reagent_containers/food/snacks/lollipop/S = new ammo_type(T)
S.change_head_color(color2)
dropped = TRUE
/**********************************************************************
HUD/SIGHT things
***********************************************************************/
@@ -509,10 +346,6 @@
icon_state = "securearea"
sight_mode = BORGXRAY
/obj/item/borg/sight/xray/truesight_lens
name = "truesight lens"
icon = 'icons/obj/clockwork_objects.dmi'
icon_state = "truesight_lens"
/obj/item/borg/sight/thermal
name = "\proper thermal vision"
+137 -59
View File
@@ -1,19 +1,68 @@
/obj/item/robot_parts
name = "robot parts"
icon = 'icons/obj/robot_parts.dmi'
force = 4
throwforce = 4
item_state = "buildpipe"
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."
attack_verb = list("slapped", "punched")
icon_state = "l_arm"
body_zone = "l_arm"
//The robot bodyparts have been moved to code/module/surgery/bodyparts/robot_bodyparts.dm
/obj/item/robot_parts/r_arm
name = "cyborg right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
attack_verb = list("slapped", "punched")
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."
attack_verb = list("kicked", "stomped")
icon_state = "l_leg"
body_zone = "l_leg"
/obj/item/robot_suit
/obj/item/robot_parts/r_leg
name = "cyborg right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
attack_verb = list("kicked", "stomped")
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
/obj/item/robot_parts/head
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
/obj/item/robot_parts/robot_suit
name = "cyborg endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon = 'icons/obj/robot_parts.dmi'
icon_state = "robo_suit"
var/obj/item/bodypart/l_arm/robot/l_arm = null
var/obj/item/bodypart/r_arm/robot/r_arm = null
var/obj/item/bodypart/l_leg/robot/l_leg = null
var/obj/item/bodypart/r_leg/robot/r_leg = null
var/obj/item/bodypart/chest/robot/chest = null
var/obj/item/bodypart/head/robot/head = null
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/created_name = ""
var/mob/living/silicon/ai/forced_ai
@@ -22,11 +71,11 @@
var/aisync = 1
var/panel_locked = 1
/obj/item/robot_suit/New()
/obj/item/robot_parts/robot_suit/New()
..()
src.updateicon()
/obj/item/robot_suit/proc/updateicon()
/obj/item/robot_parts/robot_suit/proc/updateicon()
src.cut_overlays()
if(src.l_arm)
src.add_overlay("l_arm+o")
@@ -41,7 +90,7 @@
if(src.head)
src.add_overlay("head+o")
/obj/item/robot_suit/proc/check_completion()
/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)
@@ -49,7 +98,7 @@
return 1
return 0
/obj/item/robot_suit/attackby(obj/item/W, mob/user, params)
/obj/item/robot_parts/robot_suit/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = W
@@ -58,89 +107,71 @@
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_held_item()==src)
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/bodypart/l_leg/robot))
else if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg)
return
if(!user.unEquip(W))
return
W.forceMove(src)
W.icon_state = initial(W.icon_state)
W.cut_overlays()
W.loc = src
src.l_leg = W
src.updateicon()
else if(istype(W, /obj/item/bodypart/r_leg/robot))
else if(istype(W, /obj/item/robot_parts/r_leg))
if(src.r_leg)
return
if(!user.unEquip(W))
return
W.forceMove(src)
W.icon_state = initial(W.icon_state)
W.cut_overlays()
W.loc = src
src.r_leg = W
src.updateicon()
else if(istype(W, /obj/item/bodypart/l_arm/robot))
else if(istype(W, /obj/item/robot_parts/l_arm))
if(src.l_arm)
return
if(!user.unEquip(W))
return
W.forceMove(src)
W.icon_state = initial(W.icon_state)
W.cut_overlays()
W.loc = src
src.l_arm = W
src.updateicon()
else if(istype(W, /obj/item/bodypart/r_arm/robot))
else if(istype(W, /obj/item/robot_parts/r_arm))
if(src.r_arm)
return
if(!user.unEquip(W))
return
W.forceMove(src)
W.icon_state = initial(W.icon_state)//in case it is a dismembered robotic limb
W.cut_overlays()
W.loc = src
src.r_arm = W
src.updateicon()
else if(istype(W, /obj/item/bodypart/chest/robot))
var/obj/item/bodypart/chest/robot/CH = W
else if(istype(W, /obj/item/robot_parts/chest))
if(src.chest)
return
if(CH.wired && CH.cell)
if(!user.unEquip(CH))
if(W:wired && W:cell)
if(!user.unEquip(W))
return
CH.forceMove(src)
CH.icon_state = initial(CH.icon_state) //in case it is a dismembered robotic limb
CH.cut_overlays()
src.chest = CH
W.loc = src
src.chest = W
src.updateicon()
else if(!CH.wired)
else if(!W:wired)
user << "<span class='warning'>You need to attach wires to it first!</span>"
else
user << "<span class='warning'>You need to attach a cell to it first!</span>"
else if(istype(W, /obj/item/bodypart/head/robot))
var/obj/item/bodypart/head/robot/HD = W
for(var/X in HD.contents)
if(istype(X, /obj/item/organ))
user << "<span class='warning'>There are organs inside [HD]!</span>"
return
else if(istype(W, /obj/item/robot_parts/head))
if(src.head)
return
if(HD.flash2 && HD.flash1)
if(!user.unEquip(HD))
if(W:flash2 && W:flash1)
if(!user.unEquip(W))
return
HD.loc = src
HD.icon_state = initial(HD.icon_state)//in case it is a dismembered robotic limb
HD.cut_overlays()
src.head = HD
W.loc = src
src.head = W
src.updateicon()
else
user << "<span class='warning'>You need to attach a flash to it first!</span>"
@@ -154,14 +185,14 @@
else if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
if(!isturf(loc))
if(!istype(loc,/turf))
user << "<span class='warning'>You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise!</span>"
return
if(!M.brainmob)
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"
return
var/mob/living/brain/BM = M.brainmob
var/mob/living/carbon/brain/BM = M.brainmob
if(!BM.key || !BM.mind)
user << "<span class='warning'>The mmi indicates that their mind is completely unresponsive; there's no point!</span>"
return
@@ -213,10 +244,11 @@
O.make_laws()
ticker.mode.remove_antag_for_borging(BM.mind)
if(!M.clockwork)
remove_servant_of_ratvar(BM, TRUE)
BM.mind.transfer_to(O)
if(M.clockwork)
add_servant_of_ratvar(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("As a cyborg, you must obey your silicon laws and master AI above all else. Your objectives will consider you to be dead.")
O << "<span class='userdanger'>You have been robotized!</span>"
@@ -251,7 +283,7 @@
else
return ..()
/obj/item/robot_suit/proc/Interact(mob/user)
/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)
t1 += text("Master AI: <A href='?src=\ref[];Master=1'>[(forced_ai ? "[forced_ai.name]" : "Automatic")]</a><br><br>\n",src)
@@ -263,12 +295,12 @@
popup.set_content(t1)
popup.open()
/obj/item/robot_suit/Topic(href, href_list)
if(usr.incapacitated() || !Adjacent(usr))
/obj/item/robot_parts/robot_suit/Topic(href, href_list)
if(usr.lying || usr.stat || usr.stunned || !Adjacent(usr))
return
var/mob/living/living_user = usr
var/obj/item/item_in_hand = living_user.get_active_held_item()
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/device/multitool))
living_user << "<span class='warning'>You need a multitool!</span>"
return
@@ -298,4 +330,50 @@
add_fingerprint(usr)
Interact(usr)
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>"
return
else
if(!user.unEquip(W))
return
W.loc = src
src.cell = W
user << "<span class='notice'>You insert the cell.</span>"
else if(istype(W, /obj/item/stack/cable_coil))
if(src.wired)
user << "<span class='warning'>You have already inserted wire!</span>"
return
var/obj/item/stack/cable_coil/coil = W
if (coil.use(1))
src.wired = 1
user << "<span class='notice'>You insert the wire.</span>"
else
user << "<span class='warning'>You need one length of coil to wire it!</span>"
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)
user << "<span class='warning'>You have already inserted the eyes!</span>"
return
else if(F.crit_fail)
user << "<span class='warning'>You can't use a broken flash!</span>"
return
else
if(!user.unEquip(W))
return
F.loc = src
if(src.flash1)
src.flash2 = F
else
src.flash1 = F
user << "<span class='notice'>You insert the flash into the eye socket.</span>"
else
return ..()
+68 -101
View File
@@ -21,6 +21,40 @@
usr << "There's no mounting point for the module!"
return 1
/obj/item/borg/upgrade/reset
name = "cyborg module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
icon_state = "cyborg_upgrade1"
require_module = 1
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
if(..())
return
R.notify_ai(2)
R.uneq_all()
R.hands.icon_state = "nomod"
R.icon_state = "robot"
qdel(R.module)
R.module = null
R.modtype = "robot"
R.designation = "Default"
R.updatename("Default")
R.update_icons()
R.update_headlamp()
R.speed = 0 // Remove upgrades.
R.ionpulse = FALSE
R.magpulse = FALSE
R.weather_immunities = initial(R.weather_immunities)
R.status_flags |= CANPUSH
return 1
/obj/item/borg/upgrade/rename
name = "cyborg reclassification board"
desc = "Used to rename a cyborg."
@@ -131,14 +165,14 @@
if(..())
return
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/weapon/shovel/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in R.module.modules)
qdel(D)
for(var/obj/item/weapon/shovel/S in R.module.modules)
qdel(S)
R.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
R.module.rebuild()
var/obj/item/weapon/pickaxe/drill/cyborg/diamond/DD = new /obj/item/weapon/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
return 1
/obj/item/borg/upgrade/soh
@@ -153,12 +187,32 @@
if(..())
return
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/weapon/storage/bag/ore/cyborg/S in R.module.modules)
qdel(S)
R.module.modules += new /obj/item/weapon/storage/bag/ore/holding(R.module)
R.module.rebuild()
return 1
/obj/item/borg/upgrade/hyperka
name = "mining cyborg hyper-kinetic accelerator"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/miner
origin_tech = "materials=6;powerstorage=4;engineering=4;magnets=4;combat=4"
/obj/item/borg/upgrade/hyperka/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
qdel(H)
R.module.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/hyper/cyborg(R.module)
R.module.rebuild()
var/obj/item/weapon/storage/bag/ore/holding/H = new /obj/item/weapon/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
return 1
/obj/item/borg/upgrade/syndicate
@@ -183,7 +237,6 @@
name = "mining cyborg lavaproof tracks"
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to mining cyborg tracks, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = 1
module_type = /obj/item/weapon/robot_module/miner
origin_tech = "engineering=4;materials=4;plasmatech=4"
@@ -205,7 +258,6 @@
var/on = 0
var/powercost = 10
var/mob/living/silicon/robot/cyborg
var/datum/action/toggle_action
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
if(..())
@@ -218,19 +270,10 @@
cyborg = R
icon_state = "selfrepair_off"
toggle_action = new /datum/action/item_action/toggle(src)
toggle_action.Grant(R)
var/datum/action/A = new /datum/action/item_action/toggle(src)
A.Grant(R)
return 1
/obj/item/borg/uprgade/selfrepair/dropped()
addtimer(src, "check_dropped", 1)
/obj/item/borg/upgrade/selfrepair/proc/check_dropped()
if(loc != cyborg)
toggle_action.Remove(cyborg)
cyborg = null
deactivate()
/obj/item/borg/upgrade/selfrepair/ui_action_click()
on = !on
if(on)
@@ -296,79 +339,3 @@
msg_cooldown = world.time
else
deactivate()
/obj/item/borg/upgrade/hypospray
name = "medical cyborg hypospray advanced synthesiser"
desc = "An upgrade to the Medical module cyborg's hypospray, allowing it \
to produce more advanced and complex medical reagents."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/medical
origin_tech = null
var/list/additional_reagents = list()
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
return 1
/obj/item/borg/upgrade/hypospray/expanded
name = "medical cyborg expanded hypospray"
desc = "An upgrade to the Medical module's hypospray, allowing it \
to treat a wider range of conditions and problems."
additional_reagents = list("mannitol", "oculine", "inacusiate",
"mutadone", "haloperidol")
origin_tech = "programming=5;engineering=4;biotech=5"
/obj/item/borg/upgrade/hypospray/high_strength
name = "medical cyborg high-strength hypospray"
desc = "An upgrade to the Medical module's hypospray, containing \
stronger versions of existing chemicals."
additional_reagents = list("oxandrolone", "sal_acid", "rezadone",
"pen_acid")
origin_tech = "programming=5;engineering=5;biotech=6"
/obj/item/borg/upgrade/piercing_hypospray
name = "cyborg piercing hypospray"
desc = "An upgrade to a cyborg's hypospray, allowing it to \
pierce armor and thick material."
origin_tech = "materials=5;engineering=7;combat=3"
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R)
if(..())
return
var/found_hypo = FALSE
for(var/obj/item/weapon/reagent_containers/borghypo/H in R.module)
H.bypass_protection = TRUE
found_hypo = TRUE
if(!found_hypo)
return
return 1
/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
desc = "An upgrade to the Medical module, installing a builtin \
defibrillator, for on the scene revival."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = /obj/item/weapon/robot_module/medical
origin_tech = "programming=4;engineering=6;materials=5;powerstorage=5;biotech=5"
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R)
if(..())
return
var/obj/item/weapon/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
return 1