Merge remote-tracking branch 'refs/remotes/ParadiseSS13/master' into freegolems

This commit is contained in:
datlo
2019-02-03 06:41:02 +00:00
68 changed files with 3222 additions and 3057 deletions
+56 -46
View File
@@ -333,25 +333,6 @@
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
/obj/item/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
if(!istype(H))
return
var/storedDir = H.dir //don't want to lose track of this
var/icon/faked = new()
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked.Insert(getFlatIcon(H), dir = WEST)
H.dir = SOUTH
faked.Insert(getFlatIcon(H), dir = SOUTH)
H.dir = storedDir
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
return faked
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
@@ -377,7 +358,7 @@
if("Show")
return ..()
if("Edit")
switch(input(user,"What would you like to edit on \the [src]?") in list("Name","Photo","Appearance","Sex","Age","Occupation","Money Account","Blood Type","DNA Hash","Fingerprint Hash","Reset Card"))
switch(input(user,"What would you like to edit on \the [src]?") in list("Name", "Photo", "Appearance", "Sex", "Age", "Occupation", "Money Account", "Blood Type", "DNA Hash", "Fingerprint Hash", "Reset Access", "Delete Card Information"))
if("Name")
var/new_name = reject_bad_name(input(user,"What name would you like to put on this card?","Agent Card Name", ishuman(user) ? user.real_name : user.name))
if(!Adjacent(user))
@@ -390,11 +371,14 @@
if("Photo")
if(!Adjacent(user))
return
var/icon/newphoto = fake_id_photo(user)
var/job_clothes = null
if(assignment)
job_clothes = assignment
var/icon/newphoto = get_id_photo(user, job_clothes)
if(!newphoto)
return
photo = newphoto
to_chat(user, "<span class='notice'>Photo changed.</span>")
to_chat(user, "<span class='notice'>Photo changed. Select another occupation and take a new photo if you wish to appear with different clothes.</span>")
RebuildHTML()
if("Appearance")
@@ -432,22 +416,41 @@
return
if(!choice)
return
src.icon_state = choice
icon_state = choice
switch(choice)
if("silver")
desc = "A silver card which shows honour and dedication."
if("gold")
desc = "A golden card which shows power and might."
if("clown")
desc = "Even looking at the card strikes you with deep fear."
if("mime")
desc = "..."
if("prisoner")
desc = "You are a number, you are not a free man."
if("centcom")
desc = "An ID straight from Central Command."
else
desc = "A card used to provide ID and determine access across the station."
to_chat(usr, "<span class='notice'>Appearance changed to [choice].</span>")
if("Sex")
var/new_sex = sanitize(stripped_input(user,"What sex would you like to put on this card?","Agent Card Sex", ishuman(user) ? capitalize(user.gender) : "Male", MAX_MESSAGE_LEN))
if(!Adjacent(user))
return
src.sex = new_sex
sex = new_sex
to_chat(user, "<span class='notice'>Sex changed to [new_sex].</span>")
RebuildHTML()
if("Age")
var/new_age = sanitize(stripped_input(user,"What age would you like to put on this card?","Agent Card Age","21", MAX_MESSAGE_LEN))
var/default = "21"
if(ishuman(user))
var/mob/living/carbon/human/H = user
default = H.age
var/new_age = sanitize(input(user,"What age would you like to be written on this card?","Agent Card Age", default) as text)
if(!Adjacent(user))
return
src.age = new_age
age = new_age
to_chat(user, "<span class='notice'>Age changed to [new_age].</span>")
RebuildHTML()
@@ -485,7 +488,7 @@
if(!Adjacent(user))
return
src.assignment = new_job
assignment = new_job
to_chat(user, "<span class='notice'>Occupation changed to [new_job].</span>")
UpdateName()
RebuildHTML()
@@ -507,7 +510,7 @@
var/new_blood_type = sanitize(input(user,"What blood type would you like to be written on this card?","Agent Card Blood Type",default) as text)
if(!Adjacent(user))
return
src.blood_type = new_blood_type
blood_type = new_blood_type
to_chat(user, "<span class='notice'>Blood type changed to [new_blood_type].</span>")
RebuildHTML()
@@ -521,7 +524,7 @@
var/new_dna_hash = sanitize(input(user,"What DNA hash would you like to be written on this card?","Agent Card DNA Hash",default) as text)
if(!Adjacent(user))
return
src.dna_hash = new_dna_hash
dna_hash = new_dna_hash
to_chat(user, "<span class='notice'>DNA hash changed to [new_dna_hash].</span>")
RebuildHTML()
@@ -535,26 +538,33 @@
var/new_fingerprint_hash = sanitize(input(user,"What fingerprint hash would you like to be written on this card?","Agent Card Fingerprint Hash",default) as text)
if(!Adjacent(user))
return
src.fingerprint_hash = new_fingerprint_hash
fingerprint_hash = new_fingerprint_hash
to_chat(user, "<span class='notice'>Fingerprint hash changed to [new_fingerprint_hash].</span>")
RebuildHTML()
if("Reset Card")
name = initial(name)
registered_name = initial(registered_name)
icon_state = initial(icon_state)
sex = initial(sex)
age = initial(age)
assignment = initial(assignment)
associated_account_number = initial(associated_account_number)
blood_type = initial(blood_type)
dna_hash = initial(dna_hash)
fingerprint_hash = initial(fingerprint_hash)
access = initial_access.Copy() // Initial() doesn't work on lists
registered_user = null
if("Reset Access")
var/response = alert(user, "Are you sure you want to reset access saved on the card?","Reset Access", "No", "Yes")
if(response == "Yes")
access = initial_access.Copy() // Initial() doesn't work on lists
to_chat(user, "<span class='notice'>Card access reset.</span>")
to_chat(user, "<span class='notice'>All information has been deleted from \the [src].</span>")
RebuildHTML()
if("Delete Card Information")
var/response = alert(user, "Are you sure you want to delete all information saved on the card?","Delete Card Information", "No", "Yes")
if(response == "Yes")
name = initial(name)
registered_name = initial(registered_name)
icon_state = initial(icon_state)
sex = initial(sex)
age = initial(age)
assignment = initial(assignment)
associated_account_number = initial(associated_account_number)
blood_type = initial(blood_type)
dna_hash = initial(dna_hash)
fingerprint_hash = initial(fingerprint_hash)
photo = null
registered_user = null
to_chat(user, "<span class='notice'>All information has been deleted from \the [src].</span>")
RebuildHTML()
else
..()
@@ -565,7 +575,7 @@
icon_state = "syndie"
assignment = "Syndicate Overlord"
untrackable = 1
access = list(access_syndicate, access_external_airlocks)
access = list(access_syndicate, access_syndicate_leader, access_syndicate_command, access_external_airlocks)
/obj/item/card/id/captains_spare
name = "captain's spare ID"
@@ -116,8 +116,9 @@
cure_text = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human)
severity = BIOHAZARD
disease_flags = CURABLE
disease_flags = CAN_CARRY
spread_flags = NON_CONTAGIOUS
virus_heal_resistant = TRUE
var/obj/item/storage/toolbox/green/memetic/progenitor = null
/datum/disease/memetic_madness/Destroy()
@@ -189,6 +189,17 @@
new /obj/item/grenade/empgrenade(src)
new /obj/item/implanter/emp/(src)
/obj/item/storage/box/syndie_kit/c4
name = "Pack of C-4 Explosives"
/obj/item/storage/box/syndie_kit/c4/New()
..()
new /obj/item/grenade/plastic/c4(src)
new /obj/item/grenade/plastic/c4(src)
new /obj/item/grenade/plastic/c4(src)
new /obj/item/grenade/plastic/c4(src)
new /obj/item/grenade/plastic/c4(src)
/obj/item/storage/box/syndie_kit/throwing_weapons
name = "boxed throwing kit"
can_hold = list(/obj/item/throwing_star, /obj/item/restraints/legcuffs/bola/tactical)