mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
this kills the object verbs
This commit is contained in:
@@ -33,6 +33,11 @@
|
|||||||
var/semicd = 0 //cooldown handler
|
var/semicd = 0 //cooldown handler
|
||||||
var/heavy_weapon = 0
|
var/heavy_weapon = 0
|
||||||
|
|
||||||
|
var/unique_rename = 0 //allows renaming with a pen
|
||||||
|
var/unique_reskin = 0 //allows one-time reskinning
|
||||||
|
var/reskinned = 0 //whether or not the gun has been reskinned
|
||||||
|
var/list/options = list()
|
||||||
|
|
||||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||||
|
|
||||||
@@ -251,6 +256,11 @@
|
|||||||
S.update_brightness(user)
|
S.update_brightness(user)
|
||||||
update_icon()
|
update_icon()
|
||||||
verbs -= /obj/item/weapon/gun/proc/toggle_gunlight
|
verbs -= /obj/item/weapon/gun/proc/toggle_gunlight
|
||||||
|
|
||||||
|
if(unique_rename)
|
||||||
|
if(istype(A, /obj/item/weapon/pen))
|
||||||
|
rename_gun(user)
|
||||||
|
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -305,3 +315,34 @@
|
|||||||
if(F.on)
|
if(F.on)
|
||||||
user.AddLuminosity(-F.brightness_on)
|
user.AddLuminosity(-F.brightness_on)
|
||||||
SetLuminosity(F.brightness_on)
|
SetLuminosity(F.brightness_on)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/attack_hand(mob/user as mob)
|
||||||
|
if(unique_reskin && !reskinned && loc == user)
|
||||||
|
reskin_gun(user)
|
||||||
|
return
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/proc/reskin_gun(var/mob/M)
|
||||||
|
var/choice = input(M,"Warning, you can only reskin your weapon once!","Reskin Gun") in options
|
||||||
|
|
||||||
|
if(src && choice && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
|
||||||
|
if(sawn_state == SAWN_OFF)
|
||||||
|
icon_state = options[choice] + "-sawn"
|
||||||
|
if(icon_state == "[initial(icon_state)]-sawn")
|
||||||
|
return
|
||||||
|
else
|
||||||
|
icon_state = options[choice]
|
||||||
|
if(icon_state == initial(icon_state))
|
||||||
|
return
|
||||||
|
M << "Your gun is now skinned as [choice]. Say hello to your new friend."
|
||||||
|
reskinned = 1
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/proc/rename_gun(var/mob/M)
|
||||||
|
var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
||||||
|
|
||||||
|
if(src && input && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
|
||||||
|
name = input
|
||||||
|
M << "You name the gun [input]. Say hello to your new friend."
|
||||||
|
return
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
var/range_add = 0
|
var/range_add = 0
|
||||||
var/overheat_time = 20
|
var/overheat_time = 20
|
||||||
upgrades = list("diamond" = 0, "screwdriver" = 0, "plasma" = 0)
|
upgrades = list("diamond" = 0, "screwdriver" = 0, "plasma" = 0)
|
||||||
|
unique_rename = 1
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/kinetic_accelerator/newshot()
|
/obj/item/weapon/gun/energy/kinetic_accelerator/newshot()
|
||||||
..()
|
..()
|
||||||
@@ -161,6 +161,8 @@
|
|||||||
power_supply.rigged = 1 // This is dangerous!
|
power_supply.rigged = 1 // This is dangerous!
|
||||||
S.use(1)
|
S.use(1)
|
||||||
|
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/kinetic_accelerator/shoot_live_shot()
|
/obj/item/weapon/gun/energy/kinetic_accelerator/shoot_live_shot()
|
||||||
overheat = 1
|
overheat = 1
|
||||||
spawn(overheat_time)
|
spawn(overheat_time)
|
||||||
@@ -192,6 +194,7 @@
|
|||||||
origin_tech = "combat=2;magnets=2;syndicate=5"
|
origin_tech = "combat=2;magnets=2;syndicate=5"
|
||||||
suppressed = 1
|
suppressed = 1
|
||||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
||||||
|
unique_rename = 0
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
|
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
|
||||||
name = "energy crossbow"
|
name = "energy crossbow"
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
chamber_round()
|
chamber_round()
|
||||||
|
|
||||||
|
if(unique_rename)
|
||||||
|
if(istype(A, /obj/item/weapon/pen))
|
||||||
|
rename_gun(user)
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user as mob)
|
/obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user as mob)
|
||||||
var/num_unloaded = 0
|
var/num_unloaded = 0
|
||||||
while (get_ammo() > 0)
|
while (get_ammo() > 0)
|
||||||
@@ -57,6 +61,16 @@
|
|||||||
icon_state = "detective"
|
icon_state = "detective"
|
||||||
origin_tech = "combat=2;materials=2"
|
origin_tech = "combat=2;materials=2"
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||||
|
unique_rename = 1
|
||||||
|
unique_reskin = 1
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/projectile/revolver/detective/New()
|
||||||
|
..()
|
||||||
|
options["Leopard Spots"] = "detective_leopard"
|
||||||
|
options["Black Panther"] = "detective_panther"
|
||||||
|
options["Gold Trim"] = "detective_gold"
|
||||||
|
options["The Peacemaker"] = "detective_peacemaker"
|
||||||
|
options["Cancel"] = "detective"
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
|
/obj/item/weapon/gun/projectile/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, var/message = 1, params)
|
||||||
if(magazine.caliber != initial(magazine.caliber))
|
if(magazine.caliber != initial(magazine.caliber))
|
||||||
@@ -69,39 +83,6 @@
|
|||||||
return 0
|
return 0
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun()
|
|
||||||
set name = "Name Gun"
|
|
||||||
set category = "Object"
|
|
||||||
set desc = "Click to rename your gun."
|
|
||||||
|
|
||||||
var/mob/M = usr
|
|
||||||
var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
|
||||||
|
|
||||||
if(src && input && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
|
|
||||||
name = input
|
|
||||||
M << "You name the gun [input]. Say hello to your new friend."
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/detective/verb/reskin_gun()
|
|
||||||
set name = "Reskin gun"
|
|
||||||
set category = "Object"
|
|
||||||
set desc = "Click to reskin your gun."
|
|
||||||
|
|
||||||
var/mob/M = usr
|
|
||||||
var/list/options = list()
|
|
||||||
options["The Original"] = "detective"
|
|
||||||
options["Leopard Spots"] = "detective_leopard"
|
|
||||||
options["Black Panther"] = "detective_panther"
|
|
||||||
options["Gold Trim"] = "detective_gold"
|
|
||||||
options["The Peacemaker"] = "detective_peacemaker"
|
|
||||||
var/choice = input(M,"What do you want to skin the gun to?","Reskin Gun") in options
|
|
||||||
|
|
||||||
if(src && choice && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
|
|
||||||
icon_state = options[choice]
|
|
||||||
M << "Your gun is now skinned as [choice]. Say hello to your new friend."
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/detective/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
/obj/item/weapon/gun/projectile/revolver/detective/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||||
..()
|
..()
|
||||||
if(istype(A, /obj/item/weapon/screwdriver))
|
if(istype(A, /obj/item/weapon/screwdriver))
|
||||||
|
|||||||
@@ -139,6 +139,17 @@
|
|||||||
origin_tech = "combat=3;materials=1"
|
origin_tech = "combat=3;materials=1"
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
||||||
sawn_desc = "Omar's coming!"
|
sawn_desc = "Omar's coming!"
|
||||||
|
unique_rename = 1
|
||||||
|
unique_reskin = 1
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/projectile/revolver/doublebarrel/New()
|
||||||
|
..()
|
||||||
|
options["Dark Red Finish"] = "dshotgun-d"
|
||||||
|
options["Ash"] = "dshotgun-f"
|
||||||
|
options["Faded Grey"] = "dshotgun-g"
|
||||||
|
options["Maple"] = "dshotgun-l"
|
||||||
|
options["Rosewood"] = "dshotgun-p"
|
||||||
|
options["Cancel"] = "dshotgun"
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||||
..()
|
..()
|
||||||
@@ -179,6 +190,8 @@
|
|||||||
origin_tech = "combat=2;materials=2"
|
origin_tech = "combat=2;materials=2"
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/improvised
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/improvised
|
||||||
sawn_desc = "I'm just here for the gasoline."
|
sawn_desc = "I'm just here for the gasoline."
|
||||||
|
unique_rename = 0
|
||||||
|
unique_reskin = 0
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||||
..()
|
..()
|
||||||
@@ -193,7 +206,8 @@
|
|||||||
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
|
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
//Sawing guns related procs
|
// Sawing guns related procs //
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user as mob)
|
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user as mob)
|
||||||
. = 0
|
. = 0
|
||||||
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
|
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
|
||||||
@@ -228,7 +242,7 @@
|
|||||||
user.visible_message("<span class='warning'>[user] shortens \the [src]!</span>", "<span class='warning'>You shorten \the [src]!</span>")
|
user.visible_message("<span class='warning'>[user] shortens \the [src]!</span>", "<span class='warning'>You shorten \the [src]!</span>")
|
||||||
name = "sawn-off [src.name]"
|
name = "sawn-off [src.name]"
|
||||||
desc = sawn_desc
|
desc = sawn_desc
|
||||||
icon_state = initial(icon_state) + "-sawn"
|
icon_state = "[icon_state]-sawn"
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
item_state = "gun"
|
item_state = "gun"
|
||||||
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
||||||
@@ -240,6 +254,8 @@
|
|||||||
sawn_state = SAWN_INTACT
|
sawn_state = SAWN_INTACT
|
||||||
|
|
||||||
|
|
||||||
|
// Bulldog shotgun //
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
|
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
|
||||||
name = "syndicate shotgun"
|
name = "syndicate shotgun"
|
||||||
desc = "A semi-auto, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
desc = "A semi-auto, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user