mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
More changes to malf modules.
Machine Overload and Reactivate Camera now only work on the appropriate items. Making the verb only show up on the proper items is a far more intensive (if even possible) effort. The Blackout module is now more likely to hit areas that previous attempts failed to overload. (30% chance first attempt, 60% chance second attempt, 90% chance third attempt, 120% chance forth attempt, etc) Moved the module picker verb to the Malfunction tab. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@541 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -75,14 +75,16 @@ rcd light flash thingy on matter drain
|
||||
/client/proc/overload_machine(obj/machinery/M as obj in world)
|
||||
set name = "Overload Machine"
|
||||
set category = "Malfunction"
|
||||
for(var/datum/game_mode/malfunction/AI_Module/small/overload_machine/overload in usr:current_modules)
|
||||
if(overload.uses > 0)
|
||||
overload.uses --
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue You hear a loud electrical buzzing sound!"))
|
||||
spawn(50)
|
||||
explosion(get_turf(M), 0,1,1,0)
|
||||
else usr << "Out of uses."
|
||||
if (istype(M, /obj/machinery))
|
||||
for(var/datum/game_mode/malfunction/AI_Module/small/overload_machine/overload in usr:current_modules)
|
||||
if(overload.uses > 0)
|
||||
overload.uses --
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue You hear a loud electrical buzzing sound!"))
|
||||
spawn(50)
|
||||
explosion(get_turf(M), 0,1,1,0)
|
||||
else usr << "Out of uses."
|
||||
else usr << "That's not a machine."
|
||||
|
||||
/datum/game_mode/malfunction/AI_Module/small/blackout
|
||||
module_name = "Blackout"
|
||||
@@ -96,8 +98,9 @@ rcd light flash thingy on matter drain
|
||||
if(blackout.uses > 0)
|
||||
blackout.uses --
|
||||
for(var/obj/machinery/power/apc/apc in world)
|
||||
if(prob(30))
|
||||
apc.overload_lighting()
|
||||
if(prob(30*apc.overload))
|
||||
apc.overload_lighting()
|
||||
else apc.overload++
|
||||
else usr << "Out of uses."
|
||||
|
||||
/datum/game_mode/malfunction/AI_Module/small/interhack
|
||||
@@ -118,16 +121,18 @@ rcd light flash thingy on matter drain
|
||||
/client/proc/reactivate_camera(obj/machinery/camera/C as obj in world)
|
||||
set name = "Reactivate Camera"
|
||||
set category = "Malfunction"
|
||||
for(var/datum/game_mode/malfunction/AI_Module/small/reactivate_camera/camera in usr:current_modules)
|
||||
if(camera.uses > 0)
|
||||
if(!C.status)
|
||||
C.status = !C.status
|
||||
camera.uses --
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue You hear a quiet click."))
|
||||
else
|
||||
usr << "This camera is either active, or not repairable."
|
||||
else usr << "Out of uses."
|
||||
if (istype (C, /obj/machinery/camera))
|
||||
for(var/datum/game_mode/malfunction/AI_Module/small/reactivate_camera/camera in usr:current_modules)
|
||||
if(camera.uses > 0)
|
||||
if(!C.status)
|
||||
C.status = !C.status
|
||||
camera.uses --
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue You hear a quiet click."))
|
||||
else
|
||||
usr << "This camera is either active, or not repairable."
|
||||
else usr << "Out of uses."
|
||||
else usr << "That's not a camera."
|
||||
|
||||
|
||||
/datum/game_mode/malfunction/AI_Module/module_picker
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/choose_modules()
|
||||
set category = "AI Commands"
|
||||
set category = "Malfunction"
|
||||
set name = "Choose Module"
|
||||
|
||||
src.malf_picker.use(src)
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
||||
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
||||
// luminosity = 1
|
||||
var/overload = 1 //used for the Blackout malf module
|
||||
|
||||
/proc/RandomAPCWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
|
||||
Reference in New Issue
Block a user