mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 20:52:41 +00:00
PDAs can be used when buckled (and not in any other way restrained or stunned). Rejuvenate now completely heals a target or broken organs and viruses too.
This commit is contained in:
@@ -784,10 +784,10 @@
|
|||||||
#include "code\modules\customitems\item_defines.dm"
|
#include "code\modules\customitems\item_defines.dm"
|
||||||
#include "code\modules\customitems\item_spawning.dm"
|
#include "code\modules\customitems\item_spawning.dm"
|
||||||
#include "code\modules\destilery\main.dm"
|
#include "code\modules\destilery\main.dm"
|
||||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
#include "code\modules\detectivework\detective_work.dm"
|
||||||
#include "code\modules\DetectiveWork\evidence.dm"
|
#include "code\modules\detectivework\evidence.dm"
|
||||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
#include "code\modules\detectivework\footprints_and_rag.dm"
|
||||||
#include "code\modules\DetectiveWork\scanner.dm"
|
#include "code\modules\detectivework\scanner.dm"
|
||||||
#include "code\modules\events\alien_infestation.dm"
|
#include "code\modules\events\alien_infestation.dm"
|
||||||
#include "code\modules\events\blob.dm"
|
#include "code\modules\events\blob.dm"
|
||||||
#include "code\modules\events\brand_intelligence.dm"
|
#include "code\modules\events\brand_intelligence.dm"
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
if(!M.canmove)
|
if(M.stat || M.restrained() || M.paralysis || M.stunned || M.weakened)
|
||||||
return 0
|
return 0
|
||||||
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ))
|
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ))
|
||||||
return 1
|
return 1
|
||||||
@@ -306,7 +306,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
|
|
||||||
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
if((!istype(over_object, /obj/screen)) && !M.restrained() && !M.stat && can_use())
|
if((!istype(over_object, /obj/screen)) && can_use())
|
||||||
return attack_self(M)
|
return attack_self(M)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -520,7 +520,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||||
|
|
||||||
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
|
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
|
||||||
if ( !(U.stat || U.restrained()) )
|
|
||||||
|
|
||||||
add_fingerprint(U)
|
add_fingerprint(U)
|
||||||
U.set_machine(src)
|
U.set_machine(src)
|
||||||
@@ -741,10 +740,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
mode = text2num(href_list["choice"])
|
mode = text2num(href_list["choice"])
|
||||||
cartridge.mode = mode
|
cartridge.mode = mode
|
||||||
cartridge.unlock()
|
cartridge.unlock()
|
||||||
else//If can't interact.
|
|
||||||
U.unset_machine()
|
|
||||||
U << browse(null, "window=pda")
|
|
||||||
return
|
|
||||||
else//If not in range or not using the pda.
|
else//If not in range or not using the pda.
|
||||||
U.unset_machine()
|
U.unset_machine()
|
||||||
U << browse(null, "window=pda")
|
U << browse(null, "window=pda")
|
||||||
@@ -866,7 +861,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
if(issilicon(usr))
|
if(issilicon(usr))
|
||||||
return
|
return
|
||||||
|
|
||||||
if ( !(usr.stat || usr.restrained()) )
|
if ( can_use(usr) )
|
||||||
if(id)
|
if(id)
|
||||||
remove_id()
|
remove_id()
|
||||||
else
|
else
|
||||||
@@ -883,7 +878,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
if(issilicon(usr))
|
if(issilicon(usr))
|
||||||
return
|
return
|
||||||
|
|
||||||
if ( !(usr.stat || usr.restrained()) )
|
if ( can_use(usr) )
|
||||||
var/obj/item/weapon/pen/O = locate() in src
|
var/obj/item/weapon/pen/O = locate() in src
|
||||||
if(O)
|
if(O)
|
||||||
if (istype(loc, /mob))
|
if (istype(loc, /mob))
|
||||||
@@ -943,7 +938,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
|||||||
else
|
else
|
||||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||||
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||||
if(!(user.stat || user.restrained()) )//If they can still act.
|
if( can_use(user) )//If they can still act.
|
||||||
id_check(user, 2)
|
id_check(user, 2)
|
||||||
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
|
||||||
updateSelfDialog()//Update self dialog on success.
|
updateSelfDialog()//Update self dialog on success.
|
||||||
|
|||||||
@@ -2029,17 +2029,13 @@
|
|||||||
if("virus")
|
if("virus")
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","V")
|
feedback_add_details("admin_secrets_fun_used","V")
|
||||||
var/answer = alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose")
|
var/answer = alert("Do you want this to be a greater disease or a lesser one?",,"Greater","Lesser")
|
||||||
if(answer=="Random")
|
if(answer=="Lesser")
|
||||||
viral_outbreak()
|
virus2_lesser_infection()
|
||||||
message_admins("[key_name_admin(usr)] has triggered a virus outbreak", 1)
|
message_admins("[key_name_admin(usr)] has triggered a lesser virus outbreak.", 1)
|
||||||
else if(answer == "Choose")
|
|
||||||
var/list/viruses = list("fake gbs","gbs","magnitis","wizarditis",/*"beesease",*/"brain rot","cold","retrovirus","flu","pierrot's throat","rhumba beat")
|
|
||||||
var/V = input("Choose the virus to spread", "BIOHAZARD") in viruses
|
|
||||||
viral_outbreak(V)
|
|
||||||
message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [V]", 1)
|
|
||||||
else
|
else
|
||||||
AdminCreateVirus(usr)
|
virus2_greater_infection()
|
||||||
|
message_admins("[key_name_admin(usr)] has triggered a greater virus outbreak.", 1)
|
||||||
if("retardify")
|
if("retardify")
|
||||||
feedback_inc("admin_secrets_fun_used",1)
|
feedback_inc("admin_secrets_fun_used",1)
|
||||||
feedback_add_details("admin_secrets_fun_used","RET")
|
feedback_add_details("admin_secrets_fun_used","RET")
|
||||||
|
|||||||
@@ -269,6 +269,15 @@
|
|||||||
if(iscarbon(src))
|
if(iscarbon(src))
|
||||||
var/mob/living/carbon/C = src
|
var/mob/living/carbon/C = src
|
||||||
C.handcuffed = initial(C.handcuffed)
|
C.handcuffed = initial(C.handcuffed)
|
||||||
|
if(ishuman(src))
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
for(var/datum/organ/external/O in H.organs)
|
||||||
|
O.heal_damage(1000,1000,1,1)
|
||||||
|
for(var/datum/organ/internal/I in H.internal_organs)
|
||||||
|
I.damage = 0
|
||||||
|
for (var/ID in H.virus2)
|
||||||
|
var/datum/disease2/disease/V = H.virus2[ID]
|
||||||
|
V.cure(src)
|
||||||
for(var/datum/disease/D in viruses)
|
for(var/datum/disease/D in viruses)
|
||||||
D.cure(0)
|
D.cure(0)
|
||||||
if(stat == 2)
|
if(stat == 2)
|
||||||
|
|||||||
@@ -162,3 +162,27 @@ var/global/list/virusDB = list()
|
|||||||
v.fields["spread type"] = spreadtype
|
v.fields["spread type"] = spreadtype
|
||||||
virusDB["[uniqueID]"] = v
|
virusDB["[uniqueID]"] = v
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
proc/virus2_lesser_infection()
|
||||||
|
var/list/candidates = list() //list of candidate keys
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/human/G in player_list)
|
||||||
|
if(G.client && G.stat != DEAD)
|
||||||
|
candidates += G
|
||||||
|
if(!candidates.len) return
|
||||||
|
|
||||||
|
candidates = shuffle(candidates)
|
||||||
|
|
||||||
|
infect_mob_random_lesser(candidates[1])
|
||||||
|
|
||||||
|
proc/virus2_greater_infection()
|
||||||
|
var/list/candidates = list() //list of candidate keys
|
||||||
|
|
||||||
|
for(var/mob/living/carbon/human/G in player_list)
|
||||||
|
if(G.client && G.stat != DEAD)
|
||||||
|
candidates += G
|
||||||
|
if(!candidates.len) return
|
||||||
|
|
||||||
|
candidates = shuffle(candidates)
|
||||||
|
|
||||||
|
infect_mob_random_greater(candidates[1])
|
||||||
|
|||||||
Reference in New Issue
Block a user