mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 05:52:17 +00:00
Manual Merge
This commit is contained in:
@@ -973,7 +973,7 @@ var/global/floorIsLava = 0
|
||||
if(3)
|
||||
var/count = 0
|
||||
for(var/mob/living/carbon/monkey/Monkey in world)
|
||||
if(Monkey.z == 1)
|
||||
if(Monkey.z in station_levels)
|
||||
count++
|
||||
return "Kill all [count] of the monkeys on the station"
|
||||
if(4)
|
||||
|
||||
@@ -76,7 +76,8 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/response_team, // Response Teams admin verb
|
||||
/client/proc/toggle_antagHUD_use,
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/allow_character_respawn /* Allows a ghost to respawn */
|
||||
/client/proc/allow_character_respawn, /* Allows a ghost to respawn */
|
||||
/client/proc/event_manager_panel
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
|
||||
@@ -1283,11 +1283,11 @@
|
||||
foo += text("<B>Is an AI</B> | ")
|
||||
else
|
||||
foo += text("<A HREF='?src=\ref[];makeai=\ref[]'>Make AI</A> | ", src, M)
|
||||
if(M.z != 2)
|
||||
if(isNotAdminLevel(M.z))
|
||||
foo += text("<A HREF='?src=\ref[];sendtoprison=\ref[]'>Prison</A> | ", src, M)
|
||||
foo += text("<A HREF='?src=\ref[];sendtomaze=\ref[]'>Maze</A> | ", src, M)
|
||||
else
|
||||
foo += text("<B>On Z = 2</B> | ")
|
||||
foo += text("<B>On Z = [M.z]</B> | ")
|
||||
else
|
||||
foo += text("<B>Hasn't Entered Game</B> | ")
|
||||
foo += text("<A HREF='?src=\ref[];revive=\ref[]'>Heal/Revive</A> | ", src, M)
|
||||
@@ -2295,7 +2295,7 @@
|
||||
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1)
|
||||
|
||||
for(var/turf/simulated/floor/F in world)
|
||||
if(F.z == 1)
|
||||
if(F.z in config.station_levels)
|
||||
F.name = "lava"
|
||||
F.desc = "The floor is LAVA!"
|
||||
F.overlays += "lava"
|
||||
@@ -2320,7 +2320,7 @@
|
||||
sleep(10)
|
||||
|
||||
for(var/turf/simulated/floor/F in world) // Reset everything.
|
||||
if(F.z == 1)
|
||||
if(F.z in config.station_levels)
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays.Cut()
|
||||
@@ -2368,7 +2368,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in world)
|
||||
if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
if(W.z in config.station_levels && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg')
|
||||
@@ -2561,20 +2561,10 @@
|
||||
if(src.admincaster_feed_message.body =="" || src.admincaster_feed_message.body =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = src.admincaster_signature
|
||||
newMsg.body = src.admincaster_feed_message.body
|
||||
newMsg.is_admin_message = 1
|
||||
feedback_inc("newscaster_stories",1)
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
FC.messages += newMsg //Adding message to the network's appropriate feed_channel
|
||||
break
|
||||
news_network.SubmitArticle(src.admincaster_feed_message.body, src.admincaster_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
src.admincaster_screen=4
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name)
|
||||
|
||||
log_admin("[key_name_admin(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.access_news_network()
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/inactive_on_main_station = 0
|
||||
for(var/zone/zone in air_master.zones)
|
||||
var/turf/simulated/turf = locate() in zone.contents
|
||||
if(turf && turf.z == 1)
|
||||
if(turf && turf.z in config.station_levels)
|
||||
if(zone.needs_update)
|
||||
active_on_main_station++
|
||||
else
|
||||
|
||||
@@ -117,14 +117,13 @@
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
..()
|
||||
if((in_range(src, usr) || loc == usr))
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
if((in_range(src, user) || loc == user))
|
||||
if(secured)
|
||||
usr << "\The [src] is ready!"
|
||||
user << "\The [src] is ready!"
|
||||
else
|
||||
usr << "\The [src] can be attached!"
|
||||
user << "\The [src] can be attached!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
|
||||
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a phoron tank
|
||||
|
||||
/obj/item/device/onetankbomb/examine()
|
||||
..()
|
||||
bombtank.examine()
|
||||
/obj/item/device/onetankbomb/examine(mob/user)
|
||||
..(user)
|
||||
user.examinate(bombtank)
|
||||
|
||||
/obj/item/device/onetankbomb/update_icon()
|
||||
if(bombtank)
|
||||
|
||||
@@ -84,14 +84,13 @@
|
||||
src.overlays += O
|
||||
*/
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
..()
|
||||
if ((in_range(src, usr) || src.loc == usr))
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
if ((in_range(src, user) || src.loc == user))
|
||||
if (src.secured)
|
||||
usr << "\The [src] is ready!"
|
||||
user << "\The [src] is ready!"
|
||||
else
|
||||
usr << "\The [src] can be attached!"
|
||||
user << "\The [src] can be attached!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
var/armed = 0
|
||||
|
||||
|
||||
examine()
|
||||
..()
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
if(armed)
|
||||
usr << "It looks like it's armed."
|
||||
user << "It looks like it's armed."
|
||||
|
||||
update_icon()
|
||||
if(armed)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/frequency = 1457
|
||||
var/delay = 0
|
||||
var/airlock_wire = null
|
||||
var/datum/wires/connected = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/deadman = 0
|
||||
|
||||
@@ -118,9 +119,8 @@
|
||||
|
||||
|
||||
pulse(var/radio = 0)
|
||||
if(istype(src.loc, /obj/machinery/door/airlock) && src.airlock_wire && src.wires)
|
||||
var/obj/machinery/door/airlock/A = src.loc
|
||||
A.pulse(src.airlock_wire)
|
||||
if(src.connected && src.wires)
|
||||
connected.Pulse(src)
|
||||
else if(holder)
|
||||
holder.process_activation(src, 1, 0)
|
||||
else
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
name = "Scientist"
|
||||
corpseradio = /obj/item/device/radio/headset/headset_sci
|
||||
corpseuniform = /obj/item/clothing/under/rank/scientist
|
||||
corpsesuit = /obj/item/clothing/suit/storage/labcoat/science
|
||||
corpsesuit = /obj/item/clothing/suit/storage/toggle/labcoat/science
|
||||
corpseback = /obj/item/weapon/storage/backpack
|
||||
corpseshoes = /obj/item/clothing/shoes/white
|
||||
corpseid = 1
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
/client/New(TopicData)
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(connection != "seeker") //Invalid connection type.
|
||||
if(!(connection in list("seeker", "web"))) //Invalid connection type.
|
||||
return null
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
@@ -298,5 +298,6 @@
|
||||
'icons/spideros_icons/sos_11.png',
|
||||
'icons/spideros_icons/sos_12.png',
|
||||
'icons/spideros_icons/sos_13.png',
|
||||
'icons/spideros_icons/sos_14.png'
|
||||
'icons/spideros_icons/sos_14.png',
|
||||
'html/images/ntlogo.png'
|
||||
)
|
||||
|
||||
@@ -1574,25 +1574,23 @@ datum/preferences
|
||||
// Destroy/cyborgize organs
|
||||
|
||||
for(var/name in organ_data)
|
||||
var/datum/organ/external/O = character.organs_by_name[name]
|
||||
var/datum/organ/internal/I = character.internal_organs_by_name[name]
|
||||
var/status = organ_data[name]
|
||||
|
||||
if(!I || !O)
|
||||
continue
|
||||
|
||||
if(status == "amputated")
|
||||
O.amputated = 1
|
||||
O.status |= ORGAN_DESTROYED
|
||||
O.destspawn = 1
|
||||
if(status == "cyborg")
|
||||
O.status |= ORGAN_ROBOT
|
||||
if(status == "assisted")
|
||||
I.mechassist()
|
||||
else if(status == "mechanical")
|
||||
I.mechanize()
|
||||
|
||||
else continue
|
||||
var/status = organ_data[name]
|
||||
var/datum/organ/external/O = character.organs_by_name[name]
|
||||
if(O)
|
||||
if(status == "amputated")
|
||||
O.amputated = 1
|
||||
O.status |= ORGAN_DESTROYED
|
||||
O.destspawn = 1
|
||||
else if(status == "cyborg")
|
||||
O.status |= ORGAN_ROBOT
|
||||
else
|
||||
var/datum/organ/internal/I = character.internal_organs_by_name[name]
|
||||
if(I)
|
||||
if(status == "assisted")
|
||||
I.mechassist()
|
||||
else if(status == "mechanical")
|
||||
I.mechanize()
|
||||
|
||||
if(underwear > underwear_m.len || underwear < 1)
|
||||
underwear = 0 //I'm sure this is 100% unnecessary, but I'm paranoid... sue me. //HAH NOW NO MORE MAGIC CLONING UNDIES
|
||||
|
||||
@@ -1,18 +1,45 @@
|
||||
var/global/list/gear_datums = list()
|
||||
|
||||
/hook/startup/proc/populate_gear_list()
|
||||
var/list/sort_categories = list(
|
||||
"[slot_head]" = list(),
|
||||
"[slot_glasses]" = list(),
|
||||
"[slot_wear_mask]" = list(),
|
||||
"[slot_w_uniform]" = list(),
|
||||
"attachments" = list(),
|
||||
"[slot_wear_suit]" = list(),
|
||||
"[slot_gloves]" = list(),
|
||||
"[slot_shoes]" = list(),
|
||||
"utility" = list(),
|
||||
"misc" = list(),
|
||||
"unknown" = list(),
|
||||
)
|
||||
|
||||
//create a list of gear datums to sort
|
||||
for(var/type in typesof(/datum/gear)-/datum/gear)
|
||||
var/datum/gear/G = new type()
|
||||
gear_datums[G.display_name] = G
|
||||
|
||||
var/category = (G.sort_category in sort_categories)? G.sort_category : "unknown"
|
||||
sort_categories[category][G.display_name] = G
|
||||
|
||||
for (var/category in sort_categories)
|
||||
gear_datums.Add(sortAssoc(sort_categories[category]))
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gear
|
||||
var/display_name //Name/index.
|
||||
var/display_name //Name/index. Must be unique.
|
||||
var/path //Path to item.
|
||||
var/cost //Number of points used.
|
||||
var/slot //Slot to equip to.
|
||||
var/list/allowed_roles //Roles that can spawn with this item.
|
||||
var/whitelisted //Term to check the whitelist for..
|
||||
var/sort_category
|
||||
|
||||
/datum/gear/New()
|
||||
..()
|
||||
if (!sort_category)
|
||||
sort_category = "[slot]"
|
||||
|
||||
// This is sorted both by slot and alphabetically! Don't fuck it up!
|
||||
// Headslot items
|
||||
@@ -23,6 +50,12 @@ var/global/list/gear_datums = list()
|
||||
cost = 2
|
||||
slot = slot_head
|
||||
|
||||
/datum/gear/obandana
|
||||
display_name = "bandana, orange"
|
||||
path = /obj/item/clothing/head/orangebandana
|
||||
cost = 2
|
||||
slot = slot_head
|
||||
|
||||
/datum/gear/bandana
|
||||
display_name = "bandana, pirate-red"
|
||||
path = /obj/item/clothing/head/bandana
|
||||
@@ -230,7 +263,7 @@ var/global/list/gear_datums = list()
|
||||
/datum/gear/sterilemask
|
||||
display_name = "sterile mask"
|
||||
path = /obj/item/clothing/mask/surgical
|
||||
slot = slot_w_uniform
|
||||
slot = slot_wear_mask
|
||||
cost = 2
|
||||
|
||||
// Uniform slot
|
||||
@@ -260,7 +293,7 @@ var/global/list/gear_datums = list()
|
||||
cost = 2
|
||||
|
||||
/datum/gear/skirt_red
|
||||
display_name = " plaid skirt, red"
|
||||
display_name = "plaid skirt, red"
|
||||
path = /obj/item/clothing/under/dress/plaid_red
|
||||
slot = slot_w_uniform
|
||||
cost = 2
|
||||
@@ -277,6 +310,12 @@ var/global/list/gear_datums = list()
|
||||
slot = slot_w_uniform
|
||||
cost = 3
|
||||
|
||||
/datum/gear/cheongsam
|
||||
display_name = "cheongsam, white"
|
||||
path = /obj/item/clothing/under/cheongsam
|
||||
slot = slot_w_uniform
|
||||
cost = 3
|
||||
|
||||
/datum/gear/uniform_captain
|
||||
display_name = "uniform, captain's dress"
|
||||
path = /obj/item/clothing/under/dress/dress_cap
|
||||
@@ -324,74 +363,88 @@ var/global/list/gear_datums = list()
|
||||
/datum/gear/armband_cargo
|
||||
display_name = "armband, cargo"
|
||||
path = /obj/item/clothing/tie/armband/cargo
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_emt
|
||||
display_name = "armband, EMT"
|
||||
path = /obj/item/clothing/tie/armband/medgreen
|
||||
sort_category = "attachments"
|
||||
cost = 2
|
||||
|
||||
/datum/gear/armband_engineering
|
||||
display_name = "armband, engineering"
|
||||
path = /obj/item/clothing/tie/armband/engine
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_hydroponics
|
||||
display_name = "armband, hydroponics"
|
||||
path = /obj/item/clothing/tie/armband/hydro
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_medical
|
||||
display_name = "armband, medical"
|
||||
path = /obj/item/clothing/tie/armband/med
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband
|
||||
display_name = "armband, red"
|
||||
path = /obj/item/clothing/tie/armband
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_science
|
||||
display_name = "armband, science"
|
||||
path = /obj/item/clothing/tie/armband/science
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armpit
|
||||
display_name = "shoulder holster"
|
||||
path = /obj/item/clothing/tie/holster/armpit
|
||||
sort_category = "attachments"
|
||||
cost = 2
|
||||
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Head of Security")
|
||||
|
||||
/datum/gear/tie_blue
|
||||
display_name = "tie, blue"
|
||||
path = /obj/item/clothing/tie/blue
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/tie_red
|
||||
display_name = "tie, red"
|
||||
path = /obj/item/clothing/tie/red
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/tie_horrible
|
||||
display_name = "tie, socially disgraceful"
|
||||
path = /obj/item/clothing/tie/horrible
|
||||
sort_category = "attachments"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/brown_vest
|
||||
display_name = "webbing, engineering"
|
||||
path = /obj/item/clothing/tie/storage/brown_vest
|
||||
sort_category = "attachments"
|
||||
cost = 2
|
||||
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer")
|
||||
|
||||
/datum/gear/black_vest
|
||||
display_name = "webbing, security"
|
||||
path = /obj/item/clothing/tie/storage/black_vest
|
||||
sort_category = "attachments"
|
||||
cost = 2
|
||||
allowed_roles = list("Security Officer","Head of Security","Warden")
|
||||
|
||||
/datum/gear/webbing
|
||||
display_name = "webbing, simple"
|
||||
path = /obj/item/clothing/tie/storage/webbing
|
||||
sort_category = "attachments"
|
||||
cost = 2
|
||||
|
||||
// Suit slot
|
||||
@@ -403,11 +456,41 @@ var/global/list/gear_datums = list()
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/bomber
|
||||
display_name = "bomberjacker"
|
||||
path = /obj/item/clothing/suit/bomber
|
||||
display_name = "bomber jacket"
|
||||
path = /obj/item/clothing/suit/storage/bomber
|
||||
cost = 4
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/leather_jacket
|
||||
display_name = "leather jacket, black"
|
||||
path = /obj/item/clothing/suit/storage/leather_jacket
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/leather_jacket_nt
|
||||
display_name = "leather jacket, NanoTrasen, black"
|
||||
path = /obj/item/clothing/suit/storage/leather_jacket/nanotrasen
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/brown_jacket
|
||||
display_name = "leather jacket, brown"
|
||||
path = /obj/item/clothing/suit/storage/toggle/brown_jacket
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/brown_jacket_nt
|
||||
display_name = "leather jacket, NanoTrasen, brown"
|
||||
path = /obj/item/clothing/suit/storage/toggle/brown_jacket/nanotrasen
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/hoodie
|
||||
display_name = "hoodie, grey"
|
||||
path = /obj/item/clothing/suit/hoodie
|
||||
cost = 2
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/unathi_mantle
|
||||
display_name = "hide mantle (Unathi)"
|
||||
path = /obj/item/clothing/suit/unathi/mantle
|
||||
@@ -427,22 +510,34 @@ var/global/list/gear_datums = list()
|
||||
cost = 2
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/gponcho
|
||||
display_name = "poncho, blue"
|
||||
path = /obj/item/clothing/suit/poncho/blue
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/gponcho
|
||||
display_name = "poncho, green"
|
||||
path = /obj/item/clothing/suit/poncho/green
|
||||
cost = 4
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/rponcho
|
||||
display_name = "poncho, purple"
|
||||
path = /obj/item/clothing/suit/poncho/purple
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/rponcho
|
||||
display_name = "poncho, red"
|
||||
path = /obj/item/clothing/suit/poncho/red
|
||||
cost = 4
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/poncho
|
||||
display_name = "poncho, tan"
|
||||
path = /obj/item/clothing/suit/poncho
|
||||
cost = 4
|
||||
cost = 3
|
||||
slot = slot_wear_suit
|
||||
|
||||
/datum/gear/unathi_robe
|
||||
@@ -601,16 +696,24 @@ var/global/list/gear_datums = list()
|
||||
cost = 1
|
||||
slot = slot_shoes
|
||||
|
||||
// "Useful" items
|
||||
// "Useful" items - I'm guessing things that might be used at work?
|
||||
|
||||
/datum/gear/briefcase
|
||||
display_name = "briefcase"
|
||||
path = /obj/item/weapon/storage/briefcase
|
||||
sort_category = "utility"
|
||||
cost = 2
|
||||
|
||||
/datum/gear/clipboard
|
||||
display_name = "clipboard"
|
||||
path = /obj/item/weapon/clipboard
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/matchbook
|
||||
display_name = "matchbook"
|
||||
path = /obj/item/weapon/storage/box/matches
|
||||
sort_category = "utility"
|
||||
cost = 2
|
||||
|
||||
// The rest of the trash.
|
||||
@@ -618,49 +721,53 @@ var/global/list/gear_datums = list()
|
||||
/datum/gear/ashtray
|
||||
display_name = "ashtray, plastic"
|
||||
path = /obj/item/ashtray/plastic
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/cane
|
||||
display_name = "cane"
|
||||
path = /obj/item/weapon/cane
|
||||
sort_category = "misc"
|
||||
cost = 2
|
||||
|
||||
/datum/gear/clipboard
|
||||
display_name = "clipboard"
|
||||
path = /obj/item/weapon/clipboard
|
||||
cost = 1
|
||||
|
||||
/datum/gear/dice
|
||||
display_name = "d20"
|
||||
path = /obj/item/weapon/dice/d20
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/cards
|
||||
display_name = "deck of cards"
|
||||
path = /obj/item/weapon/deck
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/blipstick
|
||||
display_name = "lipstick, black"
|
||||
path = /obj/item/weapon/lipstick/black
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/jlipstick
|
||||
display_name = "lipstick, jade"
|
||||
path = /obj/item/weapon/lipstick/jade
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/plipstick
|
||||
display_name = "lipstick, purple"
|
||||
path = /obj/item/weapon/lipstick/purple
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/rlipstick
|
||||
display_name = "lipstick, red"
|
||||
path = /obj/item/weapon/lipstick
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/comb
|
||||
display_name = "purple comb"
|
||||
path = /obj/item/weapon/fluff/cado_keppel_1
|
||||
path = /obj/item/weapon/haircomb
|
||||
sort_category = "misc"
|
||||
cost = 2
|
||||
|
||||
@@ -10,6 +10,17 @@ var/list/spawntypes = list()
|
||||
var/msg //Message to display on the arrivals computer.
|
||||
var/list/turfs //List of turfs to spawn on.
|
||||
var/display_name //Name used in preference setup.
|
||||
var/list/restrict_job = null
|
||||
var/list/disallow_job = null
|
||||
|
||||
proc/check_job_spawning(job)
|
||||
if(restrict_job && !(job in restrict_job))
|
||||
return 0
|
||||
|
||||
if(disallow_job && (job in disallow_job))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/spawnpoint/arrivals
|
||||
display_name = "Arrivals Shuttle"
|
||||
@@ -30,7 +41,17 @@ var/list/spawntypes = list()
|
||||
/datum/spawnpoint/cryo
|
||||
display_name = "Cryogenic Storage"
|
||||
msg = "has completed cryogenic revival"
|
||||
disallow_job = list("Cyborg")
|
||||
|
||||
/datum/spawnpoint/cryo/New()
|
||||
..()
|
||||
turfs = latejoin_cryo
|
||||
turfs = latejoin_cryo
|
||||
|
||||
/datum/spawnpoint/cyborg
|
||||
display_name = "Cyborg Storage"
|
||||
msg = "has been activated from storage"
|
||||
restrict_job = list("Cyborg")
|
||||
|
||||
/datum/spawnpoint/cyborg/New()
|
||||
..()
|
||||
turfs = latejoin_cyborg
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/item/clothing
|
||||
name = "clothing"
|
||||
siemens_coefficient = 0.9
|
||||
var/list/species_restricted = null //Only these species can wear this kit.
|
||||
|
||||
/*
|
||||
@@ -196,11 +197,6 @@ BLIND // can't see anything
|
||||
species_restricted = list("exclude","Unathi","Tajara")
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
|
||||
|
||||
/obj/item/clothing/gloves/examine()
|
||||
set src in usr
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/clothing/gloves/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
@@ -387,20 +383,19 @@ BLIND // can't see anything
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clothing/under/examine()
|
||||
set src in view()
|
||||
..()
|
||||
/obj/item/clothing/under/examine(mob/user)
|
||||
..(user)
|
||||
switch(src.sensor_mode)
|
||||
if(0)
|
||||
usr << "Its sensors appear to be disabled."
|
||||
user << "Its sensors appear to be disabled."
|
||||
if(1)
|
||||
usr << "Its binary life sensors appear to be enabled."
|
||||
user << "Its binary life sensors appear to be enabled."
|
||||
if(2)
|
||||
usr << "Its vital tracker appears to be enabled."
|
||||
user << "Its vital tracker appears to be enabled."
|
||||
if(3)
|
||||
usr << "Its vital tracker and tracking beacon appear to be enabled."
|
||||
user << "Its vital tracker and tracking beacon appear to be enabled."
|
||||
if(hastie)
|
||||
usr << "\A [hastie] is clipped to it."
|
||||
user << "\A [hastie] is clipped to it."
|
||||
|
||||
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
|
||||
var/mob/M = usr
|
||||
|
||||
@@ -82,7 +82,11 @@
|
||||
icon_state = "swathelm"
|
||||
item_state = "helmet"
|
||||
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
|
||||
|
||||
sprite_sheets = list(
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
)
|
||||
|
||||
armor = list(melee = 62, bullet = 50, laser = 50,energy = 35, bomb = 10, bio = 2, rad = 0)
|
||||
flags_inv = HIDEEARS
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
icon_state = "chickenhead"
|
||||
item_state = "chickensuit"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
siemens_coefficient = 2.0
|
||||
siemens_coefficient = 0.7
|
||||
body_parts_covered = HEAD|FACE|EYES
|
||||
|
||||
/obj/item/clothing/head/bearpelt
|
||||
@@ -243,7 +243,7 @@
|
||||
icon_state = "bearpelt"
|
||||
item_state = "bearpelt"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
siemens_coefficient = 2.0
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/head/xenos
|
||||
name = "xenos helmet"
|
||||
@@ -261,5 +261,12 @@
|
||||
icon_state = "philosopher_wig"
|
||||
item_state = "philosopher_wig"
|
||||
flags = FPRINT | TABLEPASS | BLOCKHAIR
|
||||
siemens_coefficient = 2.0
|
||||
siemens_coefficient = 2.0 //why is it so conductive?!
|
||||
body_parts_covered = 0
|
||||
|
||||
/obj/item/clothing/head/orangebandana //themij: Taryn Kifer
|
||||
name = "orange bandana"
|
||||
desc = "An orange piece of cloth, worn on the head."
|
||||
icon_state = "orange_bandana"
|
||||
item_state = "orange_bandana"
|
||||
body_parts_covered = 0
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
flags_inv = HIDEFACE
|
||||
body_parts_covered = FACE
|
||||
w_class = 2
|
||||
sprite_sheets = list(
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/balaclava/tactical
|
||||
name = "green balaclava"
|
||||
@@ -16,6 +20,10 @@
|
||||
flags = FPRINT|TABLEPASS|BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
w_class = 2
|
||||
sprite_sheets = list(
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
)
|
||||
|
||||
/obj/item/clothing/mask/luchador
|
||||
name = "Luchador Mask"
|
||||
|
||||
@@ -8,14 +8,11 @@
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.90
|
||||
|
||||
//Monkeys can not take the muzzle off of themself! Call PETA!
|
||||
/obj/item/clothing/mask/muzzle/attack_paw(mob/user as mob)
|
||||
if (src == user.wear_mask)
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
// Clumsy folks can't take the mask off themselves.
|
||||
/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob)
|
||||
if(user.wear_mask == src && !user.IsAdvancedToolUser())
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/surgical
|
||||
name = "sterile mask"
|
||||
|
||||
@@ -23,10 +23,9 @@
|
||||
user << "You enable the mag-pulse traction system."
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
..()
|
||||
examine(mob/user)
|
||||
..(user)
|
||||
var/state = "disabled"
|
||||
if(src.flags&NOSLIP)
|
||||
state = "enabled"
|
||||
usr << "Its mag-pulse traction system appears to be [state]."
|
||||
user << "Its mag-pulse traction system appears to be [state]."
|
||||
@@ -231,8 +231,7 @@
|
||||
magpulse = 0
|
||||
canremove = 1
|
||||
|
||||
/obj/item/clothing/shoes/magboots/vox/examine()
|
||||
set src in view()
|
||||
..()
|
||||
/obj/item/clothing/shoes/magboots/vox/examine(mob/user)
|
||||
..(user)
|
||||
if (magpulse)
|
||||
usr << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped.
|
||||
user << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped.
|
||||
|
||||
@@ -214,8 +214,8 @@ var/global/list/breach_burn_descriptors = list(
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/examine()
|
||||
..()
|
||||
/obj/item/clothing/suit/space/examine(mob/user)
|
||||
..(user)
|
||||
if(can_breach && breaches && breaches.len)
|
||||
for(var/datum/breach/B in breaches)
|
||||
usr << "\red <B>It has \a [B.descriptor].</B>"
|
||||
user << "\red <B>It has \a [B.descriptor].</B>"
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/examine()
|
||||
..()
|
||||
if(get_dist(usr,src) <= 1)
|
||||
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert
|
||||
name = "emergency response team suit"
|
||||
@@ -28,13 +27,9 @@
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
w_class = 3
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
|
||||
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
|
||||
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
|
||||
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/handcuffs, /obj/item/weapon/storage/briefcase/inflatable)
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
//Commander
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null
|
||||
body_parts_covered = HEAD|FACE
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja
|
||||
name = "ninja suit"
|
||||
@@ -20,6 +21,7 @@
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null //Workaround for spawning alien ninja without internals.
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
supporting_limbs = list()
|
||||
|
||||
// Hardsuit breaching data
|
||||
|
||||
@@ -378,10 +378,9 @@
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/examine()
|
||||
..()
|
||||
if(get_dist(usr,src) <= 1)
|
||||
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/syndi
|
||||
icon_state = "rig-syndie"
|
||||
|
||||
@@ -141,11 +141,13 @@
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
//Lawyer
|
||||
/obj/item/clothing/suit/storage/lawyer/bluejacket
|
||||
/obj/item/clothing/suit/storage/toggle/lawyer/bluejacket
|
||||
name = "Blue Suit Jacket"
|
||||
desc = "A snappy dress jacket."
|
||||
icon_state = "suitjacket_blue_open"
|
||||
item_state = "suitjacket_blue_open"
|
||||
icon_open = "suitjacket_blue_open"
|
||||
icon_closed = "suitjacket_blue"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
@@ -158,62 +160,31 @@
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
//Internal Affairs
|
||||
/obj/item/clothing/suit/storage/internalaffairs
|
||||
/obj/item/clothing/suit/storage/toggle/internalaffairs
|
||||
name = "Internal Affairs Jacket"
|
||||
desc = "A smooth black jacket."
|
||||
icon_state = "ia_jacket_open"
|
||||
item_state = "ia_jacket"
|
||||
icon_open = "ia_jacket_open"
|
||||
icon_closed = "ia_jacket"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
verb/toggle()
|
||||
set name = "Toggle Coat Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
switch(icon_state)
|
||||
if("ia_jacket_open")
|
||||
src.icon_state = "ia_jacket"
|
||||
usr << "You button up the jacket."
|
||||
if("ia_jacket")
|
||||
src.icon_state = "ia_jacket_open"
|
||||
usr << "You unbutton the jacket."
|
||||
else
|
||||
usr << "You attempt to button-up the velcro on your [src], before promptly realising how retarded you are."
|
||||
return
|
||||
update_clothing_icon() //so our overlays update
|
||||
|
||||
//Medical
|
||||
/obj/item/clothing/suit/storage/fr_jacket
|
||||
/obj/item/clothing/suit/storage/toggle/fr_jacket
|
||||
name = "first responder jacket"
|
||||
desc = "A high-visibility jacket worn by medical first responders."
|
||||
icon_state = "fr_jacket_open"
|
||||
item_state = "fr_jacket"
|
||||
icon_open = "fr_jacket_open"
|
||||
icon_closed = "fr_jacket"
|
||||
blood_overlay_type = "armor"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen)
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
verb/toggle()
|
||||
set name = "Toggle Jacket Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
switch(icon_state)
|
||||
if("fr_jacket_open")
|
||||
src.icon_state = "fr_jacket"
|
||||
usr << "You button up the jacket."
|
||||
if("fr_jacket")
|
||||
src.icon_state = "fr_jacket_open"
|
||||
usr << "You unbutton the jacket."
|
||||
update_clothing_icon() //so our overlays update
|
||||
|
||||
//Mime
|
||||
/obj/item/clothing/suit/suspenders
|
||||
name = "suspenders"
|
||||
|
||||
@@ -1,160 +1,104 @@
|
||||
/obj/item/clothing/suit/storage/labcoat
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat
|
||||
name = "labcoat"
|
||||
desc = "A suit that protects against minor chemical spills."
|
||||
icon_state = "labcoat_open"
|
||||
item_state = "labcoat" //Is this even used for anything?
|
||||
icon_open = "labcoat_open"
|
||||
icon_closed = "labcoat"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi')
|
||||
|
||||
verb/toggle()
|
||||
set name = "Toggle Labcoat Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
//Why???
|
||||
switch(icon_state)
|
||||
if("labcoat_open")
|
||||
src.icon_state = "labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat")
|
||||
src.icon_state = "labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("red_labcoat_open")
|
||||
src.icon_state = "red_labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("red_labcoat")
|
||||
src.icon_state = "red_labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("blue_labcoat_open")
|
||||
src.icon_state = "blue_labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("blue_labcoat")
|
||||
src.icon_state = "blue_labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("purple_labcoat_open")
|
||||
src.icon_state = "purple_labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("purple_labcoat")
|
||||
src.icon_state = "purple_labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("green_labcoat_open")
|
||||
src.icon_state = "green_labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("green_labcoat")
|
||||
src.icon_state = "green_labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("orange_labcoat_open")
|
||||
src.icon_state = "orange_labcoat"
|
||||
usr << "You button up the labcoat."
|
||||
if("orange_labcoat")
|
||||
src.icon_state = "orange_labcoat_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labcoat_cmo_open")
|
||||
src.icon_state = "labcoat_cmo"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat_cmo")
|
||||
src.icon_state = "labcoat_cmo_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labcoat_gen_open")
|
||||
src.icon_state = "labcoat_gen"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat_gen")
|
||||
src.icon_state = "labcoat_gen_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labcoat_chem_open")
|
||||
src.icon_state = "labcoat_chem"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat_chem")
|
||||
src.icon_state = "labcoat_chem_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labcoat_vir_open")
|
||||
src.icon_state = "labcoat_vir"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat_vir")
|
||||
src.icon_state = "labcoat_vir_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labcoat_tox_open")
|
||||
src.icon_state = "labcoat_tox"
|
||||
usr << "You button up the labcoat."
|
||||
if("labcoat_tox")
|
||||
src.icon_state = "labcoat_tox_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
if("labgreen_open")
|
||||
src.icon_state = "labgreen"
|
||||
usr << "You button up the labcoat."
|
||||
if("labgreen")
|
||||
src.icon_state = "labgreen_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else
|
||||
usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are."
|
||||
return
|
||||
update_clothing_icon() //so our overlays update
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/red
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/red
|
||||
name = "red labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. This one is red."
|
||||
icon_state = "red_labcoat_open"
|
||||
item_state = "red_labcoat"
|
||||
icon_open = "red_labcoat_open"
|
||||
icon_closed = "red_labcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/blue
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/blue
|
||||
name = "blue labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. This one is blue."
|
||||
icon_state = "blue_labcoat_open"
|
||||
item_state = "blue_labcoat"
|
||||
icon_open = "blue_labcoat_open"
|
||||
icon_closed = "blue_labcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/purple
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/purple
|
||||
name = "purple labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. This one is purple."
|
||||
icon_state = "purple_labcoat_open"
|
||||
item_state = "purple_labcoat"
|
||||
icon_open = "purple_labcoat_open"
|
||||
icon_closed = "purple_labcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/orange
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/orange
|
||||
name = "orange labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. This one is orange."
|
||||
icon_state = "orange_labcoat_open"
|
||||
item_state = "orange_labcoat"
|
||||
icon_open = "orange_labcoat_open"
|
||||
icon_closed = "orange_labcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/green
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/green
|
||||
name = "green labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. This one is green."
|
||||
icon_state = "green_labcoat_open"
|
||||
item_state = "green_labcoat"
|
||||
icon_open = "green_labcoat_open"
|
||||
icon_closed = "green_labcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/cmo
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/cmo
|
||||
name = "chief medical officer's labcoat"
|
||||
desc = "Bluer than the standard model."
|
||||
icon_state = "labcoat_cmo_open"
|
||||
item_state = "labcoat_cmo"
|
||||
icon_open = "labcoat_cmo_open"
|
||||
icon_closed = "labcoat_cmo"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/mad
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/cmoalt
|
||||
name = "chief medical officer labcoat"
|
||||
desc = "A labcoat with command blue highlights."
|
||||
icon_state = "labcoat_cmoalt_open"
|
||||
icon_open = "labcoat_cmoalt_open"
|
||||
icon_closed = "labcoat_cmoalt"
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/mad
|
||||
name = "The Mad's labcoat"
|
||||
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
|
||||
icon_state = "labgreen_open"
|
||||
item_state = "labgreen"
|
||||
icon_open = "labgreen_open"
|
||||
icon_closed = "labgreen"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/genetics
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/genetics
|
||||
name = "Geneticist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder."
|
||||
icon_state = "labcoat_gen_open"
|
||||
icon_open = "labcoat_gen_open"
|
||||
icon_closed = "labcoat_gen"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/chemist
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/chemist
|
||||
name = "Chemist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder."
|
||||
icon_state = "labcoat_chem_open"
|
||||
icon_open = "labcoat_chem_open"
|
||||
icon_closed = "labcoat_chem"
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/virologist
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/virologist
|
||||
name = "Virologist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder."
|
||||
icon_state = "labcoat_vir_open"
|
||||
icon_open = "labcoat_vir_open"
|
||||
icon_closed = "labcoat_vir"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0)
|
||||
|
||||
/obj/item/clothing/suit/storage/labcoat/science
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/science
|
||||
name = "Scientist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
|
||||
icon_state = "labcoat_tox_open"
|
||||
icon_open = "labcoat_tox_open"
|
||||
icon_closed = "labcoat_tox"
|
||||
|
||||
@@ -199,28 +199,6 @@
|
||||
item_state = "ianshirt"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
//Blue suit jacket toggle
|
||||
/obj/item/clothing/suit/suit/verb/toggle()
|
||||
set name = "Toggle Jacket Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(src.icon_state == "suitjacket_blue_open")
|
||||
src.icon_state = "suitjacket_blue"
|
||||
src.item_state = "suitjacket_blue"
|
||||
usr << "You button up the suit jacket."
|
||||
else if(src.icon_state == "suitjacket_blue")
|
||||
src.icon_state = "suitjacket_blue_open"
|
||||
src.item_state = "suitjacket_blue_open"
|
||||
usr << "You unbutton the suit jacket."
|
||||
else
|
||||
usr << "You button-up some imaginary buttons on your [src]."
|
||||
return
|
||||
update_clothing_icon()
|
||||
|
||||
//pyjamas
|
||||
//originally intended to be pinstripes >.>
|
||||
|
||||
@@ -356,23 +334,70 @@
|
||||
|
||||
/obj/item/clothing/suit/poncho/green
|
||||
name = "green poncho"
|
||||
desc = "Your classic, non-racist poncho. This one is green."
|
||||
desc = "A simple, comfortable cloak without sleeves. This one is green."
|
||||
icon_state = "greenponcho"
|
||||
item_state = "greenponcho"
|
||||
|
||||
/obj/item/clothing/suit/poncho/red
|
||||
name = "red poncho"
|
||||
desc = "Your classic, non-racist poncho. This one is red."
|
||||
desc = "A simple, comfortable cloak without sleeves. This one is red."
|
||||
icon_state = "redponcho"
|
||||
item_state = "redponcho"
|
||||
|
||||
/obj/item/clothing/suit/bomber
|
||||
name = "bomber jacker"
|
||||
desc = "A well-worn WW2 leather bomber jacket."
|
||||
/obj/item/clothing/suit/poncho/purple
|
||||
name = "purple poncho"
|
||||
desc = "A simple, comfortable cloak without sleeves. This one is purple."
|
||||
icon_state = "purpleponcho"
|
||||
item_state = "purpleponcho"
|
||||
|
||||
/obj/item/clothing/suit/poncho/blue
|
||||
name = "blue poncho"
|
||||
desc = "A simple, comfortable cloak without sleeves. This one is blue."
|
||||
icon_state = "blueponcho"
|
||||
item_state = "blueponcho"
|
||||
|
||||
/obj/item/clothing/suit/storage/bomber
|
||||
name = "bomber jacket"
|
||||
desc = "A thick, well-worn WW2 leather bomber jacket."
|
||||
icon_state = "bomber"
|
||||
item_state = "bomber"
|
||||
flags = FPRINT | TABLEPASS
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
cold_protection = UPPER_TORSO|ARMS
|
||||
min_cold_protection_temperature = T0C
|
||||
siemens_coefficient = 0.7
|
||||
min_cold_protection_temperature = T0C - 20
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/suit/storage/leather_jacket
|
||||
name = "leather jacket"
|
||||
desc = "A black leather coat."
|
||||
icon_state = "leather_jacket"
|
||||
item_state = "leather_jacket"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/storage/leather_jacket/nanotrasen
|
||||
desc = "A black leather coat. The letters NT are proudly displayed on the back."
|
||||
icon_state = "leather_jacket_nt"
|
||||
|
||||
//This one has buttons for some reason
|
||||
/obj/item/clothing/suit/storage/toggle/brown_jacket
|
||||
name = "leather jacket"
|
||||
desc = "A brown leather coat."
|
||||
icon_state = "brown_jacket"
|
||||
item_state = "brown_jacket"
|
||||
icon_open = "brown_jacket_open"
|
||||
icon_closed = "brown_jacket"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/brown_jacket/nanotrasen
|
||||
desc = "A brown leather coat. The letters NT are proudly displayed on the back."
|
||||
icon_state = "brown_jacket_nt"
|
||||
icon_open = "brown_jacket_nt_open"
|
||||
icon_closed = "brown_jacket_nt"
|
||||
|
||||
/obj/item/clothing/suit/hoodie
|
||||
name = "grey hoodie"
|
||||
desc = "A warm, grey sweatshirt."
|
||||
icon_state = "grey_hoodie"
|
||||
item_state = "grey_hoodie"
|
||||
min_cold_protection_temperature = T0C - 20
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
|
||||
@@ -26,4 +26,26 @@
|
||||
|
||||
/obj/item/clothing/suit/storage/hear_talk(mob/M, var/msg)
|
||||
pockets.hear_talk(M, msg)
|
||||
..()
|
||||
..()
|
||||
|
||||
//Jackets with buttons, used for labcoats, IA jackets, First Responder jackets, and brown jackets.
|
||||
/obj/item/clothing/suit/storage/toggle
|
||||
var/icon_open
|
||||
var/icon_closed
|
||||
verb/toggle()
|
||||
set name = "Toggle Coat Buttons"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return 0
|
||||
|
||||
if(icon_state == icon_open) //Will check whether icon state is currently set to the "open" or "closed" state and switch it around with a message to the user
|
||||
icon_state = icon_closed
|
||||
usr << "You button up the coat."
|
||||
else if(icon_state == icon_closed)
|
||||
icon_state = icon_open
|
||||
usr << "You unbutton the coat."
|
||||
else //in case some goofy admin switches icon states around without switching the icon_open or icon_closed
|
||||
usr << "You attempt to button-up the velcro on your [src], before promptly realising how silly you are."
|
||||
return
|
||||
update_clothing_icon() //so our overlays update
|
||||
@@ -120,7 +120,7 @@
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
|
||||
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/suit, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
|
||||
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
|
||||
/obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
|
||||
for(var/U in typesof(/obj/item/clothing/suit)-blocked)
|
||||
var/obj/item/clothing/suit/V = new U
|
||||
@@ -257,7 +257,7 @@
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
|
||||
|
||||
//so our overlays update.
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
@@ -464,7 +464,7 @@
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
flags_inv = A.flags_inv
|
||||
|
||||
|
||||
//so our overlays update.
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -460,4 +460,12 @@
|
||||
desc = "The very image of a working man. Not that you're probably doing work."
|
||||
icon_state = "mechanic_s"
|
||||
item_state = "mechanic_s"
|
||||
item_color = "mechanic_s"
|
||||
item_color = "mechanic_s"
|
||||
|
||||
/obj/item/clothing/under/cheongsam
|
||||
name = "White Cheongsam"
|
||||
desc = "It is a white cheongsam dress."
|
||||
icon_state = "mai_yang"
|
||||
item_state = "mai_yang"
|
||||
item_color = "mai_yang"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS
|
||||
@@ -257,13 +257,12 @@
|
||||
holstered.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/tie/holster/examine()
|
||||
set src in view()
|
||||
..()
|
||||
/obj/item/clothing/tie/holster/examine(mob/user)
|
||||
..(user)
|
||||
if (holstered)
|
||||
usr << "A [holstered] is holstered here."
|
||||
user << "A [holstered] is holstered here."
|
||||
else
|
||||
usr << "It is empty."
|
||||
user << "It is empty."
|
||||
|
||||
/obj/item/clothing/tie/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -301,19 +301,9 @@
|
||||
icon_on = "engravedzippoon"
|
||||
icon_off = "engravedzippo"
|
||||
|
||||
/obj/item/weapon/fluff/cado_keppel_1 //sparklysheep: Cado Keppel
|
||||
/obj/item/weapon/haircomb/fluff/cado_keppel_1 //sparklysheep: Cado Keppel
|
||||
name = "purple comb"
|
||||
desc = "A pristine purple comb made from flexible plastic. It has a small K etched into its side."
|
||||
w_class = 1.0
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "purplecomb"
|
||||
item_state = "purplecomb"
|
||||
|
||||
attack_self(mob/user)
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"), 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/fluff/hugo_cinderbacth_1 //thatoneguy: Hugo Cinderbatch
|
||||
name = "Old Cane"
|
||||
@@ -368,7 +358,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/large/fluff/nashida_bishara_1 //rukral:Nashida Bisha'ra
|
||||
name = "Nashida's Etched Beaker"
|
||||
desc = "The message: 'Please do not be removing this beaker from the chemistry lab. If lost, return to Nashida Bisha'ra' can be seen etched into the side of this 100 unit beaker."
|
||||
desc = "The message: 'Please do not be removing this beaker from the chemistry lab. If lost, return to Nashida Bisha'ra' can be seen etched into the side of this large beaker."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beakerlarge"
|
||||
matter = list("glass" = 5000)
|
||||
@@ -756,12 +746,9 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "paintedwelding"
|
||||
|
||||
/obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 //themij: Taryn Kifer
|
||||
/obj/item/clothing/head/orangebandana/fluff/taryn_kifer_1 //themij: Taryn Kifer
|
||||
name = "orange bandana"
|
||||
desc = "Hey, I think we're missing a hazard vest..."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "taryn_kifer_1"
|
||||
body_parts_covered = 0
|
||||
|
||||
/obj/item/clothing/head/fluff
|
||||
body_parts_covered = 0
|
||||
@@ -878,6 +865,15 @@
|
||||
icon_state = "mitlabcoat"
|
||||
item_state = "mitlabcoat"
|
||||
|
||||
/obj/item/clothing/suit/storage/toggle/labcoat/fluff/epsilon //Devildabeast: Looping Song
|
||||
name = "e UMi labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a black stripe on the shoulder. The abbreviation \"e UMi\" is written on the back in bold text."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "labcoat_black_open"
|
||||
icon_open = "labcoat_black_open"
|
||||
icon_closed = "labcoat_black"
|
||||
item_state = "labcoat_black"
|
||||
|
||||
/obj/item/clothing/suit/storage/det_suit/fluff/leatherjack //atomicdog92: Seth Sealis
|
||||
name = "leather jacket"
|
||||
desc = "A black leather coat, popular amongst punks, greasers, and other galactic scum."
|
||||
@@ -1279,6 +1275,14 @@
|
||||
icon_state = "digiboots"
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/jackboots/fluff/harmony_singh_1 //Bromuzl: Harmony Singh
|
||||
name = "Springjacks"
|
||||
desc = "A pair of highly modified jackboots in medical white, with some type of spring assembly on the ankle and heels, painted orange."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "springjacks"
|
||||
item_state = "springjacks"
|
||||
slowdown = SHOES_SLOWDOWN+1 //Slowing down because of her injured foot, these are for ease of pain so she can get off painkillers.
|
||||
siemens_coefficient = 0.7 //copied from Jackboots under code/modules/clothing/shoes/miscellaneous.dm
|
||||
|
||||
//////////// Sets ////////////
|
||||
|
||||
@@ -1364,14 +1368,9 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "yuri_kornienkovich_flask"
|
||||
|
||||
/obj/item/clothing/under/fluff/mai_yang_dress // Mai Yang's pretty pretty dress.
|
||||
/obj/item/clothing/under/cheongsam/fluff/mai_yang_dress // Mai Yang's pretty pretty dress.
|
||||
name = "White Cheongsam"
|
||||
desc = "It is a white cheongsam dress."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "mai_yang"
|
||||
item_state = "mai_yang"
|
||||
item_color = "mai_yang"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||
|
||||
/obj/item/clothing/under/fluff/sakura_hokkaido_kimono
|
||||
name = "Sakura Kimono"
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
icon_state = "evidenceobj"
|
||||
return
|
||||
|
||||
/obj/item/weapon/evidencebag/examine()
|
||||
..()
|
||||
if (stored_item) stored_item.examine()
|
||||
/obj/item/weapon/evidencebag/examine(mob/user)
|
||||
..(user)
|
||||
if (stored_item) user.examinate(stored_item)
|
||||
|
||||
/obj/item/weapon/storage/box/evidence
|
||||
name = "evidence bag box"
|
||||
|
||||
@@ -45,10 +45,3 @@
|
||||
user.visible_message("[user] finishes wiping off the [A]!")
|
||||
A.clean_blood()
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/rag/examine()
|
||||
if (!usr)
|
||||
return
|
||||
usr << "That's \a [src]."
|
||||
usr << desc
|
||||
return
|
||||
@@ -52,51 +52,44 @@
|
||||
affected_dest.temp_price_change[good_type] = rand(1,100) / 100
|
||||
|
||||
/datum/event/economic_event/announce()
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "Nyx Daily"
|
||||
newMsg.is_admin_message = 1
|
||||
var/author = "Nyx Daily"
|
||||
var/channel = author
|
||||
|
||||
//see if our location has custom event info for this event
|
||||
newMsg.body = affected_dest.get_custom_eventstring()
|
||||
if(!newMsg.body)
|
||||
var/body = affected_dest.get_custom_eventstring()
|
||||
if(!body)
|
||||
switch(event_type)
|
||||
if(RIOTS)
|
||||
newMsg.body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
|
||||
body = "[pick("Riots have","Unrest has")] broken out on planet [affected_dest.name]. Authorities call for calm, as [pick("various parties","rebellious elements","peacekeeping forces","\'REDACTED\'")] begin stockpiling weaponry and armour. Meanwhile, food and mineral prices are dropping as local industries attempt empty their stocks in expectation of looting."
|
||||
if(WILD_ANIMAL_ATTACK)
|
||||
newMsg.body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
|
||||
body = "Local [pick("wildlife","animal life","fauna")] on planet [affected_dest.name] has been increasing in agression and raiding outlying settlements for food. Big game hunters have been called in to help alleviate the problem, but numerous injuries have already occurred."
|
||||
if(INDUSTRIAL_ACCIDENT)
|
||||
newMsg.body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
|
||||
body = "[pick("An industrial accident","A smelting accident","A malfunction","A malfunctioning piece of machinery","Negligent maintenance","A cooleant leak","A ruptured conduit")] at a [pick("factory","installation","power plant","dockyards")] on [affected_dest.name] resulted in severe structural damage and numerous injuries. Repairs are ongoing."
|
||||
if(BIOHAZARD_OUTBREAK)
|
||||
newMsg.body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
|
||||
body = "[pick("A \'REDACTED\'","A biohazard","An outbreak","A virus")] on [affected_dest.name] has resulted in quarantine, stopping much shipping in the area. Although the quarantine is now lifted, authorities are calling for deliveries of medical supplies to treat the infected, and gas to replace contaminated stocks."
|
||||
if(PIRATES)
|
||||
newMsg.body = "[pick("Pirates","Criminal elements","A [pick("mercenary","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
|
||||
body = "[pick("Pirates","Criminal elements","A [pick("mercenary","Donk Co.","Waffle Co.","\'REDACTED\'")] strike force")] have [pick("raided","blockaded","attempted to blackmail","attacked")] [affected_dest.name] today. Security has been tightened, but many valuable minerals were taken."
|
||||
if(CORPORATE_ATTACK)
|
||||
newMsg.body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","mercenary")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
|
||||
body = "A small [pick("pirate","Cybersun Industries","Gorlex Marauders","mercenary")] fleet has precise-jumped into proximity with [affected_dest.name], [pick("for a smash-and-grab operation","in a hit and run attack","in an overt display of hostilities")]. Much damage was done, and security has been tightened since the incident."
|
||||
if(ALIEN_RAIDERS)
|
||||
if(prob(20))
|
||||
newMsg.body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
|
||||
body = "The Tiger Co-operative have raided [affected_dest.name] today, no doubt on orders from their enigmatic masters. Stealing wildlife, farm animals, medical research materials and kidnapping civilians. NanoTrasen authorities are standing by to counter attempts at bio-terrorism."
|
||||
else
|
||||
newMsg.body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
|
||||
body = "[pick("The alien species designated \'United Exolitics\'","The alien species designated \'REDACTED\'","An unknown alien species")] have raided [affected_dest.name] today, stealing wildlife, farm animals, medical research materials and kidnapping civilians. It seems they desire to learn more about us, so the Navy will be standing by to accomodate them next time they try."
|
||||
if(AI_LIBERATION)
|
||||
newMsg.body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
|
||||
body = "A [pick("\'REDACTED\' was detected on","S.E.L.F operative infiltrated","malignant computer virus was detected on","rogue [pick("slicer","hacker")] was apprehended on")] [affected_dest.name] today, and managed to infect [pick("\'REDACTED\'","a sentient sub-system","a class one AI","a sentient defence installation")] before it could be stopped. Many lives were lost as it systematically begin murdering civilians, and considerable work must be done to repair the affected areas."
|
||||
if(MOURNING)
|
||||
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
|
||||
body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
|
||||
if(CULT_CELL_REVEALED)
|
||||
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
if(SECURITY_BREACH)
|
||||
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
|
||||
body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
|
||||
if(ANIMAL_RIGHTS_RAID)
|
||||
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
|
||||
body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
|
||||
if(FESTIVAL)
|
||||
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Nyx Daily")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("Nyx Daily")
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
/datum/event/economic_event/end()
|
||||
for(var/good_type in dearer_goods)
|
||||
|
||||
@@ -11,78 +11,76 @@
|
||||
if(!event_type)
|
||||
return
|
||||
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "Nyx Daily"
|
||||
newMsg.is_admin_message = 1
|
||||
var/author = "Nyx Daily"
|
||||
var/channel = author
|
||||
|
||||
//see if our location has custom event info for this event
|
||||
newMsg.body = affected_dest.get_custom_eventstring()
|
||||
if(!newMsg.body)
|
||||
newMsg.body = ""
|
||||
var/body = affected_dest.get_custom_eventstring()
|
||||
if(!body)
|
||||
body = ""
|
||||
switch(event_type)
|
||||
if(RESEARCH_BREAKTHROUGH)
|
||||
newMsg.body = "A major breakthough in the field of [pick("phoron research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
|
||||
body = "A major breakthough in the field of [pick("phoron research","super-compressed materials","nano-augmentation","bluespace research","volatile power manipulation")] \
|
||||
was announced [pick("yesterday","a few days ago","last week","earlier this month")] by a private firm on [affected_dest.name]. \
|
||||
NanoTrasen declined to comment as to whether this could impinge on profits."
|
||||
|
||||
if(ELECTION)
|
||||
newMsg.body = "The pre-selection of an additional candidates was announced for the upcoming [pick("supervisors council","advisory board","governership","board of inquisitors")] \
|
||||
body = "The pre-selection of an additional candidates was announced for the upcoming [pick("supervisors council","advisory board","governership","board of inquisitors")] \
|
||||
election on [affected_dest.name] was announced earlier today, \
|
||||
[pick("media mogul","web celebrity", "industry titan", "superstar", "famed chef", "popular gardener", "ex-army officer", "multi-billionaire")] \
|
||||
[random_name(pick(MALE,FEMALE))]. In a statement to the media they said '[pick("My only goal is to help the [pick("sick","poor","children")]",\
|
||||
"I will maintain NanoTrasen's record profits","I believe in our future","We must return to our moral core","Just like... chill out dudes")]'."
|
||||
|
||||
if(RESIGNATION)
|
||||
newMsg.body = "NanoTrasen regretfully announces the resignation of [pick("Sector Admiral","Division Admiral","Ship Admiral","Vice Admiral")] [random_name(pick(MALE,FEMALE))]."
|
||||
body = "NanoTrasen regretfully announces the resignation of [pick("Sector Admiral","Division Admiral","Ship Admiral","Vice Admiral")] [random_name(pick(MALE,FEMALE))]."
|
||||
if(prob(25))
|
||||
var/locstring = pick("Segunda","Salusa","Cepheus","Andromeda","Gruis","Corona","Aquila","Asellus") + " " + pick("I","II","III","IV","V","VI","VII","VIII")
|
||||
newMsg.body += " In a ceremony on [affected_dest.name] this afternoon, they will be awarded the \
|
||||
body += " In a ceremony on [affected_dest.name] this afternoon, they will be awarded the \
|
||||
[pick("Red Star of Sacrifice","Purple Heart of Heroism","Blue Eagle of Loyalty","Green Lion of Ingenuity")] for "
|
||||
if(prob(33))
|
||||
newMsg.body += "their actions at the Battle of [pick(locstring,"REDACTED")]."
|
||||
body += "their actions at the Battle of [pick(locstring,"REDACTED")]."
|
||||
else if(prob(50))
|
||||
newMsg.body += "their contribution to the colony of [locstring]."
|
||||
body += "their contribution to the colony of [locstring]."
|
||||
else
|
||||
newMsg.body += "their loyal service over the years."
|
||||
body += "their loyal service over the years."
|
||||
else if(prob(33))
|
||||
newMsg.body += " They are expected to settle down in [affected_dest.name], where they have been granted a handsome pension."
|
||||
body += " They are expected to settle down in [affected_dest.name], where they have been granted a handsome pension."
|
||||
else if(prob(50))
|
||||
newMsg.body += " The news was broken on [affected_dest.name] earlier today, where they cited reasons of '[pick("health","family","REDACTED")]'"
|
||||
body += " The news was broken on [affected_dest.name] earlier today, where they cited reasons of '[pick("health","family","REDACTED")]'"
|
||||
else
|
||||
newMsg.body += " Administration Aerospace wishes them the best of luck in their retirement ceremony on [affected_dest.name]."
|
||||
body += " Administration Aerospace wishes them the best of luck in their retirement ceremony on [affected_dest.name]."
|
||||
|
||||
if(CELEBRITY_DEATH)
|
||||
newMsg.body = "It is with regret today that we announce the sudden passing of the "
|
||||
body = "It is with regret today that we announce the sudden passing of the "
|
||||
if(prob(33))
|
||||
newMsg.body += "[pick("distinguished","decorated","veteran","highly respected")] \
|
||||
body += "[pick("distinguished","decorated","veteran","highly respected")] \
|
||||
[pick("Ship's Captain","Vice Admiral","Colonel","Lieutenant Colonel")] "
|
||||
else if(prob(50))
|
||||
newMsg.body += "[pick("award-winning","popular","highly respected","trend-setting")] \
|
||||
body += "[pick("award-winning","popular","highly respected","trend-setting")] \
|
||||
[pick("comedian","singer/songwright","artist","playwright","TV personality","model")] "
|
||||
else
|
||||
newMsg.body += "[pick("successful","highly respected","ingenious","esteemed")] \
|
||||
body += "[pick("successful","highly respected","ingenious","esteemed")] \
|
||||
[pick("academic","Professor","Doctor","Scientist")] "
|
||||
|
||||
newMsg.body += "[random_name(pick(MALE,FEMALE))] on [affected_dest.name] [pick("last week","yesterday","this morning","two days ago","three days ago")]\
|
||||
body += "[random_name(pick(MALE,FEMALE))] on [affected_dest.name] [pick("last week","yesterday","this morning","two days ago","three days ago")]\
|
||||
[pick(". Assassination is suspected, but the perpetrators have not yet been brought to justice",\
|
||||
" due to mercenary infiltrators (since captured)",\
|
||||
" during an industrial accident",\
|
||||
" due to [pick("heart failure","kidney failure","liver failure","brain hemorrhage")]")]"
|
||||
|
||||
if(BARGAINS)
|
||||
newMsg.body += "BARGAINS! BARGAINS! BARGAINS! Commerce Control on [affected_dest.name] wants you to know that everything must go! Across all retail centres, \
|
||||
body += "BARGAINS! BARGAINS! BARGAINS! Commerce Control on [affected_dest.name] wants you to know that everything must go! Across all retail centres, \
|
||||
all goods are being slashed, and all retailors are onboard - so come on over for the \[shopping\] time of your life."
|
||||
|
||||
if(SONG_DEBUT)
|
||||
newMsg.body += "[pick("Singer","Singer/songwriter","Saxophonist","Pianist","Guitarist","TV personality","Star")] [random_name(pick(MALE,FEMALE))] \
|
||||
body += "[pick("Singer","Singer/songwriter","Saxophonist","Pianist","Guitarist","TV personality","Star")] [random_name(pick(MALE,FEMALE))] \
|
||||
announced the debut of their new [pick("single","album","EP","label")] '[pick("Everyone's","Look at the","Baby don't eye those","All of those","Dirty nasty")] \
|
||||
[pick("roses","three stars","starships","nanobots","cyborgs","Skrell","Sren'darr")] \
|
||||
[pick("on Venus","on Reade","on Moghes","in my hand","slip through my fingers","die for you","sing your heart out","fly away")]' \
|
||||
with [pick("pre-puchases available","a release tour","cover signings","a launch concert")] on [affected_dest.name]."
|
||||
|
||||
if(MOVIE_RELEASE)
|
||||
newMsg.body += "From the [pick("desk","home town","homeworld","mind")] of [pick("acclaimed","award-winning","popular","stellar")] \
|
||||
body += "From the [pick("desk","home town","homeworld","mind")] of [pick("acclaimed","award-winning","popular","stellar")] \
|
||||
[pick("playwright","author","director","actor","TV star")] [random_name(pick(MALE,FEMALE))] comes the latest sensation: '\
|
||||
[pick("Deadly","The last","Lost","Dead")] [pick("Starships","Warriors","outcasts","Tajarans","Unathi","Skrell")] \
|
||||
[pick("of","from","raid","go hunting on","visit","ravage","pillage","destroy")] \
|
||||
@@ -90,57 +88,51 @@
|
||||
. Own it on webcast today, or visit the galactic premier on [affected_dest.name]!"
|
||||
|
||||
if(BIG_GAME_HUNTERS)
|
||||
newMsg.body += "Game hunters on [affected_dest.name] "
|
||||
body += "Game hunters on [affected_dest.name] "
|
||||
if(prob(33))
|
||||
newMsg.body += "were surprised when an unusual species experts have since identified as \
|
||||
body += "were surprised when an unusual species experts have since identified as \
|
||||
[pick("a subclass of mammal","a divergent abhuman species","an intelligent species of lemur","organic/cyborg hybrids")] turned up. Believed to have been brought in by \
|
||||
[pick("alien smugglers","early colonists","mercenary raiders","unwitting tourists")], this is the first such specimen discovered in the wild."
|
||||
else if(prob(50))
|
||||
newMsg.body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
|
||||
body += "were attacked by a vicious [pick("nas'r","diyaab","samak","predator which has not yet been identified")]\
|
||||
. Officials urge caution, and locals are advised to stock up on armaments."
|
||||
else
|
||||
newMsg.body += "brought in an unusually [pick("valuable","rare","large","vicious","intelligent")] [pick("mammal","predator","farwa","samak")] for inspection \
|
||||
body += "brought in an unusually [pick("valuable","rare","large","vicious","intelligent")] [pick("mammal","predator","farwa","samak")] for inspection \
|
||||
[pick("today","yesterday","last week")]. Speculators suggest they may be tipped to break several records."
|
||||
|
||||
if(GOSSIP)
|
||||
newMsg.body += "[pick("TV host","Webcast personality","Superstar","Model","Actor","Singer")] [random_name(pick(MALE,FEMALE))] "
|
||||
body += "[pick("TV host","Webcast personality","Superstar","Model","Actor","Singer")] [random_name(pick(MALE,FEMALE))] "
|
||||
if(prob(33))
|
||||
newMsg.body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
|
||||
body += "and their partner announced the birth of their [pick("first","second","third")] child on [affected_dest.name] early this morning. \
|
||||
Doctors say the child is well, and the parents are considering "
|
||||
if(prob(50))
|
||||
newMsg.body += capitalize(pick(first_names_female))
|
||||
body += capitalize(pick(first_names_female))
|
||||
else
|
||||
newMsg.body += capitalize(pick(first_names_male))
|
||||
newMsg.body += " for the name."
|
||||
body += capitalize(pick(first_names_male))
|
||||
body += " for the name."
|
||||
else if(prob(50))
|
||||
newMsg.body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
|
||||
body += "announced their [pick("split","break up","marriage","engagement")] with [pick("TV host","webcast personality","superstar","model","actor","singer")] \
|
||||
[random_name(pick(MALE,FEMALE))] at [pick("a society ball","a new opening","a launch","a club")] on [affected_dest.name] yesterday, pundits are shocked."
|
||||
else
|
||||
newMsg.body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
|
||||
newMsg.body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
|
||||
body += "is recovering from plastic surgery in a clinic on [affected_dest.name] for the [pick("second","third","fourth")] time, reportedly having made the decision in response to "
|
||||
body += "[pick("unkind comments by an ex","rumours started by jealous friends",\
|
||||
"the decision to be dropped by a major sponsor","a disasterous interview on Nyx Tonight")]."
|
||||
if(TOURISM)
|
||||
newMsg.body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
|
||||
body += "Tourists are flocking to [affected_dest.name] after the surprise announcement of [pick("major shopping bargains by a wily retailer",\
|
||||
"a huge new ARG by a popular entertainment company","a secret tour by popular artiste [random_name(pick(MALE,FEMALE))]")]. \
|
||||
Nyx Daily is offering discount tickets for two to see [random_name(pick(MALE,FEMALE))] live in return for eyewitness reports and up to the minute coverage."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Nyx Daily")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("Nyx Daily")
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
/datum/event/trivial_news
|
||||
endWhen = 10
|
||||
|
||||
/datum/event/trivial_news/announce()
|
||||
//copy-pasted from the admin verbs to submit new newscaster messages
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "Editor Mike Hammers"
|
||||
//newMsg.is_admin_message = 1
|
||||
var/author = "Editor Mike Hammers"
|
||||
var/channel = "The Gibson Gazette"
|
||||
|
||||
var/datum/trade_destination/affected_dest = pick(weighted_mundaneevent_locations)
|
||||
newMsg.body = pick(
|
||||
var/body = pick(
|
||||
"Tree stuck in tajaran; firefighters baffled.",\
|
||||
"Armadillos want aardvarks removed from dictionary claims 'here first'.",\
|
||||
"Angel found dancing on pinhead ordered to stop; cited for public nuisance.",\
|
||||
@@ -225,9 +217,4 @@
|
||||
"Broccoli discovered to be colonies of tiny aliens with murder on their minds"\
|
||||
)
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "The Gibson Gazette")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("The Gibson Gazette")
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -167,8 +167,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
desc = "A card that holds an amount of money."
|
||||
var/owner_name = "" //So the ATM can set it so the EFTPOS can put a valid name on transactions.
|
||||
|
||||
/obj/item/weapon/spacecash/ewallet/examine()
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
|
||||
/obj/item/weapon/spacecash/ewallet/examine(mob/user)
|
||||
..(user)
|
||||
if (!(user in view(2)) && user!=src.loc) return
|
||||
user << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
|
||||
|
||||
@@ -77,26 +77,8 @@ var/global/economy_init = 0
|
||||
if(economy_init)
|
||||
return 2
|
||||
|
||||
var/datum/feed_channel/newChannel = new /datum/feed_channel
|
||||
newChannel.channel_name = "Public Station Announcements"
|
||||
newChannel.author = "Automated Announcement Listing"
|
||||
newChannel.locked = 1
|
||||
newChannel.is_admin_channel = 1
|
||||
news_network.network_channels += newChannel
|
||||
|
||||
newChannel = new /datum/feed_channel
|
||||
newChannel.channel_name = "Nyx Daily"
|
||||
newChannel.author = "CentComm Minister of Information"
|
||||
newChannel.locked = 1
|
||||
newChannel.is_admin_channel = 1
|
||||
news_network.network_channels += newChannel
|
||||
|
||||
newChannel = new /datum/feed_channel
|
||||
newChannel.channel_name = "The Gibson Gazette"
|
||||
newChannel.author = "Editor Mike Hammers"
|
||||
newChannel.locked = 1
|
||||
newChannel.is_admin_channel = 1
|
||||
news_network.network_channels += newChannel
|
||||
news_network.CreateFeedChannel("Nyx Daily", "CentComm Minister of Information", 1, 1)
|
||||
news_network.CreateFeedChannel("The Gibson Gazette", "Editor Mike Hammers", 1, 1)
|
||||
|
||||
for(var/loc_type in typesof(/datum/trade_destination) - /datum/trade_destination)
|
||||
var/datum/trade_destination/D = new loc_type
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/datum/event/alien_infestation
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
|
||||
var/spawncount = 1
|
||||
var/successSpawn = 0 //So we don't make a command report if nothing gets spawned.
|
||||
@@ -21,7 +20,7 @@
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
|
||||
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
//Cortical borer spawn event - care of RobRichards1997 with minor editing by Zuhayr.
|
||||
|
||||
/datum/event/borer_infestation
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/borer_infestation
|
||||
announceWhen = 400
|
||||
|
||||
@@ -20,7 +16,7 @@
|
||||
/datum/event/borer_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
|
||||
//Stops cortical borers getting stuck in small networks. See: Security, Virology
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/datum/event/brand_intelligence
|
||||
announceWhen = 21
|
||||
endWhen = 1000 //Ends when all vending machines are subverted anyway.
|
||||
oneShot = 1
|
||||
|
||||
var/list/obj/machinery/vending/vendingMachines = list()
|
||||
var/list/obj/machinery/vending/infectedVendingMachines = list()
|
||||
@@ -14,7 +13,7 @@
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in machines)
|
||||
if(V.z != 1) continue
|
||||
if(isNotStationLevel(V.z)) continue
|
||||
vendingMachines.Add(V)
|
||||
|
||||
if(!vendingMachines.len)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/event/carp_migration
|
||||
announceWhen = 50
|
||||
oneShot = 1
|
||||
endWhen = 900
|
||||
endWhen = 900
|
||||
|
||||
var/list/spawned_carp = list()
|
||||
|
||||
/datum/event/carp_migration/setup()
|
||||
@@ -9,12 +9,28 @@
|
||||
endWhen = rand(600,1200)
|
||||
|
||||
/datum/event/carp_migration/announce()
|
||||
command_announcement.Announce("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
var/announcement = ""
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
announcement = "Massive migration of unknown biological entities has been detected near [station_name()], please stand-by."
|
||||
else
|
||||
announcement = "Unknown biological [spawned_carp.len == 1 ? "entity has" : "entities have"] been detected near [station_name()], please stand-by."
|
||||
command_announcement.Announce(announcement, "Lifesign Alert")
|
||||
|
||||
/datum/event/carp_migration/start()
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
for(var/i = 1 to rand(3,5))
|
||||
spawn_fish(landmarks_list.len)
|
||||
else if(severity == EVENT_LEVEL_MODERATE)
|
||||
spawn_fish(landmarks_list.len)
|
||||
else
|
||||
spawn_fish(rand(1, 5))
|
||||
|
||||
/datum/event/carp_migration/proc/spawn_fish(var/limit)
|
||||
for(var/obj/effect/landmark/C in landmarks_list)
|
||||
if(C.name == "carpspawn")
|
||||
spawned_carp.Add(new /mob/living/simple_animal/hostile/carp(C.loc))
|
||||
if(spawned_carp.len >= limit)
|
||||
return
|
||||
|
||||
/datum/event/carp_migration/end()
|
||||
for(var/mob/living/simple_animal/hostile/carp/C in spawned_carp)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/datum/event/disease_outbreak
|
||||
announceWhen = 15
|
||||
oneShot = 1
|
||||
|
||||
|
||||
/datum/event/disease_outbreak/announce()
|
||||
@@ -17,7 +16,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
if(isNotStationLevel(T.z))
|
||||
continue
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
|
||||
@@ -1,10 +1,65 @@
|
||||
/datum/event_meta
|
||||
var/name = ""
|
||||
var/enabled = 1 // Whether or not the event is available for random selection at all
|
||||
var/weight = 0 // The base weight of this event. A zero means it may never fire, but see get_weight()
|
||||
var/min_weight = 0 // The minimum weight that this event will have. Only used if non-zero.
|
||||
var/max_weight = 0 // The maximum weight that this event will have. Only use if non-zero.
|
||||
var/severity = 0 // The current severity of this event
|
||||
var/one_shot = 0 //If true, then the event will not be re-added to the list of available events
|
||||
var/list/role_weights = list()
|
||||
var/datum/event/event_type
|
||||
|
||||
/datum/event_meta/New(var/event_severity, var/event_name, var/datum/event/type, var/event_weight, var/list/job_weights, var/is_one_shot = 0, var/min_event_weight = 0, var/max_event_weight = 0)
|
||||
name = event_name
|
||||
severity = event_severity
|
||||
event_type = type
|
||||
one_shot = is_one_shot
|
||||
weight = event_weight
|
||||
min_weight = min_event_weight
|
||||
max_weight = max_event_weight
|
||||
if(job_weights)
|
||||
role_weights = job_weights
|
||||
|
||||
/datum/event_meta/proc/get_weight(var/list/active_with_role)
|
||||
if(!enabled)
|
||||
return 0
|
||||
|
||||
var/job_weight = 0
|
||||
for(var/role in role_weights)
|
||||
if(role in active_with_role)
|
||||
job_weight += active_with_role[role] * role_weights[role]
|
||||
|
||||
var/total_weight = weight + job_weight
|
||||
|
||||
// Only min/max the weight if the values are non-zero
|
||||
if(min_weight && total_weight < min_weight) total_weight = min_weight
|
||||
if(max_weight && total_weight > max_weight) total_weight = max_weight
|
||||
|
||||
return total_weight
|
||||
|
||||
/datum/event_meta/alien/get_weight(var/list/active_with_role)
|
||||
if(aliens_allowed)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
/datum/event_meta/ninja/get_weight(var/list/active_with_role)
|
||||
if(toggle_space_ninja)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
/datum/event //NOTE: Times are measured in master controller ticks!
|
||||
var/startWhen = 0 //When in the lifetime to call start().
|
||||
var/announceWhen = 0 //When in the lifetime to call announce().
|
||||
var/endWhen = 0 //When in the lifetime the event should end.
|
||||
var/oneShot = 0 //If true, then the event removes itself from the list of potential events on creation.
|
||||
|
||||
var/severity = 0 //Severity. Lower means less severe, higher means more severe. Does not have to be supported. Is set on New().
|
||||
var/activeFor = 0 //How long the event has existed. You don't need to change this.
|
||||
var/isRunning = 1 //If this event is currently running. You should not change this.
|
||||
var/startedAt = 0 //When this event started.
|
||||
var/endedAt = 0 //When this event ended.
|
||||
var/datum/event_meta/event_meta = null
|
||||
|
||||
/datum/event/nothing
|
||||
|
||||
//Called first before processing.
|
||||
//Allows you to setup your event, such as randomly
|
||||
@@ -41,43 +96,54 @@
|
||||
/datum/event/proc/end()
|
||||
return
|
||||
|
||||
|
||||
//Returns the latest point of event processing.
|
||||
/datum/event/proc/lastProcessAt()
|
||||
return max(startWhen, max(announceWhen, endWhen))
|
||||
|
||||
//Do not override this proc, instead use the appropiate procs.
|
||||
//This proc will handle the calls to the appropiate procs.
|
||||
/datum/event/proc/process()
|
||||
|
||||
if(activeFor > startWhen && activeFor < endWhen)
|
||||
tick()
|
||||
|
||||
if(activeFor == startWhen)
|
||||
isRunning = 1
|
||||
start()
|
||||
|
||||
if(activeFor == announceWhen)
|
||||
announce()
|
||||
|
||||
if(activeFor == endWhen)
|
||||
isRunning = 0
|
||||
end()
|
||||
|
||||
// Everything is done, let's clean up.
|
||||
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
|
||||
if(activeFor >= lastProcessAt())
|
||||
kill()
|
||||
|
||||
activeFor++
|
||||
|
||||
|
||||
//Garbage collects the event by removing it from the global events list,
|
||||
//which should be the only place it's referenced.
|
||||
//Called when start(), announce() and end() has all been called.
|
||||
/datum/event/proc/kill()
|
||||
events.Remove(src)
|
||||
// If this event was forcefully killed run end() for individual cleanup
|
||||
if(isRunning)
|
||||
isRunning = 0
|
||||
end()
|
||||
|
||||
endedAt = world.time
|
||||
event_manager.active_events -= src
|
||||
event_manager.event_complete(src)
|
||||
|
||||
/datum/event/New(var/datum/event_meta/EM)
|
||||
// event needs to be responsible for this, as stuff like APLUs currently make their own events for curious reasons
|
||||
event_manager.active_events += src
|
||||
|
||||
event_meta = EM
|
||||
severity = event_meta.severity
|
||||
if(severity < EVENT_LEVEL_MUNDANE) severity = EVENT_LEVEL_MUNDANE
|
||||
if(severity > EVENT_LEVEL_MAJOR) severity = EVENT_LEVEL_MAJOR
|
||||
|
||||
startedAt = world.time
|
||||
|
||||
//Adds the event to the global events list, and removes it from the list
|
||||
//of potential events.
|
||||
/datum/event/New()
|
||||
setup()
|
||||
events.Add(src)
|
||||
/*if(oneShot)
|
||||
potentialRandomEvents.Remove(type)*/
|
||||
..()
|
||||
|
||||
179
code/modules/events/event_container.dm
Normal file
179
code/modules/events/event_container.dm
Normal file
@@ -0,0 +1,179 @@
|
||||
#define ASSIGNMENT_ANY "Any"
|
||||
#define ASSIGNMENT_AI "AI"
|
||||
#define ASSIGNMENT_CYBORG "Cyborg"
|
||||
#define ASSIGNMENT_ENGINEER "Engineer"
|
||||
#define ASSIGNMENT_GARDENER "Gardener"
|
||||
#define ASSIGNMENT_JANITOR "Janitor"
|
||||
#define ASSIGNMENT_MEDICAL "Medical"
|
||||
#define ASSIGNMENT_SCIENTIST "Scientist"
|
||||
#define ASSIGNMENT_SECURITY "Security"
|
||||
|
||||
var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT_LEVEL_MODERATE = "Moderate", EVENT_LEVEL_MAJOR = "Major")
|
||||
|
||||
/datum/event_container
|
||||
var/severity = -1
|
||||
var/delayed = 0
|
||||
var/delay_modifier = 1
|
||||
var/next_event_time = 0
|
||||
var/list/available_events
|
||||
var/list/last_event_time = list()
|
||||
var/datum/event_meta/next_event = null
|
||||
|
||||
var/last_world_time = 0
|
||||
|
||||
/datum/event_container/proc/process()
|
||||
if(!next_event_time)
|
||||
set_event_delay()
|
||||
|
||||
if(delayed)
|
||||
next_event_time += (world.time - last_world_time)
|
||||
else if(world.time > next_event_time)
|
||||
start_event()
|
||||
|
||||
last_world_time = world.time
|
||||
|
||||
/datum/event_container/proc/start_event()
|
||||
if(!next_event) // If non-one has explicitly set an event, randomly pick one
|
||||
next_event = acquire_event()
|
||||
|
||||
// Has an event been acquired?
|
||||
if(next_event)
|
||||
// Set when the event of this type was last fired, and prepare the next event start
|
||||
last_event_time[next_event] = world.time
|
||||
set_event_delay()
|
||||
next_event.enabled = !next_event.one_shot // This event will no longer be available in the random rotation if one shot
|
||||
|
||||
new next_event.event_type(next_event) // Events are added and removed from the processing queue in their New/kill procs
|
||||
|
||||
log_debug("Starting event '[next_event.name]' of severity [severity_to_string[severity]].")
|
||||
next_event = null // When set to null, a random event will be selected next time
|
||||
else
|
||||
// If not, wait for one minute, instead of one tick, before checking again.
|
||||
next_event_time += (60 * 10)
|
||||
|
||||
|
||||
/datum/event_container/proc/acquire_event()
|
||||
if(available_events.len == 0)
|
||||
return
|
||||
var/active_with_role = number_active_with_role()
|
||||
|
||||
var/list/possible_events = list()
|
||||
for(var/datum/event_meta/EM in available_events)
|
||||
var/event_weight = EM.get_weight(active_with_role)
|
||||
if(EM.enabled && event_weight)
|
||||
possible_events[EM] = event_weight
|
||||
|
||||
for(var/event_meta in last_event_time) if(possible_events[event_meta])
|
||||
var/time_passed = world.time - event_last_fired[event_meta]
|
||||
var/weight_modifier = max(0, (config.expected_round_length - time_passed) / 300)
|
||||
var/new_weight = max(possible_events[event_meta] - weight_modifier, 0)
|
||||
|
||||
if(new_weight)
|
||||
possible_events[event_meta] = new_weight
|
||||
else
|
||||
possible_events -= event_meta
|
||||
|
||||
if(possible_events.len == 0)
|
||||
return null
|
||||
|
||||
// Select an event and remove it from the pool of available events
|
||||
var/picked_event = pickweight(possible_events)
|
||||
available_events -= picked_event
|
||||
return picked_event
|
||||
|
||||
/datum/event_container/proc/set_event_delay()
|
||||
// If the next event time has not yet been set and we have a custom first time start
|
||||
if(next_event_time == 0 && config.event_first_run[severity])
|
||||
var/lower = config.event_first_run[severity]["lower"]
|
||||
var/upper = config.event_first_run[severity]["upper"]
|
||||
var/event_delay = rand(lower, upper)
|
||||
next_event_time = world.time + event_delay
|
||||
// Otherwise, follow the standard setup process
|
||||
else
|
||||
var/playercount_modifier = 1
|
||||
switch(player_list.len)
|
||||
if(0 to 10)
|
||||
playercount_modifier = 1.2
|
||||
if(11 to 15)
|
||||
playercount_modifier = 1.1
|
||||
if(16 to 25)
|
||||
playercount_modifier = 1
|
||||
if(26 to 35)
|
||||
playercount_modifier = 0.9
|
||||
if(36 to 100000)
|
||||
playercount_modifier = 0.8
|
||||
playercount_modifier = playercount_modifier * delay_modifier
|
||||
|
||||
var/event_delay = rand(config.event_delay_lower[severity], config.event_delay_upper[severity]) * playercount_modifier
|
||||
next_event_time = world.time + event_delay
|
||||
|
||||
log_debug("Next event of severity [severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.")
|
||||
|
||||
/datum/event_container/proc/SelectEvent()
|
||||
var/datum/event_meta/EM = input("Select an event to queue up.", "Event Selection", null) as null|anything in available_events
|
||||
if(!EM)
|
||||
return
|
||||
if(next_event)
|
||||
available_events += next_event
|
||||
available_events -= EM
|
||||
next_event = EM
|
||||
return EM
|
||||
|
||||
/datum/event_container/mundane
|
||||
severity = EVENT_LEVEL_MUNDANE
|
||||
available_events = list(
|
||||
// Severity level, event name, even type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence",/datum/event/brand_intelligence,20, list(ASSIGNMENT_JANITOR = 25), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
|
||||
)
|
||||
|
||||
/datum/event_container/moderate
|
||||
severity = EVENT_LEVEL_MODERATE
|
||||
available_events = list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 10),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 5, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_SECURITY = 25)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space vines", /datum/event/spacevine, 10, list(ASSIGNMENT_ENGINEER = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_shower, 0, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 50, list(ASSIGNMENT_AI = 25, ASSIGNMENT_SECURITY = 25)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 50)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 25, list(ASSIGNMENT_ENGINEER = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 15, list(ASSIGNMENT_ENGINEER = 5, ASSIGNMENT_JANITOR = 15)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 5, list(ASSIGNMENT_SECURITY = 5), 1),
|
||||
new /datum/event_meta/alien(EVENT_LEVEL_MODERATE, "Alien Infestation", /datum/event/alien_infestation, 2.5,list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 25, ASSIGNMENT_CYBORG = 25, ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SCIENTIST = 5)),
|
||||
)
|
||||
|
||||
/datum/event_container/major
|
||||
severity = EVENT_LEVEL_MAJOR
|
||||
available_events = list(
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 50),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 10), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 10), 1),
|
||||
)
|
||||
|
||||
|
||||
#undef ASSIGNMENT_ANY
|
||||
#undef ASSIGNMENT_AI
|
||||
#undef ASSIGNMENT_CYBORG
|
||||
#undef ASSIGNMENT_ENGINEER
|
||||
#undef ASSIGNMENT_GARDENER
|
||||
#undef ASSIGNMENT_JANITOR
|
||||
#undef ASSIGNMENT_MEDICAL
|
||||
#undef ASSIGNMENT_SCIENTIST
|
||||
#undef ASSIGNMENT_SECURITY
|
||||
@@ -187,7 +187,7 @@ var/list/event_last_fired = list()
|
||||
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
|
||||
// with a specific role.
|
||||
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
|
||||
/proc/number_active_with_role(role)
|
||||
/proc/number_active_with_role()
|
||||
var/list/active_with_role = list()
|
||||
active_with_role["Engineer"] = 0
|
||||
active_with_role["Medical"] = 0
|
||||
@@ -197,6 +197,7 @@ var/list/event_last_fired = list()
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Gardener"] = 0
|
||||
active_with_role["Any"] = player_list.len
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
|
||||
@@ -1,65 +1,279 @@
|
||||
var/list/allEvents = typesof(/datum/event) - /datum/event
|
||||
var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event
|
||||
//var/list/potentialRandomEvents = typesof(/datum/event) - /datum/event - /datum/event/spider_infestation - /datum/event/alien_infestation
|
||||
/datum/event_manager
|
||||
var/window_x = 700
|
||||
var/window_y = 600
|
||||
var/report_at_round_end = 0
|
||||
var/table_options = " align='center'"
|
||||
var/row_options1 = " width='85px'"
|
||||
var/row_options2 = " width='260px'"
|
||||
var/row_options3 = " width='150px'"
|
||||
var/datum/event_container/selected_event_container = null
|
||||
|
||||
var/eventTimeLower = 12000 //20 minutes
|
||||
var/eventTimeUpper = 24000 //40 minutes
|
||||
var/scheduledEvent = null
|
||||
var/list/datum/event/active_events = list()
|
||||
var/list/datum/event/finished_events = list()
|
||||
|
||||
var/list/datum/event/allEvents
|
||||
var/list/datum/event_container/event_containers = list(
|
||||
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
|
||||
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
|
||||
EVENT_LEVEL_MAJOR = new/datum/event_container/major
|
||||
)
|
||||
|
||||
//Currently unused. Needs an admin panel for messing with events.
|
||||
/*/proc/addPotentialEvent(var/type)
|
||||
potentialRandomEvents |= type
|
||||
var/datum/event_meta/new_event = new
|
||||
|
||||
/proc/removePotentialEvent(var/type)
|
||||
potentialRandomEvents -= type*/
|
||||
/datum/event_manager/New()
|
||||
allEvents = typesof(/datum/event) - /datum/event
|
||||
|
||||
/datum/event_manager/proc/process()
|
||||
for(var/datum/event/E in event_manager.active_events)
|
||||
E.process()
|
||||
|
||||
/proc/checkEvent()
|
||||
if(!scheduledEvent)
|
||||
//more players = more time between events, less players = less time between events
|
||||
var/playercount_modifier = 1
|
||||
switch(player_list.len)
|
||||
if(0 to 10)
|
||||
playercount_modifier = 1.2
|
||||
if(11 to 15)
|
||||
playercount_modifier = 1.1
|
||||
if(16 to 25)
|
||||
playercount_modifier = 1
|
||||
if(26 to 35)
|
||||
playercount_modifier = 0.9
|
||||
if(36 to 100000)
|
||||
playercount_modifier = 0.8
|
||||
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/list/datum/event_container/EC = event_containers[i]
|
||||
EC.process()
|
||||
|
||||
if(ticker.mode && ticker.mode.name == "calamity") //Calamity mode lowers the time required between events drastically.
|
||||
playercount_modifier = playercount_modifier * 0.5
|
||||
|
||||
var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier
|
||||
scheduledEvent = world.timeofday + next_event_delay
|
||||
log_debug("Next event in [next_event_delay/600] minutes.")
|
||||
|
||||
else if(world.timeofday > scheduledEvent)
|
||||
spawn_dynamic_event()
|
||||
|
||||
scheduledEvent = null
|
||||
checkEvent()
|
||||
|
||||
//unused, see proc/dynamic_event()
|
||||
/*
|
||||
/proc/spawnEvent()
|
||||
if(!config.allow_random_events)
|
||||
/datum/event_manager/proc/event_complete(var/datum/event/E)
|
||||
if(!E.event_meta) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
|
||||
log_debug("Event of '[E.type]' with missing meta-data has completed.")
|
||||
return
|
||||
|
||||
var/Type = pick(potentialRandomEvents)
|
||||
if(!Type)
|
||||
finished_events += E
|
||||
|
||||
// Add the event back to the list of available events
|
||||
var/datum/event_container/EC = event_containers[E.severity]
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
|
||||
|
||||
/datum/event_manager/proc/Interact(var/mob/living/user)
|
||||
|
||||
var/html = GetInteractWindow()
|
||||
|
||||
var/datum/browser/popup = new(user, "event_manager", "Event Manager", window_x, window_y)
|
||||
popup.set_content(html)
|
||||
popup.open()
|
||||
|
||||
/datum/event_manager/proc/RoundEnd()
|
||||
if(!report_at_round_end)
|
||||
return
|
||||
|
||||
//The event will add itself to the MC's event list
|
||||
//and start working via the constructor.
|
||||
new Type
|
||||
*/
|
||||
world << "<br><br><br><font size=3><b>Random Events This Round:</b></font>"
|
||||
for(var/datum/event/E in active_events|finished_events)
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [worldtime2text(E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
|
||||
/client/proc/forceEvent(var/type in allEvents)
|
||||
world << message
|
||||
|
||||
/datum/event_manager/proc/GetInteractWindow()
|
||||
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
|
||||
if(selected_event_container)
|
||||
var/event_time = max(0, selected_event_container.next_event_time - world.time)
|
||||
html += "<A align='right' href='?src=\ref[src];back=1'>Back</A><br>"
|
||||
html += "Time till start: [round(event_time / 600, 0.1)]<br>"
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr><td[row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
|
||||
for(var/datum/event_meta/EM in selected_event_container.available_events)
|
||||
html += "<tr>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];set_weight=\ref[EM]'>[EM.weight]</A></td>"
|
||||
html += "<td>[EM.min_weight]</td>"
|
||||
html += "<td>[EM.max_weight]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];toggle_oneshot=\ref[EM]'>[EM.one_shot]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];toggle_enabled=\ref[EM]'>[EM.enabled]</A></td>"
|
||||
html += "<td><span class='alert'>[EM.get_weight()]</span></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];remove=\ref[EM];EC=\ref[selected_event_container]'>Remove</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Add Event</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr><td[row_options2]>Name</td><td[row_options2]>Type</td><td[row_options1]>Weight</td><td[row_options1]>OneShot</td></tr>"
|
||||
html += "<tr>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];set_name=\ref[new_event]'>[new_event.name ? new_event.name : "Enter Event"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];set_type=\ref[new_event]'>[new_event.event_type ? new_event.event_type : "Select Type"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];set_weight=\ref[new_event]'>[new_event.weight ? new_event.weight : 0]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];set_oneshot=\ref[new_event]'>[new_event.one_shot]</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "<A align='right' href='?src=\ref[src];add=\ref[selected_event_container]'>Add</A><br>"
|
||||
html += "</div>"
|
||||
else
|
||||
html += "<A align='right' href='?src=\ref[src];toggle_report=1'>Round End Report: [report_at_round_end ? "On": "Off"]</A><br>"
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Event Start</h2>"
|
||||
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr><td[row_options1]>Severity</td><td[row_options1]>Starts At</td><td[row_options1]>Starts In</td><td[row_options3]>Adjust Start</td><td[row_options1]>Pause</td><td[row_options1]>Interval Mod</td></tr>"
|
||||
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/next_event_at = max(0, EC.next_event_time - world.time)
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[worldtime2text(max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=\ref[src];dec_timer=2;event=\ref[EC]'>--</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];dec_timer=1;event=\ref[EC]'>-</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];inc_timer=1;event=\ref[EC]'>+</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];inc_timer=2;event=\ref[EC]'>++</A>"
|
||||
html += "</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=\ref[src];pause=\ref[EC]'>[EC.delayed ? "Resume" : "Pause"]</A>"
|
||||
html += "</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=\ref[src];interval=\ref[EC]'>[EC.delay_modifier]</A>"
|
||||
html += "</td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Next Event</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr><td[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options3]>Event Rotation</td><td>Clear</td></tr>"
|
||||
for(var/severity = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/datum/event_meta/EM = EC.next_event
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];select_event=\ref[EC]'>[EM ? EM.name : "Random"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];view_events=\ref[EC]'>View</A></td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];clear=\ref[EC]'>Clear</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Running Events</h2>"
|
||||
html += "Estimated times, affected by master controller delays."
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr><td[row_options1]>Severity</td><td[row_options2]>Name</td><td[row_options1]>Ends At</td><td[row_options1]>Ends In</td><td[row_options3]>Stop</td></tr>"
|
||||
for(var/datum/event/E in active_events)
|
||||
if(!E.event_meta)
|
||||
continue
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
var/ends_at = E.startedAt + (E.lastProcessAt() * master_controller.minimum_ticks) // A best estimate
|
||||
var/ends_in = max(0, round((ends_at - world.time) / 600, 0.1))
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td>[worldtime2text(ends_at)]</td>"
|
||||
html += "<td>[ends_in]</td>"
|
||||
html += "<td><A align='right' href='?src=\ref[src];stop=\ref[E]'>Stop</A></td>"
|
||||
html += "</tr>"
|
||||
html += "</table>"
|
||||
html += "</div>"
|
||||
|
||||
return html
|
||||
|
||||
/datum/event_manager/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["toggle_report"])
|
||||
report_at_round_end = !report_at_round_end
|
||||
admin_log_and_message_admins("has [report_at_round_end ? "enabled" : "disabled"] the round end event report.")
|
||||
else if(href_list["dec_timer"])
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/decrease = (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
|
||||
EC.next_event_time -= decrease
|
||||
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
|
||||
else if(href_list["inc_timer"])
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/increase = (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
|
||||
EC.next_event_time += increase
|
||||
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
|
||||
else if(href_list["select_event"])
|
||||
var/datum/event_container/EC = locate(href_list["select_event"])
|
||||
var/datum/event_meta/EM = EC.SelectEvent()
|
||||
if(EM)
|
||||
admin_log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.")
|
||||
else if(href_list["pause"])
|
||||
var/datum/event_container/EC = locate(href_list["pause"])
|
||||
EC.delayed = !EC.delayed
|
||||
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
|
||||
else if(href_list["interval"])
|
||||
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
|
||||
if(delay && delay > 0)
|
||||
var/datum/event_container/EC = locate(href_list["interval"])
|
||||
EC.delay_modifier = delay
|
||||
admin_log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].")
|
||||
else if(href_list["stop"])
|
||||
if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event/E = locate(href_list["stop"])
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
admin_log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
E.kill()
|
||||
else if(href_list["view_events"])
|
||||
selected_event_container = locate(href_list["view_events"])
|
||||
else if(href_list["back"])
|
||||
selected_event_container = null
|
||||
else if(href_list["set_name"])
|
||||
var/name = input("Enter event name.", "Set Name") as text|null
|
||||
if(name)
|
||||
var/datum/event_meta/EM = locate(href_list["set_name"])
|
||||
EM.name = name
|
||||
else if(href_list["set_type"])
|
||||
var/type = input("Select event type.", "Select") as null|anything in allEvents
|
||||
if(type)
|
||||
var/datum/event_meta/EM = locate(href_list["set_type"])
|
||||
EM.event_type = type
|
||||
else if(href_list["set_weight"])
|
||||
var/weight = input("Enter weight. A higher value means higher chance for the event of being selected.", "Set Weight") as num|null
|
||||
if(weight && weight > 0)
|
||||
var/datum/event_meta/EM = locate(href_list["set_weight"])
|
||||
EM.weight = weight
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
|
||||
else if(href_list["toggle_oneshot"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_oneshot"])
|
||||
EM.one_shot = !EM.one_shot
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["toggle_enabled"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_enabled"])
|
||||
EM.enabled = !EM.enabled
|
||||
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["remove"])
|
||||
if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event_meta/EM = locate(href_list["remove"])
|
||||
var/datum/event_container/EC = locate(href_list["EC"])
|
||||
EC.available_events -= EM
|
||||
admin_log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["add"])
|
||||
if(!new_event.name || !new_event.event_type)
|
||||
return
|
||||
if(alert("This will add a new event to the rotation. Continue?","Add Event!","Yes","No") != "Yes")
|
||||
return
|
||||
selected_event_container.available_events += new_event
|
||||
admin_log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
|
||||
new_event = new
|
||||
else if(href_list["clear"])
|
||||
var/datum/event_container/EC = locate(href_list["clear"])
|
||||
if(EC.next_event)
|
||||
admin_log_and_message_admins("has unqueued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
|
||||
EC.next_event = null
|
||||
|
||||
Interact(usr)
|
||||
|
||||
/client/proc/forceEvent(var/type in event_manager.allEvents)
|
||||
set name = "Trigger Event (Debug Only)"
|
||||
set category = "Debug"
|
||||
|
||||
@@ -67,5 +281,13 @@ var/scheduledEvent = null
|
||||
return
|
||||
|
||||
if(ispath(type))
|
||||
new type
|
||||
new type(new /datum/event_meta(EVENT_LEVEL_MAJOR))
|
||||
message_admins("[key_name_admin(usr)] has triggered an event. ([type])", 1)
|
||||
|
||||
/client/proc/event_manager_panel()
|
||||
set name = "Event Manager Panel"
|
||||
set category = "Admin"
|
||||
if(event_manager)
|
||||
event_manager.Interact(usr)
|
||||
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
@@ -221,21 +221,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
spawn(0)
|
||||
world << "Started processing APCs"
|
||||
for (var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1)
|
||||
if(APC.z in station_levels)
|
||||
APC.ion_act()
|
||||
apcnum++
|
||||
world << "Finished processing APCs. Processed: [apcnum]"
|
||||
spawn(0)
|
||||
world << "Started processing SMES"
|
||||
for (var/obj/machinery/power/smes/SMES in world)
|
||||
if(SMES.z == 1)
|
||||
if(SMES.z in station_levels)
|
||||
SMES.ion_act()
|
||||
smesnum++
|
||||
world << "Finished processing SMES. Processed: [smesnum]"
|
||||
spawn(0)
|
||||
world << "Started processing AIRLOCKS"
|
||||
for (var/obj/machinery/door/airlock/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z in station_levels)
|
||||
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
|
||||
airlocknum++
|
||||
spawn(0)
|
||||
@@ -244,7 +244,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
spawn(0)
|
||||
world << "Started processing FIREDOORS"
|
||||
for (var/obj/machinery/door/firedoor/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z in station_levels)
|
||||
firedoornum++;
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
|
||||
@@ -23,18 +23,11 @@
|
||||
deposit_success = 1
|
||||
|
||||
/datum/event/money_lotto/announce()
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = "NanoTrasen Editor"
|
||||
newMsg.is_admin_message = 1
|
||||
var/author = "NanoTrasen Editor"
|
||||
var/channel = "Nyx Daily"
|
||||
|
||||
newMsg.body = "Nyx Daily wishes to congratulate <b>[winner_name]</b> for recieving the Nyx Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
|
||||
var/body = "Nyx Daily wishes to congratulate <b>[winner_name]</b> for recieving the Nyx Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum] credits!"
|
||||
if(!deposit_success)
|
||||
newMsg.body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of $500 to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000 Thalers to ND 'Stellar Slam' office on the Nyx gateway containing updated details, and your winnings'll be re-sent within the month."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Nyx Daily")
|
||||
FC.messages += newMsg
|
||||
break
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert("Nyx Daily")
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
//Commented out because we don't send messages like this anymore. Instead it will just popup in their chat window.
|
||||
//P.tnote += "<i><b>← From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
|
||||
|
||||
if (!P.silent)
|
||||
if (!P.message_silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
if(!P.silent) O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
if(!P.message_silent) O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
if(P.loc && isliving(P.loc))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/datum/event/prison_break
|
||||
announceWhen = 50
|
||||
oneShot = 1
|
||||
|
||||
var/releaseWhen = 25
|
||||
var/list/area/prisonAreas = list()
|
||||
|
||||
@@ -1,58 +1,56 @@
|
||||
/datum/event/radiation_storm
|
||||
announceWhen = 1
|
||||
oneShot = 1
|
||||
var/const/enterBelt = 60
|
||||
var/const/leaveBelt = 170
|
||||
var/const/revokeAccess = 230
|
||||
|
||||
endWhen = revokeAccess
|
||||
|
||||
var/postStartTicks
|
||||
|
||||
/datum/event/radiation_storm/announce()
|
||||
// Don't do anything, we want to pack the announcement with the actual event
|
||||
command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
|
||||
/datum/event/radiation_storm/start()
|
||||
spawn()
|
||||
command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
|
||||
make_maint_all_access()
|
||||
|
||||
|
||||
sleep(600)
|
||||
|
||||
make_maint_all_access()
|
||||
|
||||
/datum/event/radiation_storm/tick()
|
||||
if(activeFor == enterBelt)
|
||||
command_announcement.Announce("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert")
|
||||
radiate()
|
||||
|
||||
for(var/i = 0, i < 10, i++)
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
|
||||
continue
|
||||
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,35)),IRRADIATE,0)
|
||||
if(prob(5))
|
||||
H.apply_effect((rand(40,70)),IRRADIATE,0)
|
||||
if (prob(75))
|
||||
randmutb(H) // Applies bad mutation
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
else
|
||||
randmutg(H) // Applies good mutation
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
|
||||
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
M.apply_effect((rand(5,25)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
if(activeFor > enterBelt && activeFor < leaveBelt)
|
||||
postStartTicks++
|
||||
|
||||
if(postStartTicks == 10)
|
||||
postStartTicks = 0
|
||||
radiate()
|
||||
|
||||
else if(activeFor == leaveBelt)
|
||||
command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert")
|
||||
|
||||
/datum/event/radiation_storm/proc/radiate()
|
||||
for(var/mob/living/carbon/C in living_mob_list)
|
||||
var/turf/T = get_turf(C)
|
||||
if(!T)
|
||||
continue
|
||||
if(!(T.z in config.station_levels))
|
||||
continue
|
||||
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
|
||||
continue
|
||||
|
||||
sleep(600) // Want to give them time to get out of maintenance.
|
||||
if(istype(C,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.apply_effect((rand(15,35)),IRRADIATE,0)
|
||||
if(prob(5))
|
||||
H.apply_effect((rand(40,70)),IRRADIATE,0)
|
||||
if (prob(75))
|
||||
randmutb(H) // Applies bad mutation
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
else
|
||||
randmutg(H) // Applies good mutation
|
||||
domutcheck(H,null,MUTCHK_FORCED)
|
||||
else if(istype(C,/mob/living/carbon/monkey))
|
||||
C.apply_effect((rand(5,25)),IRRADIATE,0)
|
||||
|
||||
|
||||
revoke_maint_all_access()
|
||||
/datum/event/radiation_storm/end()
|
||||
revoke_maint_all_access()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/datum/event/rogue_drone
|
||||
startWhen = 10
|
||||
endWhen = 1000
|
||||
var/list/drones_list = list()
|
||||
|
||||
@@ -41,7 +40,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, D.loc)
|
||||
sparks.start()
|
||||
D.z = 2
|
||||
D.z = config.admin_levels[1]
|
||||
D.has_loot = 0
|
||||
|
||||
del(D)
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
/datum/event/space_ninja/setup()
|
||||
space_ninja_arrival()
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
/var/global/spacevines_spawned = 0
|
||||
|
||||
/datum/event/spacevine
|
||||
oneShot = 1
|
||||
|
||||
/datum/event/spacevine/start()
|
||||
//biomass is basically just a resprited version of space vines
|
||||
if(prob(50))
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
oneShot = 1
|
||||
|
||||
var/spawncount = 1
|
||||
|
||||
@@ -19,7 +18,7 @@
|
||||
/datum/event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in config.station_levels)
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
|
||||
datum/event/viral_infection
|
||||
var/severity = 1
|
||||
|
||||
datum/event/viral_infection/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
severity = rand(1, 3)
|
||||
|
||||
datum/event/viral_infection/announce()
|
||||
command_announcement.Announce("Confirmed outbreak of level five biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg')
|
||||
@@ -18,7 +13,9 @@ datum/event/viral_infection/start()
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
while(severity > 0 && candidates.len)
|
||||
severity = severity == 1 ? 1 : severity - 1
|
||||
var/actual_severity = severity * rand(1, 3)
|
||||
while(actual_severity > 0 && candidates.len)
|
||||
infect_mob_random_lesser(candidates[1])
|
||||
candidates.Remove(candidates[1])
|
||||
severity--
|
||||
actual_severity--
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
/turf/simulated/wall
|
||||
|
||||
|
||||
datum/event/wallrot
|
||||
var/severity = 1
|
||||
|
||||
datum/event/wallrot/setup()
|
||||
announceWhen = rand(0, 300)
|
||||
endWhen = announceWhen + 1
|
||||
severity = rand(5, 10)
|
||||
|
||||
datum/event/wallrot/announce()
|
||||
command_announcement.Announce("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
|
||||
|
||||
datum/event/wallrot/start()
|
||||
spawn()
|
||||
var/turf/center = null
|
||||
var/turf/simulated/wall/center = null
|
||||
|
||||
// 100 attempts
|
||||
for(var/i=0, i<100, i++)
|
||||
@@ -24,14 +17,15 @@ datum/event/wallrot/start()
|
||||
|
||||
if(center)
|
||||
// Make sure at least one piece of wall rots!
|
||||
center:rot()
|
||||
center.rot()
|
||||
|
||||
// Have a chance to rot lots of other walls.
|
||||
var/rotcount = 0
|
||||
var/actual_severity = severity * rand(5, 10)
|
||||
for(var/turf/simulated/wall/W in range(5, center)) if(prob(50))
|
||||
W:rot()
|
||||
W.rot()
|
||||
rotcount++
|
||||
|
||||
// Only rot up to severity walls
|
||||
if(rotcount >= severity)
|
||||
if(rotcount >= actual_severity)
|
||||
break
|
||||
@@ -202,12 +202,12 @@
|
||||
update_icon()
|
||||
user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.")
|
||||
|
||||
/obj/item/weapon/hand/examine()
|
||||
..()
|
||||
if((!concealed || src.loc == usr) && cards.len)
|
||||
usr << "It contains: "
|
||||
/obj/item/weapon/hand/examine(mob/user)
|
||||
..(user)
|
||||
if((!concealed || src.loc == user) && cards.len)
|
||||
user << "It contains: "
|
||||
for(var/datum/playingcard/P in cards)
|
||||
usr << "The [P.name]."
|
||||
user << "The [P.name]."
|
||||
|
||||
/obj/item/weapon/hand/update_icon(var/direction = 0)
|
||||
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
if(world.time > last_action + action_time)
|
||||
finished_task()
|
||||
|
||||
/obj/machinery/botany/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/botany/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/datum/seed/proc/request_player(var/mob/living/host)
|
||||
if(!host) return
|
||||
for(var/mob/dead/observer/O in player_list)
|
||||
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(src, "Diona") && config.usealienwhitelist))
|
||||
if(jobban_isbanned(O, "Dionaea") || (!is_alien_whitelisted(O, "Diona") && config.usealienwhitelist))
|
||||
continue
|
||||
if(O.client)
|
||||
if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying))
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
src.name = "packet of [seed.seed_name] [seed.seed_noun]"
|
||||
src.desc = "It has a picture of [seed.display_name] on the front."
|
||||
|
||||
/obj/item/seeds/examine()
|
||||
..()
|
||||
/obj/item/seeds/examine(mob/user)
|
||||
..(user)
|
||||
if(seed && !seed.roundstart)
|
||||
usr << "It's tagged as variety #[seed.uid]."
|
||||
user << "It's tagged as variety #[seed.uid]."
|
||||
|
||||
/obj/item/seeds/cutting
|
||||
name = "cuttings"
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
if(/obj/item/weapon/twohanded/fireaxe) del src
|
||||
if(/obj/item/weapon/hatchet) del src
|
||||
if(/obj/item/weapon/melee/energy) del src
|
||||
if(/obj/item/weapon/pickaxe/plasmacutter) del src
|
||||
|
||||
// Less effective weapons
|
||||
if(/obj/item/weapon/wirecutters)
|
||||
@@ -72,10 +73,6 @@
|
||||
|
||||
manual_unbuckle(user)
|
||||
|
||||
|
||||
/obj/effect/plantsegment/attack_paw(mob/user as mob)
|
||||
manual_unbuckle(user)
|
||||
|
||||
/obj/effect/plantsegment/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
|
||||
@@ -1,325 +1,322 @@
|
||||
dmm_suite
|
||||
///////////////////////////////////////////////////////////////
|
||||
//SS13 Optimized Map loader
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
var/debug_file = file("maploader_debug.txt")
|
||||
|
||||
load_map(var/dmm_file as file, var/z_offset as num, var/y_offset as num, var/x_offset as num, var/load_speed = 0 as num)
|
||||
if(!z_offset)
|
||||
z_offset = world.maxz + 1
|
||||
/**
|
||||
* Construct the model map and control the loading process
|
||||
*
|
||||
* WORKING :
|
||||
*
|
||||
* 1) Makes an associative mapping of model_keys with model
|
||||
* e.g aa = /turf/unsimulated/wall{icon_state = "rock"}
|
||||
* 2) Read the map line by line, parsing the result (using parse_grid)
|
||||
*
|
||||
*/
|
||||
/dmm_suite/load_map(var/dmm_file as file, var/z_offset as num)
|
||||
if(!z_offset)//what z_level we are creating the map on
|
||||
z_offset = world.maxz+1
|
||||
|
||||
//Ensure values are sane.
|
||||
else if(z_offset < 0)
|
||||
z_offset = abs(z_offset)
|
||||
else if(!isnum(z_offset))
|
||||
z_offset = 0
|
||||
var/quote = ascii2text(34)
|
||||
var/tfile = file2text(dmm_file)//the map file we're creating
|
||||
var/tfile_len = length(tfile)
|
||||
var/lpos = 1 // the models definition index
|
||||
|
||||
if(x_offset < 0)
|
||||
x_offset = abs(x_offset)
|
||||
else if(!isnum(x_offset))
|
||||
x_offset = 0
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//first let's map model keys (e.g "aa") to their contents (e.g /turf/space{variables})
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
var/list/grid_models = list()
|
||||
var/key_len = length(copytext(tfile,2,findtext(tfile,quote,2,0)))//the length of the model key (e.g "aa" or "aba")
|
||||
|
||||
if(y_offset < 0)
|
||||
y_offset = abs(y_offset)
|
||||
else if(!isnum(y_offset))
|
||||
y_offset = 0
|
||||
//proceed line by line
|
||||
for(lpos=1; lpos<tfile_len; lpos=findtext(tfile,"\n",lpos,0)+1)
|
||||
var/tline = copytext(tfile,lpos,findtext(tfile,"\n",lpos,0))
|
||||
if(copytext(tline,1,2) != quote)//we reached the map "layout"
|
||||
break
|
||||
var/model_key = copytext(tline,2,2+key_len)
|
||||
var/model_contents = copytext(tline,findtext(tfile,"=")+3,length(tline))
|
||||
grid_models[model_key] = model_contents
|
||||
sleep(-1)
|
||||
|
||||
debug_file << "Starting Map Load @ ([x_offset], [y_offset], [z_offset]), [load_speed] tiles per second."
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//now let's fill the map with turf and objects using the constructed model map
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Handle slowed loading.
|
||||
var/delay_chance = 0
|
||||
if(load_speed > 0)
|
||||
//Chance out of 100 every tenth of a second.
|
||||
delay_chance = 1000 / load_speed
|
||||
//position of the currently processed square
|
||||
var/zcrd=-1
|
||||
var/ycrd=0
|
||||
var/xcrd=0
|
||||
|
||||
//String holding a quotation mark.
|
||||
var/quote = ascii2text(34)
|
||||
for(var/zpos=findtext(tfile,"\n(1,1,",lpos,0);zpos!=0;zpos=findtext(tfile,"\n(1,1,",zpos+1,0)) //in case there's several maps to load
|
||||
|
||||
var/input_file = file2text(dmm_file)
|
||||
var/input_file_len = length(input_file)
|
||||
zcrd++
|
||||
world.maxz = max(world.maxz, zcrd+z_offset)//create a new z_level if needed
|
||||
|
||||
//Stores the contents of each tile model in the map
|
||||
var/list/grid_models = list()
|
||||
//Length of the tile model code. e.g. "aaa" is 3 long.
|
||||
var/key_len = length(copytext(input_file, 2 ,findtext(input_file, quote, 2)))
|
||||
//The key of the default tile model. (In SS13 this is: "/turf/space,/area")
|
||||
var/default_key
|
||||
var/zgrid = copytext(tfile,findtext(tfile,quote+"\n",zpos,0)+2,findtext(tfile,"\n"+quote,zpos,0)+1) //copy the whole map grid
|
||||
var/z_depth = length(zgrid)
|
||||
|
||||
debug_file << " Building turf array."
|
||||
//if exceeding the world max x or y, increase it
|
||||
var/x_depth = length(copytext(zgrid,1,findtext(zgrid,"\n",2,0)))
|
||||
if(world.maxx<x_depth)
|
||||
world.maxx=x_depth
|
||||
|
||||
//Iterates through the mapfile to build the model tiles for the map.
|
||||
for(var/line_position = 1; line_position < input_file_len; line_position = findtext(input_file,"\n", line_position) + 1)
|
||||
var/next_line = copytext(input_file, line_position, findtext(input_file,"\n", line_position) - 1)
|
||||
var/y_depth = z_depth / (x_depth+1)//x_depth + 1 because we're counting the '\n' characters in z_depth
|
||||
if(world.maxy<y_depth)
|
||||
world.maxy=y_depth
|
||||
|
||||
//If the first character in the line is not a quote, the model tiles are all defined.
|
||||
if(copytext(next_line, 1, 2) != quote)
|
||||
//then proceed it line by line, starting from top
|
||||
ycrd = y_depth
|
||||
|
||||
for(var/gpos=1;gpos!=0;gpos=findtext(zgrid,"\n",gpos,0)+1)
|
||||
var/grid_line = copytext(zgrid,gpos,findtext(zgrid,"\n",gpos,0))
|
||||
|
||||
//fill the current square using the model map
|
||||
xcrd=0
|
||||
for(var/mpos=1;mpos<=x_depth;mpos+=key_len)
|
||||
xcrd++
|
||||
var/model_key = copytext(grid_line,mpos,mpos+key_len)
|
||||
parse_grid(grid_models[model_key],xcrd,ycrd,zcrd+z_offset)
|
||||
|
||||
//reached end of current map
|
||||
if(gpos+x_depth+1>z_depth)
|
||||
break
|
||||
|
||||
//Copy contents of the model into the grid_models list.
|
||||
var/model_key = copytext(next_line, 2, findtext(input_file, quote, 2))
|
||||
var/model_contents = copytext(next_line, findtext(next_line, "=" ) + 3)
|
||||
if(!default_key && model_contents == "[world.turf],[world.area]")
|
||||
default_key = model_key
|
||||
grid_models[model_key] = model_contents
|
||||
if(prob(delay_chance))
|
||||
sleep(1)
|
||||
|
||||
//Co-ordinates of the tile being loaded.
|
||||
var/z_coordinate = -1
|
||||
var/y_coordinate = 0
|
||||
var/x_coordinate = 0
|
||||
|
||||
//Store the
|
||||
var/y_depth = 0
|
||||
|
||||
//Iterate through all z-levels to load the tiles.
|
||||
for(var/z_position = findtext(input_file, "\n(1,1,"); TRUE; z_position = findtext(input_file, "\n(1,1,", z_position + 1))
|
||||
//break when there are no more z-levels.
|
||||
if(z_position == 0)
|
||||
break
|
||||
|
||||
//Increment the z_coordinate and update the world's borders
|
||||
z_coordinate++
|
||||
world.maxz = max(world.maxz, z_coordinate + z_offset)
|
||||
|
||||
//Here we go!
|
||||
y_coordinate = 0
|
||||
y_depth = 0
|
||||
var/z_level = copytext(input_file, \
|
||||
findtext(input_file, quote + "\n", z_position) + 2,\
|
||||
findtext(input_file, "\n" + quote, z_position) + 1)
|
||||
|
||||
//Iterate through each line, increasing the y_coordinate.
|
||||
for(var/grid_position = 1; grid_position != 0; grid_position = findtext(z_level, "\n", grid_position) + 1)
|
||||
//Grab this line of data.
|
||||
var/grid_line = copytext(z_level, grid_position, findtext(z_level, "\n", grid_position))
|
||||
|
||||
//Compute the size of the z-levels y axis.
|
||||
if(!y_depth)
|
||||
y_depth = length(z_level) / (length(grid_line) + 1)
|
||||
y_depth += y_offset
|
||||
if(y_depth != round(y_depth, 1))
|
||||
debug_file << " Warning: y_depth is not a round number"
|
||||
|
||||
//And update the worlds variables.
|
||||
if(world.maxy < y_depth)
|
||||
world.maxy = y_depth
|
||||
//The top of the map is the highest "y" co-ordinate, so we start there and iterate downwards
|
||||
if(!y_coordinate)
|
||||
y_coordinate = y_depth + 1
|
||||
|
||||
//Decrement and load this line of the map.
|
||||
y_coordinate--
|
||||
x_coordinate = x_offset
|
||||
|
||||
//Iterate through the line loading the model tile data.
|
||||
for(var/model_position = 1; model_position <= length(grid_line); model_position += key_len)
|
||||
x_coordinate++
|
||||
|
||||
//Find the model key and load that model.
|
||||
var/model_key = copytext(grid_line, model_position, model_position + key_len)
|
||||
//If the key is the default one, skip it and save the computation time.
|
||||
if(model_key == default_key)
|
||||
continue
|
||||
|
||||
if(world.maxx < x_coordinate)
|
||||
world.maxx = x_coordinate
|
||||
parse_grid(grid_models[model_key], x_coordinate, y_coordinate, z_coordinate + z_offset)
|
||||
|
||||
if(prob(delay_chance))
|
||||
sleep(1)
|
||||
|
||||
//If we hit the last tile in this z-level, we should break out of the loop.
|
||||
if(grid_position + length(grid_line) + 1 > length(z_level))
|
||||
break
|
||||
|
||||
//Break out of the loop when we hit the end of the file.
|
||||
if(findtext(input_file, quote + "}", z_position) + 2 >= input_file_len)
|
||||
break
|
||||
|
||||
|
||||
proc/parse_grid(var/model as text, var/x_coordinate as num, var/y_coordinate as num, var/z_coordinate as num)
|
||||
//Accepts a text string containing a comma separated list of type paths of the
|
||||
// same construction as those contained in a .dmm file, and instantiates them.
|
||||
|
||||
var/list/text_strings = list()
|
||||
for(var/index = 1; findtext(model, quote); index++)
|
||||
/*Loop: Stores quoted portions of text in text_strings, and replaces them with an
|
||||
index to that list.
|
||||
- Each iteration represents one quoted section of text.
|
||||
*/
|
||||
//Add the next section of quoted text to the list
|
||||
var/first_quote = findtext(model, quote)
|
||||
var/second_quote = findtext(model, quote, first_quote + 1)
|
||||
var/quoted_chunk = copytext(model, first_quote + 1, second_quote)
|
||||
text_strings += quoted_chunk
|
||||
//Then remove the quoted section.
|
||||
model = copytext(model, 1, first_quote) + "~[index]" + copytext(model, second_quote + 1)
|
||||
|
||||
var/debug_output = 0
|
||||
//if(x_coordinate == 86 && y_coordinate == 88 && z_coordinate == 7)
|
||||
// debug_output = 1
|
||||
|
||||
if(debug_output)
|
||||
debug_file << " Now debugging turf: [model] ([x_coordinate], [y_coordinate], [z_coordinate])"
|
||||
|
||||
var/next_position = 1
|
||||
for(var/data_position = 1, next_position || data_position != 1, data_position = next_position + 1)
|
||||
next_position = findtext(model, ",/", data_position)
|
||||
|
||||
var/full_def = copytext(model, data_position, next_position)
|
||||
|
||||
if(debug_output)
|
||||
debug_file << " Current Line: [full_def] -- ([data_position] - [next_position])"
|
||||
|
||||
/*Loop: Identifies each object's data, instantiates it, and reconstitues it's fields.
|
||||
- Each iteration represents one object's data, including type path and field values.
|
||||
*/
|
||||
|
||||
//Load the attribute data.
|
||||
var/attribute_position = findtext(full_def,"{")
|
||||
var/atom_def = text2path(copytext(full_def, 1, attribute_position))
|
||||
|
||||
var/list/attributes = list()
|
||||
if(attribute_position)
|
||||
full_def = copytext(full_def, attribute_position + 1)
|
||||
if(debug_output)
|
||||
debug_file << " Atom Def: [atom_def]"
|
||||
debug_file << " Parameters: [full_def]"
|
||||
|
||||
var/next_attribute = 1
|
||||
for(attribute_position = 1, next_attribute || attribute_position != 1, attribute_position = next_attribute + 1)
|
||||
next_attribute = findtext(full_def, ";", attribute_position)
|
||||
|
||||
//Loop: Identifies each attribute/value pair, and stores it in attributes[].
|
||||
attributes += copytext(full_def, attribute_position, next_attribute)
|
||||
|
||||
//Construct attributes associative list
|
||||
var/list/fields = list()
|
||||
for(var/attribute in attributes)
|
||||
var/trim_left = trim_text(copytext(attribute, 1, findtext(attribute, "=")))
|
||||
var/trim_right = trim_text(copytext(attribute, findtext(attribute, "=") + 1))
|
||||
|
||||
if(findtext(trim_right, "list("))
|
||||
trim_right = get_list(trim_right, text_strings)
|
||||
|
||||
else if(findtext(trim_right, "~"))//Check for strings
|
||||
while(findtext(trim_right,"~"))
|
||||
var/reference_index = copytext(trim_right, findtext(trim_right, "~") + 1)
|
||||
trim_right = text_strings[text2num(reference_index)]
|
||||
|
||||
//Check for numbers
|
||||
else if(isnum(text2num(trim_right)))
|
||||
trim_right = text2num(trim_right)
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
trim_right = file(copytext(trim_right, 2, length(trim_right)))
|
||||
|
||||
fields[trim_left] = trim_right
|
||||
sleep(-1)
|
||||
|
||||
|
||||
if(debug_output)
|
||||
var/return_data = " Debug Fields:"
|
||||
for(var/item in fields)
|
||||
return_data += " [item] = [fields[item]];"
|
||||
debug_file << return_data
|
||||
|
||||
//Begin Instanciation
|
||||
var/atom/instance
|
||||
|
||||
if(ispath(atom_def,/area))
|
||||
instance = locate(atom_def)
|
||||
if(!istype(instance, atom_def))
|
||||
instance = new atom_def
|
||||
instance.contents.Add(locate(x_coordinate,y_coordinate,z_coordinate))
|
||||
|
||||
else
|
||||
instance = new atom_def(locate(x_coordinate,y_coordinate,z_coordinate))
|
||||
if(instance)
|
||||
for(var/item in fields)
|
||||
instance.vars[item] = fields[item]
|
||||
else if(!(atom_def in borked_paths))
|
||||
borked_paths += atom_def
|
||||
var/return_data = " Failure [atom_def] @ ([x_coordinate], [y_coordinate], [z_coordinate]) fields:"
|
||||
for(var/item in fields)
|
||||
return_data += " [item] = [fields[item]];"
|
||||
debug_file << return_data
|
||||
ycrd--
|
||||
|
||||
sleep(-1)
|
||||
return 1
|
||||
|
||||
var/list/borked_paths = list()
|
||||
//reached End Of File
|
||||
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len)
|
||||
break
|
||||
sleep(-1)
|
||||
|
||||
proc/trim_text(var/what as text)
|
||||
while(length(what) && findtext(what, " ", 1, 2))
|
||||
what = copytext(what, 2)
|
||||
/**
|
||||
* Fill a given tile with its area/turf/objects/mobs
|
||||
* Variable model is one full map line (e.g /turf/unsimulated/wall{icon_state = "rock"},/area/mine/explored)
|
||||
*
|
||||
* WORKING :
|
||||
*
|
||||
* 1) Read the model string, member by member (delimiter is ',')
|
||||
*
|
||||
* 2) Get the path of the atom and store it into a list
|
||||
*
|
||||
* 3) a) Check if the member has variables (text within '{' and '}')
|
||||
*
|
||||
* 3) b) Construct an associative list with found variables, if any (the atom index in members is the same as its variables in members_attributes)
|
||||
*
|
||||
* 4) Instanciates the atom with its variables
|
||||
*
|
||||
*/
|
||||
/dmm_suite/proc/parse_grid(var/model as text,var/xcrd as num,var/ycrd as num,var/zcrd as num)
|
||||
/*Method parse_grid()
|
||||
- Accepts a text string containing a comma separated list of type paths of the
|
||||
same construction as those contained in a .dmm file, and instantiates them.
|
||||
*/
|
||||
|
||||
while(length(what) && findtext(what, " ", length(what)))
|
||||
what = copytext(what, 1, length(what))
|
||||
var/list/members = list()//will contain all members (paths) in model (in our example : /turf/unsimulated/wall and /area/mine/explored)
|
||||
var/list/members_attributes = list()//will contain lists filled with corresponding variables, if any (in our example : list(icon_state = "rock") and list())
|
||||
|
||||
return what
|
||||
|
||||
proc/get_list(var/text, var/list/text_strings)
|
||||
//First, trim the data to just the list contents
|
||||
var/list_start = findtext(text, "(") + 1
|
||||
var/list_end = findtext(text, ")", list_start)
|
||||
var/list_contents = copytext(text, list_start, list_end)
|
||||
/////////////////////////////////////////////////////////
|
||||
//Constructing members and corresponding variables lists
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
//Then, we seperate it into the individual entries
|
||||
var/index=1
|
||||
var/old_position = 1
|
||||
var/dpos
|
||||
|
||||
var/list/entries = list()
|
||||
var/entry_end = 1
|
||||
do
|
||||
//finding next member (e.g /turf/unsimulated/wall{icon_state = "rock"} or /area/mine/explored)
|
||||
dpos= find_next_delimiter_position(model,old_position,",","{","}")//find next delimiter (comma here) that's not within {...}
|
||||
|
||||
for(var/entry_start = 1, entry_end || entry_start != 1, entry_start = entry_end + 1)
|
||||
entry_end = findtext(list_contents, ",", entry_start)
|
||||
entries += copytext(list_contents, entry_start, entry_end)
|
||||
var/full_def = copytext(model,old_position,dpos)//full definition, e.g : /obj/foo/bar{variables=derp}
|
||||
var/atom_def = text2path(copytext(full_def,1,findtext(full_def,"{")))//path definition, e.g /obj/foo/bar
|
||||
members.Add(atom_def)
|
||||
old_position = dpos + 1
|
||||
|
||||
//Finally, we assemble the completed list.
|
||||
var/list/final_list = list()
|
||||
for(var/entry in entries)
|
||||
var/equals_position = findtext(entry, "=")
|
||||
//transform the variables in text format into a list (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
|
||||
var/list/fields = list()
|
||||
|
||||
if(equals_position)
|
||||
var/trim_left = trim_text(copytext(entry, 1, equals_position))
|
||||
var/trim_right = trim_text(copytext(entry, equals_position + 1))
|
||||
var/variables_start = findtext(full_def,"{")
|
||||
if(variables_start)//if there's any variable
|
||||
full_def = copytext(full_def,variables_start+1,length(full_def))//removing the last '}'
|
||||
fields = text2list(full_def,";")
|
||||
|
||||
if(findtext(trim_right, "list("))
|
||||
trim_right = get_list(trim_right, text_strings)
|
||||
//then fill the members_attributes list with the corresponding variables
|
||||
members_attributes.len++
|
||||
members_attributes[index++] = fields
|
||||
|
||||
else if(findtext(trim_right, "~"))//Check for strings
|
||||
while(findtext(trim_right,"~"))
|
||||
var/reference_index = copytext(trim_right, findtext(trim_right, "~") + 1)
|
||||
trim_right = text_strings[text2num(reference_index)]
|
||||
sleep(-1)
|
||||
while(dpos != 0)
|
||||
|
||||
//Check for numbers
|
||||
else if(isnum(text2num(trim_right)))
|
||||
trim_right = text2num(trim_right)
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
trim_right = file(copytext(trim_right, 2, length(trim_right)))
|
||||
////////////////
|
||||
//Instanciation
|
||||
////////////////
|
||||
|
||||
if(findtext(trim_left, "~"))//Check for strings
|
||||
while(findtext(trim_left,"~"))
|
||||
var/reference_index = copytext(trim_left, findtext(trim_left, "~") + 1)
|
||||
trim_left = text_strings[text2num(reference_index)]
|
||||
//The next part of the code assumes there's ALWAYS an /area AND a /turf on a given tile
|
||||
|
||||
final_list[trim_left] = trim_right
|
||||
//first instance the /area and remove it from the members list
|
||||
var/length = members.len
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(members_attributes[length])//preloader for assigning set variables on atom creation
|
||||
|
||||
else
|
||||
if(findtext(entry, "~"))//Check for strings
|
||||
while(findtext(entry, "~"))
|
||||
var/reference_index = copytext(entry, findtext(entry, "~") + 1)
|
||||
entry = text_strings[text2num(reference_index)]
|
||||
instance = locate(members[length])
|
||||
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
||||
|
||||
//Check for numbers
|
||||
else if(isnum(text2num(entry)))
|
||||
entry = text2num(entry)
|
||||
if(_preloader && instance)
|
||||
_preloader.load(instance)
|
||||
|
||||
//Check for file
|
||||
else if(copytext(entry, 1, 2) == "'")
|
||||
entry = file(copytext(entry, 2, length(entry)))
|
||||
members.Remove(members[length])
|
||||
|
||||
final_list += entry
|
||||
//then instance the /turf and remove it from the members list
|
||||
length = members.len
|
||||
|
||||
return final_list
|
||||
instance_atom(members[length],members_attributes[length],xcrd,ycrd,zcrd)
|
||||
members.Remove(members[length])
|
||||
|
||||
//Replace the previous part of the code with this if it's unsafe to assume tiles have ALWAYS an /area AND a /turf
|
||||
/*while(members.len > 0)
|
||||
var/length = members.len
|
||||
var/member = members[length]
|
||||
|
||||
if(ispath(member,/area))
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(members_attributes[length])
|
||||
|
||||
instance = locate(member)
|
||||
instance.contents.Add(locate(xcrd,ycrd,zcrd))
|
||||
|
||||
if(_preloader && instance)
|
||||
_preloader.load(instance)
|
||||
|
||||
members.Remove(member)
|
||||
continue
|
||||
|
||||
else if(ispath(member,/turf))
|
||||
instance_atom(member,members_attributes[length],xcrd,ycrd,zcrd)
|
||||
members.Remove(member)
|
||||
continue
|
||||
|
||||
else
|
||||
break
|
||||
*/
|
||||
|
||||
//finally instance all remainings objects/mobs
|
||||
for(var/k=1,k<=members.len,k++)
|
||||
instance_atom(members[k],members_attributes[k],xcrd,ycrd,zcrd)
|
||||
|
||||
////////////////
|
||||
//Helpers procs
|
||||
////////////////
|
||||
|
||||
//Instance an atom at (x,y,z) and gives it the variables in attributes
|
||||
/dmm_suite/proc/instance_atom(var/path,var/list/attributes, var/x, var/y, var/z)
|
||||
var/atom/instance
|
||||
var/dmm_suite/preloader/_preloader = new(attributes)
|
||||
|
||||
instance = new path (locate(x,y,z), _preloader)//first preloader pass
|
||||
|
||||
if(_preloader && instance)//second preloader pass, as some variables may have been reset/changed by New()
|
||||
_preloader.load(instance)
|
||||
|
||||
//text trimming (both directions) helper proc
|
||||
//optionally removes quotes before and after the text (for variable name)
|
||||
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
|
||||
while(length(what) && (findtext(what," ",1,2)))// || findtext(what,quote,1,2)))
|
||||
what=copytext(what,2,0)
|
||||
while(length(what) && (findtext(what," ",length(what),0)))// || findtext(what,quote,length(what),0)))
|
||||
what=copytext(what,1,length(what))
|
||||
if(trim_quotes)
|
||||
while(length(what) && (findtext(what,quote,1,2)))
|
||||
what=copytext(what,2,0)
|
||||
while(length(what) && (findtext(what,quote,length(what),0)))
|
||||
what=copytext(what,1,length(what))
|
||||
return what
|
||||
|
||||
//find the position of the next delimiter,skipping whatever is comprised between opening_escape and closing_escape
|
||||
//returns 0 if reached the last delimiter
|
||||
/dmm_suite/proc/find_next_delimiter_position(var/text as text,var/initial_position as num, var/delimiter=",",var/opening_escape=quote,var/closing_escape=quote)
|
||||
var/position = initial_position
|
||||
var/next_delimiter = findtext(text,delimiter,position,0)
|
||||
var/next_opening = findtext(text,opening_escape,position,0)
|
||||
|
||||
while((next_opening != 0) && (next_opening < next_delimiter))
|
||||
position = findtext(text,closing_escape,next_opening + 1,0)+1
|
||||
next_delimiter = findtext(text,delimiter,position,0)
|
||||
next_opening = findtext(text,opening_escape,position,0)
|
||||
|
||||
return next_delimiter
|
||||
|
||||
|
||||
//build a list from variables in text form (e.g {var1="derp"; var2; var3=7} => list(var1="derp", var2, var3=7))
|
||||
//return the filled list
|
||||
/dmm_suite/proc/text2list(var/text as text,var/delimiter=",")
|
||||
|
||||
var/list/to_return = list()
|
||||
|
||||
var/position
|
||||
var/old_position = 1
|
||||
|
||||
do
|
||||
//find next delimiter that is not within "..."
|
||||
position = find_next_delimiter_position(text,old_position,delimiter)
|
||||
|
||||
//check if this is a simple variable (as in list(var1, var2)) or an associative one (as in list(var1="foo",var2=7))
|
||||
var/equal_position = findtext(text,"=",old_position, position)
|
||||
|
||||
var/trim_left = trim_text(copytext(text,old_position,(equal_position ? equal_position : position)),1)//the name of the variable, must trim quotes to build a BYOND compliant associatives list
|
||||
old_position = position + 1
|
||||
|
||||
if(equal_position)//associative var, so do the association
|
||||
var/trim_right = trim_text(copytext(text,equal_position+1,position))//the content of the variable
|
||||
|
||||
//Check for string
|
||||
if(findtext(trim_right,quote,1,2))
|
||||
trim_right = copytext(trim_right,2,findtext(trim_right,quote,3,0))
|
||||
|
||||
//Check for number
|
||||
else if(isnum(text2num(trim_right)))
|
||||
trim_right = text2num(trim_right)
|
||||
|
||||
//Check for file
|
||||
else if(copytext(trim_right,1,2) == "'")
|
||||
trim_right = file(copytext(trim_right,2,length(trim_right)))
|
||||
|
||||
//Check for list
|
||||
else if(copytext(trim_right,1,5) == "list")
|
||||
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
|
||||
|
||||
to_return[trim_left] = trim_right
|
||||
|
||||
else//simple var
|
||||
to_return[trim_left] = null
|
||||
|
||||
while(position != 0)
|
||||
|
||||
return to_return
|
||||
|
||||
//atom creation method that preloads variables before creation
|
||||
atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
|
||||
if(istype(_dmm_preloader, /dmm_suite/preloader))
|
||||
_dmm_preloader.load(src)
|
||||
. = ..()
|
||||
|
||||
//////////////////
|
||||
//Preloader datum
|
||||
//////////////////
|
||||
|
||||
/dmm_suite/preloader
|
||||
parent_type = /datum
|
||||
var/list/attributes
|
||||
|
||||
/dmm_suite/preloader/New(list/the_attributes)
|
||||
.=..()
|
||||
if(!the_attributes.len)
|
||||
Del()
|
||||
attributes = the_attributes
|
||||
|
||||
/dmm_suite/preloader/proc/load(atom/what)
|
||||
for(var/attribute in attributes)
|
||||
what.vars[attribute] = attributes[attribute]
|
||||
Del()
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
|
||||
CC.amount = 1
|
||||
CC.updateicon()
|
||||
CC.update_icon()
|
||||
overlays = list()
|
||||
string_attached = null
|
||||
user << "\blue You detach the string from the coin."
|
||||
|
||||
@@ -159,6 +159,8 @@
|
||||
matter = list("metal" = 50)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
edge = 1
|
||||
|
||||
/obj/item/weapon/shovel/spade
|
||||
name = "spade"
|
||||
|
||||
@@ -36,35 +36,29 @@
|
||||
else
|
||||
stored_ore[O.name] = 1
|
||||
|
||||
/obj/structure/ore_box/examine()
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
set src in view(usr.client) //If it can be seen, it can be examined.
|
||||
/obj/structure/ore_box/examine(mob/user)
|
||||
user << "That's an [src]."
|
||||
user << desc
|
||||
|
||||
if (!( usr ))
|
||||
return
|
||||
usr << "That's an [src]."
|
||||
usr << desc
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
|
||||
if(!istype(user, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
|
||||
return
|
||||
|
||||
if(!Adjacent(usr)) //Can only check the contents of ore boxes if you can physically reach them.
|
||||
if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them.
|
||||
return
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!contents.len)
|
||||
usr << "It is empty."
|
||||
user << "It is empty."
|
||||
return
|
||||
|
||||
if(world.time > last_update + 10)
|
||||
update_ore_count()
|
||||
last_update = world.time
|
||||
|
||||
usr << "It holds:"
|
||||
user << "It holds:"
|
||||
for(var/ore in stored_ore)
|
||||
usr << "- [stored_ore[ore]] [ore]"
|
||||
user << "- [stored_ore[ore]] [ore]"
|
||||
return
|
||||
|
||||
|
||||
@@ -95,4 +89,12 @@
|
||||
O.loc = src.loc
|
||||
usr << "\blue You empty the ore box"
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/ore_box/ex_act(severity)
|
||||
if(severity == 1.0 || (severity < 3.0 && prob(50)))
|
||||
for (var/obj/item/weapon/ore/O in contents)
|
||||
O.loc = src.loc
|
||||
O.ex_act(severity++)
|
||||
del(src)
|
||||
return
|
||||
@@ -200,10 +200,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
|
||||
S.Crossed(src)
|
||||
|
||||
/mob/dead/observer/examine()
|
||||
if(usr)
|
||||
usr << desc
|
||||
|
||||
/mob/dead/observer/can_use_hands() return 0
|
||||
/mob/dead/observer/is_active() return 0
|
||||
|
||||
@@ -550,3 +546,48 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
W.message = message
|
||||
W.add_hiddenprint(src)
|
||||
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
|
||||
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in view())
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
|
||||
return 1
|
||||
|
||||
/mob/dead/proc/manifest()
|
||||
verbs += /mob/dead/proc/toggle_visibility
|
||||
toggle_visibility()
|
||||
|
||||
/mob/dead/proc/toggle_icon(var/icon)
|
||||
if(!client)
|
||||
return
|
||||
|
||||
var/iconRemoved = 0
|
||||
for(var/image/I in client.images)
|
||||
if(I.icon_state == icon)
|
||||
iconRemoved = 1
|
||||
del(I)
|
||||
|
||||
if(!iconRemoved)
|
||||
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
|
||||
client.images += J
|
||||
|
||||
/mob/dead/proc/toggle_visibility()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle Visibility"
|
||||
set desc = "Allows you to turn (in)visible (almost) at will."
|
||||
|
||||
var/toggled_invisible
|
||||
|
||||
if(invisibility && world.time < toggled_invisible + 600)
|
||||
src << "You must gather strength before you can turn visible again..."
|
||||
return
|
||||
|
||||
if(invisibility == 0)
|
||||
toggled_invisible = world.time
|
||||
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible</span>")
|
||||
else
|
||||
src << "<span class='info>You are now visible</span>"
|
||||
|
||||
invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
|
||||
// Give the ghost a cult icon which should be visible only to itself
|
||||
toggle_icon("cult")
|
||||
|
||||
@@ -181,6 +181,31 @@
|
||||
update_inv_wear_mask(0)
|
||||
return
|
||||
|
||||
/mob/proc/unEquip(obj/item/I, force = 0) //Force overrides NODROP for things like wizarditis and admin undress.
|
||||
if(!I) //If there's nothing to drop, the drop is automatically successful. If(unEquip) should generally be used to check for NODROP.
|
||||
return 1
|
||||
|
||||
/*if((I.flags & NODROP) && !force)
|
||||
return 0*/
|
||||
|
||||
if(!I.canremove && !force)
|
||||
return 0
|
||||
|
||||
if(I == r_hand)
|
||||
r_hand = null
|
||||
update_inv_r_hand()
|
||||
else if(I == l_hand)
|
||||
l_hand = null
|
||||
update_inv_l_hand()
|
||||
|
||||
if(I)
|
||||
if(client)
|
||||
client.screen -= I
|
||||
I.loc = loc
|
||||
I.dropped(src)
|
||||
if(I)
|
||||
I.layer = initial(I.layer)
|
||||
return 1
|
||||
|
||||
//Attemps to remove an object on a mob. Will not move it to another area or such, just removes from the mob.
|
||||
/mob/proc/remove_from_mob(var/obj/O)
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "alien"
|
||||
pass_flags = PASSTABLE
|
||||
melee_damage_lower = 1
|
||||
melee_damage_upper = 3
|
||||
attacktext = "bites"
|
||||
attack_sound = null
|
||||
friendly = "nuzzles"
|
||||
wall_smash = 0
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
|
||||
|
||||
@@ -14,128 +14,14 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/M as mob)
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
if(istype(M,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = M
|
||||
if(S.melee_damage_upper == 0)
|
||||
S.emote("[S.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[S]</B> [S.attacktext] [src]!", 1)
|
||||
var/damage = rand(S.melee_damage_lower, S.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
S.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [S.name] ([S.ckey])</font>")
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.use(2500)
|
||||
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall.", 2)
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
if (health > 0)
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (M.health >= -75.0)
|
||||
if ((M.head && M.head.flags & 4) || (M.wear_mask && !( M.wear_mask.flags & 32 )) )
|
||||
M << "\blue <B>Remove that mask!</B>"
|
||||
return
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn( 0 )
|
||||
O.process()
|
||||
return
|
||||
|
||||
if ("grab")
|
||||
if (M == src)
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
/mob/living/carbon/alien/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == "help")
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
if(istype(M))
|
||||
//Let people pick the little buggers up.
|
||||
if(M.a_intent == "help")
|
||||
if(M.species && M.species.name == "Diona")
|
||||
M << "You feel your being twine with that of [src] as it merges with your biomass."
|
||||
src << "You feel your being twine with that of [M] as you merge with its biomass."
|
||||
src.verbs += /mob/living/carbon/alien/diona/proc/split
|
||||
src.verbs -= /mob/living/carbon/alien/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
@@ -5,8 +5,6 @@
|
||||
speak_emote = list("hisses")
|
||||
icon_state = "larva"
|
||||
language = "Hivemind"
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 6
|
||||
|
||||
amount_grown = 0
|
||||
max_grown = 200
|
||||
|
||||
@@ -42,16 +42,12 @@
|
||||
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
|
||||
callHook("debrain", list(brainmob))
|
||||
|
||||
/obj/item/organ/brain/examine() // -- TLE
|
||||
set src in oview(12)
|
||||
if (!( usr ))
|
||||
return
|
||||
usr << "This is \icon[src] \an [name]."
|
||||
|
||||
/obj/item/organ/brain/examine(mob/user) // -- TLE
|
||||
..(user)
|
||||
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
|
||||
usr << "You can feel the small spark of life still left in this one."
|
||||
user << "You can feel the small spark of life still left in this one."
|
||||
else
|
||||
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
|
||||
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
|
||||
|
||||
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)
|
||||
|
||||
|
||||
@@ -92,15 +92,10 @@
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
|
||||
|
||||
/obj/item/device/mmi/posibrain/examine()
|
||||
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
/obj/item/device/mmi/posibrain/examine(mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
@@ -113,7 +108,7 @@
|
||||
else
|
||||
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
|
||||
msg += "<span class='info'>*---------*</span>"
|
||||
usr << msg
|
||||
user << msg
|
||||
return
|
||||
|
||||
/obj/item/device/mmi/posibrain/emp_act(severity)
|
||||
|
||||
@@ -83,22 +83,6 @@
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/attack_paw(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
|
||||
if(D.spread_by_touch())
|
||||
M.contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
|
||||
if(D.spread_by_touch())
|
||||
contract_disease(D, 0, 1, CONTACT_HANDS)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
shock_damage *= siemens_coeff
|
||||
|
||||
@@ -24,10 +24,6 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
var/strength = 5
|
||||
var/attached = 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_paw(user as mob) //can be picked up by aliens
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(user as mob)
|
||||
|
||||
if((stat == CONSCIOUS && !sterile))
|
||||
@@ -47,15 +43,15 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
else
|
||||
del(src)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/examine()
|
||||
..()
|
||||
/obj/item/clothing/mask/facehugger/examine(mob/user)
|
||||
..(user)
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
usr << "\red \b [src] is not moving."
|
||||
user << "\red \b [src] is not moving."
|
||||
if(CONSCIOUS)
|
||||
usr << "\red \b [src] seems to be active."
|
||||
user << "\red \b [src] seems to be active."
|
||||
if (sterile)
|
||||
usr << "\red \b It looks like the proboscis has been removed."
|
||||
user << "\red \b It looks like the proboscis has been removed."
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attackby()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
cold_level_2 = -1
|
||||
cold_level_3 = -1
|
||||
|
||||
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON
|
||||
flags = NO_BREATHE | NO_SCAN | NO_PAIN | NO_SLIP | NO_POISON
|
||||
|
||||
reagent_tag = IS_XENOS
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
if (!M)
|
||||
message = "<B>[src]</B> points."
|
||||
else
|
||||
M.point()
|
||||
pointed(M)
|
||||
|
||||
if (M)
|
||||
message = "<B>[src]</B> points to [M]."
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
/mob/living/carbon/human/examine()
|
||||
set src in view()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( usr.sdisabilities & BLIND || usr.blinded || usr.stat==UNCONSCIOUS )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/examine(mob/user)
|
||||
var/skipgloves = 0
|
||||
var/skipsuitstorage = 0
|
||||
var/skipjumpsuit = 0
|
||||
@@ -71,56 +64,56 @@
|
||||
tie_msg += " with \icon[U.hastie] \a [U.hastie]"
|
||||
|
||||
if(w_uniform.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] blood-stained [w_uniform.name][tie_msg]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[w_uniform] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != "#030303") ? "blood" : "oil"]-stained [w_uniform.name][tie_msg]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[w_uniform] \a [w_uniform][tie_msg].\n"
|
||||
|
||||
//head
|
||||
if(head)
|
||||
if(head.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[head] [head.gender==PLURAL?"some":"a"] blood-stained [head.name] on [t_his] head!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[head] [head.gender==PLURAL?"some":"a"] [(head.blood_color != "#030303") ? "blood" : "oil"]-stained [head.name] on [t_his] head!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[head] \a [head] on [t_his] head.\n"
|
||||
|
||||
//suit/armour
|
||||
if(wear_suit)
|
||||
if(wear_suit.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_suit] [wear_suit.gender==PLURAL?"some":"a"] blood-stained [wear_suit.name]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[wear_suit] [wear_suit.gender==PLURAL?"some":"a"] [(wear_suit.blood_color != "#030303") ? "blood" : "oil"]-stained [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[wear_suit] \a [wear_suit].\n"
|
||||
|
||||
//suit/armour storage
|
||||
if(s_store && !skipsuitstorage)
|
||||
if(s_store.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[s_store] [s_store.gender==PLURAL?"some":"a"] blood-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] carrying \icon[s_store] [s_store.gender==PLURAL?"some":"a"] [(s_store.blood_color != "#030303") ? "blood" : "oil"]-stained [s_store.name] on [t_his] [wear_suit.name]!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] carrying \icon[s_store] \a [s_store] on [t_his] [wear_suit.name].\n"
|
||||
|
||||
//back
|
||||
if(back)
|
||||
if(back.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[back] [back.gender==PLURAL?"some":"a"] blood-stained [back] on [t_his] back.</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[back] [back.gender==PLURAL?"some":"a"] [(back.blood_color != "#030303") ? "blood" : "oil"]-stained [back] on [t_his] back.</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[back] \a [back] on [t_his] back.\n"
|
||||
|
||||
//left hand
|
||||
if(l_hand)
|
||||
if(l_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] blood-stained [l_hand.name] in [t_his] left hand!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[l_hand] [l_hand.gender==PLURAL?"some":"a"] [(l_hand.blood_color != "#030303") ? "blood" : "oil"]-stained [l_hand.name] in [t_his] left hand!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding \icon[l_hand] \a [l_hand] in [t_his] left hand.\n"
|
||||
|
||||
//right hand
|
||||
if(r_hand)
|
||||
if(r_hand.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] blood-stained [r_hand.name] in [t_his] right hand!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] holding \icon[r_hand] [r_hand.gender==PLURAL?"some":"a"] [(r_hand.blood_color != "#030303") ? "blood" : "oil"]-stained [r_hand.name] in [t_his] right hand!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] holding \icon[r_hand] \a [r_hand] in [t_his] right hand.\n"
|
||||
|
||||
//gloves
|
||||
if(gloves && !skipgloves)
|
||||
if(gloves.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[gloves] [gloves.gender==PLURAL?"some":"a"] blood-stained [gloves.name] on [t_his] hands!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[gloves] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != "#030303") ? "blood" : "oil"]-stained [gloves.name] on [t_his] hands!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[gloves] \a [gloves] on [t_his] hands.\n"
|
||||
else if(blood_DNA)
|
||||
@@ -138,14 +131,14 @@
|
||||
//belt
|
||||
if(belt)
|
||||
if(belt.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[belt] [belt.gender==PLURAL?"some":"a"] blood-stained [belt.name] about [t_his] waist!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[belt] [belt.gender==PLURAL?"some":"a"] [(belt.blood_color != "#030303") ? "blood" : "oil"]-stained [belt.name] about [t_his] waist!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[belt] \a [belt] about [t_his] waist.\n"
|
||||
|
||||
//shoes
|
||||
if(shoes && !skipshoes)
|
||||
if(shoes.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[shoes] [shoes.gender==PLURAL?"some":"a"] blood-stained [shoes.name] on [t_his] feet!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_is] wearing \icon[shoes] [shoes.gender==PLURAL?"some":"a"] [(shoes.blood_color != "#030303") ? "blood" : "oil"]-stained [shoes.name] on [t_his] feet!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] wearing \icon[shoes] \a [shoes] on [t_his] feet.\n"
|
||||
else if(feet_blood_DNA)
|
||||
@@ -154,14 +147,14 @@
|
||||
//mask
|
||||
if(wear_mask && !skipmask)
|
||||
if(wear_mask.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] blood-stained [wear_mask.name] on [t_his] face!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != "#030303") ? "blood" : "oil"]-stained [wear_mask.name] on [t_his] face!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[wear_mask] \a [wear_mask] on [t_his] face.\n"
|
||||
|
||||
//eyes
|
||||
if(glasses && !skipeyes)
|
||||
if(glasses.blood_DNA)
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[glasses] [glasses.gender==PLURAL?"some":"a"] blood-stained [glasses] covering [t_his] eyes!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] \icon[glasses] [glasses.gender==PLURAL?"some":"a"] [(glasses.blood_color != "#030303") ? "blood" : "oil"]-stained [glasses] covering [t_his] eyes!</span>\n"
|
||||
else
|
||||
msg += "[t_He] [t_has] \icon[glasses] \a [glasses] covering [t_his] eyes.\n"
|
||||
|
||||
@@ -447,7 +440,7 @@
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\n[t_He] is [pose]"
|
||||
|
||||
usr << msg
|
||||
user << msg
|
||||
|
||||
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
|
||||
/proc/hasHUD(mob/M as mob, hudtype)
|
||||
|
||||
@@ -186,25 +186,6 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor)
|
||||
if(armor >= 2) return
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default.
|
||||
if(!config.use_loyalty_implants && !override) return // Nuh-uh.
|
||||
|
||||
@@ -223,69 +204,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 35)
|
||||
else
|
||||
damage = rand(5, 25)
|
||||
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/human/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
@@ -293,8 +211,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/var/co2overloadtime = null
|
||||
/mob/living/carbon/human/var/temperature_resistance = T0C+75
|
||||
|
||||
@@ -715,11 +631,11 @@
|
||||
|
||||
if (href_list["lookitem"])
|
||||
var/obj/item/I = locate(href_list["lookitem"])
|
||||
I.examine()
|
||||
src.examinate(I)
|
||||
|
||||
if (href_list["lookmob"])
|
||||
var/mob/M = locate(href_list["lookmob"])
|
||||
M.examine()
|
||||
src.examinate(M)
|
||||
|
||||
if (href_list["flavor_change"])
|
||||
switch(href_list["flavor_change"])
|
||||
@@ -775,9 +691,12 @@
|
||||
return number
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
return species.has_fine_manipulation
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
|
||||
if(species.has_fine_manipulation)
|
||||
return 1
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/abiotic(var/full_body = 0)
|
||||
if(full_body && ((src.l_hand && !( src.l_hand.abstract )) || (src.r_hand && !( src.r_hand.abstract )) || (src.back || src.wear_mask || src.head || src.shoes || src.w_uniform || src.wear_suit || src.glasses || src.l_ear || src.r_ear || src.gloves)))
|
||||
|
||||
@@ -1,93 +1,72 @@
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/M as mob)
|
||||
|
||||
var/datum/organ/external/temp = M:organs_by_name["r_hand"]
|
||||
if (M.hand)
|
||||
temp = M:organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
M << "\red You can't use your [temp.display_name]."
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H))
|
||||
var/datum/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if(H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
H << "\red You can't use your [temp.display_name]."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if((M != src) && check_shields(0, M.name))
|
||||
visible_message("\red <B>[M] attempted to touch [src]!</B>")
|
||||
return 0
|
||||
// Should this all be in Touch()?
|
||||
if(istype(H))
|
||||
if((H != src) && check_shields(0, H.name))
|
||||
visible_message("\red <B>[H] attempted to touch [src]!</B>")
|
||||
return 0
|
||||
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.use(2500)
|
||||
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Stungloved [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stungloved by [M.name] ([M.ckey])</font>")
|
||||
|
||||
msg_admin_attack("[M.name] ([M.ckey]) stungloved [src.name] ([src.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)")
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
apply_effects(5,5,0,0,5,0,0,armorblock)
|
||||
return 1
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
|
||||
return
|
||||
|
||||
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
|
||||
if(istype(H.gloves, /obj/item/clothing/gloves/boxing/hologlove))
|
||||
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
|
||||
visible_message("\red <B>[H] has attempted to punch [src]!</B>")
|
||||
return 0
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(HULK in H.mutations)
|
||||
damage += 5
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has punched [src]!</B>")
|
||||
visible_message("\red <B>[H] has punched [src]!</B>")
|
||||
|
||||
apply_damage(damage, HALLOSS, affecting, armor_block)
|
||||
if(damage >= 9)
|
||||
visible_message("\red <B>[M] has weakened [src]!</B>")
|
||||
visible_message("\red <B>[H] has weakened [src]!</B>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
|
||||
return
|
||||
else
|
||||
if(istype(M,/mob/living/carbon))
|
||||
// log_debug("No gloves, [M] is truing to infect [src]")
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
if(istype(M,/mob/living/carbon))
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if(health >= config.health_threshold_crit)
|
||||
|
||||
if(istype(H) && health < config.health_threshold_crit)
|
||||
|
||||
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove your mask!</B>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
H << "\blue <B>Remove [src]'s mask!</B>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
else
|
||||
help_shake_act(M)
|
||||
return 1
|
||||
// if(M.health < -75) return 0
|
||||
|
||||
if((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\blue <B>Remove your mask!</B>"
|
||||
return 0
|
||||
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
|
||||
M << "\blue <B>Remove his mask!</B>"
|
||||
return 0
|
||||
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human()
|
||||
O.source = M
|
||||
O.target = src
|
||||
O.s_loc = M.loc
|
||||
O.t_loc = loc
|
||||
O.place = "CPR"
|
||||
requests += O
|
||||
spawn(0)
|
||||
O.process()
|
||||
return 1
|
||||
|
||||
if("grab")
|
||||
@@ -111,11 +90,15 @@
|
||||
|
||||
if("hurt")
|
||||
|
||||
if(!istype(H))
|
||||
attack_generic(H,rand(1,3),"punched")
|
||||
return
|
||||
|
||||
// See if they can attack, and which attacks to use.
|
||||
var/datum/unarmed_attack/attack = M.species.unarmed
|
||||
if(!attack.is_usable(M))
|
||||
attack = M.species.secondary_unarmed
|
||||
if(!attack.is_usable(M))
|
||||
var/datum/unarmed_attack/attack = H.species.unarmed
|
||||
if(!attack.is_usable(H))
|
||||
attack = H.species.secondary_unarmed
|
||||
if(!attack.is_usable(H))
|
||||
return 0 // COMMENT: This means that there's no way the secondary attack gets used, ever. Needs work ~Hubble
|
||||
|
||||
if(attack_move) return 0
|
||||
@@ -123,24 +106,24 @@
|
||||
var/damage = rand(1, 5)
|
||||
var/block = 0
|
||||
var/accurate = 0
|
||||
var/target_zone = check_zone(M.zone_sel.selecting) // The zone that was targeted
|
||||
var/target_zone = check_zone(H.zone_sel.selecting) // The zone that was targeted
|
||||
var/hit_zone = target_zone // The zone that is actually hit
|
||||
var/datum/organ/external/affecting = get_organ(hit_zone)
|
||||
|
||||
// Snowflakey magboot stomp
|
||||
if(src.lying && M.canmove && !M.lying && M.shoes && istype(M.shoes, /obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/mboots = M.shoes
|
||||
if(src.lying && H.canmove && !H.lying && H.shoes && istype(H.shoes, /obj/item/clothing/shoes/magboots))
|
||||
var/obj/item/clothing/shoes/magboots/mboots = H.shoes
|
||||
if(mboots.magpulse)
|
||||
visible_message("\red [M] raises one of \his magboots over [src]'s [affecting.display_name]...")
|
||||
visible_message("\red [H] raises one of \his magboots over [src]'s [affecting.display_name]...")
|
||||
attack_move = 1
|
||||
spawn(20)
|
||||
if(M.canmove && !M.lying && M.Adjacent(src) && src.lying)
|
||||
visible_message("\red <B>[M] stomps \his magboot down on [src]'s [affecting.display_name] with full force!</B>")
|
||||
if(H.canmove && !H.lying && H.Adjacent(src) && src.lying)
|
||||
visible_message("\red <B>[H] stomps \his magboot down on [src]'s [affecting.display_name] with full force!</B>")
|
||||
apply_damage(rand(20,30), BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
playsound(loc, 'sound/weapons/genhit3.ogg', 25, 1, -1)
|
||||
attack_move = 0
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Magboot-stomped [src.name] ([src.ckey])</font>")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>Magboot-stomped [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been magboot-stomped by [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(M)] magboot-stomped [key_name(src)]")
|
||||
return 0
|
||||
@@ -167,33 +150,33 @@
|
||||
hit_zone = ran_zone(target_zone)
|
||||
if(prob(15) && hit_zone != "chest") // Missed!
|
||||
playsound(loc, attack.miss_sound, 25, 1, -1)
|
||||
visible_message("\red <B>[M] attempted to punch [src]!</B>")
|
||||
visible_message("\red <B>[H] attempted to punch [src]!</B>")
|
||||
visible_message("\red [pick("The punch barely misses their [affecting.display_name]!", "[src] manages to dodge narrowly!")]")
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [pick(attack.attack_verb)] [src.name] ([src.ckey]) (dodged)</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Dodged attack by [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(M)] attempted to [pick(attack.attack_verb)] [key_name(src)] (dodged)")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [pick(attack.attack_verb)] [src.name] ([src.ckey]) (dodged)</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Dodged attack by [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(H)] attempted to [pick(attack.attack_verb)] [key_name(src)] (dodged)")
|
||||
return 0
|
||||
if(block)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("\red <B>[M] went for [src]'s [affecting.display_name] but was blocked!</B>")
|
||||
visible_message("\red <B>[H] went for [src]'s [affecting.display_name] but was blocked!</B>")
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [pick(attack.attack_verb)] [src.name] ([src.ckey]) (blocked)</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Blocked attack by [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(M)] attempted to [pick(attack.attack_verb)] [key_name(src)] (blocked)")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>attempted to [pick(attack.attack_verb)] [src.name] ([src.ckey]) (blocked)</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Blocked attack by [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(H)] attempted to [pick(attack.attack_verb)] [key_name(src)] (blocked)")
|
||||
return 0
|
||||
|
||||
// Handle the attack logs
|
||||
attack.combat_log(M, src, hit_zone, damage)
|
||||
attack.combat_log(H, src, hit_zone, damage)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[pick(attack.attack_verb)]ed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [pick(attack.attack_verb)]ed by [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[key_name(M)] [pick(attack.attack_verb)]ed [key_name(src)]")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[pick(attack.attack_verb)]ed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [pick(attack.attack_verb)]ed by [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(H)] [pick(attack.attack_verb)]ed [key_name(src)]")
|
||||
|
||||
// This here is where buffs go
|
||||
if(M.mind && (M.mind.special_role == "Ninja" || M.mind.special_role == "Changeling"))
|
||||
if(H.mind && (H.mind.special_role == "Ninja" || H.mind.special_role == "Changeling"))
|
||||
damage += 2 // We assume Ninjas and Changelings are slightly better in combat than the usual human
|
||||
if(HULK in M.mutations)
|
||||
if(HULK in H.mutations)
|
||||
damage *= 2 // Hulks do twice the damage
|
||||
|
||||
var/armor_block = run_armor_check(affecting, "melee") // IMPORTANT: To run armor check after attack log as it produces a log itself
|
||||
@@ -231,12 +214,11 @@
|
||||
// Sum up species damage bonus at the very end so xenos don't get buffed stun chances
|
||||
damage += attack.damage // 3 for human/skrell, 5 for tajaran/unathi
|
||||
|
||||
playsound(M.loc, attack.attack_sound, 25, 1, -1)
|
||||
playsound(H.loc, attack.attack_sound, 25, 1, -1)
|
||||
|
||||
// Finally, apply damage to target
|
||||
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge)
|
||||
|
||||
|
||||
if("disarm")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")
|
||||
@@ -312,4 +294,20 @@
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
|
||||
var/dam_zone = pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg", "groin")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/mob/living/carbon/human/attack_paw(mob/M as mob)
|
||||
..()
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
var/mob/living/carbon/human/H = src
|
||||
src = null
|
||||
src = H.monkeyize()
|
||||
contract_disease(D,1,0)
|
||||
return
|
||||
@@ -55,6 +55,9 @@
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
|
||||
if(can_stand <= 1)
|
||||
tally += 5 //hopping around on one foot is slow
|
||||
|
||||
if(mRun in mutations)
|
||||
tally = 0
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
language = "Siik'tajr"
|
||||
tail = "tajtail"
|
||||
unarmed_type = /datum/unarmed_attack/claws
|
||||
secondary_unarmed_type = /datum/unarmed_attack/bite/eye_tooth
|
||||
darksight = 8
|
||||
|
||||
cold_level_1 = 200 //Default 260
|
||||
@@ -378,6 +379,7 @@
|
||||
deform = 'icons/mob/human_races/r_def_plant.dmi'
|
||||
language = "Rootspeak"
|
||||
unarmed_type = /datum/unarmed_attack/diona
|
||||
secondary_unarmed_type = null //Does a walking mass of dionaea even have jaws, as we understand them?
|
||||
primitive = /mob/living/carbon/alien/diona
|
||||
slowdown = 7
|
||||
rarity_value = 3
|
||||
@@ -444,6 +446,7 @@
|
||||
deform = 'icons/mob/human_races/r_machine.dmi'
|
||||
language = "Tradeband"
|
||||
unarmed_type = /datum/unarmed_attack/punch
|
||||
secondary_unarmed_type = null
|
||||
rarity_value = 2
|
||||
|
||||
eyes = "blank_eyes"
|
||||
@@ -520,6 +523,14 @@
|
||||
playsound(M.loc, attack_sound, 25, 1, -1)
|
||||
|
||||
/datum/unarmed_attack/bite
|
||||
attack_verb = list("bite") // 'x has biteed y', needs work.
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
shredding = 0
|
||||
damage = 3
|
||||
sharp = 0
|
||||
edge = 0
|
||||
|
||||
/datum/unarmed_attack/bite/eye_tooth
|
||||
attack_verb = list("bite") // 'x has biteed y', needs work.
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
shredding = 0
|
||||
@@ -550,7 +561,7 @@
|
||||
if(T == M)
|
||||
M.visible_message("\red <B>[M] [pick(attack_verb)]ed \himself in the [organ]!</B>")
|
||||
return 0
|
||||
if(!M.lying)
|
||||
if(!T.lying)
|
||||
switch(skill)
|
||||
if(0)
|
||||
switch(zone)
|
||||
@@ -607,7 +618,7 @@
|
||||
switch(damage)
|
||||
if(1 to 4) M.visible_message("\red <B>[M] kicked [T] in \his [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] stomped down hard on [T]'s [organ]!")
|
||||
else if (M.loc != M.loc)
|
||||
else if (M.loc != T.loc)
|
||||
M.visible_message("\red <B>[M] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "rams their foot into")] [T]'s [organ]!</B>")
|
||||
else
|
||||
M.visible_message("\red <B>[M] [pick("punches", "throws a punch", "strikes", "slaps", "rams their [pick(attack_noun)] into")] [T]'s [organ]!</B>")
|
||||
@@ -619,7 +630,7 @@
|
||||
damage = 5
|
||||
|
||||
/datum/unarmed_attack/claws
|
||||
attack_verb = list("scratch", "claw", "gouge", "tear", "rip")
|
||||
attack_verb = list("scratch", "claw", "gouge")
|
||||
attack_noun = list("claws")
|
||||
attack_sound = 'sound/weapons/slice.ogg'
|
||||
miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
@@ -640,67 +651,23 @@
|
||||
if(T == M)
|
||||
M.visible_message("\red <B>[M] [pick(attack_verb)]ed \himself in the [organ]!</B>")
|
||||
return 0
|
||||
if(!M.lying)
|
||||
switch(skill)
|
||||
if(0)
|
||||
switch(zone)
|
||||
if("head", "chest", "l_arm", "r_arm", "l_hand", "r_hand")
|
||||
M.visible_message("\red <B>[M] [pick("flailed", "thrashed")] at [T]'s [organ]!</B>")
|
||||
if("groin", "l_leg", "r_leg", "l_foot", "r_foot")
|
||||
M.visible_message("\red <B>[M] [pick("kicked", "thrashed")] at [T]'s [organ]!</B>")
|
||||
if(1 to 2) // Amateur, Trained
|
||||
switch(zone)
|
||||
if("head")
|
||||
// ----- HEAD ----- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] slapped [T] across \his cheek!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] struck [T] in the head[pick("", " with a closed fist")]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] gave [T] a resounding slap to the face!</B>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand")
|
||||
// -- UPPER BODY -- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] slapped [T]'s [organ]!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] [findtext(zone, "hand")?"[pick(attack_verb)]ed":pick("[pick(attack_verb)]ed", "shoulders")] [T] in \his [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] rammed \his [pick(attack_noun)] into [T]'s [organ]!</B>")
|
||||
if("groin", "l_leg", "r_leg")
|
||||
// -- LOWER BODY -- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] gave [T] a light kick to the [organ]!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] [pick("kicked", "kneed")] [T] in \his [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] landed a strong kick against [T]'s [organ]!</B>")
|
||||
if("l_foot", "r_foot")
|
||||
// ----- FEET ----- //
|
||||
switch(damage)
|
||||
if(1 to 4) M.visible_message("\red <B>[M] kicked [T] in \his [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] stomped down hard on [T]'s [organ]!")
|
||||
if(3) // Professional
|
||||
switch(zone)
|
||||
if("head")
|
||||
// ----- HEAD ----- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] threw a [pick("jab", "cross", "hook")] punch against [T]'s head!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] threw an uppercut on [T]!</B>")
|
||||
if(5 to 6) M.visible_message("\red <B>[M] grabbed [T]'s head and gave \him a strong headbutt!</B>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand")
|
||||
// -- UPPER BODY -- //
|
||||
switch(damage)
|
||||
if(1 to 4) M.visible_message("\red <B>[M] [findtext(zone, "hand")?"[pick(attack_verb)]ed":pick("[pick(attack_verb)]ed", "shoulders")] [T] in \his [organ]!</B>")
|
||||
if(5 to 6) M.visible_message("\red <B>[M] rammed \his [pick(attack_noun)] into [T]'s [organ]!</B>")
|
||||
if("groin", "l_leg", "r_leg")
|
||||
// -- LOWER BODY -- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] threw a light [pick("front", "side")] kick against [T]'s [organ]!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] gave [T] a [pick("knee strike", "kick")] in \his [organ]!</B>")
|
||||
if(5 to 6) M.visible_message("\red <B>[M] threw a strong [pick("front", "side", "roundhouse")] kick against [T]'s [organ]!</B>")
|
||||
if("l_foot", "r_foot")
|
||||
// ----- FEET ----- //
|
||||
switch(damage)
|
||||
if(1 to 4) M.visible_message("\red <B>[M] kicked [T] in \his [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] stomped down hard on [T]'s [organ]!")
|
||||
else if (M.loc != M.loc)
|
||||
M.visible_message("\red <B>[M] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "rams their foot into")] [T]'s [organ]!</B>")
|
||||
else
|
||||
M.visible_message("\red <B>[M] [pick("punches", "throws a punch", "strikes", "slaps", "rams their [pick(attack_noun)] into")] [T]'s [organ]!</B>")
|
||||
switch(skill)
|
||||
if(0)
|
||||
M.visible_message("\red <B>[M] [pick("flailed", "clawed")] at [T]'s [organ]!</B>")
|
||||
if(1 to 3)
|
||||
switch(zone)
|
||||
if("head")
|
||||
// ----- HEAD ----- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] scratched [T] across \his cheek!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [pick("", "the side of")][T] [pick("head", "neck")][pick("", " with spread [pick(attack_noun)]")]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [T] across \his face!</B>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
|
||||
// ----- BODY ----- //
|
||||
switch(damage)
|
||||
if(1 to 2) M.visible_message("\red <B>[M] scratched [T]'s [organ]!</B>")
|
||||
if(3 to 4) M.visible_message("\red <B>[M] [pick(attack_verb)]ed [pick("", "the side of")][T]'s [organ]!</B>")
|
||||
if(5) M.visible_message("\red <B>[M] digs \his [pick(attack_noun)] deep into [T]'s [organ]!</B>")
|
||||
|
||||
/datum/unarmed_attack/claws/strong
|
||||
attack_verb = list("slash")
|
||||
|
||||
@@ -862,7 +862,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
var/t_state = r_hand.item_state
|
||||
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
|
||||
if(r_hand.icon_override)
|
||||
@@ -880,7 +880,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
var/t_state = l_hand.item_state
|
||||
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
|
||||
if(l_hand.icon_override)
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
/mob/living/carbon/slime/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
/mob/living/carbon/slime/examine(mob/user)
|
||||
..(user)
|
||||
var/msg = ""
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
|
||||
else
|
||||
@@ -33,5 +27,5 @@
|
||||
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
usr << msg
|
||||
user << msg
|
||||
return
|
||||
@@ -83,7 +83,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
UnarmedAttack(Target)
|
||||
return
|
||||
if(!Target.lying && prob(80))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
Atkcool = 0
|
||||
|
||||
if(Target.Adjacent(src))
|
||||
Target.attack_slime(src)
|
||||
UnarmedAttack(Target)
|
||||
|
||||
else
|
||||
if(!Atkcool && Target.Adjacent(src))
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
|
||||
if(nutrition <= get_hunger_nutrition() && !Atkcool)
|
||||
if (is_adult || prob(5))
|
||||
AM.attack_slime(src)
|
||||
UnarmedAttack(AM)
|
||||
spawn()
|
||||
Atkcool = 1
|
||||
sleep(45)
|
||||
@@ -253,84 +253,7 @@
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
|
||||
"<span class='userdanger'> The [M.name] has glomped [src]!</span>")
|
||||
var/damage = rand(1, 3)
|
||||
attacked += 5
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(1, 6)
|
||||
else
|
||||
damage = rand(1, 3)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
attacked += 10
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/slime/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey)))
|
||||
return // Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
if (health > 0)
|
||||
attacked += 10
|
||||
//playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] has attacked [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attacked [src]!</span>")
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -387,18 +310,6 @@
|
||||
|
||||
return
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.use(2500)
|
||||
visible_message("<span class='warning'>[src] has been touched with the stun gloves by [M]!</span>")
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
|
||||
@@ -21,3 +21,16 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/slime/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
if (speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer.Add(speaker)
|
||||
speech_buffer.Add(lowertext(html_decode(message)))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
|
||||
if (speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer.Add(speaker)
|
||||
speech_buffer.Add(lowertext(html_decode(message)))
|
||||
..()
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
/mob/living/carbon/monkey/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
/mob/living/carbon/monkey/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
var/msg = ""
|
||||
if (src.handcuffed)
|
||||
msg += "It is \icon[src.handcuffed] handcuffed!\n"
|
||||
if (src.wear_mask)
|
||||
@@ -41,5 +35,5 @@
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
user << msg
|
||||
return
|
||||
@@ -143,58 +143,7 @@
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
return
|
||||
|
||||
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
|
||||
..()
|
||||
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
else
|
||||
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
|
||||
if ((prob(75) && health > 0))
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
|
||||
var/damage = rand(1, 5)
|
||||
adjustBruteLoss(damage)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/jungle_fever))
|
||||
contract_disease(D,1,0)
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M.name] has attempted to bite [name]!</B>", 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if (istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
M << "No attacking people at spawn, you jackass."
|
||||
return
|
||||
|
||||
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = M.gloves
|
||||
if(G.cell)
|
||||
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
|
||||
if(G.cell.charge >= 2500)
|
||||
G.cell.use(2500)
|
||||
Weaken(5)
|
||||
if (stuttering < 5)
|
||||
stuttering = 5
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if (O.client)
|
||||
O.show_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>", 1, "\red You hear someone fall", 2)
|
||||
return
|
||||
else
|
||||
M << "\red Not enough charge! "
|
||||
return
|
||||
|
||||
if (M.a_intent == "help")
|
||||
help_shake_act(M)
|
||||
@@ -254,82 +203,6 @@
|
||||
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/attack_animal(mob/living/M as mob)
|
||||
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_slime(mob/living/carbon/slime/M as mob)
|
||||
if (!ticker)
|
||||
M << "You cannot attack people before the game has started."
|
||||
return
|
||||
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
|
||||
if (health > -100)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] glomps []!</B>", src), 1)
|
||||
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
if(M.powerlevel > 0)
|
||||
var/stunprob = 10
|
||||
var/power = M.powerlevel + rand(0,3)
|
||||
|
||||
switch(M.powerlevel)
|
||||
if(1 to 2) stunprob = 20
|
||||
if(3 to 4) stunprob = 30
|
||||
if(5 to 6) stunprob = 40
|
||||
if(7 to 8) stunprob = 60
|
||||
if(9) stunprob = 70
|
||||
if(10) stunprob = 95
|
||||
|
||||
if(prob(stunprob))
|
||||
M.powerlevel -= 3
|
||||
if(M.powerlevel < 0)
|
||||
M.powerlevel = 0
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if (stuttering < power)
|
||||
stuttering = power
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
if (prob(stunprob) && M.powerlevel >= 8)
|
||||
adjustFireLoss(M.powerlevel * rand(6,10))
|
||||
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/monkey/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
@@ -393,8 +266,10 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
//Unless its monkey mode monkeys cant use advanced tools
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser(var/silent)
|
||||
if(!silent)
|
||||
src << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/monkey/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/italics=0, var/message_range = world.view, var/list/used_radios = list())
|
||||
@@ -412,4 +287,4 @@
|
||||
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
@@ -1,3 +1,25 @@
|
||||
//mob verbs are faster than object verbs. See mob/verb/examine.
|
||||
/mob/living/verb/pulled(atom/movable/AM as mob|obj in oview(1))
|
||||
set name = "Pull"
|
||||
set category = "Object"
|
||||
|
||||
if(AM.Adjacent(src))
|
||||
src.start_pulling(AM)
|
||||
|
||||
return
|
||||
|
||||
//mob verbs are faster than object verbs. See above.
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in view())
|
||||
if(src.stat || !src.canmove || src.restrained())
|
||||
return 0
|
||||
if(src.status_flags & FAKEDEATH)
|
||||
return 0
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
usr.visible_message("<b>[src]</b> points to [A]")
|
||||
return 1
|
||||
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
|
||||
@@ -179,3 +179,15 @@
|
||||
return 0
|
||||
|
||||
// End BS12 momentum-transfer code.
|
||||
|
||||
/mob/living/attack_generic(var/mob/user, var/damage, var/attack_message)
|
||||
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
adjustBruteLoss(damage)
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [user.name] ([user.ckey])</font>")
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
spawn(1) updatehealth()
|
||||
return 1
|
||||
|
||||
@@ -37,12 +37,4 @@
|
||||
|
||||
var/tod = null // Time of death
|
||||
var/update_slimes = 1
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
|
||||
// Putting these here for attack_animal().
|
||||
var/melee_damage_lower = 0
|
||||
var/melee_damage_upper = 0
|
||||
var/attacktext = "attacks"
|
||||
var/attack_sound = null
|
||||
var/friendly = "nuzzles"
|
||||
var/wall_smash = 0
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
@@ -12,6 +12,8 @@ var/list/department_radio_keys = list(
|
||||
":w" = "whisper", "#w" = "whisper", ".w" = "whisper",
|
||||
":t" = "Mercenary", "#t" = "Mercenary", ".t" = "Mercenary",
|
||||
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
|
||||
":v" = "Service", "#v" = "Service", ".v" = "Service",
|
||||
":o" = "AI Private", "#o" = "AI Private", ".o" = "AI Private",
|
||||
|
||||
":R" = "right ear", "#R" = "right ear", ".R" = "right ear",
|
||||
":L" = "left ear", "#L" = "left ear", ".L" = "left ear",
|
||||
@@ -25,6 +27,8 @@ var/list/department_radio_keys = list(
|
||||
":W" = "whisper", "#W" = "whisper", ".W" = "whisper",
|
||||
":T" = "Mercenary", "#T" = "Mercenary", ".T" = "Mercenary",
|
||||
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
|
||||
":V" = "Service", "#V" = "Service", ".V" = "Service",
|
||||
":O" = "AI Private", "#O" = "AI Private", ".O" = "AI Private",
|
||||
|
||||
//kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
@@ -42,6 +46,21 @@ var/list/department_radio_keys = list(
|
||||
":<3A>" = "Supply", "#<23>" = "Supply", ".<2E>" = "Supply",
|
||||
)
|
||||
|
||||
|
||||
var/list/channel_to_radio_key = new
|
||||
proc/get_radio_key_from_channel(var/channel)
|
||||
var/key = channel_to_radio_key[channel]
|
||||
if(!key)
|
||||
for(var/radio_key in department_radio_keys)
|
||||
if(department_radio_keys[radio_key] == channel)
|
||||
key = radio_key
|
||||
break
|
||||
if(!key)
|
||||
key = ""
|
||||
channel_to_radio_key[channel] = key
|
||||
|
||||
return key
|
||||
|
||||
/mob/living/proc/binarycheck()
|
||||
|
||||
if (istype(src, /mob/living/silicon/pai))
|
||||
@@ -71,8 +90,7 @@ var/list/department_radio_keys = list(
|
||||
src.custom_emote(1, "[pick(speaking.signlang_verb)].")
|
||||
|
||||
if (speaking.flags & SIGNLANG)
|
||||
say_signlang(message, pick(speaking.signlang_verb), speaking)
|
||||
return 1
|
||||
return say_signlang(message, pick(speaking.signlang_verb), speaking)
|
||||
|
||||
//make sure the air can transmit speech
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
@@ -99,12 +117,6 @@ var/list/department_radio_keys = list(
|
||||
hearturfs += M.locs[1]
|
||||
for(var/obj/O in M.contents)
|
||||
listening_obj |= O
|
||||
if (isslime(I))
|
||||
var/mob/living/carbon/slime/S = I
|
||||
if (src in S.Friends)
|
||||
S.speech_buffer = list()
|
||||
S.speech_buffer.Add(src)
|
||||
S.speech_buffer.Add(lowertext(html_decode(message)))
|
||||
else if(istype(I, /obj/))
|
||||
var/obj/O = I
|
||||
hearturfs += O.locs[1]
|
||||
@@ -137,6 +149,7 @@ var/list/department_radio_keys = list(
|
||||
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.hear_signlang(message, verb, language, src)
|
||||
return 1
|
||||
|
||||
/obj/effect/speech_bubble
|
||||
var/mob/parent
|
||||
|
||||
@@ -16,7 +16,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/proc/ai_roster,
|
||||
/mob/living/silicon/ai/proc/ai_statuschange,
|
||||
/mob/living/silicon/ai/proc/ai_store_location,
|
||||
/mob/living/silicon/ai/proc/checklaws,
|
||||
/mob/living/silicon/ai/proc/ai_checklaws,
|
||||
/mob/living/silicon/ai/proc/control_integrated_radio,
|
||||
/mob/living/silicon/ai/proc/core,
|
||||
/mob/living/silicon/ai/proc/pick_icon,
|
||||
@@ -49,11 +49,7 @@ var/list/ai_verbs_default = list(
|
||||
var/obj/machinery/camera/camera = null
|
||||
var/list/connected_robots = list()
|
||||
var/aiRestorePowerRoutine = 0
|
||||
//var/list/laws = list()
|
||||
var/viewalerts = 0
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/lawchannel = "Common" // Default channel on which to state laws
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
var/obj/item/device/multitool/aiMulti = null
|
||||
@@ -121,7 +117,11 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
aiMulti = new(src)
|
||||
aiRadio = new(src)
|
||||
common_radio = aiRadio
|
||||
aiRadio.myAi = src
|
||||
additional_law_channels += "Binary"
|
||||
additional_law_channels += "Holopad"
|
||||
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
|
||||
|
||||
if (istype(loc, /turf))
|
||||
@@ -146,16 +146,7 @@ var/list/ai_verbs_default = list(
|
||||
if (B.brainmob.mind)
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
|
||||
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply click on it."
|
||||
src << "Use say :b to speak to your cyborgs through binary."
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
on_mob_init()
|
||||
|
||||
spawn(5)
|
||||
new /obj/machinery/ai_powersupply(src)
|
||||
@@ -174,10 +165,50 @@ var/list/ai_verbs_default = list(
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/on_mob_init()
|
||||
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply click on it."
|
||||
src << "Use say :b to speak to your cyborgs through binary. Use say :h to speak from an active holopad."
|
||||
src << "For department channels, use the following say commands:"
|
||||
|
||||
var/radio_text = ""
|
||||
for(var/i = 1 to common_radio.channels.len)
|
||||
var/channel = common_radio.channels[i]
|
||||
var/key = get_radio_key_from_channel(channel)
|
||||
radio_text += "[key] - [channel]"
|
||||
if(i != common_radio.channels.len)
|
||||
radio_text += ", "
|
||||
|
||||
src << radio_text
|
||||
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
|
||||
/mob/living/silicon/ai/Del()
|
||||
ai_list -= src
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/pointed(atom/A as mob|obj|turf in view())
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/proc/system_integrity()
|
||||
return (health-config.health_threshold_dead)/2
|
||||
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/ai/show_system_integrity()
|
||||
// An AI doesn't become inoperable until -100% (or whatever config.health_threshold_dead is set to)
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [system_integrity()]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
/mob/living/silicon/ai/proc/SetName(pickedName as text)
|
||||
real_name = pickedName
|
||||
name = pickedName
|
||||
@@ -427,7 +458,8 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/Topic(href, href_list)
|
||||
if(usr != src)
|
||||
return
|
||||
..()
|
||||
if(..())
|
||||
return
|
||||
if (href_list["mach_close"])
|
||||
if (href_list["mach_close"] == "aialerts")
|
||||
viewalerts = 0
|
||||
@@ -455,13 +487,6 @@ var/list/ai_verbs_default = list(
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawr"]) // Selects on which channel to state laws
|
||||
var/setchannel = input(usr, "Specify channel.", "Channel selection") in list("State","Common","Science","Command","Medical","Engineering","Security","Supply","Binary","Holopad", "Cancel")
|
||||
if(setchannel == "Cancel")
|
||||
return
|
||||
lawchannel = setchannel
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
@@ -517,20 +542,6 @@ var/list/ai_verbs_default = list(
|
||||
updatehealth()
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/ai/attack_animal(mob/living/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
/mob/living/silicon/ai/reset_view(atom/A)
|
||||
if(camera)
|
||||
camera.SetLuminosity(0)
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
/mob/living/silicon/ai/examine()
|
||||
set src in oview()
|
||||
|
||||
if(!usr || !src) return
|
||||
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
|
||||
usr << "<span class='notice'>Something is there but you can't see it.</span>"
|
||||
/mob/living/silicon/ai/examine(mob/user)
|
||||
if(!..(user))
|
||||
return
|
||||
|
||||
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <EM>[src]</EM>!\n"
|
||||
|
||||
var/msg = ""
|
||||
if (src.stat == DEAD)
|
||||
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
|
||||
else
|
||||
|
||||
@@ -17,21 +17,17 @@
|
||||
/mob/aiEye/Move()
|
||||
return 0
|
||||
|
||||
// Hide popout menu verbs
|
||||
/mob/aiEye/examine()
|
||||
/mob/aiEye/examinate(atom/A as mob|obj|turf in view())
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/aiEye/pull()
|
||||
/mob/aiEye/pointed(atom/A as mob|obj|turf in view())
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
|
||||
/mob/aiEye/point()
|
||||
set popup_menu = 0
|
||||
set src = usr.contents
|
||||
return 0
|
||||
/mob/aiEye/examine(mob/user)
|
||||
|
||||
// Use this when setting the aiEye's location.
|
||||
// It will also stream the chunk that the new loc is in.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user