Adds a religion subsystem

This commit is contained in:
KorPhaeron
2016-11-17 21:01:22 -06:00
parent f01862c208
commit 969abebade
10 changed files with 88 additions and 683 deletions

View File

@@ -1,642 +1,34 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"aa" = (
/turf/open/space,
/area/space)
"ab" = (
/turf/closed/wall/mineral/titanium/overspace,
/area/shuttle/escape)
"ac" = (
/obj/structure/grille,
/obj/structure/window/shuttle,
/turf/open/floor/plating,
/area/shuttle/escape)
"ad" = (
/turf/closed/wall/shuttle{
icon_state = "swall_s10";
dir = 2
},
/area/shuttle/escape)
"ae" = (
/turf/open/floor/mineral/titanium,
/turf/closed/wall/mineral/titanium/interior,
/area/shuttle/escape)
"af" = (
/obj/structure/table,
/obj/item/weapon/storage/firstaid/fire,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"ag" = (
/obj/structure/chair{
dir = 1
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"ah" = (
/obj/machinery/computer/emergency_shuttle,
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"ai" = (
/obj/structure/table,
/obj/item/weapon/storage/firstaid/regular{
pixel_x = 2;
pixel_y = 3
},
/obj/item/weapon/crowbar,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aj" = (
/turf/open/floor/plasteel/shuttle/white,
/turf/closed/wall/shuttle/interior{
icon_state = "swall_f5"
},
/area/shuttle/escape)
"ak" = (
/turf/closed/wall/mineral/titanium,
/area/shuttle/escape)
"al" = (
/obj/machinery/computer/atmos_alert,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"am" = (
/obj/structure/chair{
dir = 8
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"an" = (
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"ao" = (
/obj/structure/chair{
dir = 4
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"ap" = (
/obj/machinery/computer/security,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aq" = (
/obj/machinery/computer/crew,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"ar" = (
/obj/structure/chair{
dir = 8
},
/obj/structure/extinguisher_cabinet{
pixel_x = 0;
pixel_y = -30
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"as" = (
/obj/item/device/radio/intercom{
name = "Station Intercom (General)";
pixel_x = 0;
pixel_y = -29
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"at" = (
/obj/machinery/button/flasher{
id = "cockpit_flasher";
pixel_x = 6;
pixel_y = -24
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"au" = (
/obj/machinery/computer/communications,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"av" = (
/turf/closed/wall/shuttle{
icon_state = "swall13";
dir = 2
},
/area/shuttle/escape)
"aw" = (
/turf/closed/wall/shuttle{
icon_state = "swall12";
dir = 2
},
/area/shuttle/escape)
"ax" = (
/turf/closed/wall/shuttle{
icon_state = "swall14";
dir = 2
},
/area/shuttle/escape)
"ay" = (
/obj/machinery/door/airlock/glass{
name = "Emergency Shuttle Cockpit";
req_access_txt = "19"
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"az" = (
/obj/machinery/status_display,
/turf/closed/wall/mineral/titanium,
/area/shuttle/escape)
"aA" = (
/obj/structure/chair,
/turf/open/floor/mineral/plastitanium/brig,
/area/shuttle/escape)
"aB" = (
/obj/machinery/flasher{
id = "cockpit_flasher";
pixel_x = 6;
pixel_y = 24
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aC" = (
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aD" = (
/obj/structure/closet/emcloset,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aE" = (
/obj/structure/table,
/obj/item/weapon/storage/firstaid/fire,
/obj/item/weapon/storage/firstaid/regular{
pixel_x = 2;
pixel_y = 3
},
/obj/item/weapon/crowbar,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aF" = (
/obj/machinery/flasher{
id = "shuttle_flasher";
pixel_x = -24;
pixel_y = 6
},
/obj/machinery/button/flasher{
id = "shuttle_flasher";
pixel_x = -24;
pixel_y = -6
},
/turf/open/floor/mineral/plastitanium/brig,
/area/shuttle/escape)
"aG" = (
/turf/open/floor/mineral/plastitanium/brig,
/area/shuttle/escape)
"aH" = (
/obj/machinery/door/airlock/glass{
name = "Emergency Shuttle Brig";
req_access_txt = "2"
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"aI" = (
/obj/machinery/door/airlock/shuttle{
name = "Emergency Shuttle Airlock";
req_access_txt = "2"
},
/turf/open/floor/plating,
/area/shuttle/escape)
"aJ" = (
/obj/structure/chair{
dir = 1
},
/turf/open/floor/mineral/plastitanium/brig,
/area/shuttle/escape)
"aK" = (
/obj/structure/chair,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aL" = (
/obj/structure/chair{
dir = 4
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aM" = (
/obj/structure/table,
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aN" = (
/turf/closed/wall/shuttle{
icon_state = "swall7";
dir = 2
},
/area/shuttle/escape)
"aO" = (
/turf/closed/wall/shuttle{
icon_state = "swallc4";
dir = 2
},
/area/shuttle/escape)
"aP" = (
/obj/machinery/door/airlock/shuttle{
name = "Emergency Shuttle Airlock"
},
/obj/docking_port/mobile/emergency{
timid = 1;
name = "Box emergency shuttle"
},
/turf/open/floor/plating,
/area/shuttle/escape)
"aQ" = (
/obj/structure/extinguisher_cabinet{
pixel_x = -5;
pixel_y = 30
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"aR" = (
/obj/structure/extinguisher_cabinet{
pixel_x = 27;
pixel_y = 0
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"aS" = (
/obj/structure/chair{
dir = 8
},
/obj/structure/window/reinforced{
dir = 4
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aT" = (
/obj/structure/chair{
dir = 4
},
/obj/structure/window/reinforced{
dir = 8
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aU" = (
/obj/structure/chair{
dir = 8
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"aV" = (
/obj/machinery/door/airlock/shuttle{
name = "Emergency Shuttle Airlock"
},
/turf/open/floor/plating,
/area/shuttle/escape)
"aW" = (
/obj/structure/extinguisher_cabinet{
pixel_x = 0;
pixel_y = -30
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"aX" = (
/obj/machinery/door/airlock/shuttle{
name = "Emergency Shuttle Cargo"
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"aY" = (
/obj/machinery/status_display,
/turf/closed/wall/shuttle{
icon_state = "swall14";
dir = 2
},
/area/shuttle/escape)
"aZ" = (
/obj/machinery/door/airlock/glass{
name = "Emergency Shuttle Infirmary"
},
/turf/open/floor/mineral/titanium/blue,
/area/shuttle/escape)
"ba" = (
/turf/closed/wall/shuttle{
icon_state = "swall11";
dir = 2
},
/area/shuttle/escape)
"bb" = (
/turf/open/floor/mineral/titanium/yellow,
/area/shuttle/escape)
"bc" = (
/obj/structure/extinguisher_cabinet{
pixel_x = 27;
pixel_y = 0
},
/turf/open/floor/mineral/titanium/yellow,
/area/shuttle/escape)
"bd" = (
/obj/machinery/sleeper{
icon_state = "sleeper-open";
dir = 8
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"be" = (
/obj/structure/table,
/obj/item/weapon/storage/firstaid/fire,
/obj/item/weapon/storage/firstaid/regular{
pixel_x = 2;
pixel_y = 3
},
/obj/item/weapon/crowbar,
/obj/structure/extinguisher_cabinet{
pixel_x = 27;
pixel_y = 0
},
/turf/open/floor/mineral/titanium,
/area/shuttle/escape)
"bf" = (
/obj/structure/closet,
/turf/open/floor/mineral/titanium/yellow,
/area/shuttle/escape)
"bg" = (
/obj/structure/closet/crate,
/turf/open/floor/mineral/titanium/yellow,
/area/shuttle/escape)
"bh" = (
/turf/closed/wall/shuttle{
icon_state = "swall_s5";
dir = 2
},
/area/shuttle/escape)
"bi" = (
/obj/structure/window/reinforced{
dir = 1
},
/obj/structure/shuttle/engine/heater,
/turf/open/floor/plating/airless,
/area/shuttle/escape)
"bj" = (
/turf/closed/wall/mineral/titanium/nodiagonal,
/area/shuttle/escape)
"bk" = (
/obj/structure/shuttle/engine/propulsion,
/turf/open/floor/plating/airless,
/area/shuttle/escape)
"a" = (/turf/open/space,/area/space)
"b" = (/turf/closed/indestructible/necropolis,/area/shuttle/escape)
"c" = (/turf/open/floor/plating/lava/smooth,/area/shuttle/escape)
"d" = (/turf/open/indestructible/necropolis,/area/shuttle/escape)
"e" = (/obj/structure/window/reinforced/clockwork,/turf/open/indestructible/necropolis,/area/shuttle/escape)
"f" = (/obj/structure/window/reinforced/clockwork{tag = "icon-clockwork_window_single (EAST)"; icon_state = "clockwork_window_single"; dir = 4},/turf/open/indestructible/necropolis,/area/shuttle/escape)
"g" = (/obj/structure/closet/crate/necropolis/tendril,/turf/open/indestructible/necropolis,/area/shuttle/escape)
"h" = (/obj/docking_port/mobile/emergency{timid = 1; name = "Box emergency shuttle"},/turf/open/indestructible/necropolis,/area/shuttle/escape)
"i" = (/obj/structure/window/reinforced/clockwork{tag = "icon-clockwork_window_single (NORTH)"; icon_state = "clockwork_window_single"; dir = 1},/turf/open/indestructible/necropolis,/area/shuttle/escape)
(1,1,1) = {"
aa
aa
aa
aa
ak
ak
ak
aI
ak
aP
ak
ac
ac
ac
ak
aV
ak
aV
ak
ak
ak
aa
"}
(2,1,1) = {"
aa
ak
ak
ak
ak
aA
aF
aG
ak
an
aL
aL
aL
aL
aL
an
ak
bb
bb
bf
ak
ak
"}
(3,1,1) = {"
ak
ae
al
aq
ak
aA
aG
aJ
ak
aQ
an
an
an
an
an
aW
ak
bb
bb
bf
bi
bk
"}
(4,1,1) = {"
ac
af
am
ar
ak
aA
aG
aJ
ak
an
aS
aS
aS
aS
aS
an
aX
bb
bb
bg
bi
bk
"}
(5,1,1) = {"
ac
ag
an
as
ak
ac
aH
ac
bj
an
aT
aT
aT
aT
aT
an
ak
bc
bb
bg
bi
bk
"}
(6,1,1) = {"
ac
ah
an
at
ak
aB
an
aK
aM
an
an
an
an
an
an
an
az
ak
ak
ak
bi
bk
"}
(7,1,1) = {"
ac
ag
an
an
ay
an
an
aL
aM
an
aS
aS
aS
aS
aS
an
ac
aD
aC
aD
bi
bk
"}
(8,1,1) = {"
ac
ai
ao
ao
az
aC
an
aM
aM
an
aT
aT
aT
aT
aT
an
aZ
aC
aC
aC
bi
bk
"}
(9,1,1) = {"
ak
ae
ap
au
ak
aD
an
an
an
an
an
an
an
an
an
an
ac
aC
aC
aC
bi
bk
"}
(10,1,1) = {"
aa
ak
ak
ak
ak
aE
aC
aC
aC
aR
aU
aU
aU
aU
aU
aR
ac
bd
be
bd
ak
ak
"}
(11,1,1) = {"
aa
aa
aa
aa
ak
ac
ak
ac
ak
ak
ak
ac
ac
ac
ak
ak
ak
ac
ak
ac
ak
aa
aabbbbbbbaa
abbcccccbba
abbcbcbcbba
abbbbcbbbba
bbcccccccbb
bccdddddccb
bcddddeddcb
dddddfcdgcb
bcdddfcdgcb
hddddfcdgcb
bcdddfcdgcb
bcdddfcdgcb
bcdddfcdgcb
bcdddfcdgcb
bcdddfcdgcb
dddddfcdgcb
bcdddfcdgcb
ddddddiddcb
bcddddddccb
bcccccccccb
bbbbbbbbbbb
abbbbbbbbba
"}

View File

@@ -0,0 +1,14 @@
var/datum/subsystem/religion/SSreligion
/datum/subsystem/religion
name = "religion"
init_order = 19
flags = SS_NO_FIRE|SS_NO_INIT
var/bible_deity_name
var/Bible_icon_state
var/Bible_item_state
var/Bible_name
var/Bible_deity_name
var/holy_weapon

View File

@@ -22,12 +22,6 @@ var/datum/subsystem/ticker/ticker
var/list/datum/mind/minds = list() //The characters in the game. Used for objective tracking.
//These bible variables should be a preference
var/Bible_icon_state //icon_state the chaplain has chosen for his bible
var/Bible_item_state //item_state the chaplain has chosen for his bible
var/Bible_name //name of the bible
var/Bible_deity_name //name of chaplin's deity
var/list/syndicate_coalition = list() //list of traitor-compatible factions
var/list/factions = list() //list of all factions
var/list/availablefactions = list() //list of factions with openings
@@ -565,11 +559,6 @@ var/datum/subsystem/ticker/ticker
minds = ticker.minds
Bible_icon_state = ticker.Bible_icon_state
Bible_item_state = ticker.Bible_item_state
Bible_name = ticker.Bible_name
Bible_deity_name = ticker.Bible_deity_name
syndicate_coalition = ticker.syndicate_coalition
factions = ticker.factions
availablefactions = ticker.availablefactions

View File

@@ -21,22 +21,30 @@
reskin_holy_weapon(user)
/obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M)
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
var/list/display_names = list()
for(var/V in holy_weapons_list)
var/atom/A = V
display_names += initial(A.name)
var/obj/item/weapon/nullrod/holy_weapon
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(!src || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
return
if(SSreligion.holy_weapon)
holy_weapon = SSreligion.holy_weapon
else
var/list/holy_weapons_list = typesof(/obj/item/weapon/nullrod)
var/list/display_names = list()
for(var/V in holy_weapons_list)
var/atom/A = V
display_names += initial(A.name)
var/index = display_names.Find(choice)
var/A = holy_weapons_list[index]
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
if(!src || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
return
var/obj/item/weapon/nullrod/holy_weapon = new A
var/index = display_names.Find(choice)
var/A = holy_weapons_list[index]
holy_weapon = new A
SSreligion.holy_weapon = holy_weapon.type
feedback_set_details("chaplain_weapon","[choice]")
feedback_set_details("chaplain_weapon","[choice]")
if(holy_weapon)
holy_weapon.reskinned = TRUE

View File

@@ -50,7 +50,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
/obj/item/weapon/storage/book/bible/attack_self(mob/living/carbon/human/H)
if(!istype(H))
return
if(ticker && !ticker.Bible_icon_state && H.job == "Chaplain")
if(!SSreligion.Bible_icon_state && H.job == "Chaplain")
//Open bible selection
var/dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
@@ -95,7 +95,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
T.setDir(10)
/obj/item/weapon/storage/book/bible/Topic(href, href_list)
if(href_list["seticon"] && ticker && !ticker.Bible_icon_state)
if(href_list["seticon"] && ticker && !SSreligion.Bible_icon_state)
var/iconi = text2num(href_list["seticon"])
var/biblename = biblenames[iconi]
@@ -107,9 +107,9 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", "
//Set biblespecific chapels
setupbiblespecifics(B, usr)
if(ticker)
ticker.Bible_icon_state = B.icon_state
ticker.Bible_item_state = B.item_state
SSreligion.Bible_icon_state = B.icon_state
SSreligion.Bible_item_state = B.item_state
feedback_set_details("religion_book","[biblename]")
usr << browse(null, "window=editicon") // Close window

View File

@@ -25,8 +25,8 @@
cross = image('icons/obj/storage.dmi',"kingyellow")
font_color = "blue"
prayer_type = "CHAPLAIN PRAYER"
if (ticker && ticker.Bible_deity_name)
deity = ticker.Bible_deity_name
if(SSreligion.Bible_deity_name)
deity = SSreligion.Bible_deity_name
else if(iscultist(usr))
cross = image('icons/obj/storage.dmi',"tome")
font_color = "red"

View File

@@ -37,10 +37,10 @@ Chaplain
var/obj/item/weapon/storage/book/bible/B = new /obj/item/weapon/storage/book/bible/booze(H)
if(ticker && ticker.Bible_deity_name)
B.deity_name = ticker.Bible_deity_name
B.name = ticker.Bible_name
H << "There is already an established religion onboard the station. You are an acolyte of [ticker.Bible_deity_name]. Defer to the Chaplain."
if(SSreligion.Bible_deity_name)
B.deity_name = SSreligion.Bible_deity_name
B.name = SSreligion.Bible_name
H << "There is already an established religion onboard the station. You are an acolyte of [SSreligion.Bible_deity_name]. Defer to the Chaplain."
H.equip_to_slot_or_del(B, slot_in_backpack)
var/obj/item/weapon/nullrod/N = new(H)
H.equip_to_slot_or_del(N, slot_in_backpack)
@@ -77,14 +77,13 @@ Chaplain
else
B.name = "The Holy Book of [new_religion]"
feedback_set_details("religion_name","[new_religion]")
ticker.Bible_name = B.name
SSreligion.Bible_name = B.name
var/new_deity = "Space Jesus"
if(H.client && H.client.prefs.custom_names["deity"])
new_deity = H.client.prefs.custom_names["deity"]
B.deity_name = new_deity
if(ticker)
ticker.Bible_deity_name = B.deity_name
SSreligion.Bible_deity_name = B.deity_name
feedback_set_details("religion_deity","[new_deity]")
H.equip_to_slot_or_del(B, slot_in_backpack)

View File

@@ -337,11 +337,11 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(!bibledelay)
var/obj/item/weapon/storage/book/bible/B = new /obj/item/weapon/storage/book/bible(src.loc)
if(ticker && ( ticker.Bible_icon_state && ticker.Bible_item_state) )
B.icon_state = ticker.Bible_icon_state
B.item_state = ticker.Bible_item_state
B.name = ticker.Bible_name
B.deity_name = ticker.Bible_deity_name
if(SSreligion.Bible_icon_state && SSreligion.Bible_item_state)
B.icon_state = SSreligion.Bible_icon_state
B.item_state = SSreligion.Bible_item_state
B.name = SSreligion.Bible_name
B.deity_name = SSreligion.Bible_deity_name
bibledelay = 1
spawn(60)

View File

@@ -60,8 +60,10 @@
playsound(get_turf(holder.my_atom), 'sound/effects/pray.ogg', 80, 0, round(created_volume/48))
strengthdiv = 8
for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom)))
var/deity = ticker.Bible_deity_name
if(!ticker.Bible_deity_name)
var/deity
if(SSreligion.Bible_deity_name)
deity = SSreligion.Bible_deity_name
else
deity = "Christ"
R << "<span class='userdanger'>The power of [deity] compels you!</span>"
R.stun(20)

View File

@@ -159,6 +159,7 @@
#include "code\controllers\subsystem\persistence.dm"
#include "code\controllers\subsystem\pool.dm"
#include "code\controllers\subsystem\radio.dm"
#include "code\controllers\subsystem\religion.dm"
#include "code\controllers\subsystem\server_maintenance.dm"
#include "code\controllers\subsystem\shuttles.dm"
#include "code\controllers\subsystem\spacedrift.dm"