mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Merge pull request #1576 from ririchiyo/disease_fixes
Fixes some of the issue with some of the diseases spawning an infinite n...
This commit is contained in:
@@ -741,6 +741,7 @@ var/global/floorIsLava = 0
|
|||||||
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
|
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
|
||||||
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
|
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
|
||||||
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
|
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
|
||||||
|
<a href='?src=\ref[src];secretscoder=virus_custom'>Custom Virus Outbreak</a><BR>
|
||||||
<BR>
|
<BR>
|
||||||
<B>Coder Secrets</B><BR>
|
<B>Coder Secrets</B><BR>
|
||||||
<BR>
|
<BR>
|
||||||
|
|||||||
@@ -2582,6 +2582,10 @@
|
|||||||
J.total_positions = -1
|
J.total_positions = -1
|
||||||
J.spawn_positions = -1
|
J.spawn_positions = -1
|
||||||
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
|
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
|
||||||
|
if("virus_custom")
|
||||||
|
if(virus2_make_custom(usr.client))
|
||||||
|
feedback_add_details("admin_secrets_fun_used", "V_C")
|
||||||
|
message_admins("[key_name_admin(usr)] has trigger a custom virus outbreak.", 1)
|
||||||
|
|
||||||
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
|
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
|
||||||
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
|
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
/datum/disease2/disease/New(var/notes="No notes.")
|
/datum/disease2/disease/New(var/notes="No notes.")
|
||||||
uniqueID = rand(0,10000)
|
uniqueID = rand(0,10000)
|
||||||
log += "<br />[timestamp()] CREATED - [notes]"
|
log += "<br />[timestamp()] CREATED - [notes]<br>"
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/datum/disease2/disease/proc/makerandom(var/greater=0)
|
/datum/disease2/disease/proc/makerandom(var/greater=0)
|
||||||
@@ -34,6 +34,41 @@
|
|||||||
antigen |= text2num(pick(ANTIGENS))
|
antigen |= text2num(pick(ANTIGENS))
|
||||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||||
|
|
||||||
|
/proc/virus2_make_custom(client/C)
|
||||||
|
if(!C.holder || !istype(C))
|
||||||
|
return 0
|
||||||
|
if(!(C.holder.rights & R_DEBUG))
|
||||||
|
return 0
|
||||||
|
var/mob/living/carbon/infectedMob = input(C, "Select person to infect", "Infect Person") in (player_list) // get the selected mob
|
||||||
|
if(!istype(infectedMob))
|
||||||
|
return // return if isn't proper mob type
|
||||||
|
var/datum/disease2/disease/D = new /datum/disease2/disease("custom_disease") //set base name
|
||||||
|
for(var/i = 1; i <= D.max_stage; i++) // run through this loop until everything is set
|
||||||
|
var/datum/disease2/effect/sympton = input(C, "Choose a sympton to add ([5-i] remaining)", "Choose a Sympton") in ((typesof(/datum/disease2/effect) - /datum/disease2/effect)) // choose a sympton from the list of them
|
||||||
|
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder(infectedMob) // create the infectedMob as a holder for it.
|
||||||
|
holder.stage = i // set the stage of this holder equal to i.
|
||||||
|
var/datum/disease2/effect/f = new sympton // initalize the new sympton
|
||||||
|
holder.effect = f // assign the new sympton to the holder
|
||||||
|
holder.chance = input(C, "Choose chance", "Chance") as num // set the chance of the sympton that can occur
|
||||||
|
if(holder.chance > 100 || holder.chance < 0)
|
||||||
|
return 0
|
||||||
|
D.log += "[f.name] [holder.chance]%<br>"
|
||||||
|
D.effects += holder // add the holder to the disease
|
||||||
|
|
||||||
|
D.uniqueID = rand(0, 10000)
|
||||||
|
D.infectionchance = input(C, "Choose an infection rate percent", "Infection Rate") as num
|
||||||
|
if(D.infectionchance > 100 || D.infectionchance < 0)
|
||||||
|
return 0
|
||||||
|
//pick random antigens for the disease to have
|
||||||
|
D.antigen |= text2num(pick(ANTIGENS))
|
||||||
|
D.antigen |= text2num(pick(ANTIGENS))
|
||||||
|
|
||||||
|
D.spreadtype = input(C, "Select spread type", "Spread Type") in list("Airborne", "Contact") // select how the disease is spread
|
||||||
|
infectedMob.virus2["[D.uniqueID]"] = D // assign the disease datum to the infectedMob/ selected user.
|
||||||
|
log_admin("[infectedMob] was infected with a virus with uniqueID : [D.uniqueID] by [C.ckey]")
|
||||||
|
message_admins("[infectedMob] was infected with a virus with uniqueID : [D.uniqueID] by [C.ckey]")
|
||||||
|
return 1
|
||||||
|
|
||||||
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
||||||
if(dead)
|
if(dead)
|
||||||
cure(mob)
|
cure(mob)
|
||||||
|
|||||||
@@ -490,42 +490,39 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/datum/disease2/effect/elvis
|
/datum/disease2/effect/elvis
|
||||||
name = "Elvisism"
|
name = "Elvisism"
|
||||||
stage = 3
|
stage = 3
|
||||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||||
//
|
if(!istype(mob))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/H = mob
|
||||||
var/obj/item/clothing/glasses/virussunglasses = new /obj/item/clothing/glasses/virussunglasses
|
var/obj/item/clothing/glasses/virussunglasses = new /obj/item/clothing/glasses/virussunglasses
|
||||||
|
if(H.glasses && !istype(H.glasses, /obj/item/clothing/glasses/virussunglasses))
|
||||||
|
mob.u_equip(H.glasses)
|
||||||
|
mob.equip_to_slot(virussunglasses, slot_glasses)
|
||||||
|
if(!slot_glasses)
|
||||||
mob.equip_to_slot(virussunglasses, slot_glasses)
|
mob.equip_to_slot(virussunglasses, slot_glasses)
|
||||||
mob.confused += 10
|
mob.confused += 10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(pick(0,1))
|
if(pick(0,1))
|
||||||
mob.say(pick("Uh HUH!", "Thank you, Thank you very much...", "I ain't nothin' but a hound dog!", "Swing low, sweet chariot!"))
|
mob.say(pick("Uh HUH!", "Thank you, Thank you very much...", "I ain't nothin' but a hound dog!", "Swing low, sweet chariot!"))
|
||||||
else
|
else
|
||||||
mob.emote("me",1,pick("curls his lip!", "gyrates his hips!", "thrusts his hips!"))
|
mob.emote("me",1,pick("curls his lip!", "gyrates his hips!", "thrusts his hips!"))
|
||||||
|
|
||||||
if(istype(mob, /mob/living/carbon/human))
|
if(istype(H))
|
||||||
|
|
||||||
var/mob/living/carbon/human/H = mob
|
|
||||||
if(H.species.name == "Human" && !(H.f_style == "Pompadour"))
|
if(H.species.name == "Human" && !(H.f_style == "Pompadour"))
|
||||||
spawn(50)
|
spawn(50)
|
||||||
H.h_style = "Pompadour"
|
H.h_style = "Pompadour"
|
||||||
H.update_hair()
|
H.update_hair()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(H.species.name == "Human" && !(H.f_style == "Elvis Sideburns"))
|
if(H.species.name == "Human" && !(H.f_style == "Elvis Sideburns"))
|
||||||
spawn(50)
|
spawn(50)
|
||||||
H.f_style = "Elvis Sideburns"
|
H.f_style = "Elvis Sideburns"
|
||||||
H.update_hair()
|
H.update_hair()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/glasses/virussunglasses
|
/obj/item/clothing/glasses/virussunglasses
|
||||||
|
|
||||||
dropped(mob/user as mob)
|
dropped(mob/user as mob)
|
||||||
@@ -550,6 +547,10 @@
|
|||||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||||
//
|
//
|
||||||
var/obj/item/clothing/mask/gas/virusclown_hat = new /obj/item/clothing/mask/gas/virusclown_hat
|
var/obj/item/clothing/mask/gas/virusclown_hat = new /obj/item/clothing/mask/gas/virusclown_hat
|
||||||
|
if(mob.wear_mask && !istype(mob.wear_mask, /obj/item/clothing/mask/gas/virusclown_hat))
|
||||||
|
mob.u_equip(mob.wear_mask)
|
||||||
|
mob.equip_to_slot(virusclown_hat, slot_wear_mask)
|
||||||
|
if(!mob.wear_mask)
|
||||||
mob.equip_to_slot(virusclown_hat, slot_wear_mask)
|
mob.equip_to_slot(virusclown_hat, slot_wear_mask)
|
||||||
mob.reagents.add_reagent("psilocybin", 20)
|
mob.reagents.add_reagent("psilocybin", 20)
|
||||||
mob.say(pick("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk..."))
|
mob.say(pick("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk..."))
|
||||||
@@ -583,6 +584,10 @@ var/list/compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/mon
|
|||||||
|
|
||||||
|
|
||||||
var/obj/item/clothing/mask/horsehead/magic/magichead = new /obj/item/clothing/mask/horsehead/magic
|
var/obj/item/clothing/mask/horsehead/magic/magichead = new /obj/item/clothing/mask/horsehead/magic
|
||||||
|
if(mob.wear_mask && !istype(mob.wear_mask, /obj/item/clothing/mask/horsehead/magic))
|
||||||
|
mob.u_equip(mob.wear_mask)
|
||||||
|
mob.equip_to_slot(magichead, slot_wear_mask)
|
||||||
|
if(!mob.wear_mask)
|
||||||
mob.equip_to_slot(magichead, slot_wear_mask)
|
mob.equip_to_slot(magichead, slot_wear_mask)
|
||||||
mob << "<span class='warning'>You feel a little horse!</span>"
|
mob << "<span class='warning'>You feel a little horse!</span>"
|
||||||
|
|
||||||
|
|||||||
38
html/changelogs/Ririchiyo-PR-1576.yml
Normal file
38
html/changelogs/Ririchiyo-PR-1576.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscdel (general adding of nice things)
|
||||||
|
# rscadd (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
# tgs (TG-ported fixes?)
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: Ririchiyo
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
#delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||||
|
changes:
|
||||||
|
- rscadd: Added an add reagent verb for administrators.
|
||||||
|
- rscadd: Added a way for administrators to add custom virus2 diseases.
|
||||||
|
- bugfix: Fixed a couple of bugs with diseases where sunglasses, horse heads, and clown masks were replicating forever.
|
||||||
|
- experiment: Switched the preference system from flatfile over to an sqlite database -- expect there to be a few bugs.
|
||||||
Reference in New Issue
Block a user