mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +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)
|
/client/proc/overload_machine(obj/machinery/M as obj in world)
|
||||||
set name = "Overload Machine"
|
set name = "Overload Machine"
|
||||||
set category = "Malfunction"
|
set category = "Malfunction"
|
||||||
for(var/datum/game_mode/malfunction/AI_Module/small/overload_machine/overload in usr:current_modules)
|
if (istype(M, /obj/machinery))
|
||||||
if(overload.uses > 0)
|
for(var/datum/game_mode/malfunction/AI_Module/small/overload_machine/overload in usr:current_modules)
|
||||||
overload.uses --
|
if(overload.uses > 0)
|
||||||
for(var/mob/V in viewers(src, null))
|
overload.uses --
|
||||||
V.show_message(text("\blue You hear a loud electrical buzzing sound!"))
|
for(var/mob/V in viewers(src, null))
|
||||||
spawn(50)
|
V.show_message(text("\blue You hear a loud electrical buzzing sound!"))
|
||||||
explosion(get_turf(M), 0,1,1,0)
|
spawn(50)
|
||||||
else usr << "Out of uses."
|
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
|
/datum/game_mode/malfunction/AI_Module/small/blackout
|
||||||
module_name = "Blackout"
|
module_name = "Blackout"
|
||||||
@@ -96,8 +98,9 @@ rcd light flash thingy on matter drain
|
|||||||
if(blackout.uses > 0)
|
if(blackout.uses > 0)
|
||||||
blackout.uses --
|
blackout.uses --
|
||||||
for(var/obj/machinery/power/apc/apc in world)
|
for(var/obj/machinery/power/apc/apc in world)
|
||||||
if(prob(30))
|
if(prob(30*apc.overload))
|
||||||
apc.overload_lighting()
|
apc.overload_lighting()
|
||||||
|
else apc.overload++
|
||||||
else usr << "Out of uses."
|
else usr << "Out of uses."
|
||||||
|
|
||||||
/datum/game_mode/malfunction/AI_Module/small/interhack
|
/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)
|
/client/proc/reactivate_camera(obj/machinery/camera/C as obj in world)
|
||||||
set name = "Reactivate Camera"
|
set name = "Reactivate Camera"
|
||||||
set category = "Malfunction"
|
set category = "Malfunction"
|
||||||
for(var/datum/game_mode/malfunction/AI_Module/small/reactivate_camera/camera in usr:current_modules)
|
if (istype (C, /obj/machinery/camera))
|
||||||
if(camera.uses > 0)
|
for(var/datum/game_mode/malfunction/AI_Module/small/reactivate_camera/camera in usr:current_modules)
|
||||||
if(!C.status)
|
if(camera.uses > 0)
|
||||||
C.status = !C.status
|
if(!C.status)
|
||||||
camera.uses --
|
C.status = !C.status
|
||||||
for(var/mob/V in viewers(src, null))
|
camera.uses --
|
||||||
V.show_message(text("\blue You hear a quiet click."))
|
for(var/mob/V in viewers(src, null))
|
||||||
else
|
V.show_message(text("\blue You hear a quiet click."))
|
||||||
usr << "This camera is either active, or not repairable."
|
else
|
||||||
else usr << "Out of uses."
|
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
|
/datum/game_mode/malfunction/AI_Module/module_picker
|
||||||
|
|||||||
@@ -315,7 +315,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/choose_modules()
|
/mob/living/silicon/ai/proc/choose_modules()
|
||||||
set category = "AI Commands"
|
set category = "Malfunction"
|
||||||
set name = "Choose Module"
|
set name = "Choose Module"
|
||||||
|
|
||||||
src.malf_picker.use(src)
|
src.malf_picker.use(src)
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
||||||
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
||||||
// luminosity = 1
|
// luminosity = 1
|
||||||
|
var/overload = 1 //used for the Blackout malf module
|
||||||
|
|
||||||
/proc/RandomAPCWires()
|
/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).
|
//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