mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 18:33:22 +00:00
- I renamed some vars of datum/hud to be more selfexplanatory
- Moved all datum/hud mob code into the hud folder.
- fixed alien's zone selection button not using the correct sprites.
- I removed the update_hud() proc (that needed to be removed).
- Fixed a typo in /mob/living/carbon/ContractDisease , using "internals" instead of "internal" (very different things)
- Fixed doTeleport() calling Entered() twice on the destination area.
- To reference a mob's selected zone, you now use a direct mob var ("H.zone_selected" instead of "H.zone_sel.selecting")
- mobs lose certain screen objects var ("healths", "zone_sel", "internals", etc) which are now vars of the mob's datum/hud instead.
- the Blind spell is now done via the blind mutation instead of the blind disabilities.
- Give to mobs a version of forceMove(), so the mob is always properly unbuckled, his pull stopped, his vision updated, etc.
- The "user" var of mob/camera/aiEye/remote is renamed to "eye_user" to avoid confusion.
- reset_view() is replaced by reset_perspective(). Now all changes to client.eye and client.perspective are done with this proc.
- I reworked /obj/machinery/computer/security code, changing camera is instantaneous now, as well as cancelling.
- I reworked /obj/machinery/computer/camera_advanced code as well.
- I changed /obj/item/mecha_parts/mecha_equipment/mining_scanner's meson view to be constant instead of by intermittent.
- Fixes not being able to use /obj/item/device/camera_bug while buckled.
- removed admin_forcemove() proc, admin force moving now uses forceMove() simply.
- Removed the client var "adminobs"
- Added var/vision_correction to glasses.
- Added a thermal_overload() proc for glasses, to remove copypasta in emp_act code.
- Remove the hal_crit mob var
- We no longer delete the mob's hud everytime he logs in.
- Added a stat == dead check in mob's metabolize() so we immediately stop metabolizing if one of the chem kills the mob.
- Being inside disposal bin lowers your vision, like wearing a welding helmet.
- removed the remote_view mob var.
- I changed advanced camera EYE, some fixes, removed unnecessary code when the eye moves, now the mob client eye properly follows the camera mob.
- fixes mob var "machine" not being nullified on logout.
- larva/death() was calling two "living_mob_list -= src"
- I made the Blind screen objects into a global_hud instead of giving one to each mob (like damage overlay).
- I untied tint and eye_blind, TINT_BLIND doesn't give you eye_blind=1.
- gave a visual overlay when inside locker (vimpaired)
- when inside disposal/gas pipes you get sight |= (BLIND|SEE_TURFS)
- glasses toggling updates (atmos meson toggle): DONE
- The new adjust procs serve to properly change eye_blind etc and call vision update procs when needed.
- I added an on_unset_machine() proc to handle perspective reset for camera consoles.
- I moved consequences of eye_check fail inside eye_check() procs themselves.
- I fixed vision updates being fucked by forceMove, especially pipe vision.
- I decided that damage overlay not appearing when dead.
- mob's hud_used is no longer deleted on each login()
- I refactored mob huds a bit, creating subtypes for each mob (/datum/hud/human)
- f12's hud toggling is now available to all mobs
- gave borgs a low_power_mode var so unpowered borg do not use stat= UNCONSCIOUS (which made things weird since you were unconscious but not blind)
- Fixed double Area entering when forced teleporting.
- I fixed larva pulling not being broken when cuffing them, and larva not seeing handcuff alert (and they can resist by clicking it)
- I removed pull updates from life() since it onyl checked for puller's incapacitation.
- I renamed camera/deactivate() to toggle_cam() to be more accurate.
- I fixed mmi brain being immortal (by removing the brain and putting it back)
- I simplified mmi brain emp damage.
145 lines
3.4 KiB
Plaintext
145 lines
3.4 KiB
Plaintext
|
|
/mob/proc/HasDisease(datum/disease/D)
|
|
for(var/datum/disease/DD in viruses)
|
|
if(D.IsSame(DD))
|
|
return 1
|
|
return 0
|
|
|
|
|
|
/mob/proc/CanContractDisease(datum/disease/D)
|
|
if(stat == DEAD)
|
|
return 0
|
|
|
|
if(D.GetDiseaseID() in resistances)
|
|
return 0
|
|
|
|
if(HasDisease(D))
|
|
return 0
|
|
|
|
if(!(type in D.viable_mobtypes))
|
|
return 0
|
|
|
|
if(count_by_type(viruses, /datum/disease/advance) >= 3)
|
|
return 0
|
|
|
|
return 1
|
|
|
|
|
|
/mob/proc/ContractDisease(datum/disease/D)
|
|
if(!CanContractDisease(D))
|
|
return 0
|
|
AddDisease(D)
|
|
|
|
|
|
/mob/proc/AddDisease(datum/disease/D)
|
|
var/datum/disease/DD = new D.type(1, D, 0)
|
|
viruses += DD
|
|
DD.affected_mob = src
|
|
DD.holder = src
|
|
|
|
//Copy properties over. This is so edited diseases persist.
|
|
var/list/skipped = list("affected_mob","holder","carrier","stage","type","parent_type","vars","transformed")
|
|
for(var/V in DD.vars)
|
|
if(V in skipped)
|
|
continue
|
|
if(istype(DD.vars[V],/list))
|
|
var/list/L = D.vars[V]
|
|
DD.vars[V] = L.Copy()
|
|
else
|
|
DD.vars[V] = D.vars[V]
|
|
|
|
DD.affected_mob.med_hud_set_status()
|
|
|
|
|
|
/mob/living/carbon/ContractDisease(datum/disease/D)
|
|
if(!CanContractDisease(D))
|
|
return 0
|
|
|
|
var/obj/item/clothing/Cl = null
|
|
var/passed = 1
|
|
|
|
var/head_ch = 100
|
|
var/body_ch = 100
|
|
var/hands_ch = 25
|
|
var/feet_ch = 25
|
|
|
|
if(D.spread_flags & CONTACT_HANDS)
|
|
head_ch = 0
|
|
body_ch = 0
|
|
hands_ch = 100
|
|
feet_ch = 0
|
|
if(D.spread_flags & CONTACT_FEET)
|
|
head_ch = 0
|
|
body_ch = 0
|
|
hands_ch = 0
|
|
feet_ch = 100
|
|
|
|
if(prob(15/D.permeability_mod))
|
|
return
|
|
|
|
if(satiety>0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
|
|
return
|
|
|
|
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)
|
|
|
|
if(istype(src, /mob/living/carbon/human))
|
|
var/mob/living/carbon/human/H = src
|
|
|
|
switch(target_zone)
|
|
if(1)
|
|
if(isobj(H.head) && !istype(H.head, /obj/item/weapon/paper))
|
|
Cl = H.head
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
if(passed && isobj(H.wear_mask))
|
|
Cl = H.wear_mask
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
if(2)
|
|
if(isobj(H.wear_suit))
|
|
Cl = H.wear_suit
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
if(passed && isobj(slot_w_uniform))
|
|
Cl = slot_w_uniform
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
if(3)
|
|
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
|
Cl = H.wear_suit
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
|
|
if(passed && isobj(H.gloves))
|
|
Cl = H.gloves
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
if(4)
|
|
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
|
Cl = H.wear_suit
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
|
|
if(passed && isobj(H.shoes))
|
|
Cl = H.shoes
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
|
|
else if(istype(src, /mob/living/carbon/monkey))
|
|
var/mob/living/carbon/monkey/M = src
|
|
switch(target_zone)
|
|
if(1)
|
|
if(M.wear_mask && isobj(M.wear_mask))
|
|
Cl = M.wear_mask
|
|
passed = prob((Cl.permeability_coefficient*100) - 1)
|
|
|
|
if(!passed && (D.spread_flags & AIRBORNE) && !internal)
|
|
passed = (prob((50*D.permeability_mod) - 1))
|
|
|
|
if(passed)
|
|
AddDisease(D)
|
|
|
|
|
|
//Same as ContractDisease, except never overidden clothes checks
|
|
/mob/proc/ForceContractDisease(datum/disease/D)
|
|
if(!CanContractDisease(D))
|
|
return 0
|
|
AddDisease(D)
|
|
|
|
|
|
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
|
|
if(dna && VIRUSIMMUNE in dna.species.specflags)
|
|
return 0
|
|
return ..() |