mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Merge remote-tracking branch 'refs/remotes/PolarisSS13/master' into GunsGunsGuns
# Conflicts: # code/modules/projectiles/gun.dm
This commit is contained in:
@@ -107,7 +107,7 @@ datum/preferences/proc/set_biological_gender(var/gender)
|
||||
else if(href_list["metadata"])
|
||||
var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , pref.metadata)) as message|null
|
||||
if(new_metadata && CanUseTopic(user))
|
||||
pref.metadata = sanitize(new_metadata)
|
||||
pref.metadata = new_metadata
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -14,6 +14,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 200
|
||||
circuit = /obj/item/weapon/circuitboard/fax
|
||||
|
||||
var/obj/item/weapon/card/id/scan = null // identification
|
||||
var/authenticated = 0
|
||||
@@ -22,13 +23,11 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
var/destination = null // the department we're sending to
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/New()
|
||||
..()
|
||||
allfaxes += src
|
||||
if(!destination) destination = "[boss_name]"
|
||||
if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) )
|
||||
alldepartments |= department
|
||||
|
||||
circuit = new circuit(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -82,6 +82,13 @@
|
||||
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
var/tmp/lock_time = -100
|
||||
|
||||
var/dna_lock = 0 //whether or not the gun is locked to dna
|
||||
var/list/stored_dna = list() //list of the dna stored in the gun, used to allow users to use it or not
|
||||
var/safety_level = 0 //either 0 or 1, at 0 the game buzzes and tells the user they can't use it, at 1 it self destructs after 10 seconds
|
||||
var/controller_dna = null //The dna of the person who is the primary controller of the gun
|
||||
var/controller_lock = 0 //whether or not the gun is locked by the primar controller, 0 or 1, at 1 it is locked and does not allow
|
||||
var/exploding = 0
|
||||
|
||||
/obj/item/weapon/gun/New()
|
||||
..()
|
||||
for(var/i in 1 to firemodes.len)
|
||||
@@ -90,6 +97,11 @@
|
||||
if(isnull(scoped_accuracy))
|
||||
scoped_accuracy = accuracy
|
||||
|
||||
if(!dna_lock)
|
||||
verbs -= /obj/item/weapon/gun/verb/remove_dna
|
||||
verbs -= /obj/item/weapon/gun/verb/give_dna
|
||||
verbs -= /obj/item/weapon/gun/verb/allow_dna
|
||||
|
||||
/obj/item/weapon/gun/update_held_icon()
|
||||
if(requires_two_hands)
|
||||
var/mob/living/M = loc
|
||||
@@ -114,6 +126,20 @@
|
||||
return 0
|
||||
|
||||
var/mob/living/M = user
|
||||
if(dna_lock && stored_dna)
|
||||
if(!authorized_user(user))
|
||||
if(safety_level == 0)
|
||||
M << "<span class='danger'>\The [src] buzzes in dissapoint and displays an invalid DNA symbol.</span>"
|
||||
return 0
|
||||
if(!exploding)
|
||||
if(safety_level == 1)
|
||||
M << "<span class='danger'>\The [src] hisses in dissapointment.</span>"
|
||||
visible_message("<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>", "<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>")
|
||||
sleep(100)
|
||||
explosion(src, -1, 0, 2, 3, 0)
|
||||
exploding = 1
|
||||
qdel(src)
|
||||
return 0
|
||||
if(HULK in M.mutations)
|
||||
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
|
||||
return 0
|
||||
@@ -429,3 +455,80 @@
|
||||
|
||||
/obj/item/weapon/gun/attack_self(mob/user)
|
||||
switch_firemodes(user)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/obj/item/weapon/gun/proc/get_dna(mob/user)
|
||||
var/mob/living/M = user
|
||||
if(!controller_lock)
|
||||
|
||||
if(!stored_dna && !(M.dna in stored_dna))
|
||||
M << "<span class='warning'>\The [src] buzzes and displays a symbol showing the gun already contains your DNA.</span>"
|
||||
return 0
|
||||
else
|
||||
stored_dna += M.dna
|
||||
M << "<span class='notice'>\The [src] pings and a needle flicks out from the grip, taking a DNA sample from you.</span>"
|
||||
if(!controller_dna)
|
||||
controller_dna = M.dna
|
||||
M << "<span class='notice'>\The [src] processes the dna sample and pings, acknowledging you as the primary controller.</span>"
|
||||
return 1
|
||||
else
|
||||
M << "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA samples at this time.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/verb/give_dna()
|
||||
set name = "Give DNA"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
get_dna(usr)
|
||||
|
||||
/obj/item/weapon/gun/proc/clear_dna(mob/user)
|
||||
var/mob/living/M = user
|
||||
if(!controller_lock)
|
||||
if(!authorized_user(M))
|
||||
M << "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>"
|
||||
return 0
|
||||
else
|
||||
stored_dna -= user.dna
|
||||
M << "<span class='notice'>\The [src] beeps and clears the DNA it has stored.</span>"
|
||||
if(M.dna == controller_dna)
|
||||
controller_dna = null
|
||||
M << "<span class='notice'>\The [src] beeps and removes you as the primary controller.</span>"
|
||||
if(controller_lock)
|
||||
controller_lock = 0
|
||||
return 1
|
||||
else
|
||||
M << "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA modifcation at this time.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/verb/remove_dna()
|
||||
set name = "Remove DNA"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
clear_dna(usr)
|
||||
|
||||
/obj/item/weapon/gun/proc/toggledna(mob/user)
|
||||
var/mob/living/M = user
|
||||
if(authorized_user(M) && user.dna == controller_dna)
|
||||
if(!controller_lock)
|
||||
controller_lock = 1
|
||||
M << "<span class='notice'>\The [src] beeps and displays a locked symbol, informing you it will no longer allow DNA samples.</span>"
|
||||
else
|
||||
controller_lock = 0
|
||||
M << "<span class='notice'>\The [src] beeps and displays an unlocked symbol, informing you it will now allow DNA samples.</span>"
|
||||
else
|
||||
M << "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>"
|
||||
|
||||
/obj/item/weapon/gun/verb/allow_dna()
|
||||
set name = "Toggle DNA Samples Allowance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
toggledna(usr)
|
||||
|
||||
/obj/item/weapon/gun/proc/authorized_user(mob/user)
|
||||
if(!stored_dna || !stored_dna.len)
|
||||
return 1
|
||||
if(!(user.dna in stored_dna))
|
||||
return 0
|
||||
return 1
|
||||
>>>>>>> refs/remotes/PolarisSS13/master
|
||||
|
||||
@@ -510,7 +510,8 @@ other types of metals and chemistry for reagents).
|
||||
/datum/design/item/weapon/decloner
|
||||
id = "decloner"
|
||||
req_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 7, TECH_BIO = 5, TECH_POWER = 6)
|
||||
materials = list("gold" = 5000,"uranium" = 10000, "mutagen" = 40)
|
||||
materials = list("gold" = 5000,"uranium" = 10000)
|
||||
chemicals = list("mutagen" = 40)
|
||||
build_path = /obj/item/weapon/gun/energy/decloner
|
||||
sort_string = "TAAAE"
|
||||
|
||||
|
||||
@@ -93,6 +93,12 @@ var/global/list/xenoChemList = list("mutationtoxin",
|
||||
var/val = traits["[trait]"]
|
||||
return val
|
||||
|
||||
/datum/xeno/traits/proc/copy_traits(var/datum/xeno/traits/target)
|
||||
target.traits = traits
|
||||
target.chemlist = chemlist
|
||||
target.chems = chems
|
||||
target.source = source
|
||||
|
||||
/datum/xeno/traits/New()
|
||||
..()
|
||||
set_trait(TRAIT_XENO_COLOR, "#CACACA")
|
||||
|
||||
@@ -110,7 +110,8 @@
|
||||
icon_state = "scanner_1old"
|
||||
for(var/i=1 to occupant.cores)
|
||||
var/obj/item/xenoproduct/slime/core/C = new(src)
|
||||
C.traits = occupant.traitdat
|
||||
C.traits = new()
|
||||
occupant.traitdat.copy_traits(C.traits)
|
||||
|
||||
C.nameVar = occupant.nameVar
|
||||
|
||||
|
||||
@@ -13,11 +13,10 @@ Slime specific procs go here.
|
||||
traitdat.traits[TRAIT_XENO_HUNGER] = rand(1, 20)
|
||||
traitdat.traits[TRAIT_XENO_STARVEDAMAGE] = rand(1, 4)
|
||||
traitdat.traits[TRAIT_XENO_EATS] = prob(95) //Odds are, that thing'll need to eat.
|
||||
traitdat.traits[TRAIT_XENO_CHROMATIC] = prob(5)
|
||||
if(traitdat.traits[TRAIT_XENO_CHROMATIC])
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = prob(60) //Let's increase this probabilty.
|
||||
if(prob(10))
|
||||
traitdat.traits[TRAIT_XENO_CHROMATIC] = 1
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = 0
|
||||
else
|
||||
traitdat.traits[TRAIT_XENO_HOSTILE] = prob(30)
|
||||
traitdat.traits[TRAIT_XENO_GLOW_STRENGTH] = round(rand(1,3))
|
||||
traitdat.traits[TRAIT_XENO_GLOW_RANGE] = round(rand(1,3))
|
||||
traitdat.traits[TRAIT_XENO_STRENGTH] = round(rand(4,9))
|
||||
|
||||
@@ -29,10 +29,8 @@ Procs for targeting
|
||||
set_light(traitdat.traits[TRAIT_XENO_GLOW_RANGE], traitdat.traits[TRAIT_XENO_GLOW_STRENGTH], traitdat.traits[TRAIT_XENO_BIO_COLOR])
|
||||
else
|
||||
set_light(0, 0, "#000000") //Should kill any light that shouldn't be there.
|
||||
if(chromatic)
|
||||
hostile = 0 //No. No laser-reflecting hostile creatures. Bad.
|
||||
else
|
||||
hostile = traitdat.traits[TRAIT_XENO_HOSTILE]
|
||||
|
||||
hostile = traitdat.traits[TRAIT_XENO_HOSTILE]
|
||||
|
||||
speed = traitdat.traits[TRAIT_XENO_SPEED]
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
dat += "It bears no characters indicating resilience to damage.<br>"
|
||||
|
||||
if(growth_max)
|
||||
if(growth_level < 25)
|
||||
if(growth_level < 35)
|
||||
dat += "It appears to be far to growing up.<br>"
|
||||
else if(growth_level > 40)
|
||||
dat += "It appears to be close to growing up.<br>"
|
||||
|
||||
Reference in New Issue
Block a user