mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
- Moved another proc from datums/disease.dm to mob.dm so doubleclicking /mob actually gets you to the mob's definition.
- Two new admin verbs. "toggle hear radio" and "toggle hear deadcast". These don't care if you're a ghost or what you had for breakfast, they work because they're tied to your client, not your mob. To non-admins it might seem silly that this is needed but when dealing with multiple adminhelps you don't want text to move at lightning speed, so anything that you can disable is good. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2259 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -91,194 +91,6 @@ to null does not delete the object itself. Thank you.
|
||||
return result
|
||||
|
||||
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
if(stat >=2) return
|
||||
if(virus.type in resistances)
|
||||
if(prob(99.9)) return
|
||||
resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus.type))
|
||||
return // two viruses of the same kind can't infect a body at once!!
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
var/fail = 1
|
||||
for(var/name in virus.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(src, mob_type))
|
||||
fail = 0
|
||||
break
|
||||
if(fail) return
|
||||
|
||||
if(skip_this == 1)
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(src.virus) //
|
||||
//return //
|
||||
|
||||
|
||||
/*
|
||||
var/list/clothing_areas = list()
|
||||
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
|
||||
for(var/Covers in covers)
|
||||
clothing_areas[Covers] = list()
|
||||
|
||||
for(var/obj/item/clothing/Clothing in src)
|
||||
if(Clothing)
|
||||
for(var/Covers in covers)
|
||||
if(Clothing&Covers)
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
//chances to target this zone
|
||||
var/head_ch
|
||||
var/body_ch
|
||||
var/hands_ch
|
||||
var/feet_ch
|
||||
|
||||
switch(virus.spread_type)
|
||||
if(CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
else
|
||||
head_ch = 100
|
||||
body_ch = 100
|
||||
hands_ch = 25
|
||||
feet_ch = 25
|
||||
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head))
|
||||
Cl = H.head
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Head pass [passed]"
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Mask pass [passed]"
|
||||
if(2)//arms and legs included
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
if(passed && isobj(H.slot_w_uniform))
|
||||
Cl = H.slot_w_uniform
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Uniform pass [passed]"
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Gloves pass [passed]"
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Shoes pass [passed]"
|
||||
else
|
||||
src << "Something strange's going on, something's wrong."
|
||||
|
||||
/*if("feet")
|
||||
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100)
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(passed && virus.spread_type == AIRBORNE && internals)
|
||||
passed = (prob(50*virus.permeability_mod))
|
||||
|
||||
if(passed)
|
||||
//world << "Infection in the mob [src]. YAY"
|
||||
|
||||
|
||||
/*
|
||||
var/score = 0
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:gloves) score += 5
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(wear_mask)
|
||||
score += 5
|
||||
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
|
||||
score += 5
|
||||
if(internal)
|
||||
score += 5
|
||||
if(score > 20)
|
||||
return
|
||||
else if(score == 20 && prob(95))
|
||||
return
|
||||
else if(score >= 15 && prob(75))
|
||||
return
|
||||
else if(score >= 10 && prob(55))
|
||||
return
|
||||
else if(score >= 5 && prob(35))
|
||||
return
|
||||
else if(prob(15))
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source=null)
|
||||
//world << "Disease [src] proc spread was called from holder [source]"
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
var/karma = 0
|
||||
var/karma_spent = 0
|
||||
|
||||
var/STFU_ghosts //80+ rounds are fun to admin when text flies faster than airport security
|
||||
var/STFU_radio //80+ rounds are fun to admin when text flies faster than airport security
|
||||
|
||||
var/midis = 1 //Check if midis should be played for someone -- Urist
|
||||
var/bubbles = 1 //Check if bubbles should be displayed for someone -- Doohl
|
||||
|
||||
@@ -231,3 +231,192 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
switch (alert("Are you sure you wish to delete \the [A.name] at ([A.x],[A.y],[A.z]) ?", "Admin Delete Object","Yes","No"))
|
||||
if("Yes")
|
||||
log_admin("[usr.key] deleted [A.name] at ([A.x],[A.y],[A.z])")
|
||||
|
||||
|
||||
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
if(stat >=2) return
|
||||
if(virus.type in resistances)
|
||||
if(prob(99.9)) return
|
||||
resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus.type))
|
||||
return // two viruses of the same kind can't infect a body at once!!
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
var/fail = 1
|
||||
for(var/name in virus.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(src, mob_type))
|
||||
fail = 0
|
||||
break
|
||||
if(fail) return
|
||||
|
||||
if(skip_this == 1)
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(src.virus) //
|
||||
//return //
|
||||
|
||||
|
||||
/*
|
||||
var/list/clothing_areas = list()
|
||||
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
|
||||
for(var/Covers in covers)
|
||||
clothing_areas[Covers] = list()
|
||||
|
||||
for(var/obj/item/clothing/Clothing in src)
|
||||
if(Clothing)
|
||||
for(var/Covers in covers)
|
||||
if(Clothing&Covers)
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
//chances to target this zone
|
||||
var/head_ch
|
||||
var/body_ch
|
||||
var/hands_ch
|
||||
var/feet_ch
|
||||
|
||||
switch(virus.spread_type)
|
||||
if(CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
else
|
||||
head_ch = 100
|
||||
body_ch = 100
|
||||
hands_ch = 25
|
||||
feet_ch = 25
|
||||
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head))
|
||||
Cl = H.head
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Head pass [passed]"
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Mask pass [passed]"
|
||||
if(2)//arms and legs included
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
if(passed && isobj(H.slot_w_uniform))
|
||||
Cl = H.slot_w_uniform
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Uniform pass [passed]"
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Gloves pass [passed]"
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Shoes pass [passed]"
|
||||
else
|
||||
src << "Something strange's going on, something's wrong."
|
||||
|
||||
/*if("feet")
|
||||
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100)
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(passed && virus.spread_type == AIRBORNE && internals)
|
||||
passed = (prob(50*virus.permeability_mod))
|
||||
|
||||
if(passed)
|
||||
//world << "Infection in the mob [src]. YAY"
|
||||
|
||||
|
||||
/*
|
||||
var/score = 0
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:gloves) score += 5
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(wear_mask)
|
||||
score += 5
|
||||
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
|
||||
score += 5
|
||||
if(internal)
|
||||
score += 5
|
||||
if(score > 20)
|
||||
return
|
||||
else if(score == 20 && prob(95))
|
||||
return
|
||||
else if(score >= 15 && prob(75))
|
||||
return
|
||||
else if(score >= 10 && prob(55))
|
||||
return
|
||||
else if(score >= 5 && prob(35))
|
||||
return
|
||||
else if(prob(15))
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
@@ -233,6 +233,8 @@
|
||||
var/list/heard_garbled = list() // garbled message
|
||||
|
||||
for (var/mob/R in receive)
|
||||
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
continue
|
||||
if (R.say_understands(M))
|
||||
if (!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
|
||||
heard_masked += R
|
||||
@@ -282,7 +284,7 @@
|
||||
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
|
||||
//This following recording is intended for research and feedback in the use of department radio channels. It was added on 30.3.2011 by errorage.
|
||||
//This following recording is intended for research and feedback in the use of department radio channels.
|
||||
|
||||
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/blackbox_msg = "[part_a][M.name][part_blackbox_b][quotedmsg][part_c]"
|
||||
|
||||
@@ -220,6 +220,8 @@
|
||||
verbs += /obj/admins/proc/immreboot //immediate reboot
|
||||
verbs += /obj/admins/proc/restart //restart
|
||||
verbs += /client/proc/cmd_admin_create_centcom_report
|
||||
verbs += /client/proc/toggle_hear_deadcast
|
||||
verbs += /client/proc/toggle_hear_radio
|
||||
|
||||
|
||||
if (holder.level >= 0)//Mod********************************************************************
|
||||
@@ -381,6 +383,9 @@
|
||||
verbs -= /client/proc/toggleprayers
|
||||
verbs -= /client/proc/jump_to_dead_group
|
||||
verbs -= /client/proc/Blobize
|
||||
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
|
||||
verbs -= /client/proc/toggle_hear_deadcast
|
||||
verbs -= /client/proc/toggle_hear_radio
|
||||
return
|
||||
|
||||
|
||||
@@ -615,6 +620,22 @@
|
||||
using_new_click_proc = !using_new_click_proc
|
||||
world << "Testing of new click proc [using_new_click_proc ? "enabled" : "disabled"]"
|
||||
|
||||
/client/proc/toggle_hear_deadcast()
|
||||
set name = "Toggle Hear Deadcast"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder) return
|
||||
STFU_ghosts = !STFU_ghosts
|
||||
usr << "You will now [STFU_ghosts ? "hear" : "not hear"] ghsots"
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Toggle Hear Radio"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder) return
|
||||
STFU_radio = !STFU_radio
|
||||
usr << "You will now [STFU_radio ? "hear" : "not hear"] radio chatter from nearby radios or speakers"
|
||||
|
||||
/client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs
|
||||
set name = "Toggle most admin verb visibility"
|
||||
set category = "Admin"
|
||||
|
||||
@@ -314,57 +314,7 @@
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
M.show_message(rendered, 2)
|
||||
/*
|
||||
if(M.client)
|
||||
spawn()
|
||||
var/isbot = ""
|
||||
if(istype(src, /mob/living/silicon))
|
||||
isbot = "bot"
|
||||
|
||||
var/speechtype = "say"
|
||||
var/ending = copytext(message, length(message))
|
||||
if (ending == "?")
|
||||
speechtype = "question"
|
||||
else if (ending == "!")
|
||||
speechtype = "exclamation"
|
||||
|
||||
if(istype(M, /mob/living))
|
||||
if(M:ear_deaf && speechtype == "question")
|
||||
speechtype = "say"
|
||||
|
||||
var/obj/speech_bubble/B = new/obj/speech_bubble
|
||||
B.icon = 'speechbubble.dmi'
|
||||
B.parent = src
|
||||
B.mouse_opacity = 0
|
||||
B.invisibility = invisibility
|
||||
B.layer = 10
|
||||
|
||||
if(!M.client.bubbles || M == src)
|
||||
var/image/I = image('speechbubble.dmi', B, "override")
|
||||
I.override = 1
|
||||
M << I
|
||||
|
||||
flick("[isbot][speechtype]", B)
|
||||
|
||||
if(istype(loc, /turf))
|
||||
B.loc = loc
|
||||
else
|
||||
B.loc = loc.loc
|
||||
|
||||
sleep(11)
|
||||
del(B)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
for(var/obj/O in M) // This is terribly costly for such a unique circumstance, should probably do this a different way in the future -- TLE
|
||||
if(istype(O, /obj/item/device/aicard))
|
||||
for(var/mob/M2 in O)
|
||||
M2.show_message(rendered, 2)
|
||||
break
|
||||
break
|
||||
*/
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat == 2 || (M.client && M.client.holder && M.client.deadchat)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
M.show_message(rendered, 2)
|
||||
if(M.client && !M.client.STFU_ghosts) //Admin shut-off for ghosts chatter
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
/mob/proc/say_understands(var/mob/other)
|
||||
if (src.stat == 2)
|
||||
|
||||
Reference in New Issue
Block a user