mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
TG: (Might very possibly be broken. Didn't port most of the stuff due to it having been rewritten. - Erthilo)
Adds BS12 dismemberment. Not all features of it are implemented yet, but it should be equal to our previous system. Adds greater changeling code, but doesn't change the genome count yet on it. Renames registered to registered_name on IDs because bs12 had it and it seemed like a good idea to do last night. For some reason. Adds an afterattack to mobs that can be used. (In fairness, lots of shit in attack_hand should be in there instead, like stungloves and stuff, to minimize duplicated code) Revision: r3537 Author: VivianFoxfoot
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/structure/closet/secure_closet/personal/var/registered = null
|
||||
/obj/structure/closet/secure_closet/personal/var/registered_name = null
|
||||
/obj/structure/closet/secure_closet/personal/req_access = list(access_all_personal_lockers)
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
@@ -42,14 +42,14 @@
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered_name)))
|
||||
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked) src.icon_state = src.icon_locked
|
||||
else src.icon_state = src.icon_closed
|
||||
|
||||
if(!src.registered)
|
||||
src.registered = I.registered_name
|
||||
if(!src.registered_name)
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
src.name = "Personal Closet - [I.registered_name]"
|
||||
else
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
if (is_sharp(W))
|
||||
burst()
|
||||
|
||||
/proc/is_sharp(obj/item/W as obj)
|
||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/screwdriver) || \
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
@@ -483,6 +483,7 @@
|
||||
istype(W, /obj/item/weapon/shard) || \
|
||||
istype(W, /obj/item/weapon/reagent_containers/syringe) || \
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) || \
|
||||
istype(W,/obj/item/projectile)\
|
||||
)
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
var/datum/organ/external/temp = user:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
user << "\blue Yo- wait a minute."
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
for(var/mob/M in range(1, src.loc))
|
||||
if (M.s_active == src.loc)
|
||||
|
||||
@@ -67,18 +67,39 @@ FINGERPRINT CARD
|
||||
return
|
||||
/obj/item/weapon/card/id/syndicate/var/mob/registered_user = null
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!registered_user)
|
||||
registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
if(!src.registered_name)
|
||||
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
return
|
||||
src.assignment = u
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
registered_user = user
|
||||
else if(registered_user == user)
|
||||
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
|
||||
if("Rename")
|
||||
registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
|
||||
assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
|
||||
name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
return
|
||||
src.assignment = u
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
return
|
||||
if("Show")
|
||||
|
||||
Reference in New Issue
Block a user