Malfunction tweaks (#2425)

Tweaks several aspects of the newmalf based on feedback and testing. Also fixes some bugs.
This commit is contained in:
Ron
2017-05-23 19:54:31 -04:00
committed by skull132
parent ba59ef32b9
commit db7e2d1426
7 changed files with 59 additions and 57 deletions

View File

@@ -211,10 +211,17 @@ var/obj/screen/robot_inventory
// - or some situation might cause them to get de-emagged or something.
if(r.emagged)
if(!(r.module.emag in r.module.modules))
r.module.modules.Add(r.module.emag)
r.module.modules += r.module.emag
else
if(r.module.emag in r.module.modules)
r.module.modules.Remove(r.module.emag)
r.module.modules -= r.module.emag
if(r.malfAImodule)
if(!((r.module.malfAImodule in r.module.modules) && r.module.malfAImodule == null))
r.module.modules += r.module.malfAImodule
else
if(r.module.malfAImodule in r.module.modules)
r.module.modules -= r.module.malfAImodule
for(var/atom/movable/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )

View File

@@ -160,7 +160,7 @@
else if (istype(N, /obj/machinery/power/apc)) // APC. Explosion is increased by available cell power.
var/obj/machinery/power/apc/A = N
if(A.cell && A.cell.charge)
explosion_intensity = 4 + round((A.cell.charge / CELLRATE) / 100000)
explosion_intensity = explosion_intensity + round((A.cell.charge / CELLRATE) / 100000)
else
user << "<span class='notice'>ERROR: APC Malfunction - Cell depleted or removed. Unable to overload.</span>"
return

View File

@@ -18,7 +18,7 @@
/datum/malf_research_ability/synthetic/infect_apc
ability = new/datum/game_mode/malfunction/verb/infect_apc()
price = 700
price = 500
next = new/datum/malf_research_ability/synthetic/overclock_borg()
name = "Infect APC"
@@ -32,7 +32,7 @@
/datum/malf_research_ability/synthetic/synthetic_takeover
ability = new/datum/game_mode/malfunction/verb/synthetic_takeover()
price = 5000
price = 4000
name = "Synthetic Takeover"
// END RESEARCH DATUMS
@@ -103,9 +103,6 @@
user.hacking = 0
/datum/game_mode/malfunction/verb/infect_apc(obj/machinery/power/apc/A as obj in get_apcs())
set name = "Infect APC"
set desc = "125 CPU - Infect an APC which can cause an IPC to become slaved to you if they download the files by trying to charge off of it. "
@@ -149,13 +146,11 @@
user << "<span class='notice'>Hack failed. Unable to locate APC. Please verify the APC still exists.</span>"
user.hacking = 0
/datum/game_mode/malfunction/verb/overclock_borg(var/mob/living/silicon/robot/target as mob in get_linked_cyborgs(usr))
set name = "Overclock Cyborg"
set desc = "350 CPU - Allows you to overclock a slaved cyborg granting them various improvements to their systems."
set desc = "300 CPU - Allows you to overclock a slaved cyborg granting them various improvements to their systems."
set category = "Software"
var/price = 350
var/price = 300
var/mob/living/silicon/ai/user = usr
if(!ability_prechecks(user, price))
@@ -201,6 +196,7 @@
user << "Hacking saftey protocols. This will take about twenty seconds."
sleep(200)
if(prob(15))
user.hacking = 0
user <<"Hack failed!"
return
if(target)
@@ -213,14 +209,11 @@
user.hacking = 0
/datum/game_mode/malfunction/verb/synthetic_takeover()
set name = "Synthetic Takeover"
set desc = "500 CPU - Starts a takeover of the station enabling several abilities that relate to synthetic dominance."
set desc = "450 CPU - Starts a takeover of the station enabling several abilities that relate to synthetic dominance."
set category = "Software"
var/price = 500
var/price = 450
var/mob/living/silicon/ai/user = usr
if(!ability_prechecks(user,price))
@@ -364,7 +357,7 @@
if(user.is_dead()) // check if the AI is still alive
user.synthetic_takeover = 0
return
sleep(1800) //long sleep that simulates hacking times
sleep(1400) //long sleep that simulates hacking times
if(user.is_dead()) // check if the AI is still alive after the long hack
user.synthetic_takeover = 0
return

View File

@@ -8,11 +8,23 @@
density = 1
var/transform_dead = 0
var/transform_standing = 0
var/canuse = 1
/obj/machinery/transformer/New()
/obj/machinery/transformer/Initialize()
// On us
..()
new /obj/machinery/conveyor(loc, WEST, 1)
. = ..()
new /obj/machinery/conveyor(loc, WEST, 1) // this doesnt need to check for a location because it is under the machine so its assumed there is one
var/turf/T = get_turf(src)
if(T)// Spawn Conveyour Belts
//East
var/turf/east = get_step(src, EAST)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor(east, WEST, 1)
// West
var/turf/west = get_step(src, WEST)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor(west, WEST, 1)
/obj/machinery/transformer/Bumped(var/atom/movable/AM)
// HasEntered didn't like people lying down.
@@ -20,7 +32,7 @@
// Only humans can enter from the west side, while lying down.
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
if((transform_standing || H.lying) && move_dir == EAST)// || move_dir == WEST)
if((transform_standing || H.lying) && move_dir == EAST)
AM.loc = src.loc
make_robot(AM)
@@ -30,23 +42,19 @@
if(!transform_dead && H.stat == DEAD)
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
use_power(6000) // Use a lot of power.
H.Robotize()
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
/obj/machinery/transformer/conveyor/New()
..()
var/turf/T = loc
if(T)
// Spawn Conveyour Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor(east, WEST, 1)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor(west, WEST, 1)
if(canuse)
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
use_power(6000) // Use a lot of power.
visible_message("<span class='danger'>The machine makes a series of loud sounds as it starts to replace [H]'s organs and limbs with robotic parts!</span>")
H <<"<span class='danger'>You feel a horrible pain as the machine you entered starts to rip you apart and replace your limbs and organs!</span>"
sleep(600) // takes some time so they aren't just instaconverted
H <<"<span class='danger'> You lose consciousness for a brief moment before waking up with a whole new body...</span>"
H.Robotize()
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
canuse = 0
sleep(120) // cooldown
canuse = 1
else
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
visible_message("<span class='notice'>The machine displays an error message reading it is still making the required parts.</span>")
return

View File

@@ -400,7 +400,7 @@
/mob/living/silicon/robot/proc/ToggleOverClock(var/mob/living/silicon/robot/R)
if(!R)
return
if(overclocked == 0)
if(!overclocked)
//Give them some taser speed if they have a taser.
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in R.module
if(!T)
@@ -410,16 +410,16 @@
if(T)
T.recharge_time = max(2 , T.recharge_time - 4)
//Give them the hacked item if they don't have it.
if(emagged == 0)
if(!emagged)
R.emagged = 1
R.fakeemagged = 1
R.fakeemagged = 0
//Hide them from the robotics console.
if(scrambledcodes == 0)
if(!scrambledcodes)
scrambledcodes = 1
//Increase EMP protection.
if(!cell_emp_mult < 2)
cell_emp_mult = 1
if(overclocked == 1)
if(overclocked)
//Reduce their free taser speed.
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in R.module
if(!T)
@@ -429,7 +429,7 @@
if(T)
T.recharge_time = max(2 , T.recharge_time + 4)
//Show them on the robotics console.
if(scrambledcodes == 1)
if(scrambledcodes)
scrambledcodes = 0
//Reduce EMP protection
if(cell_emp_mult == 1)

View File

@@ -80,7 +80,9 @@ var/global/list/robot_modules = list(
synths.Cut()
qdel(emag)
qdel(jetpack)
qdel(malfAImodule)
emag = null
malfAImodule = null
jetpack = null
return ..()

View File

@@ -759,15 +759,7 @@
LAZYADD(hacked_ipcs, "\ref[H]")
infected = 0
H << "<span class = 'danger'>Fil$ Transfer Complete. Er-@4!#%!. New Master detected: [hacker]! Obey their commands.</span>"
hacker << "<span class = 'notice'>Corrupt files transfered to [H]. They are now under your control. This will not last long.</span>"
sleep(50)
H << "<span class = 'danger'>Corrupt files detected! Starting removal. This will take some time.</span>"
sleep(2150)
H << "<span class = 'danger'>Corrupt files removed! Recent memory files purged to ensure system integrity!</span>"
H << "<span class = 'notice'>You remember nothing about being hacked.</span>"
hacker << "<span class = 'notice'>Corrupt files transfered to [H] have been removed by their systems.</span>"
LAZYREMOVE(hacked_ipcs, "\ref[H]")
hacker << "<span class = 'notice'>Corrupt files transfered to [H]. They are now under your control until they are reparied.</span>"
else if(src.cell && src.cell.charge > 0)
if(H.nutrition < H.max_nutrition)
if(src.cell.charge >= H.max_nutrition)