mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Merge tgstation13 r4570 into bs12_with_tgport
Conflicts: baystation12.dme code/defines/obj.dm code/defines/procs/helpers.dm code/defines/turf.dm code/game/gamemodes/changeling/modularchangling.dm code/game/gamemodes/cult/cult_structures.dm code/game/gamemodes/events.dm code/game/machinery/telecomms/machine_interactions.dm code/game/master_controller.dm code/game/objects/items/blueprints.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/item.dm code/game/objects/items/weapons/gift_wrappaper.dm code/game/objects/items/weapons/wires.dm code/game/objects/weapons.dm code/game/turfs/turf.dm code/modules/clothing/head/hardhat.dm code/modules/mining/mine_items.dm code/modules/mining/mine_turfs.dm code/modules/mob/living/silicon/robot/life.dm code/modules/mob/mob_defines.dm code/modules/mob/new_player/login.dm code/modules/paperwork/pen.dm code/modules/paperwork/stamps.dm code/unused/toilets.dm html/changelog.html icons/effects/alert.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -48,7 +48,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/area/master // master area used for power calcluations
|
||||
// (original area before splitting due to sd_DAL)
|
||||
var/list/related // the other areas of the same type as this
|
||||
var/list/lights // list of all lights on this area
|
||||
// var/list/lights // list of all lights on this area
|
||||
|
||||
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
|
||||
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
|
||||
@@ -122,10 +122,10 @@ proc/process_ghost_teleport_locs()
|
||||
//place to another. Look at escape shuttle for example.
|
||||
//All shuttles show now be under shuttle since we have smooth-wall code.
|
||||
|
||||
/area/shuttle //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/shuttle/arrival
|
||||
name = "\improper Arrival Shuttle"
|
||||
@@ -227,14 +227,14 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Alien Shuttle Base"
|
||||
requires_power = 1
|
||||
luminosity = 0
|
||||
sd_lighting = 1
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
/area/shuttle/alien/mine
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Alien Shuttle Mine"
|
||||
requires_power = 1
|
||||
luminosity = 0
|
||||
sd_lighting = 1
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
/area/shuttle/prison/
|
||||
name = "\improper Prison Shuttle"
|
||||
@@ -316,7 +316,7 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "start"
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
has_gravity = 1
|
||||
|
||||
// === end remove
|
||||
@@ -796,7 +796,7 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Holodeck"
|
||||
icon_state = "Holodeck"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/holodeck/alphadeck
|
||||
name = "\improper Holodeck Alpha"
|
||||
@@ -864,7 +864,7 @@ proc/process_ghost_teleport_locs()
|
||||
/area/solar
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
auxport
|
||||
name = "\improper Fore Port Solar Array"
|
||||
@@ -1349,25 +1349,25 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextFS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextAS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextAP
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/NewAIMain
|
||||
name = "\improper AI Main New"
|
||||
@@ -1449,7 +1449,7 @@ proc/process_ghost_teleport_locs()
|
||||
/area/turret_protected/AssistantRoom
|
||||
name = "\improper Assistant Room"
|
||||
icon_state = "storage"
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/*
|
||||
@@ -1521,7 +1521,7 @@ var/list/the_station_areas = list (
|
||||
name = "Keelin's private beach"
|
||||
icon_state = "null"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
var/sound/mysound = null
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ obj
|
||||
else
|
||||
return null
|
||||
|
||||
/atom/proc/meteorhit(obj/effect/meteor as obj)
|
||||
/atom/proc/meteorhit(obj/meteor as obj)
|
||||
return
|
||||
|
||||
/atom/proc/allow_drop()
|
||||
|
||||
+69
-448
@@ -14,17 +14,69 @@
|
||||
var/throwforce = 1
|
||||
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
|
||||
proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
//DEFAULT: Take air from turf to give to have mob process
|
||||
if(breath_request>0)
|
||||
return remove_air(breath_request)
|
||||
else
|
||||
return null
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
// datum/air_group to tell lifeform to process using that breath return
|
||||
//DEFAULT: Take air from turf to give to have mob process
|
||||
if(breath_request>0)
|
||||
return remove_air(breath_request)
|
||||
else
|
||||
return null
|
||||
|
||||
proc/initialize()
|
||||
/obj/proc/initialize()
|
||||
return
|
||||
|
||||
/obj/proc/updateUsrDialog()
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
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.
|
||||
src.attack_ai(usr)
|
||||
|
||||
// check for TK users
|
||||
//AutoUpdateTK(src)
|
||||
if (istype(usr, /mob/living/carbon/human))
|
||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src)
|
||||
src.attack_hand(usr)
|
||||
|
||||
/obj/proc/updateDialog()
|
||||
var/list/nearby = viewers(1, src)
|
||||
for(var/mob/M in nearby)
|
||||
if ((M.client && M.machine == src))
|
||||
src.attack_hand(M)
|
||||
AutoUpdateAI(src)
|
||||
//AutoUpdateTK(src)
|
||||
|
||||
/obj/proc/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/proc/updateSelfDialog()
|
||||
var/mob/M = src.loc
|
||||
if(istype(M) && M.client && M.machine == src)
|
||||
src.attack_self(M)
|
||||
|
||||
|
||||
/obj/proc/alter_health()
|
||||
return 1
|
||||
|
||||
/obj/proc/hide(h)
|
||||
return
|
||||
|
||||
|
||||
/obj/proc/hear_talk(mob/M as mob, text)
|
||||
/*
|
||||
var/mob/mo = locate(/mob) in src
|
||||
if(mo)
|
||||
var/rendered = "<span class='game say'><span class='name'>[M.name]: </span> <span class='message'>[text]</span></span>"
|
||||
mo.show_message(rendered, 2)
|
||||
*/
|
||||
return
|
||||
|
||||
/obj/structure/signpost
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
@@ -151,37 +203,44 @@
|
||||
for(name in heads)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[heads[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(sec.len > 0)
|
||||
dat += "<tr><th colspan=2>Security</th></tr>"
|
||||
for(name in sec)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sec[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(eng.len > 0)
|
||||
dat += "<tr><th colspan=2>Engineering</th></tr>"
|
||||
for(name in eng)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[eng[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(med.len > 0)
|
||||
dat += "<tr><th colspan=2>Medical</th></tr>"
|
||||
for(name in med)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[med[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(sci.len > 0)
|
||||
dat += "<tr><th colspan=2>Science</th></tr>"
|
||||
for(name in sci)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[sci[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
if(civ.len > 0)
|
||||
dat += "<tr><th colspan=2>Civilian</th></tr>"
|
||||
for(name in civ)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[civ[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
// in case somebody is insane and added them to the manifest, why not
|
||||
if(bot.len > 0)
|
||||
dat += "<tr><th colspan=2>Silicon</th></tr>"
|
||||
for(name in bot)
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[bot[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
// misc guys
|
||||
if(misc.len > 0)
|
||||
dat += "<tr><th colspan=2>Miscellaneous</th></tr>"
|
||||
@@ -189,191 +248,11 @@
|
||||
dat += "<tr[even ? " class='alt'" : ""]><td>[name]</td><td>[misc[name]]</td></tr>"
|
||||
even = !even
|
||||
|
||||
|
||||
dat += "</table>"
|
||||
dat = dd_replacetext(dat, "\n", "") // so it can be placed on paper correctly
|
||||
dat = dd_replacetext(dat, "\t", "")
|
||||
return dat
|
||||
|
||||
/obj/effect/sign/securearea
|
||||
desc = "A warning sign which reads 'SECURE AREA'."
|
||||
name = "SECURE AREA"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "securearea"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/biohazard
|
||||
desc = "A warning sign which reads 'BIOHAZARD'"
|
||||
name = "BIOHAZARD"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "bio"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/electricshock
|
||||
desc = "A warning sign which reads 'HIGH VOLTAGE'"
|
||||
name = "HIGH VOLTAGE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/examroom
|
||||
desc = "A guidance sign which reads 'EXAM ROOM'"
|
||||
name = "EXAM"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "examroom"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/vacuum
|
||||
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
|
||||
name = "HARD VACUUM AHEAD"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "space"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/deathsposal
|
||||
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
|
||||
name = "DISPOSAL LEADS TO SPACE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "deathsposal"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/pods
|
||||
desc = "A warning sign which reads 'ESCAPE PODS'"
|
||||
name = "ESCAPE PODS"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "pods"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/fire
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
name = "DANGER: FIRE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "fire"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
|
||||
/obj/effect/sign/nosmoking_1
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
name = "NO SMOKING"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "nosmoking"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
|
||||
/obj/effect/sign/nosmoking_2
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
name = "NO SMOKING"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "nosmoking2"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/redcross
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
name = "Med-Bay"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "redcross"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/goldenplaque
|
||||
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
|
||||
name = "The Most Robust Men Award for Robustness"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "goldenplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/atmosplaque
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
name = "FEA Atmospherics Division"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "atmosplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/*/obj/item/weapon/plaque_assembly //commenting this out until there's a better rework
|
||||
desc = "Put this on a wall and engrave an epitaph"
|
||||
name = "Plaque Assembly"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "goldenplaque"
|
||||
|
||||
/obj/item/weapon/plaque_assembly/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
|
||||
if(istype(A,/turf/simulated/wall) || istype(A,/turf/simulated/shuttle/wall) || istype(A,/turf/unsimulated/wall))
|
||||
var/epitaph = input("What would you like to engrave", null)
|
||||
if(epitaph)
|
||||
var/obj/effect/sign/goldenplaque/gp = new/obj/effect/sign/goldenplaque(A)
|
||||
gp.name = epitaph
|
||||
gp.layer = 2.9
|
||||
del(src)*/
|
||||
|
||||
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
name = "The Maltese Falcon"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "maltesefalcon1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/maltesefalcon2
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
name = "The Maltese Falcon"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "maltesefalcon2"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
|
||||
desc = "A warning sign which reads 'SCIENCE!'"
|
||||
name = "SCIENCE!"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "science1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/chemistry
|
||||
desc = "A warning sign which reads 'CHEMISTY'"
|
||||
name = "CHEMISTRY"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "chemistry1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/botany
|
||||
desc = "A warning sign which reads 'HYDROPONICS'"
|
||||
name = "HYDROPONICS"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "hydro1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/hud
|
||||
name = "hud"
|
||||
unacidable = 1
|
||||
@@ -396,264 +275,6 @@
|
||||
|
||||
var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define!
|
||||
|
||||
/obj/item
|
||||
name = "item"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/abstract = 0
|
||||
var/force = 0
|
||||
var/item_state = null
|
||||
var/damtype = "brute"
|
||||
var/r_speed = 1.0
|
||||
var/health = null
|
||||
var/burn_point = null
|
||||
var/burning = null
|
||||
var/hitsound = null
|
||||
var/w_class = 3.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 50
|
||||
// causeerrorheresoifixthis
|
||||
var/obj/item/master = null
|
||||
|
||||
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
|
||||
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
|
||||
var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags
|
||||
var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags
|
||||
|
||||
var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file.
|
||||
var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear.
|
||||
|
||||
//Since any item can now be a piece of clothing, this has to be put here so all items share it.
|
||||
var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
var/color = null
|
||||
var/body_parts_covered = 0 //see setup.dm for appropriate bit flags
|
||||
//var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible
|
||||
var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets)
|
||||
var/permeability_coefficient = 1 // for chemicals/diseases
|
||||
var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit)
|
||||
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
|
||||
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
|
||||
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
|
||||
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
|
||||
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
|
||||
//Set disable_warning to 1 if you wish it to not give you outputs.
|
||||
|
||||
/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0)
|
||||
if(!slot) return 0
|
||||
if(!M) return 0
|
||||
|
||||
if(ishuman(M))
|
||||
//START HUMAN
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(FAT in H.mutations)
|
||||
if(!(flags & ONESIZEFITSALL))
|
||||
if(!disable_warning)
|
||||
H << "\red You're too fat to wear the [name]."
|
||||
return 0
|
||||
|
||||
switch(slot)
|
||||
if(slot_l_hand)
|
||||
if(H.l_hand)
|
||||
return 0
|
||||
return 1
|
||||
if(slot_r_hand)
|
||||
if(H.r_hand)
|
||||
return 0
|
||||
return 1
|
||||
if(slot_wear_mask)
|
||||
if(H.wear_mask)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_MASK) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_back)
|
||||
if(H.back)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_BACK) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_wear_suit)
|
||||
if(H.wear_suit)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_OCLOTHING) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_gloves)
|
||||
if(H.gloves)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_GLOVES) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_shoes)
|
||||
if(H.shoes)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_FEET) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_belt)
|
||||
if(H.belt)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_BELT) )
|
||||
return
|
||||
return 1
|
||||
if(slot_glasses)
|
||||
if(H.glasses)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_EYES) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_head)
|
||||
if(H.head)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_HEAD) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_ears)
|
||||
if(H.ears)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_EARS) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_w_uniform)
|
||||
if(H.w_uniform)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_ICLOTHING) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_wear_id)
|
||||
if(H.wear_id)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_ID) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_l_store)
|
||||
if(H.l_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
if(slot_flags & SLOT_DENYPOCKET)
|
||||
return
|
||||
if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
|
||||
return 1
|
||||
if(slot_r_store)
|
||||
if(H.r_store)
|
||||
return 0
|
||||
if(!H.w_uniform)
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
if(slot_flags & SLOT_DENYPOCKET)
|
||||
return 0
|
||||
if( w_class <= 2 || (slot_flags & SLOT_POCKET) )
|
||||
return 1
|
||||
return 0
|
||||
if(slot_s_store)
|
||||
if(H.s_store)
|
||||
return 0
|
||||
if(!H.wear_suit)
|
||||
if(!disable_warning)
|
||||
H << "\red You need a suit before you can attach this [name]."
|
||||
return 0
|
||||
if(!H.wear_suit.allowed)
|
||||
if(!disable_warning)
|
||||
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
|
||||
return 0
|
||||
if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) )
|
||||
return 1
|
||||
return 0
|
||||
if(slot_handcuffed)
|
||||
if(H.handcuffed)
|
||||
return 0
|
||||
if(!istype(src, /obj/item/weapon/handcuffs))
|
||||
return 0
|
||||
return 1
|
||||
if(slot_legcuffed)
|
||||
if(H.legcuffed)
|
||||
return 0
|
||||
if(!istype(src, /obj/item/weapon/legcuffs))
|
||||
return 0
|
||||
return 1
|
||||
if(slot_in_backpack)
|
||||
if (H.back && istype(H.back, /obj/item/weapon/storage/backpack))
|
||||
var/obj/item/weapon/storage/backpack/B = H.back
|
||||
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
|
||||
return 1
|
||||
return 0
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
else if(ismonkey(M))
|
||||
//START MONKEY
|
||||
var/mob/living/carbon/monkey/MO = M
|
||||
switch(slot)
|
||||
if(slot_l_hand)
|
||||
if(MO.l_hand)
|
||||
return 0
|
||||
return 1
|
||||
if(slot_r_hand)
|
||||
if(MO.r_hand)
|
||||
return 0
|
||||
return 1
|
||||
if(slot_wear_mask)
|
||||
if(MO.wear_mask)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_MASK) )
|
||||
return 0
|
||||
return 1
|
||||
if(slot_back)
|
||||
if(MO.back)
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_BACK) )
|
||||
return 0
|
||||
return 1
|
||||
return 0 //Unsupported slot
|
||||
|
||||
//END MONKEY
|
||||
|
||||
|
||||
/obj/item/verb/verb_pickup()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Pick up"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr))
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
if(usr.get_active_hand() == null)
|
||||
src.Click() // Let me know if this has any problems -Giacom
|
||||
/*
|
||||
if(usr.get_active_hand() == null)
|
||||
src.attack_hand(usr)
|
||||
else
|
||||
usr << "\red You already have something in your hand."
|
||||
*/
|
||||
else
|
||||
usr << "\red This mob type can't use this verb."
|
||||
|
||||
//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi
|
||||
//The default action is attack_self().
|
||||
//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob.
|
||||
/obj/item/proc/ui_action_click()
|
||||
if( src in usr )
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/device
|
||||
icon = 'icons/obj/device.dmi'
|
||||
|
||||
|
||||
@@ -227,6 +227,7 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
luminosity = 1
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "greenglow"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/machinery/camera
|
||||
name = "security camera"
|
||||
desc = "It's used to monitor rooms. It can see through walls."
|
||||
desc = "It's used to monitor rooms."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "camera"
|
||||
var/network = "SS13"
|
||||
|
||||
+26
-45
@@ -27,6 +27,13 @@
|
||||
IsShield()
|
||||
return 1
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/melee/baton))
|
||||
user.visible_message("<span class='warning'>[user] bashes their [src] with [W]!</span>")
|
||||
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shield/energy
|
||||
name = "energy combat shield"
|
||||
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
|
||||
@@ -221,6 +228,19 @@
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=2"
|
||||
|
||||
/obj/item/weapon/melee/chainofcommand
|
||||
name = "chain of command"
|
||||
desc = "A tool used by great men to placate the frothing masses."
|
||||
icon_state = "chain"
|
||||
item_state = "chain"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = 3
|
||||
origin_tech = "combat=4"
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
|
||||
/obj/item/weapon/melee/energy
|
||||
var/active = 0
|
||||
|
||||
@@ -688,41 +708,18 @@
|
||||
item_state = "card-id"
|
||||
w_class = 1.0
|
||||
|
||||
//TODO: Figure out wtf this is and possibly remove it -Nodrak
|
||||
/obj/item/weapon/dummy
|
||||
name = "dummy"
|
||||
invisibility = 101.0
|
||||
anchored = 1.0
|
||||
flags = TABLEPASS
|
||||
|
||||
/obj/item/weapon/extinguisher
|
||||
name = "fire extinguisher"
|
||||
desc = "A traditional red fire extinguisher."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "fire_extinguisher0"
|
||||
var/last_use = 1.0
|
||||
var/safety = 1
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT
|
||||
throwforce = 10
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
force = 10.0
|
||||
item_state = "fire_extinguisher"
|
||||
m_amt = 90
|
||||
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
|
||||
/obj/item/weapon/dummy/ex_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/mini
|
||||
name = "fire extinguisher"
|
||||
desc = "A light and compact fibreglass-framed model fire extinguisher."
|
||||
icon_state = "miniFE0"
|
||||
hitsound = null //it is much lighter, after all.
|
||||
flags = FPRINT | USEDELAY | TABLEPASS
|
||||
throwforce = 2
|
||||
w_class = 2.0
|
||||
force = 3.0
|
||||
item_state = "miniFE"
|
||||
m_amt = 0
|
||||
/obj/item/weapon/dummy/blob_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_card
|
||||
name = "finger print card"
|
||||
@@ -1291,7 +1288,7 @@
|
||||
|
||||
/obj/item/weapon/camera_bug/attack_self(mob/usr as mob)
|
||||
var/list/cameras = new/list()
|
||||
for (var/obj/machinery/camera/C in Cameras)
|
||||
for (var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if (C.bugged && C.status)
|
||||
cameras.Add(C)
|
||||
if (length(cameras) == 0)
|
||||
@@ -1610,22 +1607,6 @@
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
|
||||
/obj/item/weapon/dice // -- TLE
|
||||
name = "d6"
|
||||
desc = "A dice with six sides."
|
||||
var/sides = 6
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "d66"
|
||||
|
||||
/obj/item/weapon/dice/New()
|
||||
icon_state = "[name][rand(sides)]"
|
||||
|
||||
/obj/item/weapon/dice/d20 // -- TLE
|
||||
name = "d20"
|
||||
desc = "A dice with twenty sides."
|
||||
sides = 20
|
||||
icon_state = "d2020"
|
||||
|
||||
/obj/item/weapon/pai_cable
|
||||
desc = "A flexible coated cable with a universal jack on one end."
|
||||
name = "data cable"
|
||||
|
||||
@@ -50,20 +50,13 @@
|
||||
|
||||
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
|
||||
//They should approximate pythagoras theorem well enough for our needs.
|
||||
//In fact, less accuracy is kinda better for explosions anyway :P Maybe k1=1, k2=0.5?
|
||||
#define k1 0.934
|
||||
#define k2 0.427
|
||||
/proc/approx_dist(center=usr, T) // T is just the second atom to check distance to center with
|
||||
var/turf/centerturf = get_turf(center)
|
||||
var/turf/targetturf = get_turf(T)
|
||||
|
||||
var/a = abs(targetturf.x - centerturf.x) //sides of right-angled triangle
|
||||
var/b = abs(targetturf.y - centerturf.y)
|
||||
|
||||
if(a>=b)
|
||||
return (k1*a) + (k2*b) //No sqrt or powers :)
|
||||
else
|
||||
return (k1*b) + (k2*a)
|
||||
/proc/cheap_hypotenuse(Ax,Ay,Bx,By) // T is just the second atom to check distance to center with
|
||||
var/dx = abs(Ax - Bx) //sides of right-angled triangle
|
||||
var/dy = abs(Ay - By)
|
||||
if(dx>=dy) return (k1*dx) + (k2*dy) //No sqrt or powers :)
|
||||
else return (k1*dx) + (k2*dy)
|
||||
#undef k1
|
||||
#undef k2
|
||||
|
||||
|
||||
@@ -57,6 +57,13 @@ proc/isemptylist(list/list)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Checks for specific types in a list
|
||||
/proc/is_type_in_list(var/atom/A, var/list/L)
|
||||
for(var/type in L)
|
||||
if(istype(A, type))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Empties the list by setting the length to 0. Hopefully the elements get garbage collected
|
||||
proc/clearlist(list/list)
|
||||
if(istype(list))
|
||||
@@ -166,6 +173,29 @@ proc/listclearnulls(list/list)
|
||||
K += item
|
||||
return K
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortKey(var/list/client/L, var/order = 1)
|
||||
if(isnull(L) || L.len < 2)
|
||||
return L
|
||||
var/middle = L.len / 2 + 1
|
||||
return mergeKey(sortKey(L.Copy(0,middle)), sortKey(L.Copy(middle)), order)
|
||||
|
||||
//Mergsort: does the actual sorting and returns the results back to sortAtom
|
||||
/proc/mergeKey(var/list/client/L, var/list/client/R, var/order = 1)
|
||||
var/Li=1
|
||||
var/Ri=1
|
||||
var/list/result = new()
|
||||
while(Li <= L.len && Ri <= R.len)
|
||||
var/client/rL = L[Li]
|
||||
var/client/rR = R[Ri]
|
||||
if(sorttext(rL.ckey, rR.ckey) == order)
|
||||
result += L[Li++]
|
||||
else
|
||||
result += R[Ri++]
|
||||
|
||||
if(Li <= L.len)
|
||||
return (result + L.Copy(Li, 0))
|
||||
return (result + R.Copy(Ri, 0))
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortAtom(var/list/atom/L, var/order = 1)
|
||||
|
||||
@@ -199,6 +199,50 @@ proc/tg_list2text(list/list, glue=",")
|
||||
file = file(file_path)
|
||||
return dd_text2list(file2text(file), separator)
|
||||
|
||||
//Turns a direction into text
|
||||
/proc/dir2text(direction)
|
||||
switch(direction)
|
||||
if(1.0)
|
||||
return "north"
|
||||
if(2.0)
|
||||
return "south"
|
||||
if(4.0)
|
||||
return "east"
|
||||
if(8.0)
|
||||
return "west"
|
||||
if(5.0)
|
||||
return "northeast"
|
||||
if(6.0)
|
||||
return "southeast"
|
||||
if(9.0)
|
||||
return "northwest"
|
||||
if(10.0)
|
||||
return "southwest"
|
||||
else
|
||||
return
|
||||
|
||||
//Turns text into proper directions
|
||||
/proc/text2dir(direction)
|
||||
switch(uppertext(direction))
|
||||
if("NORTH")
|
||||
return 1
|
||||
if("SOUTH")
|
||||
return 2
|
||||
if("EAST")
|
||||
return 4
|
||||
if("WEST")
|
||||
return 8
|
||||
if("NORTHEAST")
|
||||
return 5
|
||||
if("NORTHWEST")
|
||||
return 9
|
||||
if("SOUTHEAST")
|
||||
return 6
|
||||
if("SOUTHWEST")
|
||||
return 10
|
||||
else
|
||||
return
|
||||
|
||||
//Converts an angle (degrees) into an ss13 direction
|
||||
/proc/angle2dir(var/degree)
|
||||
degree = ((degree+22.5)%365)
|
||||
|
||||
+198
-53
@@ -320,6 +320,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
oldname = null//don't bother with the records update crap
|
||||
world << "<b>[newname] is the AI!</b>"
|
||||
world << sound('sound/AI/newAI.ogg')
|
||||
for(var/mob/aiEye/E in mob_list)
|
||||
if(E.ai && E.ai == src)
|
||||
E.name = "[newname] (AI Eye)"
|
||||
break
|
||||
|
||||
fully_replace_character_name(oldname,newname)
|
||||
|
||||
@@ -399,30 +403,31 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
return creatures
|
||||
|
||||
//Orders mobs by type
|
||||
//Orders mobs by type then by name
|
||||
/proc/sortmobs()
|
||||
var/list/moblist = list()
|
||||
for(var/mob/living/silicon/ai/M in mob_list)
|
||||
var/list/sortmob = sortAtom(mob_list)
|
||||
for(var/mob/living/silicon/ai/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/silicon/pai/M in mob_list)
|
||||
for(var/mob/living/silicon/pai/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/silicon/robot/M in mob_list)
|
||||
for(var/mob/living/silicon/robot/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/human/M in mob_list)
|
||||
for(var/mob/living/carbon/human/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/brain/M in mob_list)
|
||||
for(var/mob/living/carbon/brain/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/alien/M in mob_list)
|
||||
for(var/mob/living/carbon/alien/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/dead/observer/M in mob_list)
|
||||
for(var/mob/dead/observer/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/new_player/M in mob_list)
|
||||
for(var/mob/new_player/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/monkey/M in mob_list)
|
||||
for(var/mob/living/carbon/monkey/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/carbon/metroid/M in mob_list)
|
||||
for(var/mob/living/carbon/metroid/M in sortmob)
|
||||
moblist.Add(M)
|
||||
for(var/mob/living/simple_animal/M in mob_list)
|
||||
for(var/mob/living/simple_animal/M in sortmob)
|
||||
moblist.Add(M)
|
||||
// for(var/mob/living/silicon/hivebot/M in world)
|
||||
// mob_list.Add(M)
|
||||
@@ -762,6 +767,17 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
if(A.vars.Find(lowertext(varname))) return 1
|
||||
else return 0
|
||||
|
||||
//Returns: all the areas in the world
|
||||
/proc/return_areas()
|
||||
var/list/area/areas = list()
|
||||
for(var/area/A in world)
|
||||
areas += A
|
||||
return areas
|
||||
|
||||
//Returns: all the areas in the world, sorted.
|
||||
/proc/return_sorted_areas()
|
||||
return sortAtom(return_areas())
|
||||
|
||||
//Takes: Area type as text string or as typepath OR an instance of the area.
|
||||
//Returns: A list of all areas of that type in the world.
|
||||
/proc/get_areas(var/areatype)
|
||||
@@ -907,25 +923,25 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
if(!istype(O,/obj)) continue
|
||||
O.loc = X
|
||||
for(var/mob/M in T)
|
||||
if(!istype(M,/mob)) continue
|
||||
if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
|
||||
M.loc = X
|
||||
|
||||
var/area/AR = X.loc
|
||||
// var/area/AR = X.loc
|
||||
|
||||
if(AR.sd_lighting)
|
||||
X.opacity = !X.opacity
|
||||
X.sd_SetOpacity(!X.opacity)
|
||||
// if(AR.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
|
||||
// X.opacity = !X.opacity
|
||||
// X.SetOpacity(!X.opacity)
|
||||
|
||||
toupdate += X
|
||||
|
||||
if(turftoleave)
|
||||
var/turf/ttl = new turftoleave(T)
|
||||
|
||||
var/area/AR2 = ttl.loc
|
||||
// var/area/AR2 = ttl.loc
|
||||
|
||||
if(AR2.sd_lighting)
|
||||
ttl.opacity = !ttl.opacity
|
||||
ttl.sd_SetOpacity(!ttl.opacity)
|
||||
// if(AR2.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
|
||||
// ttl.opacity = !ttl.opacity
|
||||
// ttl.sd_SetOpacity(!ttl.opacity)
|
||||
|
||||
fromupdate += ttl
|
||||
|
||||
@@ -942,13 +958,19 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
air_master.tiles_to_update |= T1
|
||||
/*if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1*/
|
||||
|
||||
if(fromupdate.len)
|
||||
for(var/turf/simulated/T2 in fromupdate)
|
||||
for(var/obj/machinery/door/D2 in T2)
|
||||
doors += D2
|
||||
air_master.tiles_to_update |= T2
|
||||
/*if(T2.parent)
|
||||
air_master.groups_to_rebuild += T2.parent
|
||||
else
|
||||
air_master.tiles_to_update += T2*/
|
||||
|
||||
for(var/obj/O in doors)
|
||||
O:update_nearby_tiles(1)
|
||||
@@ -1062,9 +1084,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
|
||||
for(var/mob/M in T)
|
||||
|
||||
if(!istype(M,/mob))
|
||||
continue
|
||||
|
||||
if(!istype(M,/mob) || istype(M, /mob/aiEye)) continue // If we need to check for more mobs, I'll add a variable
|
||||
mobs += M
|
||||
|
||||
for(var/mob/M in mobs)
|
||||
@@ -1079,14 +1099,14 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
|
||||
|
||||
for(var/V in T.vars)
|
||||
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity", "sd_light_spill",)))
|
||||
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
|
||||
X.vars[V] = T.vars[V]
|
||||
|
||||
var/area/AR = X.loc
|
||||
// var/area/AR = X.loc
|
||||
|
||||
if(AR.sd_lighting)
|
||||
X.opacity = !X.opacity
|
||||
X.sd_SetOpacity(!X.opacity)
|
||||
// if(AR.lighting_use_dynamic)
|
||||
// X.opacity = !X.opacity
|
||||
// X.sd_SetOpacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
|
||||
|
||||
toupdate += X
|
||||
|
||||
@@ -1099,12 +1119,11 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
|
||||
var/list/doors = new/list()
|
||||
|
||||
//skytodo: wtf is going on here?
|
||||
/*if(toupdate.len)
|
||||
if(toupdate.len)
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
if(T1.parent)
|
||||
/*if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1*/
|
||||
@@ -1151,26 +1170,152 @@ proc/get_mob_with_client_list()
|
||||
mobs += M
|
||||
return mobs
|
||||
|
||||
/atom/proc/transfer_fingerprints_to(var/atom/A)
|
||||
if(!istype(A.fingerprints,/list))
|
||||
A.fingerprints = list()
|
||||
if(!istype(A.fingerprintshidden,/list))
|
||||
A.fingerprintshidden = list()
|
||||
A.fingerprints |= fingerprints //detective
|
||||
A.fingerprintshidden |= fingerprintshidden //admin
|
||||
A.fingerprintslast = fingerprintslast
|
||||
|
||||
/proc/parse_zone(zone)
|
||||
if(zone == "r_hand") return "right hand"
|
||||
else if (zone == "l_hand") return "left hand"
|
||||
else if (zone == "l_arm") return "left arm"
|
||||
else if (zone == "r_arm") return "right arm"
|
||||
else if (zone == "l_leg") return "left leg"
|
||||
else if (zone == "r_leg") return "right leg"
|
||||
else if (zone == "l_foot") return "left foot"
|
||||
else if (zone == "r_foot") return "right foot"
|
||||
else return zone
|
||||
|
||||
|
||||
//todo: this func is missing diagonals
|
||||
/proc/get_turf(turf/location)
|
||||
while(location)
|
||||
if(isturf(location))
|
||||
return location
|
||||
location = location.loc
|
||||
return null
|
||||
|
||||
/proc/get_turf_or_move(turf/location)
|
||||
return get_turf(location)
|
||||
|
||||
|
||||
//Quick type checks for some tools
|
||||
var/global/list/common_tools = list(
|
||||
/obj/item/weapon/cable_coil,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/wirecutters,
|
||||
/obj/item/device/multitool,
|
||||
/obj/item/weapon/crowbar)
|
||||
|
||||
/proc/istool(O)
|
||||
if(O && is_type_in_list(O, common_tools))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswrench(O)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswelder(O)
|
||||
if(istype(O, /obj/item/weapon/weldingtool))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iscoil(O)
|
||||
if(istype(O, /obj/item/weapon/cable_coil))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iswirecutter(O)
|
||||
if(istype(O, /obj/item/weapon/wirecutters))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/isscrewdriver(O)
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/ismultitool(O)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/iscrowbar(O)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/is_hot(obj/item/W as obj)
|
||||
switch(W.type)
|
||||
if(/obj/item/weapon/weldingtool)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
return 3800
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/lighter)
|
||||
if(W:lit)
|
||||
return 1500
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/match)
|
||||
if(W:lit)
|
||||
return 1000
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/clothing/mask/cigarette)
|
||||
if(W:lit)
|
||||
return 1000
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/pickaxe/plasmacutter)
|
||||
return 3800
|
||||
if(/obj/item/weapon/melee/energy)
|
||||
return 3500
|
||||
else
|
||||
return 0
|
||||
|
||||
return 0
|
||||
|
||||
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
|
||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/screwdriver) || \
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
istype(W, /obj/item/weapon/weldingtool) || \
|
||||
istype(W, /obj/item/weapon/lighter/zippo) || \
|
||||
istype(W, /obj/item/weapon/match) || \
|
||||
istype(W, /obj/item/clothing/mask/cigarette) || \
|
||||
istype(W, /obj/item/weapon/wirecutters) || \
|
||||
istype(W, /obj/item/weapon/circular_saw) || \
|
||||
istype(W, /obj/item/weapon/melee/energy/sword) || \
|
||||
istype(W, /obj/item/weapon/melee/energy/blade) || \
|
||||
istype(W, /obj/item/weapon/shovel) || \
|
||||
istype(W, /obj/item/weapon/kitchenknife) || \
|
||||
istype(W, /obj/item/weapon/butch) || \
|
||||
istype(W, /obj/item/weapon/scalpel) || \
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
|
||||
istype(W, /obj/item/weapon/shard) || \
|
||||
istype(W, /obj/item/weapon/broken_bottle) || \
|
||||
istype(W, /obj/item/weapon/reagent_containers/syringe) || \
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) \
|
||||
)
|
||||
|
||||
/proc/reverse_direction(var/dir)
|
||||
switch(dir)
|
||||
if(1)
|
||||
return 2
|
||||
if(4)
|
||||
return 8
|
||||
if(2)
|
||||
return 1
|
||||
if(8)
|
||||
return 4
|
||||
else
|
||||
return dir
|
||||
if(NORTH)
|
||||
return SOUTH
|
||||
if(NORTHEAST)
|
||||
return SOUTHWEST
|
||||
if(EAST)
|
||||
return WEST
|
||||
if(SOUTHEAST)
|
||||
return NORTHWEST
|
||||
if(SOUTH)
|
||||
return NORTH
|
||||
if(SOUTHWEST)
|
||||
return NORTHEAST
|
||||
if(WEST)
|
||||
return EAST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
+17
-1
@@ -38,6 +38,16 @@
|
||||
proc/return_siding_icon_state() //used for grass floors, which have siding.
|
||||
return 0
|
||||
|
||||
/turf/Entered(atom/A as mob|obj)
|
||||
..()
|
||||
if ((A && A.density && !( istype(A, /obj/effect/beam) )))
|
||||
for(var/obj/effect/beam/i_beam/I in src)
|
||||
spawn( 0 )
|
||||
if (I)
|
||||
I.hit()
|
||||
return
|
||||
return
|
||||
|
||||
/turf/space
|
||||
icon = 'icons/turf/space.dmi'
|
||||
name = "\proper space"
|
||||
@@ -213,7 +223,7 @@
|
||||
walltype = "plasma"
|
||||
if("clown")
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating."
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon_state = "clown0"
|
||||
walltype = "clown"
|
||||
if("sandstone")
|
||||
@@ -298,6 +308,12 @@
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
turf/unsimulated/wall/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = 'icons/misc/fullscreen.dmi'
|
||||
icon_state = "title"
|
||||
layer = FLY_LAYER
|
||||
|
||||
/turf/unsimulated/wall/other
|
||||
icon_state = "r_wall"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user