Files
Aurora.3/code/game/objects/objs.dm
Matt Atlas 99b4033ca5 Aurora 2: The 3/4thening (#17186)
* after dark

* FIXES

* breakin

* butt

* Update code/game/objects/items/devices/floor_painter.dm

Co-authored-by: Cody Brittain <cbrittain10@yahoo.com>

* Update code/game/objects/items/devices/floor_painter.dm

Co-authored-by: Cody Brittain <cbrittain10@yahoo.com>

* Update code/game/objects/structures/lattice.dm

Co-authored-by: Cody Brittain <cbrittain10@yahoo.com>

* testing 1

* a

* FUCK THIS PRESET!!!

* allah

* OTEMACHI

* tis' done

* Project Exorcism : Sneed's Snairs (Formerly Chuck's)

* Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm

* Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm

* Update stools.dm

* Update code/game/objects/structures/stool_bed_chair_nest/stools.dm

* Update code/game/objects/structures/stool_bed_chair_nest/stools.dm

* Update stools.dm

* Update chairs.dm

* Update code/game/objects/structures/stool_bed_chair_nest/chairs.dm

* inhand fixes

* airlocks (matt has cooked)

fuck

* my cody plays the mamba

* fuck

* fixes layering issue

* airlocks and everything else Please fucking kill me

* underlays

* unfuck blending

* finished replacing old ass shit

* your ass is geass

* conflicts die now

* public fat'wa

* progress on walls and windows

* more mapping

* baltimore accents be like

* minor progress

* monitors

* fire alarms and apc adjustments

* apcs pixel adjustments, final airlock look

* also grilles

* shuttle wall start plus shuttle windows

* starting consoles

* table outlines

* I love broke ass sprites

* fixing the stupid ass exterior walls

* light fuckery

* terminal directionals, external airlocks, table fixes, blahblahblah

* fix 1

* fix 2

* some more fixes

* fix chairs

* basic untested railings and updating colors from atteria

* bridge and some fixes

* removing some artifacts on the new walls

* breaking wood tables and adding 4 wall materials

* fix

* compile & wood fixes

* make the horizon compile again

* railings, firedoors, ATMs, intercomms and tables again

* mapping begins also some tweaks to map view of icons

* full tile steel walls

* i sure hope nothing bad happens

* airlock updates (untested)

* reverts most wall machinery

* skull

* wall coloring

* makes the tg wood chill out

* work on airlocks

* hull consistency

* cause you live forever in the lights you make

* whoops can't show that in a christian manga

* terminals should be on walls and everything's hunky dory now

also i changed the wood stuff as per atteria's suggestion

* fixing airlocks

* fixes

* window resprite, coloring adjustments

* scc hull resprite

* new grilles, frame edits, and borosilicate

* greyscale wood palette improvement

* shuttle windows

* window frame fix

* apc update

* refit and reshaded fire alarms

* mapping icon fixes

* table fixes

* map fixes, platforms and stairs

* updates cutter, new walls and terminals

* mapping fixes

* fix preview

* preview fix stone

* stairs

* initial work for the map

* railing and windowpane fuckery

* new external airlocks

* a

* fix the maps in preparation

* wall object pixel offsets

* air alarms D1

* extinguisher cabinets

* APC DESTROYED MISSION ACCOMPLISHED GOOD WORK

* deck 3: floor decals, APCs, air alarms, fire extinguisher cabinets

* deck 3: fireaxe cabinet

* /shuttle_landmark/distress/blue, move base_turf from map to obj def

* intercom presets

* formatting

* deck 1: floor decals

* deck 2: named area fix (LMAO), signs to use single quotes

* deck 2: floor decals, APCs, air alarms, fire extinguisher cabinets, fireaxe cabinets

* Platforms and stairs!

* grates and bugfixes

* Angled ship walls + grate color fix

* corrects apc anim overlay

* deck 2 and away site fixes

# Conflicts:
#	maps/sccv_horizon/sccv_horizon-2_deck_2.dmm

* deck 2 missing grate

* warning stripes

* railings and ledges

* windows and fixtures

* windoorsagain

* airlocks pt1

* windows de-seamed and transparent

* airlocks and pixel offsets

* fixes for airlocks

* more airlock fixes

* presets for ringer, request console and newscaster

* 132

* asfsaf

* kitchen tiling

* thicker freezer tile bevels

* More angled walls

* New shutters and blast doors

* directional corrections

* ops railing fixes

* updated window map things and shutters

* value changes and blast door changes

* Ledges and platforms galore (D2/D3)

* all decks: fix door dirs

* all decks: newscasters, intercoms, requests consoles, ringer consoles

* helm light blue decals to dark blue

* supermatter door dir fix

* fix directional presets (dirs/offsets): newscaster, intercom, requests console, ringer console

* firedoor changes

* deck 3: overlapping wall mountables fixes

* map changes

* airlock changes

* map tweaks

* airlock & stair icons

* various mapping modifications

* Double airlocks + fixing denied states + fixing airlocks on all levels

* Rebase

* directional terminals buttons and lights again, platform tweaks

terminal north facing sprites, atm/food terminal directionals
proper door control and lightswitch directionals (presets still need to be set up, mapping)
re-adds new light tube sprites, again
new sprites for floor lights and the other stuff that got added
adjusted platforms to be recolorable, added light and dark versions, fixed some shading

* missing ERT outfit thingy fix

* floor lights fixed

* deck 3: various small fixes

* deck 1: various small fixes

* deck 2: various small fixes

* fixes

* d2 fixes & multitile door fix

* d2 fixes, remove unused airlock files, button icon fixes, window icon fixes

* make it actually compile, oops!

* make it actually compile, pt2

* CE office camera

* pew pew pew

* pew pew pew 2

* fixes

* deck 3: buttons fixes

* deck 3: button and other fixes

* deck 3: fixes and stuff

* D1 fixes & skrell airlocks

* minor D2 tweaks

* a lot of airlock-related fixes, glass tables, paint sprayer fixes, decal fixes, changelog

* maintenance hatch sprites

* fixing double doors

* flips multi-tiles, fixes multi-tiles, adds desk windoors

* new plastic flaps

* deck 2: a few buttons

* side + middle doors

* created paths for 3-tiles doors

* apply to map the 3 tiles airlocks

* some fixes, windoor alpha

* remove this random ass potted plant

* more map fixes

* holodeck disposal pipe fix

* secure airlock sprites

no code or obj definitions yet

* vault airlock

* vault door fixes

* scc window alpha

* adjusts double door glass, firedoor open state

* adjusts construction states for doors

* remove some defunct icons and fix anims

* assembly stuff

* pharma fixes

* vault door dir

* firedoor smart generation moved to its own proc

* lift doors, d1 fixes

* firedoor smart generation: adjacent wall check

* firedoor smart generation: adjacent firedoor check

* all decks: missing firedoor and other fixes

* deck 2: weird maint stairs fix

* oops

* diona airlock fix

* the shuttle wall gigadeath

* fixes

* some fixes for leftover map item paths, and double lattices

* new diona walls

* more fixes

* and more

* deck 1: fix out of bounds keys

* deck 3: fix out of bounds keys

* runtime 3: duplicate APCs fix

* all decks: make all 3 tile wide doors glass

---------

Co-authored-by: Wezzy <wowzewow@gmail.com>
Co-authored-by: Wowzewow (Wezzy) <42310821+alsoandanswer@users.noreply.github.com>
Co-authored-by: Cody Brittain <cbrittain10@yahoo.com>
Co-authored-by: kyres1 <noodle.buster31@gmail.com>
Co-authored-by: Matt Atlas <liermattia@gmail.com>
Co-authored-by: atteria <tarkona@protonmail.com>
Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
Co-authored-by: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com>
Co-authored-by: naut <nautilussplat@gmail.com>
Co-authored-by: naut <55491249+nauticall@users.noreply.github.com>
2023-08-30 21:18:10 +00:00

262 lines
7.6 KiB
Plaintext

/obj
animate_movement = 2
var/list/matter //Used to store information about the contents of the object.
var/recyclable = FALSE //Whether the object can be recycled (eaten) by something like the Autolathe
var/w_class // Size of the object.
var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj.
var/obj_flags //Special flags such as whether or not this object can be rotated.
var/throwforce = 1
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/sharp = 0 // whether this object cuts
var/edge = FALSE // whether this object is more likely to dismember
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = DAMAGE_BRUTE
var/force = 0
var/armor_penetration = 0
var/noslice = 0 // To make it not able to slice things.
var/being_shocked = 0
var/icon_species_tag = ""//If set, this holds the 3-letter shortname of a species, used for species-specific worn icons
var/icon_auto_adapt = 0//If 1, this item will automatically change its species tag to match the wearer's species.
//requires that the wearer's species is listed in icon_supported_species_tags
var/list/icon_supported_species_tags //Used with icon_auto_adapt, a list of species which have differing appearances for this item
var/icon_species_in_hand = 0//If 1, we will use the species tag even for rendering this item in the left/right hand.
var/equip_slot = 0
var/usesound
var/toolspeed = 1
/obj/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/Topic(href, href_list, var/datum/ui_state/state = default_state)
if(..())
return 1
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
CouldNotUseTopic(usr)
return 1
/obj/CanUseTopic(var/mob/user, var/datum/ui_state/state)
if(user.CanUseObjTopic(src))
return ..()
to_chat(user, "<span class='danger'>[icon2html(src, user)]Access Denied!</span>")
return STATUS_CLOSE
/mob/living/silicon/CanUseObjTopic(var/obj/O)
var/id = src.GetIdCard()
return O.check_access(id)
/mob/proc/CanUseObjTopic()
return 1
/obj/proc/CouldUseTopic(var/mob/user)
user.AddTopicPrint(src)
/mob/proc/AddTopicPrint(var/obj/target)
target.add_hiddenprint(src)
/mob/living/AddTopicPrint(var/obj/target)
if(Adjacent(target))
target.add_fingerprint(src)
else
target.add_hiddenprint(src)
/mob/living/silicon/ai/AddTopicPrint(var/obj/target)
target.add_hiddenprint(src)
/obj/proc/CouldNotUseTopic(var/mob/user)
// Nada
/obj/proc/ai_can_interact(var/mob/user)
if(!Adjacent(user) && within_jamming_range(src, FALSE)) // if not adjacent to it, it uses wireless signal
to_chat(user, SPAN_WARNING("Something in the area of \the [src] is blocking the remote signal!"))
return FALSE
return TRUE
/obj/item/proc/is_used_on(obj/O, mob/user)
/obj/assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
else
return null
/obj/remove_air(amount)
if(loc)
return loc.remove_air(amount)
else
return null
/obj/return_air()
if(loc)
return loc.return_air()
/obj/proc/updateUsrDialog()
if(in_use)
var/is_in_use = 0
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
is_in_use = 1
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
src.attack_ai(usr)
in_use = is_in_use
/obj/proc/updateDialog()
// Check that people are actually using the machine. If not, don't update anymore.
if(in_use)
var/list/nearby = viewers(1, src)
var/is_in_use = 0
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
is_in_use = 1
src.interact(M)
var/ai_in_use = AutoUpdateAI(src)
if(!ai_in_use && !is_in_use)
in_use = 0
/obj/attack_ghost(mob/user)
ui_interact(user)
..()
/obj/proc/interact(mob/user)
return
/mob/proc/unset_machine()
src.machine = null
/mob/proc/set_machine(var/obj/O)
if(src.machine)
unset_machine()
src.machine = O
if(istype(O))
O.in_use = 1
/obj/item/proc/updateSelfDialog()
var/mob/M = src.loc
if(istype(M) && M.client && M.machine == src)
src.attack_self(M)
/obj/proc/hide(var/hide)
set_invisibility(hide ? INVISIBILITY_MAXIMUM : initial(invisibility))
level = hide ? 1 : initial(level)
/obj/proc/hides_under_flooring()
return level == 1
/obj/proc/hear_talk(mob/M as mob, text, verb, datum/language/speaking)
if(talking_atom)
talking_atom.catchMessage(text, M)
/obj/proc/see_emote(mob/M as mob, text, var/emote_type)
return
/obj/proc/tesla_act(var/power, var/melt = FALSE)
if(melt)
visible_message(SPAN_DANGER("\The [src] melts down until ashes are left!"))
new /obj/effect/decal/cleanable/ash(loc)
qdel(src)
return
being_shocked = 1
var/power_bounced = power / 2
tesla_zap(src, 3, power_bounced)
addtimer(CALLBACK(src, PROC_REF(reset_shocked)), 10)
/obj/proc/reset_shocked()
being_shocked = 0
/obj/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
return
//To be called from things that spill objects on the floor.
//Makes an object move around randomly for a couple of tiles
/obj/proc/tumble(var/dist)
if (dist >= 1)
spawn()
dist += rand(0,1)
for(var/i = 1, i <= dist, i++)
if(src)
step(src, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
/obj/proc/auto_adapt_species(var/mob/living/carbon/human/wearer)
if(icon_auto_adapt)
icon_species_tag = ""
if (loc == wearer && icon_supported_species_tags.len)
if (wearer.species.short_name in icon_supported_species_tags)
icon_species_tag = wearer.species.short_name
return 1
return 0
//This function should be called on an item when it is:
//Built, autolathed, protolathed, crafted or constructed. At runtime, by players or machines
//It should NOT be called on things that:
//spawn at roundstart, are adminspawned, arrive on shuttles, spawned from vendors, removed from fridges and containers, etc
//This is useful for setting special behaviour for built items that shouldn't apply to those spawned at roundstart
/obj/proc/Created()
return
/obj/proc/rotate(var/mob/user, var/anchored_ignore = FALSE)
if(use_check_and_message(user))
return
if(anchored && !anchored_ignore)
to_chat(user, SPAN_WARNING("\The [src] is bolted down to the floor!"))
return
set_dir(turn(dir, 90))
update_icon()
return TRUE
/obj/AltClick(var/mob/user)
if(obj_flags & OBJ_FLAG_ROTATABLE)
rotate(user)
return
if(obj_flags & OBJ_FLAG_ROTATABLE_ANCHORED)
rotate(user, TRUE)
return
..()
/obj/examine(mob/user)
. = ..()
if((obj_flags & OBJ_FLAG_ROTATABLE) || (obj_flags & OBJ_FLAG_ROTATABLE_ANCHORED))
to_chat(user, SPAN_SUBTLE("Can be rotated with alt-click."))
if(contaminated)
to_chat(user, SPAN_ALIEN("\The [src] has been contaminated with phoron!"))
// whether mobs can unequip and drop items into us or not
/obj/proc/can_hold_dropped_items()
return TRUE
/obj/proc/damage_flags()
. = 0
if(has_edge(src))
. |= DAMAGE_FLAG_EDGE
if(is_sharp(src))
. |= DAMAGE_FLAG_SHARP
if(damtype == DAMAGE_BURN)
. |= DAMAGE_FLAG_LASER
/obj/proc/set_pixel_offsets()
return