mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Started on surgery stuff
Adds pain modifier to surgery if patient is conscious
Now actually compiles
Makes surgery easier if patient is drunk, allowing for easier ghetto surgery.
Now reduces failure chance if painkillers are in the patient's system.
Fixed argument spacing (hopefully)
Repairing robotic limbs no longer needs anesthesia.
Revert "Repairing robotic limbs no longer needs anesthesia."
This reverts commit 12c1f4140a.
Repairing robotic limbs doesn't cause a pain modifier, because they don't feel pain. Now actually works.
Moves typecasting from the helper proc to outside fo it and checks for sleeping.
Now correctly checks for repair to robotic limbs.
Increased effectiveness of Hydrocodone and Morphine to 99% on maintainer recommendation.
This commit is contained in:
@@ -81,7 +81,24 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/proc/get_pain_modifier(mob/living/carbon/human/M) //returns modfier to make surgery harder if patient is conscious and feels pain
|
||||
if(M.stat && !M.sleeping) //stat=0 if CONSCIOUS, 1=UNCONSCIOUS and 2=DEAD. Operating on dead people is easy, too. Just sleeping won't work, though.
|
||||
return 1
|
||||
if(NO_PAIN in M.species.species_traits)//if you don't feel pain, you can hold still
|
||||
return 1
|
||||
if(M.reagents.has_reagent("hydrocodone"))//really good pain killer
|
||||
return 0.99
|
||||
if(M.reagents.has_reagent("morphine"))//Just as effective as Hydrocodone, but has an addiction chance
|
||||
return 0.99
|
||||
if(M.drunk >= 80)//really damn drunk
|
||||
return 0.95
|
||||
if(M.drunk >= 40)//pretty drunk
|
||||
return 0.9
|
||||
if(M.reagents.has_reagent("sal_acid")) //it's better than nothing, as far as painkillers go.
|
||||
return 0.85
|
||||
if(M.drunk >= 15)//a little drunk
|
||||
return 0.85
|
||||
return 0.8 //20% failure chance
|
||||
|
||||
/proc/get_location_modifier(mob/M)
|
||||
var/turf/T = get_turf(M)
|
||||
|
||||
@@ -116,6 +116,12 @@
|
||||
prob_chance = allowed_tools[implement_type]
|
||||
prob_chance *= get_location_modifier(target)
|
||||
|
||||
|
||||
if(!ispath(surgery.steps[surgery.status], /datum/surgery_step/robotics))//Repairing robotic limbs doesn't hurt
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target //typecast to human
|
||||
prob_chance *= get_pain_modifier(H)//operating on conscious people is hard.
|
||||
|
||||
if(prob(prob_chance) || isrobot(user))
|
||||
if(end_step(user, target, target_zone, tool, surgery))
|
||||
advance = 1
|
||||
|
||||
Reference in New Issue
Block a user