mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-24 00:51:46 +00:00
- Hopefully this will cut down on the server spamming/crashing escapades happening on other servers. (This wont stop that from happening, this just makes it less severe) - Some of the sanitizes were probably unnecessary, but better safe then sorry. Added MAX_NAME_LEN constant which is initialized to 26. - Please use MAX_NAME_LEN instead of typing in 26 when cutting inputs short. 26's are annoying when they have to be changed and you have to hunt through over a hundred files and tens of thousands of lines of code to find them all. Moved uplink_kits.dm to code/game/objects/storage Moved uplinks.dm to code/game/objects - The stuff inside uplinks.dm could really be chopped up and split into separate dm files but this will do for now. ********************************************************* **********************Important************************** ********************************************************* When you create code that asks the user for an input consider whether or not it gets shown to the user through html or the like. If it does please sanatize() or strip_html() it. Also use copytext() to cutoff spam by using MAX_NAME_LEN and MAX_MESSAGE_LEN as the cutoff var. Revision: r3652 Author: johnsonmt88
44 lines
1.4 KiB
Plaintext
44 lines
1.4 KiB
Plaintext
/obj/item/weapon/gun/projectile/detective
|
|
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
|
|
name = "revolver"
|
|
icon_state = "detective"
|
|
caliber = "357"
|
|
origin_tech = "combat=2;materials=2"
|
|
ammo_type = "/obj/item/ammo_casing/c38"
|
|
|
|
|
|
special_check(var/mob/living/carbon/human/M)
|
|
/* if(ishuman(M))
|
|
if(istype(M.w_uniform, /obj/item/clothing/under/det) && istype(M.head, /obj/item/clothing/head/det_hat) && istype(M.wear_suit, /obj/item/clothing/suit/storage/det_suit))
|
|
return 1
|
|
M << "\red You just don't feel cool enough to use this gun looking like that."
|
|
return 0 */
|
|
return 1
|
|
|
|
|
|
verb/rename_gun()
|
|
set name = "Name Gun"
|
|
set category = "Object"
|
|
set desc = "Click to rename your gun. If you're the detective."
|
|
|
|
var/mob/M = usr
|
|
if(!M.mind) return 0
|
|
if(!M.mind.assigned_role == "Detective")
|
|
M << "\red You don't feel cool enough to name this gun, chump."
|
|
return 0
|
|
|
|
var/input = copytext(sanitize(input("What do you want to name the gun?",,"")),1,MAX_NAME_LEN)
|
|
|
|
if(src && input && !M.stat && in_range(M,src))
|
|
name = input
|
|
M << "You name the gun [input]. Say hello to your new friend."
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/obj/item/weapon/gun/projectile/mateba
|
|
name = "mateba"
|
|
desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo."
|
|
icon_state = "mateba"
|
|
origin_tech = "combat=2;materials=2" |