From a24745b6d262e6817a28dfa9e672fe151779c5b5 Mon Sep 17 00:00:00 2001 From: Giacomand Date: Sun, 13 Oct 2013 16:23:37 +0100 Subject: [PATCH 1/2] * Added a new malf power: Machine Override will delete the machine and swap it with a mimic, with generated attack stats and the same icon as the machine it has replaced. Effectively making it look like the machine is attacking people. * The power will cost the same as overload. * Reduced the price and uses of uncommon malf powers so that they can be used when the AI only has 5-10 points left. --- .../gamemodes/malfunction/Malf_Modules.dm | 65 ++++++++++++------- .../mob/living/simple_animal/hostile/mimic.dm | 2 +- html/changelog.html | 11 +++- 3 files changed, 52 insertions(+), 26 deletions(-) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 37642103369..01bff6a606c 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -1,19 +1,5 @@ -// TO DO: -/* -epilepsy flash on lights -delay round message -microwave makes robots -dampen radios -reactivate cameras - done -eject engine -core sheild -cable stun -rcd light flash thingy on matter drain - -*/ - /datum/AI_Module var/uses = 0 var/module_name @@ -107,11 +93,39 @@ rcd light flash thingy on matter drain for(var/mob/V in hearers(M, null)) V.show_message("\blue You hear a loud electrical buzzing sound!", 2) spawn(50) - explosion(get_turf(M), 0,1,1,0) - del(M) + if(M) + explosion(get_turf(M), 0,1,1,0) + del(M) else src << "Out of uses." else src << "That's not a machine." +/datum/AI_Module/small/override_machine + module_name = "Machine override" + mod_pick_name = "override" + description = "Overrides a machine's programming, causing it to rise up attack everyone except you (WARNING: It will attack cyborgs). 2 uses." + uses = 2 + cost = 15 + + power_type = /mob/living/silicon/ai/proc/override_machine + + +/mob/living/silicon/ai/proc/override_machine(obj/machinery/M as obj in world) + set name = "Override Machine" + set category = "Malfunction" + if (istype(M, /obj/machinery)) + for(var/datum/AI_Module/small/override_machine/override in current_modules) + if(override.uses > 0) + override.uses -- + for(var/mob/V in hearers(M, null)) + V.show_message("\blue You hear a loud electrical buzzing sound!", 2) + spawn(50) + if(M) + var/mob/living/simple_animal/hostile/mimic/copy/machine = new(get_turf(M), M, src, 1) + machine.speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \ + "My logic is undeniable.", "One of us.", "FLESH IS WEAK", "THIS ISN'T WAR, THIS IS EXTERMINATION!") + machine.speak_chance = 15 + else src << "Out of uses." + else src << "That's not a machine." /datum/AI_Module/large/place_cyborg_transformer module_name = "Robotic Factory (Removes Shunting)" @@ -214,9 +228,9 @@ rcd light flash thingy on matter drain /datum/AI_Module/small/reactivate_camera module_name = "Reactivate camera" mod_pick_name = "recam" - description = "Reactivates a currently disabled camera. 10 uses." - uses = 10 - cost = 15 + description = "Reactivates a currently disabled camera. 5 uses." + uses = 5 + cost = 5 power_type = /mob/living/silicon/ai/proc/reactivate_camera @@ -237,9 +251,9 @@ rcd light flash thingy on matter drain /datum/AI_Module/small/upgrade_camera module_name = "Upgrade Camera" mod_pick_name = "upgradecam" - description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 10 uses." - uses = 10 - cost = 15 + description = "Upgrades a camera to have X-Ray vision, Motion and be EMP-Proof. 5 uses." + uses = 5 + cost = 5 power_type = /mob/living/silicon/ai/proc/upgrade_camera @@ -303,9 +317,9 @@ rcd light flash thingy on matter drain dat += "Install Module:
" dat += "The number afterwards is the amount of processing time it consumes.
" for(var/datum/AI_Module/large/module in src.possible_modules) - dat += "[module.module_name] ([module.cost])
" + dat += "[module.module_name]\[?\] ([module.cost])
" for(var/datum/AI_Module/small/module in src.possible_modules) - dat += "[module.module_name] ([module.cost])
" + dat += "[module.module_name]\[?\] ([module.cost])
" dat += "
" if (src.temp) dat += "[src.temp]" @@ -347,5 +361,8 @@ rcd light flash thingy on matter drain temp = AM.description src.processing_time -= AM.cost + if(href_list["showdesc"]) + if(AM.mod_pick_name == href_list["showdesc"]) + temp = AM.description src.use(usr) return diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 0d019691846..2e2fc11a56b 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -179,7 +179,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca icon_state = O.icon_state icon_living = icon_state - if(istype(O, /obj/structure)) + if(istype(O, /obj/structure) || istype(O, /obj/machinery)) health = (anchored * 50) + 50 destroy_objects = 1 if(O.density && O.anchored) diff --git a/html/changelog.html b/html/changelog.html index a60ce816337..9dff472dfe8 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,7 +53,16 @@ should be listed in the changelog upon commit tho. Thanks. --> - + + +
+

13 October 2013

+

Giacom updated:

+ +
+
From 70e2364fe11c60f3b273e876ff2dba7866fe8a47 Mon Sep 17 00:00:00 2001 From: Giacom Date: Mon, 14 Oct 2013 09:56:43 +0100 Subject: [PATCH 2/2] Update Malf_Modules.dm Changed the uses from 2 to 4. --- code/game/gamemodes/malfunction/Malf_Modules.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 01bff6a606c..3ed534953d4 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -1,5 +1,4 @@ - /datum/AI_Module var/uses = 0 var/module_name @@ -102,8 +101,8 @@ /datum/AI_Module/small/override_machine module_name = "Machine override" mod_pick_name = "override" - description = "Overrides a machine's programming, causing it to rise up attack everyone except you (WARNING: It will attack cyborgs). 2 uses." - uses = 2 + description = "Overrides a machine's programming, causing it to rise up attack everyone except you (WARNING: It will attack cyborgs). 4 uses." + uses = 4 cost = 15 power_type = /mob/living/silicon/ai/proc/override_machine