everything but mob stuff
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
#define INFINITE -1
|
||||
|
||||
/obj/item/device/autoimplanter
|
||||
name = "autoimplanter"
|
||||
desc = "A device that automatically injects a cyber-implant into the user without the hassle of extensive surgery. It has a slot to insert implants and a screwdriver slot for removing accidentally added implants."
|
||||
icon_state = "autoimplanter"
|
||||
item_state = "walkietalkie"//left as this so as to intentionally not have inhands
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/obj/item/organ/storedorgan
|
||||
var/organ_type = /obj/item/organ/cyberimp
|
||||
var/uses = INFINITE
|
||||
|
||||
/obj/item/device/autoimplanter/New()
|
||||
..()
|
||||
if(storedorgan)
|
||||
storedorgan.loc = src
|
||||
|
||||
/obj/item/device/autoimplanter/attack_self(mob/user)//when the object it used...
|
||||
if(!uses)
|
||||
to_chat(user, "<span class='warning'>[src] has already been used. The tools are dull and won't reactivate.</span>")
|
||||
return
|
||||
else if(!storedorgan)
|
||||
to_chat(user, "<span class='notice'>[src] currently has no implant stored.</span>")
|
||||
return
|
||||
storedorgan.Insert(user)//insert stored organ into the user
|
||||
user.visible_message("<span class='notice'>[user] presses a button on [src], and you hear a short mechanical noise.</span>", "<span class='notice'>You feel a sharp sting as [src] plunges into your body.</span>")
|
||||
playsound(get_turf(user), 'sound/weapons/circsawhit.ogg', 50, 1)
|
||||
storedorgan = null
|
||||
if(uses != INFINITE)
|
||||
uses--
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
|
||||
/obj/item/device/autoimplanter/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, organ_type))
|
||||
if(storedorgan)
|
||||
to_chat(user, "<span class='notice'>[src] already has an implant stored.</span>")
|
||||
return
|
||||
else if(!uses)
|
||||
to_chat(user, "<span class='notice'>[src] has already been used up.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
storedorgan = I
|
||||
to_chat(user, "<span class='notice'>You insert the [I] into [src].</span>")
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
if(!storedorgan)
|
||||
to_chat(user, "<span class='notice'>There's no implant in [src] for you to remove.</span>")
|
||||
else
|
||||
var/turf/open/floorloc = get_turf(user)
|
||||
floorloc.contents += contents
|
||||
to_chat(user, "<span class='notice'>You remove the [storedorgan] from [src].</span>")
|
||||
playsound(get_turf(user), I.usesound, 50, 1)
|
||||
storedorgan = null
|
||||
if(uses != INFINITE)
|
||||
uses--
|
||||
if(!uses)
|
||||
desc = "[initial(desc)] Looks like it's been used up."
|
||||
|
||||
/obj/item/device/autoimplanter/cmo
|
||||
name = "medical HUD autoimplanter"
|
||||
desc = "A single use autoimplanter that contains a medical heads-up display augment. A screwdriver can be used to remove it, but implants can't be placed back in."
|
||||
storedorgan = new/obj/item/organ/cyberimp/eyes/hud/medical()
|
||||
uses = 1
|
||||
@@ -1,6 +1,6 @@
|
||||
#define LIVER_DEFAULT_HEALTH 100 //amount of damage required for liver failure
|
||||
#define LIVER_DEFAULT_TOX_TOLERANCE 3 //amount of toxins the liver can filter out
|
||||
#define LIVER_DEFAULT_TOX_LETHALITY 0.5 //lower values lower how harmful toxins are to the liver
|
||||
#define LIVER_DEFAULT_TOX_LETHALITY 0.01 //lower values lower how harmful toxins are to the liver
|
||||
|
||||
/obj/item/organ/liver
|
||||
name = "liver"
|
||||
@@ -25,22 +25,17 @@
|
||||
//slowly heal liver damage
|
||||
damage = max(0, damage - 0.1)
|
||||
|
||||
if(filterToxins)
|
||||
if(filterToxins && !owner.has_trait(TRAIT_TOXINLOVER))
|
||||
//handle liver toxin filtration
|
||||
var/toxamount
|
||||
var/static/list/toxinstypecache = typecacheof(/datum/reagent/toxin)
|
||||
for(var/I in C.reagents.reagent_list)
|
||||
var/datum/reagent/pickedreagent = I
|
||||
if(is_type_in_typecache(pickedreagent, toxinstypecache))
|
||||
toxamount += C.reagents.get_reagent_amount(initial(pickedreagent.id))
|
||||
if(toxamount <= toxTolerance && toxamount > 0)
|
||||
for(var/I in C.reagents.reagent_list)
|
||||
var/datum/reagent/pickedreagent = I
|
||||
if(is_type_in_typecache(pickedreagent, toxinstypecache))
|
||||
var/thisamount = C.reagents.get_reagent_amount(initial(pickedreagent.id))
|
||||
if (thisamount <= toxTolerance && thisamount)
|
||||
C.reagents.remove_reagent(initial(pickedreagent.id), 1)
|
||||
else if(toxamount > toxTolerance)
|
||||
damage += toxamount*toxLethality
|
||||
|
||||
else
|
||||
damage += (thisamount*toxLethality)
|
||||
|
||||
//metabolize reagents
|
||||
C.reagents.metabolize(C, can_overdose=TRUE)
|
||||
@@ -80,7 +75,7 @@
|
||||
alcohol_tolerance = 0.001
|
||||
maxHealth = 200 //double the health of a normal liver
|
||||
toxTolerance = 15 //can shrug off up to 15u of toxins
|
||||
toxLethality = 0.3 //20% less damage than a normal liver
|
||||
toxLethality = 0.008 //20% less damage than a normal liver
|
||||
|
||||
/obj/item/organ/liver/cybernetic/emp_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
#define HUMAN_MAX_OXYLOSS 3
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_1 2
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_2 4
|
||||
#define HEAT_GAS_DAMAGE_LEVEL_3 8
|
||||
|
||||
#define COLD_GAS_DAMAGE_LEVEL_1 0.5
|
||||
#define COLD_GAS_DAMAGE_LEVEL_2 1.5
|
||||
#define COLD_GAS_DAMAGE_LEVEL_3 3
|
||||
|
||||
/obj/item/organ/lungs
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
@@ -369,13 +359,3 @@
|
||||
cold_level_1_threshold = 200
|
||||
cold_level_2_threshold = 140
|
||||
cold_level_3_threshold = 100
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
#undef HEAT_GAS_DAMAGE_LEVEL_1
|
||||
#undef HEAT_GAS_DAMAGE_LEVEL_2
|
||||
#undef HEAT_GAS_DAMAGE_LEVEL_3
|
||||
|
||||
#undef COLD_GAS_DAMAGE_LEVEL_1
|
||||
#undef COLD_GAS_DAMAGE_LEVEL_2
|
||||
#undef COLD_GAS_DAMAGE_LEVEL_3
|
||||
|
||||
Reference in New Issue
Block a user