mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Scalpels use a var instead of a typecheck for clamping (#11317)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e9908c1ea3
commit
53887e109d
@@ -108,6 +108,7 @@
|
|||||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||||
drop_sound = 'sound/items/drop/knife.ogg'
|
drop_sound = 'sound/items/drop/knife.ogg'
|
||||||
|
var/clamp_chance = 0 // chance that the scalpel will perform cautery on its own
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Researchable Scalpels
|
* Researchable Scalpels
|
||||||
@@ -118,6 +119,7 @@
|
|||||||
icon_state = "scalpel_laser1"
|
icon_state = "scalpel_laser1"
|
||||||
damtype = "fire"
|
damtype = "fire"
|
||||||
hitsound = 'sound/weapons/blade1.ogg'
|
hitsound = 'sound/weapons/blade1.ogg'
|
||||||
|
clamp_chance = 75
|
||||||
|
|
||||||
/obj/item/surgical/scalpel/laser2
|
/obj/item/surgical/scalpel/laser2
|
||||||
name = "laser scalpel"
|
name = "laser scalpel"
|
||||||
@@ -126,6 +128,7 @@
|
|||||||
damtype = "fire"
|
damtype = "fire"
|
||||||
hitsound = 'sound/weapons/blade1.ogg'
|
hitsound = 'sound/weapons/blade1.ogg'
|
||||||
force = 12.0
|
force = 12.0
|
||||||
|
clamp_chance = 85
|
||||||
|
|
||||||
/obj/item/surgical/scalpel/laser3
|
/obj/item/surgical/scalpel/laser3
|
||||||
name = "laser scalpel"
|
name = "laser scalpel"
|
||||||
@@ -134,12 +137,14 @@
|
|||||||
damtype = "fire"
|
damtype = "fire"
|
||||||
hitsound = 'sound/weapons/blade1.ogg'
|
hitsound = 'sound/weapons/blade1.ogg'
|
||||||
force = 15.0
|
force = 15.0
|
||||||
|
clamp_chance = 95
|
||||||
|
|
||||||
/obj/item/surgical/scalpel/manager
|
/obj/item/surgical/scalpel/manager
|
||||||
name = "incision management system"
|
name = "incision management system"
|
||||||
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps."
|
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps."
|
||||||
icon_state = "scalpel_manager"
|
icon_state = "scalpel_manager"
|
||||||
force = 7.5
|
force = 7.5
|
||||||
|
clamp_chance = 100
|
||||||
|
|
||||||
/obj/item/surgical/scalpel/ripper
|
/obj/item/surgical/scalpel/ripper
|
||||||
name = "jagged scalpel"
|
name = "jagged scalpel"
|
||||||
|
|||||||
@@ -108,13 +108,10 @@
|
|||||||
affected.open = 1
|
affected.open = 1
|
||||||
|
|
||||||
affected.createwound(CUT, 1)
|
affected.createwound(CUT, 1)
|
||||||
var/clamp_chance = 0 //I hate this. Make all laser scalpels a /laser subtype and give them a clamp_chance var???
|
var/clamp_chance = 0
|
||||||
if(istype(tool,/obj/item/surgical/scalpel/laser1))
|
if(istype(tool,/obj/item/surgical/scalpel))
|
||||||
clamp_chance = 75
|
var/obj/item/surgical/scalpel/T = tool
|
||||||
if(istype(tool,/obj/item/surgical/scalpel/laser2))
|
clamp_chance = T.clamp_chance
|
||||||
clamp_chance = 85
|
|
||||||
if(istype(tool,/obj/item/surgical/scalpel/laser3))
|
|
||||||
clamp_chance = 95
|
|
||||||
if(clamp_chance)
|
if(clamp_chance)
|
||||||
affected.organ_clamp()
|
affected.organ_clamp()
|
||||||
user.visible_message(span_notice("[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool]."), \
|
user.visible_message(span_notice("[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool]."), \
|
||||||
|
|||||||
Reference in New Issue
Block a user