From 41b599158c307157f0ae18a744491a864022df9f Mon Sep 17 00:00:00 2001 From: datlo Date: Wed, 8 Aug 2018 22:41:35 +0100 Subject: [PATCH 1/4] Greater Knock --- code/datums/spells/greaterknock.dm | 42 +++++++++++++++++++++++++ code/game/gamemodes/wizard/spellbook.dm | 8 +++++ paradise.dme | 1 + 3 files changed, 51 insertions(+) create mode 100644 code/datums/spells/greaterknock.dm diff --git a/code/datums/spells/greaterknock.dm b/code/datums/spells/greaterknock.dm new file mode 100644 index 00000000000..4e8281d43d2 --- /dev/null +++ b/code/datums/spells/greaterknock.dm @@ -0,0 +1,42 @@ +/obj/effect/proc_holder/spell/aoe_turf/greaterknock + name = "Greater Knock" + desc = "On first cast, will remove access restrictions on all airlocks on the Cyberiad, and announce this spell's use and your arrival to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!" + + school = "transmutation" + charge_max = 200 + clothes_req = 0 + invocation = "MAIOR OXIN FIERA" + invocation_type = "shout" + range = 7 + cooldown_min = 40 //40 deciseconds reduction per rank + action_icon_state = "knock" + sound = 'sound/magic/Knock.ogg' + var/used = FALSE + +/obj/effect/proc_holder/spell/aoe_turf/greaterknock/cast(list/targets, mob/user = usr) + if (!used) + for(var/obj/machinery/door/airlock/A in airlocks) + if(is_station_level(A.z)) + A.req_access = list() + if (is_station_level(usr.z)) + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolving them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + else + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolving them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + used = TRUE + else + for(var/turf/T in targets) + for(var/obj/machinery/door/door in T.contents) + spawn(1) + if(istype(door,/obj/machinery/door/airlock/hatch/gamma)) + return + if(istype(door,/obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/A = door + A.unlock(1) //forced because it's magic! + door.open() + for(var/obj/structure/closet/C in T.contents) + spawn(1) + if(istype(C, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = C + SC.locked = 0 + C.open() + return \ No newline at end of file diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 0c380010e6a..3f8932be573 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -202,6 +202,14 @@ category = "Mobility" cost = 1 +/datum/spellbook_entry/greaterknock + name = "Greater Knock" + spell_type = /obj/effect/proc_holder/spell/aoe_turf/greaterknock + log_name = "GK" + category = "Mobility" + cost = 2 + refundable = 0 //global effect on cast + /datum/spellbook_entry/fleshtostone name = "Flesh to Stone" spell_type = /obj/effect/proc_holder/spell/targeted/touch/flesh_to_stone diff --git a/paradise.dme b/paradise.dme index 70eaa50867a..b229bbc79b9 100644 --- a/paradise.dme +++ b/paradise.dme @@ -332,6 +332,7 @@ #include "code\datums\spells\explosion.dm" #include "code\datums\spells\fake_gib.dm" #include "code\datums\spells\genetic.dm" +#include "code\datums\spells\greaterknock.dm" #include "code\datums\spells\horsemask.dm" #include "code\datums\spells\infinite_guns.dm" #include "code\datums\spells\inflict_handler.dm" From 7c36785ec7a03a5805a3daf25d3fd82babfb8ac4 Mon Sep 17 00:00:00 2001 From: datlo Date: Wed, 8 Aug 2018 23:06:06 +0100 Subject: [PATCH 2/4] grammar fix --- code/datums/spells/greaterknock.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/spells/greaterknock.dm b/code/datums/spells/greaterknock.dm index 4e8281d43d2..338452d2868 100644 --- a/code/datums/spells/greaterknock.dm +++ b/code/datums/spells/greaterknock.dm @@ -19,9 +19,9 @@ if(is_station_level(A.z)) A.req_access = list() if (is_station_level(usr.z)) - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolving them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") else - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolving them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") used = TRUE else for(var/turf/T in targets) From 6b3bb7304b5c59dc3a01bfa38e1d1a405f7b65f5 Mon Sep 17 00:00:00 2001 From: datlo Date: Wed, 8 Aug 2018 23:55:16 +0100 Subject: [PATCH 3/4] Make greater knock a subtype of Knock also moved it into knock.dm --- code/datums/spells/greaterknock.dm | 42 ------------------------- code/datums/spells/knock.dm | 25 +++++++++++++++ code/game/gamemodes/wizard/spellbook.dm | 2 +- paradise.dme | 1 - 4 files changed, 26 insertions(+), 44 deletions(-) delete mode 100644 code/datums/spells/greaterknock.dm diff --git a/code/datums/spells/greaterknock.dm b/code/datums/spells/greaterknock.dm deleted file mode 100644 index 338452d2868..00000000000 --- a/code/datums/spells/greaterknock.dm +++ /dev/null @@ -1,42 +0,0 @@ -/obj/effect/proc_holder/spell/aoe_turf/greaterknock - name = "Greater Knock" - desc = "On first cast, will remove access restrictions on all airlocks on the Cyberiad, and announce this spell's use and your arrival to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!" - - school = "transmutation" - charge_max = 200 - clothes_req = 0 - invocation = "MAIOR OXIN FIERA" - invocation_type = "shout" - range = 7 - cooldown_min = 40 //40 deciseconds reduction per rank - action_icon_state = "knock" - sound = 'sound/magic/Knock.ogg' - var/used = FALSE - -/obj/effect/proc_holder/spell/aoe_turf/greaterknock/cast(list/targets, mob/user = usr) - if (!used) - for(var/obj/machinery/door/airlock/A in airlocks) - if(is_station_level(A.z)) - A.req_access = list() - if (is_station_level(usr.z)) - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") - else - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") - used = TRUE - else - for(var/turf/T in targets) - for(var/obj/machinery/door/door in T.contents) - spawn(1) - if(istype(door,/obj/machinery/door/airlock/hatch/gamma)) - return - if(istype(door,/obj/machinery/door/airlock)) - var/obj/machinery/door/airlock/A = door - A.unlock(1) //forced because it's magic! - door.open() - for(var/obj/structure/closet/C in T.contents) - spawn(1) - if(istype(C, /obj/structure/closet/secure_closet)) - var/obj/structure/closet/secure_closet/SC = C - SC.locked = 0 - C.open() - return \ No newline at end of file diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm index 1d296c26d41..f6dee122710 100644 --- a/code/datums/spells/knock.dm +++ b/code/datums/spells/knock.dm @@ -30,4 +30,29 @@ SC.locked = 0 C.open() + return + +/obj/effect/proc_holder/spell/aoe_turf/knock/greater + name = "Greater Knock" + desc = "On first cast, will remove access restrictions on all airlocks on the Cyberiad, and announce this spell's use and your arrival to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!" + + charge_max = 200 + invocation = "MAIOR OXIN FIERA" + invocation_type = "shout" + range = 7 + cooldown_min = 40 //40 deciseconds reduction per rank + var/used = FALSE + +/obj/effect/proc_holder/spell/aoe_turf/knock/greater/cast(list/targets, mob/user = usr) + if(!used) + used = TRUE + for(var/obj/machinery/door/airlock/A in airlocks) + if(is_station_level(A.z)) + A.req_access = list() + if(is_station_level(usr.z)) + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + else + command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + else + ..() return \ No newline at end of file diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 3f8932be573..39c7868671d 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -204,7 +204,7 @@ /datum/spellbook_entry/greaterknock name = "Greater Knock" - spell_type = /obj/effect/proc_holder/spell/aoe_turf/greaterknock + spell_type = /obj/effect/proc_holder/spell/aoe_turf/knock/greater log_name = "GK" category = "Mobility" cost = 2 diff --git a/paradise.dme b/paradise.dme index b229bbc79b9..70eaa50867a 100644 --- a/paradise.dme +++ b/paradise.dme @@ -332,7 +332,6 @@ #include "code\datums\spells\explosion.dm" #include "code\datums\spells\fake_gib.dm" #include "code\datums\spells\genetic.dm" -#include "code\datums\spells\greaterknock.dm" #include "code\datums\spells\horsemask.dm" #include "code\datums\spells\infinite_guns.dm" #include "code\datums\spells\inflict_handler.dm" From c43ff119a2af3d42b02d3bcd32f169903d3f2c40 Mon Sep 17 00:00:00 2001 From: datlo Date: Sat, 11 Aug 2018 12:39:12 +0100 Subject: [PATCH 4/4] Updates announcement Simplified wizard fed announcement on cast, updated spell description Made the spell impossible to improve (quality of life since it can't be refunded) Fixed a bug on one_access airlocks --- code/datums/spells/knock.dm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm index f6dee122710..301dd5086b2 100644 --- a/code/datums/spells/knock.dm +++ b/code/datums/spells/knock.dm @@ -34,13 +34,14 @@ /obj/effect/proc_holder/spell/aoe_turf/knock/greater name = "Greater Knock" - desc = "On first cast, will remove access restrictions on all airlocks on the Cyberiad, and announce this spell's use and your arrival to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!" + desc = "On first cast, will remove access restrictions on all airlocks on the Cyberiad, and announce this spell's use to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!" charge_max = 200 invocation = "MAIOR OXIN FIERA" invocation_type = "shout" range = 7 - cooldown_min = 40 //40 deciseconds reduction per rank + level_max = 0 //Cannot be improved, quality of life since can't be refunded + cooldown_min = 200 var/used = FALSE /obj/effect/proc_holder/spell/aoe_turf/knock/greater/cast(list/targets, mob/user = usr) @@ -49,10 +50,8 @@ for(var/obj/machinery/door/airlock/A in airlocks) if(is_station_level(A.z)) A.req_access = list() - if(is_station_level(usr.z)) - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! One of our employees should already be on-site to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") - else - command_announcement.Announce("We have noticed several issues inhibiting productivity on your station, and would like to help resolve them! We have already improved your airlock access system. No longer will you be unable to get what you need, as of now you can go anywhere you want! We are sending one of our employees to further improve your station. Have a pleasant day!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") + A.req_one_access = list() + command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message") else ..() return \ No newline at end of file