mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-20 23:21:10 +00:00
* Replace SSingulo with SScalamity; processing cleanup
- SScalamity now handles blobs as well as singularity-types.
- Processing subtypes have been simplified to not require a stop_processing definition.
* this is probably important
* Remove cascade disabling SSgarbage
* Fixed a bug where dust() did not qdel the target mob
* Misc fixes
* Fix decals surviving break-to-plating
* Subsystem flag tweaks
* Apparently subsystems are new'd before config is.
* Fix paper icons
* Speculative fix for insane lag
* Better machinery stat
* Make organs not use SSoverlay
* Misc bugfixes & tweaks
* Nightmode fixes
* Changelog for SMC
* Port /tg/'s improved MC crash handling
* Add some more SS Recover() procs
* supply_controller -> SScargo
* More New() -> Initialize()
* pAI and robot construction overlays
* Fix cargo unit tests
* Merge the DMM Suite's atom/New() into atoms_init
* Lighting pre-baking
* Lighting initialization logging
* Fix some bad SS init orders
* Fix SSlighting logging; rename Processes to MC
* Speculative fix for insane GC lag
* Prebaked openturf/icon_smooth & fix lighting prebake
* SS init status; SSatoms LATEQDEL
* Fix bug with MC init stat panel
* Fix parallax
* Misc
* Ignore SS_NO_DISPLAY during init
* apparently this is important
* REEEEEE
* Image GC fixes; broadcaster radio-new sanity
* RCON Cleanup
* Move pAI recruiter into subsystem
* Move global solars list into sun subsystem
* Make chickens not use a global
* Demote SSdisposals to SS_BACKGROUND; garbage-debug cleanup
* Speed up space init a little
* Fix bad timer flags on floor drying
* Subsystem panic-restart verb for mins
* Explosion speedup
* Minor subsystem & MC logging tweaks
* SSopenturf improvements
* Make pipenet actually initialize (whoops)
* Minor tweaks
* Implement lighting rounding
* comments are hard okay
* Minor lattice tweaks
* Fix some timer issues & better closet init
* Timer sanity
* Request console tweaks + Storage init sanity
* Minor SSmachiner RCON improvements
* Further reduce world-start timer count
* Standardize subsystem logging
* Garbage hard delete profiling from /tg/
* Timer hang detection & recovery
* Log machines that sleep in process() and fuck up SSmachinery
* Fix an issue with external airlocks sleeping in process()
* Failsafe logging
* Minor tweaks
* Revert "Request console tweaks + Storage init sanity"
This reverts commit 98d3579e35.
* Re-implement RC changes
* Fix SQL FT saving
* Fix SSmachinery sleep in disposals
* Minor SS tweaks
* Paper fixes
* Blood drying fixes
* Merge gameticker and SSticker
* Minor global list init cleanup
* Lagcheck biogenerator & bags
* Tweak SScargo init order; RIG Initialize()
* Caching tweaks
* Remove rogue comma
* Initialize fixes
* Lighting destroy cleanup
* Fix emagging airlocks
* Initial SSicon implementation
* Tweaks & Fixes
* Fire + Air alarm queued icon updates
* Overlays + Queued icon cleanup
* Runtime & background fixes
* Kill some meaningless set statements
* Kill some image qdels
* Bump up lighting rounding val
* Fix adv. scanner destroy runtimes
* Remove unneeded icon update limiting
* Move icon smoothing into helpers
* Show a warning if DM 510 compiles without memory leak hack enabled
* Re-organize subsystems & MC defines a little
* Airlock SFX
* Log of Changes
* Make SSicon_update disable itself when not doing anything
* Fix respawn verb runtime when used early in server-init
* Add more information to MC's stat_entry()
* Replace direct refernces to gcDestroyed with QDEL* macros
* plant_controller -> SSplants
* More plant tweaks
* Add more humor to changelog
* Move parallax globals into SSparallax
* Lighting responsiveness tweaks
* Fix parallax init order & better MC init panel stat
* Make mobs GC
* More overlays + Remove intercom spawn()
* SSfast_process; make pinpointers not use spawn-recursion to process
Also made the SM Cascade beach process with SSprocessing instead of a spawn loop.
* Update changelog
* Mob GC tweaks
* Del() cleanup
* Fix insomniac ZAS connection edges
* Minor pAI cleanup
* Convert more things to SSoverlay; fix duplicated overlay in field gens
* SM Bluespace turf tweaks
* Update SSgarbage debug globals list
* Human-type qdel tweaks
* Subsystem suspension; stat_entry improvements
* SQL Statistics cleanup
* Fix runtimes with ambrosia
* More disable() -> suspend(); fix nightmode again
* Human qdel fix; minor tweaks
* Update turbolift to work with StonedMC
* Make lifts use timers instead of a subsystem
* Make SSassets start earlier
* Convert the radio controller into a subsystem
* Fix some missing CHECK_TICKs in asteroid generation
* MC stat tweaks; make shouldnt_see a typecache
* Kill some redundant debug-controller entries
* radio_controller -> SSradio
* Better SSgarbage hard-del logging from /tg/ upstream
* Logging tweaks + GELF
* Misc client caching improvements
* Slime SSoverlay
* Oven icon fixes
* Implant fixes
- Death implants will no longer spam Common on death of user.
- Death implants should handle a deleted user better.
* Holder tweaks + Welding tool Initialize()
* Fix some bad subsystem logging
* Fix suit cooling units spawning without cells
* Starlight tweaks
* Gibber infinite gib fix
* More SSoverlay stuff
* Make crates use CUT_OVERLAY_IN
* Make SSarrivals suspend instead of disable
* Make openturf use split/phased tick checks
* Speculative fix for unwet timer runtimes
* Blood overlay tweaks/fixes
* Update crusher to play nice with SMC + SSoverlay
* Openturf improvements and fixes
* Minor turbolift tweaks
* Lighting performance improvements + ChangeTurf tweaks
* this is probably important
* Fix wall weld noises on changeturf
* More ChangeTurf tweaks
* Explosion tweaks
* Pre-game lobby tweaks
* Openturf tweaks
* Prevent admins from starting the game before init finishes
* Fix Travis
* Kill an unused var
* Fix ChangeTurf runtimes on openturfs
* Fixes
* Browser datum fixes, asset caching
* Update changelog
* Changelog
* Lobby tweaks
* Ticker tweaks; kill ticker var
* Further lobby tweaks
* Cascade tweaks
* air_master -> SSair
* Reduce overhead from radio autosay
* alarm_manager -> SSalarm
* bomb_processor -> SSexplosives
* corp_regs -> SSlaw
* ZAS overlay fixes
* Small wall icon optimization
* Fix effects master
* Assembly tweaks
* Megavend fixes
* Shuttle fixes
* Camera alert performance improvements
* Fix some world.log spam from lighting overlays
* Fix some Initialize() procs
* Openspace responsiveness tweaks
* Make HE pipes animate through openturfs
* Kill a spawn
216 lines
7.0 KiB
Plaintext
216 lines
7.0 KiB
Plaintext
/atom/movable/proc/get_mob()
|
|
return
|
|
|
|
/obj/machinery/bot/mulebot/get_mob()
|
|
if(load && istype(load,/mob/living))
|
|
return load
|
|
|
|
/obj/mecha/get_mob()
|
|
return occupant
|
|
|
|
/obj/vehicle/train/get_mob()
|
|
return buckled_mob
|
|
|
|
/mob/get_mob()
|
|
return src
|
|
|
|
/proc/mobs_in_view(var/range, var/source)
|
|
. = list()
|
|
for(var/atom/movable/AM in view(range, source))
|
|
if (ismob(AM))
|
|
. += AM
|
|
continue
|
|
|
|
if (!AM.can_hold_mob)
|
|
continue
|
|
|
|
. += AM.get_mob()
|
|
|
|
proc/random_hair_style(gender, species = "Human")
|
|
var/h_style = "Bald"
|
|
|
|
var/list/valid_hairstyles = list()
|
|
for(var/hairstyle in hair_styles_list)
|
|
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
|
|
if(gender == MALE && S.gender == FEMALE)
|
|
continue
|
|
if(gender == FEMALE && S.gender == MALE)
|
|
continue
|
|
if( !(species in S.species_allowed))
|
|
continue
|
|
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
|
|
|
|
if(valid_hairstyles.len)
|
|
h_style = pick(valid_hairstyles)
|
|
|
|
return h_style
|
|
|
|
proc/random_facial_hair_style(gender, species = "Human")
|
|
var/f_style = "Shaved"
|
|
|
|
var/list/valid_facialhairstyles = list()
|
|
for(var/facialhairstyle in facial_hair_styles_list)
|
|
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
|
|
if(gender == MALE && S.gender == FEMALE)
|
|
continue
|
|
if(gender == FEMALE && S.gender == MALE)
|
|
continue
|
|
if( !(species in S.species_allowed))
|
|
continue
|
|
|
|
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
|
|
|
|
if(valid_facialhairstyles.len)
|
|
f_style = pick(valid_facialhairstyles)
|
|
|
|
return f_style
|
|
|
|
proc/sanitize_name(name, species = "Human")
|
|
var/datum/species/current_species
|
|
if(species)
|
|
current_species = all_species[species]
|
|
|
|
return current_species ? current_species.sanitize_name(name) : sanitizeName(name)
|
|
|
|
proc/random_name(gender, species = "Human")
|
|
|
|
var/datum/species/current_species
|
|
if(species)
|
|
current_species = all_species[species]
|
|
|
|
if(!current_species || current_species.name_language == null)
|
|
if(gender==FEMALE)
|
|
return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
|
else
|
|
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
|
else
|
|
return current_species.get_random_name(gender)
|
|
|
|
proc/random_skin_tone()
|
|
switch(pick(60;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino"))
|
|
if("caucasian") . = -10
|
|
if("afroamerican") . = -115
|
|
if("african") . = -165
|
|
if("latino") . = -55
|
|
if("albino") . = 34
|
|
else . = rand(-185,34)
|
|
return min(max( .+rand(-25, 25), -185),34)
|
|
|
|
proc/skintone2racedescription(tone)
|
|
switch (tone)
|
|
if(30 to INFINITY) return "albino"
|
|
if(20 to 30) return "pale"
|
|
if(5 to 15) return "light skinned"
|
|
if(-10 to 5) return "white"
|
|
if(-25 to -10) return "tan"
|
|
if(-45 to -25) return "darker skinned"
|
|
if(-65 to -45) return "brown"
|
|
if(-INFINITY to -65) return "black"
|
|
else return "unknown"
|
|
|
|
proc/age2agedescription(age)
|
|
switch(age)
|
|
if(0 to 1) return "infant"
|
|
if(1 to 3) return "toddler"
|
|
if(3 to 13) return "child"
|
|
if(13 to 19) return "teenager"
|
|
if(19 to 30) return "young adult"
|
|
if(30 to 45) return "adult"
|
|
if(45 to 60) return "middle-aged"
|
|
if(60 to 70) return "aging"
|
|
if(70 to INFINITY) return "elderly"
|
|
else return "unknown"
|
|
|
|
proc/RoundHealth(health)
|
|
switch(health)
|
|
if(100 to INFINITY)
|
|
return "health100"
|
|
if(90 to 100)
|
|
return "health95"
|
|
if(70 to 90)
|
|
return "health80"
|
|
if(50 to 70)
|
|
return "health60"
|
|
if(30 to 50)
|
|
return "health40"
|
|
if(18 to 30)
|
|
return "health25"
|
|
if(5 to 18)
|
|
return "health10"
|
|
if(1 to 5)
|
|
return "health1"
|
|
if(-99 to 0)
|
|
return "health0"
|
|
else
|
|
return "health-100"
|
|
return "0"
|
|
|
|
/*
|
|
Proc for attack log creation, because really why not
|
|
1 argument is the actor
|
|
2 argument is the target of action
|
|
3 is the description of action(like punched, throwed, or any other verb)
|
|
4 should it make adminlog note or not
|
|
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
|
|
6 is additional information, anything that needs to be added
|
|
*/
|
|
|
|
/proc/add_logs(mob/user, mob/target, what_done, var/admin=1, var/object=null, var/addition=null)
|
|
if(user && ismob(user))
|
|
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target ? "[target.name][(ismob(target) && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
|
|
if(target && ismob(target))
|
|
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>")
|
|
if(admin)
|
|
log_attack("<font color='red'>[user ? "[user.name][(ismob(user) && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(ismob(target) && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition]</font>",ckey=key_name(user),ckey_target=key_name(target))
|
|
|
|
//checks whether this item is a module of the robot it is located in.
|
|
/proc/is_robot_module(var/obj/item/thing)
|
|
if (!thing || !istype(thing.loc, /mob/living/silicon/robot))
|
|
return 0
|
|
var/mob/living/silicon/robot/R = thing.loc
|
|
return (thing in R.module.modules)
|
|
|
|
/proc/get_exposed_defense_zone(var/atom/movable/target)
|
|
var/obj/item/weapon/grab/G = locate() in target
|
|
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
|
|
return pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg")
|
|
else
|
|
return pick("chest", "groin")
|
|
|
|
|
|
// Returns true if M was not already in the dead mob list
|
|
/mob/proc/switch_from_living_to_dead_mob_list()
|
|
remove_from_living_mob_list()
|
|
. = add_to_dead_mob_list()
|
|
|
|
// Returns true if M was not already in the living mob list
|
|
/mob/proc/switch_from_dead_to_living_mob_list()
|
|
remove_from_dead_mob_list()
|
|
. = add_to_living_mob_list()
|
|
|
|
// Returns true if the mob was in neither the dead or living list
|
|
/mob/proc/add_to_living_mob_list()
|
|
return FALSE
|
|
/mob/living/add_to_living_mob_list()
|
|
if((src in living_mob_list) || (src in dead_mob_list))
|
|
return FALSE
|
|
living_mob_list += src
|
|
return TRUE
|
|
|
|
// Returns true if the mob was removed from the living list
|
|
/mob/proc/remove_from_living_mob_list()
|
|
return living_mob_list.Remove(src)
|
|
|
|
// Returns true if the mob was in neither the dead or living list
|
|
/mob/proc/add_to_dead_mob_list()
|
|
return FALSE
|
|
/mob/living/add_to_dead_mob_list()
|
|
if((src in living_mob_list) || (src in dead_mob_list))
|
|
return FALSE
|
|
dead_mob_list += src
|
|
return TRUE
|
|
|
|
// Returns true if the mob was removed form the dead list
|
|
/mob/proc/remove_from_dead_mob_list()
|
|
return dead_mob_list.Remove(src)
|