Merge remote-tracking branch 'upstream/master' into unlockable-loadout-items

This commit is contained in:
Timothy Teakettle
2021-01-01 22:30:04 +00:00
187 changed files with 6110 additions and 4666 deletions
+122 -100
View File
@@ -325,10 +325,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Service Hallway"
icon_state = "hall_service"
/area/hallway/secondary/civilian
name = "Civilian Wing"
icon_state = "hallFS"
//Command
@@ -469,6 +465,11 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "yellow"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/arcade
name = "Arcade"
icon_state = "abandoned_g_den"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/fitness
name = "Fitness Room"
icon_state = "fitness"
@@ -479,6 +480,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "fitness"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/fitness/pool
name = "Pool Area"
icon_state = "pool"
/area/crew_quarters/cafeteria
name = "Cafeteria"
icon_state = "cafeteria"
@@ -765,6 +770,11 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "medbay3"
ambientsounds = MEDICAL
/area/medical/clinic
name = "Clinic"
icon_state = "medbay3"
ambientsounds = MEDICAL
/area/medical/abandoned
name = "Abandoned Medbay"
icon_state = "medbay3"
@@ -1036,10 +1046,19 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "janitor"
flags_1 = NONE
/area/janitor/aux
name = "Auxiliary Custodial Closet"
icon_state = "janitor"
flags_1 = NONE
/area/hydroponics
name = "Hydroponics"
icon_state = "hydro"
/area/hydroponics/lobby
name = "Hydroponics Lobby"
icon_state = "hydro"
/area/hydroponics/garden
name = "Garden"
icon_state = "garden"
@@ -1058,6 +1077,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Science Division"
icon_state = "toxlab"
/area/science/observatory
name = "Research Observatory"
icon_state = "toxmisc"
/area/science/lab
name = "Research and Development"
icon_state = "toxlab"
@@ -1186,6 +1209,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "storage"
clockwork_warp_allowed = FALSE
/area/storage/emergency
name = "Emergency Storage"
icon_state = "emergencystorage"
/area/storage/emergency/starboard
name = "Starboard Emergency Storage"
icon_state = "emergencystorage"
@@ -1395,100 +1422,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Telecommunications Satellite Lounge"
icon_state = "tcomsatlounge"
/area/crew_quarters/fitness/pool
name = "Pool Area"
icon_state = "pool"
/area/crew_quarters/dorms/blue
name = "Blue Dorms"
icon_state = "Sleep"
nightshift_public_area = NIGHTSHIFT_AREA_NONE
/area/crew_quarters/dorms/purple
name = "Purple Dorms"
icon_state = "Sleep"
nightshift_public_area = NIGHTSHIFT_AREA_NONE
/area/crew_quarters/lounge/jazz
name = "Jazz Lounge"
icon_state = "yellow"
ambientsounds = list('sound/ambience/ambidet1.ogg','sound/ambience/ambidet2.ogg')
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/fitness/recreation
name = "Recreation Area"
icon_state = "fitness"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/fitness/cogpool
name = "Pool"
icon_state = "fitness"
clockwork_warp_fail = "Pool's closed."
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/barbershop
name = "Barbershop"
icon_state = "blue"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/observatory
name = "Observatory"
icon_state = "Sleep"
//Engineering
/area/engine/teg_hot
name = "Hot Loop"
icon_state = "red"
/area/engine/teg_cold
name = "Cold Loop"
icon_state = "blue"
/area/engine/workshop
name = "Engineering Workshop"
icon_state = "engine"
/area/security/courtroom/jury
name = "Jury Room"
icon_state = "courtroom"
/area/quartermaster/miningdock/airless
name = "Mining Dock"
icon_state = "mining"
has_gravity = STANDARD_GRAVITY
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //While part of the station, what good will it do you?
/area/quartermaster/miningdock/airless/no_grav
name = "Mining Dock"
icon_state = "mining"
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
power_light = FALSE
power_equip = FALSE
power_environ = FALSE
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //While part of the station, what good will it do you?
/area/janitor/aux
name = "Auxiliary Custodial Closet"
icon_state = "janitor"
flags_1 = NONE
/area/hydroponics/lobby
name = "Hydroponics Lobby"
icon_state = "hydro"
//Storage
/area/storage/emergency/generic
name = "Emergency Storage"
icon_state = "emergencystorage"
//Construction
@@ -1545,10 +1478,99 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Storage Wing"
icon_state = "storage_wing"
//Routers
//Areas that predominantly only apply to CogStation
/area/crew_quarters/dorms/blue
name = "Blue Dorms"
icon_state = "Sleep"
nightshift_public_area = NIGHTSHIFT_AREA_NONE
/area/crew_quarters/dorms/purple
name = "Purple Dorms"
icon_state = "Sleep"
nightshift_public_area = NIGHTSHIFT_AREA_NONE
/area/crew_quarters/lounge/jazz
name = "Jazz Lounge"
icon_state = "yellow"
ambientsounds = list('sound/ambience/ambidet1.ogg','sound/ambience/ambidet2.ogg')
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/fitness/cogpool
name = "Pool"
icon_state = "fitness"
clockwork_warp_fail = "Pool's closed."
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/barbershop
name = "Barbershop"
icon_state = "blue"
nightshift_public_area = NIGHTSHIFT_AREA_RECREATION
/area/crew_quarters/observatory
name = "Observatory"
icon_state = "Sleep"
/area/hallway/secondary/civilian
name = "Civilian Wing"
icon_state = "hallFS"
/area/engine/atmos/aftair
name = "Aft Air Hookup"
icon_state = "atmos"
flags_1 = NONE
/area/engine/teg
name = "Thermo-Electric Generator"
icon_state = "engine"
/area/engine/teg/hotloop
name = "Hot Loop"
icon_state = "red"
/area/engine/teg/coldloop
name = "Cold Loop"
icon_state = "blue"
/area/engine/workshop
name = "Engineering Workshop"
icon_state = "engine"
/area/engine/substation
name = "Electrical Substation"
icon_state = "engine"
/area/security/courtroom/jury
name = "Jury Room"
icon_state = "courtroom"
/area/quartermaster/miningdock/airless
name = "Mining Dock"
icon_state = "mining"
has_gravity = STANDARD_GRAVITY
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //While part of the station, what good will it do you?
/area/quartermaster/miningdock/airless/no_grav
name = "Mining Dock"
icon_state = "mining"
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
power_light = FALSE
power_equip = FALSE
power_environ = FALSE
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE //While part of the station, what good will it do you?
//Routers (currently exclusive to CogStation)
/area/router
name = "Router"
name = "Routing Depot"
icon_state = "yellow"
ambientsounds = ENGINEERING
-18
View File
@@ -1143,21 +1143,3 @@
*/
/atom/proc/setClosed()
return
///Passes Stat Browser Panel clicks to the game and calls client click on an atom
/atom/Topic(href, list/href_list)
. = ..()
if(!usr?.client)
return
var/client/usr_client = usr.client
var/list/paramslist = list()
if(href_list["statpanel_item_shiftclick"])
paramslist["shift"] = "1"
if(href_list["statpanel_item_ctrlclick"])
paramslist["ctrl"] = "1"
if(href_list["statpanel_item_altclick"])
paramslist["alt"] = "1"
if(href_list["statpanel_item_click"])
// first of all make sure we valid
var/mouseparams = list2params(paramslist)
usr_client.Click(src, loc, null, mouseparams)
+3 -3
View File
@@ -150,14 +150,14 @@ Credit where due:
var/datum/team/clockcult/main_clockcult
/datum/game_mode/clockwork_cult/pre_setup() //Gamemode and job code is pain. Have fun codediving all of that stuff, whoever works on this next - Delta
var/list/errorList = list()
/*var/list/errorList = list()
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
if(errorList.len) // reebe failed to load
message_admins("Reebe failed to load!")
log_game("Reebe failed to load!")
return FALSE
for(var/datum/parsed_map/PM in reebes)
PM.initTemplateBounds()
for(var/datum/parsed_map/PM in reebes) //Temporarily commented because of z-level loading reliably segfaulting the server.
PM.initTemplateBounds()*/
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
+104 -123
View File
@@ -22,17 +22,16 @@
//Used for logging people entering cryosleep and important items they are carrying.
var/list/frozen_crew = list()
var/list/frozen_items = list()
// Used for containing rare items traitors need to steal, so it's not
// game-over if they get iced
var/list/objective_items = list()
// A cache of theft datums so you don't have to re-create them for
// each item check
var/list/theft_cache = list()
var/list/obj/stored_packages = list()
var/allow_items = TRUE
/obj/machinery/computer/cryopod/deconstruct()
. = ..()
for(var/i in stored_packages)
var/obj/O = i
O.forceMove(drop_location())
/obj/machinery/computer/cryopod/attack_ai()
attack_hand()
@@ -67,11 +66,11 @@
if(3)
dat += "<a href='byond://?src=[REF(src)];menu=1'><< Back</a><br><br>"
dat += "<h3>Recently stored objects</h3><br/><hr/><br/>"
if(!frozen_items.len)
if(!stored_packages.len)
dat += "There has been no storage usage at this terminal.<br/>"
else
for(var/obj/item/I in frozen_items)
dat += "[I.name]<br/>"
for(var/obj/O in stored_packages)
dat += "[O.name]<br/>"
dat += "<hr/>"
var/datum/browser/popup = new(user, "cryopod_console", "Cryogenic System Control")
@@ -87,25 +86,27 @@
add_fingerprint(user)
if(href_list["item"])
if(!allowed(user))
if(!allowed(user) && !(obj_flags & EMAGGED))
to_chat(user, "<span class='warning'>Access Denied.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
updateUsrDialog()
return
if(!allow_items) return
if(frozen_items.len == 0)
if(!allow_items)
return
if(stored_packages.len == 0)
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
updateUsrDialog()
return
var/obj/item/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in frozen_items
var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages
playsound(src, "terminal_type", 25, 0)
if(!I)
return
if(!(I in frozen_items))
if(!(I in stored_packages))
to_chat(user, "<span class='notice'>\The [I] is no longer in storage.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
updateUsrDialog()
@@ -117,20 +118,21 @@
I.forceMove(drop_location())
if(user && Adjacent(user) && user.can_hold_items())
user.put_in_hands(I)
frozen_items -= I
stored_packages -= I
updateUsrDialog()
else if(href_list["allitems"])
playsound(src, "terminal_type", 25, 0)
if(!allowed(user))
if(!allowed(user) && !(obj_flags & EMAGGED))
to_chat(user, "<span class='warning'>Access Denied.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
updateUsrDialog()
return
if(!allow_items)
return
if(frozen_items.len == 0)
if(stored_packages.len == 0)
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
return
@@ -138,10 +140,10 @@
visible_message("<span class='notice'>The console beeps happily as it disgorges the desired objects.</span>")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
for(var/obj/item/I in frozen_items)
I.forceMove(drop_location())
frozen_items -= I
updateUsrDialog()
for(var/obj/O in stored_packages)
O.forceMove(get_turf(src))
stored_packages.Cut()
updateUsrDialog()
else if (href_list["menu"])
src.menu = text2num(href_list["menu"])
@@ -159,6 +161,13 @@
/obj/machinery/computer/cryopod/contents_explosion()
return
/obj/machinery/computer/cryopod/contents_explosion()
return //don't blow everyone's shit up.
/// The box
/obj/item/storage/box/blue/cryostorage_items
w_class = WEIGHT_CLASS_HUGE
//Cryopods themselves.
/obj/machinery/cryopod
name = "cryogenic freezer"
@@ -177,44 +186,9 @@
var/despawn_world_time = null // Used to keep track of the safe period.
var/obj/machinery/computer/cryopod/control_computer
var/item_storage_type = /obj/item/storage/box/blue/cryostorage_items //with how storage components work this can be anything the player can open or anything with a storage component.
var/last_no_computer_message = 0
// These items are preserved when the process() despawn proc occurs.
var/static/list/preserve_items = typecacheof(list(
/obj/item/hand_tele,
/obj/item/card/id/captains_spare,
/obj/item/aicard,
/obj/item/mmi,
/obj/item/paicard,
/obj/item/gun,
/obj/item/pinpointer,
/obj/item/clothing/shoes/magboots,
/obj/item/areaeditor/blueprints,
/obj/item/clothing/head/helmet/space,
/obj/item/clothing/suit/space,
/obj/item/clothing/suit/armor,
/obj/item/defibrillator/compact,
/obj/item/reagent_containers/hypospray/CMO,
/obj/item/clothing/accessory/medal/gold/captain,
/obj/item/clothing/gloves/krav_maga,
/obj/item/nullrod,
/obj/item/tank/jetpack,
/obj/item/documents,
/obj/item/nuke_core_container
))
// These items will NOT be preserved
var/static/list/do_not_preserve_items = typecacheof(list(
/obj/item/mmi/posibrain,
/obj/item/gun/energy/laser/mounted,
/obj/item/gun/energy/e_gun/advtaser/mounted,
/obj/item/gun/ballistic/revolver/grenadelauncher/cyborg,
/obj/item/gun/energy/disabler/cyborg,
/obj/item/gun/energy/e_gun/advtaser/cyborg,
/obj/item/gun/energy/printer,
/obj/item/gun/energy/kinetic_accelerator/cyborg,
/obj/item/gun/energy/laser/cyborg
))
/obj/machinery/cryopod/Initialize(mapload)
. = ..()
update_icon()
@@ -286,73 +260,89 @@
despawn_occupant()
#define CRYO_DESTROY 0
#define CRYO_PRESERVE 1
#define CRYO_OBJECTIVE 2
#define CRYO_IGNORE 3
#define CRYO_DESTROY_LATER 4
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I)
for(var/datum/objective_item/steal/T in control_computer.theft_cache)
if(istype(I, T.targetitem) && T.check_special_completion(I))
return CRYO_OBJECTIVE
if(preserve_items[I] && !do_not_preserve_items[I])
return CRYO_PRESERVE
return CRYO_DESTROY
// This function can not be undone; do not call this unless you are sure
/obj/machinery/cryopod/proc/despawn_occupant()
if(!control_computer)
find_control_computer()
var/mob/living/mob_occupant = occupant
var/list/obj/item/cryo_items = list()
var/list/obj/item/storing = list()
var/list/obj/item/destroying = list()
var/list/obj/item/destroy_later = list()
investigate_log("Despawning [key_name(mob_occupant)].", INVESTIGATE_CRYOGENICS)
//Handle Borg stuff first
var/atom/target_store = (control_computer?.allow_items && control_computer) || src //the double control computer check makes it return the control computer.
var/drop_to_ground = !istype(target_store, /obj/machinery/computer/cryopod)
var/mind_identity = mob_occupant.mind?.name
var/occupant_identity = mob_occupant.real_name
if(iscyborg(mob_occupant))
var/mob/living/silicon/robot/R = mob_occupant
if(R.mmi?.brain)
cryo_items[R.mmi] = CRYO_DESTROY_LATER
cryo_items[R.mmi.brain] = CRYO_DESTROY_LATER
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags
cryo_items[O] = should_preserve_item(O)
O.forceMove(src)
R.module.remove_module(I, TRUE) //delete the module itself so it doesn't transfer over.
//Drop all items into the pod.
for(var/obj/item/I in mob_occupant)
if(cryo_items[I] == CRYO_IGNORE || cryo_items[I] ==CRYO_DESTROY_LATER)
continue
cryo_items[I] = should_preserve_item(I)
mob_occupant.transferItemToLoc(I, src, TRUE)
if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items.
if(cryo_items[I] != CRYO_DESTROY) // Don't remove the contents of things that need preservation
destroy_later += R.mmi
destroy_later += R.mmi.brain
for(var/i in R.module)
if(!isitem(i))
destroying += i
continue
for(var/obj/item/O in I.contents)
cryo_items[O] = should_preserve_item(O)
O.forceMove(src)
for(var/A in cryo_items)
var/obj/item/I = A
if(QDELETED(I)) //edge cases and DROPDEL.
continue
var/preserve = cryo_items[I]
if(preserve == CRYO_DESTROY_LATER)
continue
if(preserve != CRYO_IGNORE)
if(preserve == CRYO_DESTROY)
qdel(I)
else if(control_computer?.allow_items)
control_computer.frozen_items += I
if(preserve == CRYO_OBJECTIVE)
control_computer.objective_items += I
I.moveToNullspace()
var/obj/item/I = i
// let's be honest we only care about the trash bag don't beat around the bush
if(SEND_SIGNAL(I, COMSIG_CONTAINS_STORAGE))
storing += I.contents
for(var/atom/movable/AM in I.contents)
AM.forceMove(src)
R.module.remove_module(I, TRUE)
else
var/list/gear = list()
if(iscarbon(mob_occupant)) // sorry simp-le-mobs deserve no mercy
var/mob/living/carbon/C = mob_occupant
gear = C.get_all_gear()
for(var/i in gear)
var/obj/item/I = i
I.forceMove(src)
if(!istype(I))
destroying += I
continue
if(I.item_flags & (DROPDEL | ABSTRACT))
destroying += I
continue
if(HAS_TRAIT(I, TRAIT_NODROP))
destroying += I
continue
// WEE WOO SNOWFLAKE TIME
if(istype(I, /obj/item/pda))
var/obj/item/pda/P = I
if((P.owner == mind_identity) || (P.owner == occupant_identity))
destroying += P
else
storing += P
else if(istype(I, /obj/item/card/id))
var/obj/item/card/id/idcard = I
if((idcard.registered_name == mind_identity) || (idcard.registered_name == occupant_identity))
destroying += idcard
else
storing += idcard
else
I.forceMove(loc)
cryo_items -= I
storing += I
// get rid of mobs
for(var/mob/living/L in mob_occupant.GetAllContents() - mob_occupant)
L.forceMove(drop_location())
if(storing.len)
var/obj/O = new item_storage_type
O.name = "cryogenic retrieval package: [mob_occupant.real_name]"
for(var/i in storing)
var/obj/item/I = i
I.forceMove(O)
O.forceMove(drop_to_ground? target_store.drop_location() : target_store)
if((target_store == control_computer) && !drop_to_ground)
control_computer.stored_packages += O
QDEL_LIST(destroying)
//Update any existing objectives involving this mob.
for(var/i in GLOB.objectives)
@@ -414,22 +404,13 @@
// Ghost and delete the mob.
if(!mob_occupant.get_ghost(1))
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE)
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE, cryo = TRUE)
QDEL_NULL(occupant)
for(var/I in cryo_items) //only "CRYO_DESTROY_LATER" atoms are left)
var/atom/A = I
if(!QDELETED(A))
qdel(A)
QDEL_LIST(destroy_later)
open_machine()
name = initial(name)
#undef CRYO_DESTROY
#undef CRYO_PRESERVE
#undef CRYO_OBJECTIVE
#undef CRYO_IGNORE
#undef CRYO_DESTROY_LATER
/obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user)
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
return
+2 -2
View File
@@ -67,9 +67,9 @@
/obj/machinery/door/window/proc/open_and_close()
open()
if(src.check_access(null))
sleep(50)
sleep(60)
else //secure doors close faster
sleep(20)
sleep(40)
close()
/obj/machinery/door/window/Bumped(atom/movable/AM)
+44 -35
View File
@@ -18,7 +18,7 @@
var/mode = HEATER_MODE_STANDBY
var/setMode = "auto" // Anything other than "heat" or "cool" is considered auto.
var/targetTemperature = T20C
var/heatingPower = 40000
var/heatingPower = 10000
var/efficiency = 20000
var/temperatureTolerance = 1
var/settableTemperatureMedian = 30 + T0C
@@ -74,46 +74,55 @@
if(cell && cell.charge > 0)
var/turf/L = loc
if(!istype(L))
if(mode != HEATER_MODE_STANDBY)
mode = HEATER_MODE_STANDBY
update_icon()
return
PerformHeating(L)
var/datum/gas_mixture/env = L.return_air()
for(var/direction in GLOB.alldirs)
L=get_step(src,direction)
if(!locate(/turf/closed) in L) // we don't want to heat walls and cause jank
PerformHeating(L)
var/newMode = HEATER_MODE_STANDBY
if(setMode != HEATER_MODE_COOL && env.return_temperature() < targetTemperature - temperatureTolerance)
newMode = HEATER_MODE_HEAT
else if(setMode != HEATER_MODE_HEAT && env.return_temperature() > targetTemperature + temperatureTolerance)
newMode = HEATER_MODE_COOL
if(mode != newMode)
mode = newMode
update_icon()
if(mode == HEATER_MODE_STANDBY)
return
var/heat_capacity = env.heat_capacity()
var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity
requiredPower = min(requiredPower, heatingPower)
if(requiredPower < 1)
return
var/deltaTemperature = requiredPower / heat_capacity
if(mode == HEATER_MODE_COOL)
deltaTemperature *= -1
if(deltaTemperature)
env.set_temperature(env.return_temperature() + deltaTemperature)
air_update_turf()
cell.use(requiredPower / efficiency)
else
on = FALSE
update_icon()
return PROCESS_KILL
/obj/machinery/space_heater/proc/PerformHeating(turf/L)
if(!istype(L))
if(mode != HEATER_MODE_STANDBY)
mode = HEATER_MODE_STANDBY
update_icon()
return
var/datum/gas_mixture/env = L.return_air()
var/newMode = HEATER_MODE_STANDBY
if(setMode != HEATER_MODE_COOL && env.return_temperature() < targetTemperature - temperatureTolerance)
newMode = HEATER_MODE_HEAT
else if(setMode != HEATER_MODE_HEAT && env.return_temperature() > targetTemperature + temperatureTolerance)
newMode = HEATER_MODE_COOL
if(mode != newMode)
mode = newMode
update_icon()
if(mode == HEATER_MODE_STANDBY)
return
var/heat_capacity = env.heat_capacity()
var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity
requiredPower = min(requiredPower, heatingPower)
if(requiredPower < 1)
return
var/deltaTemperature = requiredPower / heat_capacity
if(mode == HEATER_MODE_COOL)
deltaTemperature *= -1
if(deltaTemperature)
env.set_temperature(env.return_temperature() + deltaTemperature)
air_update_turf()
cell.use(requiredPower / efficiency)
/obj/machinery/space_heater/RefreshParts()
var/laser = 2
var/cap = 1
@@ -122,7 +131,7 @@
for(var/obj/item/stock_parts/capacitor/M in component_parts)
cap += M.rating
heatingPower = laser * 40000
heatingPower = laser * 10000
settableTemperatureRange = cap * 30
efficiency = (cap + 1) * 10000
-7
View File
@@ -377,10 +377,3 @@
hitsound = 'sound/weapons/taserhit.ogg'
w_class = WEIGHT_CLASS_SMALL
breakouttime = 60
/obj/item/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(iscarbon(hit_atom))
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom))
B.Crossed(hit_atom)
qdel(src)
..()
+6 -1
View File
@@ -175,7 +175,7 @@
/obj/item/kitchen/knife/combat/survival/knuckledagger/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 50, 120, 5) // it's good for butchering stuff
AddComponent(/datum/component/butchering, 30, 130, 20) // it's good for butchering stuff
/obj/item/kitchen/knife/combat/survival/knuckledagger/ui_action_click(mob/user, actiontype)
light_on = !light_on
@@ -189,6 +189,11 @@
else
set_light(0)
/obj/item/kitchen/knife/combat/survival/knuckledagger/update_overlays()
. = ..()
if(light_on)
. += "[icon_state]_lit"
/obj/item/kitchen/knife/combat/bone
name = "bone dagger"
item_state = "bone_dagger"
+15 -1
View File
@@ -33,6 +33,8 @@
//--end of love :'(--
var/snowflake_id //if we set from a config snowflake plushie.
/// wrapper, do not use, read only
var/__ADMIN_SET_TO_ID
var/can_random_spawn = TRUE //if this is FALSE, don't spawn this for random plushies.
/obj/item/toy/plush/random_snowflake/Initialize(mapload, set_snowflake_id)
@@ -112,10 +114,21 @@
return ..()
/obj/item/toy/plush/vv_get_var(var_name)
if(var_name == NAMEOF(src, __ADMIN_SET_TO_ID))
return debug_variable("__ADMIN: SET SNOWFLAKE ID", snowflake_id, 0, src)
return ..()
/obj/item/toy/plush/vv_edit_var(var_name, var_value)
if(var_name == NAMEOF(src, __ADMIN_SET_TO_ID))
return set_snowflake_from_config(var_value)
return ..()
/obj/item/toy/plush/proc/set_snowflake_from_config(id)
var/list/configlist = CONFIG_GET(keyed_list/snowflake_plushies)
var/list/jsonlist = configlist[id]
ASSERT(jsonlist)
if(!jsonlist)
return FALSE
jsonlist = json_decode(jsonlist)
if(jsonlist["inherit_from"])
var/path = text2path(jsonlist["inherit_from"])
@@ -151,6 +164,7 @@
var/datum/component/squeak/S = GetComponent(/datum/component/squeak)
S?.override_squeak_sounds = squeak_override
snowflake_id = id
return TRUE
/obj/item/toy/plush/handle_atom_del(atom/A)
if(A == grenade)
+1 -2
View File
@@ -137,8 +137,7 @@
AM.anchored = TRUE
flick("laserbox_burn", AM)
trigger()
sleep(15)
qdel(AM)
QDEL_IN(src, 15)
// snowflake code until undertile elements
/obj/item/pressure_plate/hologrid/hide()
+18 -12
View File
@@ -23,14 +23,15 @@
resistance_flags = FIRE_PROOF
var/self_fueling = FALSE //Do we refill ourselves or not
var/nextrefueltick = 0 // How long it takes before we get a new fuel unit
var/nextrefueltick = 0 //When is the next tick we refuel?
var/refueling_interval = 10 //Every how many processing ticks does this refuel? (1 = every processing tick)
custom_materials = list(/datum/material/iron=70, /datum/material/glass=30)
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = TRUE //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/change_icons = 1
var/can_off_process = 0
var/can_off_process = FALSE
var/light_intensity = 2 //how powerful the emitted light is when used.
var/progress_flash_divisor = 10
var/burned_fuel_for = 0 //when fuel was last removed
@@ -66,6 +67,14 @@
. += "[initial(icon_state)]-on"
/obj/item/weldingtool/process()
//This handles refueling. Its looking at how much fuel the tool has and comparing that to how much it holds
//This then looks if the refuel tick has come based on world time.
//Then looks if we refuel ourselves or not.
if(self_fueling && get_fuel() < max_fuel && nextrefueltick <= world.time)
nextrefueltick = world.time + refueling_interval
reagents.add_reagent(/datum/reagent/fuel, 1)
switch(welding)
if(0)
force = 3
@@ -86,14 +95,6 @@
//This is to start fires. process() is only called if the welder is on.
open_flame()
//This handles refueling. Its looking at how much fuel the tool has and comparing that to how much it holds
//This then looks if the refuel tick has come based on world time.
//Then looks if we refuel ourselves or not.
if(get_fuel() < max_fuel && nextrefueltick < world.time && self_fueling)
nextrefueltick = world.time + 10
reagents.add_reagent(/datum/reagent/fuel, 1)
/obj/item/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (FIRELOSS)
@@ -367,7 +368,7 @@
custom_materials = list(/datum/material/iron=70, /datum/material/glass=120)
change_icons = 0
self_fueling = TRUE
can_off_process = 1
can_off_process = TRUE
light_intensity = 1
toolspeed = 0.5
@@ -375,6 +376,7 @@
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
resistance_flags = FIRE_PROOF | ACID_PROOF
refueling_interval = 5
icon_state = "clockwelder"
item_state = "brasswelder"
@@ -384,16 +386,20 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
self_fueling = TRUE
can_off_process = TRUE
refueling_interval = 1
toolspeed = 0.1
light_intensity = 0
change_icons = 0
/obj/item/weldingtool/advanced
name = "advanced welding tool"
desc = "A modern welding tool combined with an alien welding tool, it never runs out of fuel and works almost as fast."
desc = "A modern welding tool combined with an alien welding tool, it almost never runs out of fuel and works nearly as fast."
icon = 'icons/obj/advancedtools.dmi'
icon_state = "welder"
self_fueling = TRUE
can_off_process = TRUE
refueling_interval = 2
toolspeed = 0.2
light_intensity = 0
change_icons = 0
@@ -446,8 +446,11 @@
var/mob/living/L = O
if(!issilicon(L))
L.DefaultCombatKnockdown(40)
O.forceMove(T)
close()
if(istype(src, /obj/structure/closet/supplypod/extractionpod))
O.forceMove(src)
else
O.forceMove(T)
close()
else
O.forceMove(T)
return 1
@@ -47,6 +47,25 @@
new /obj/item/clothing/glasses/hud/health(src)
return
/obj/structure/closet/secure_closet/paramedic
name = "paramedic's locker"
req_access = list(ACCESS_MEDICAL)
icon_state = "paramed_secure"
/obj/structure/closet/secure_closet/paramedic/PopulateContents()
..()
new /obj/item/clothing/suit/toggle/labcoat/paramedic(src)
new /obj/item/clothing/under/rank/medical/paramedic(src)
new /obj/item/clothing/under/rank/medical/paramedic/skirt(src)
new /obj/item/radio/headset/headset_med(src)
new /obj/item/defibrillator/loaded(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/storage/belt/medical(src)
new /obj/item/clothing/glasses/hud/health(src)
new /obj/item/pinpointer/crew(src)
new /obj/item/sensor_device(src)
return
/obj/structure/closet/secure_closet/CMO
name = "\proper chief medical officer's locker"
req_access = list(ACCESS_CMO)
+3 -3
View File
@@ -98,11 +98,11 @@ GLOBAL_LIST_INIT(freqtospan, list(
/// Converts specific characters, like +, |, and _ to formatted output.
/atom/movable/proc/say_emphasis(input)
var/static/regex/italics = regex(@"\|(\S[\w\W]*?\S)\|", "g")
var/static/regex/italics = regex(@"\|((?=\S)[\w\W]*?(?<=\S))\|", "g")
input = italics.Replace_char(input, "<i>$1</i>")
var/static/regex/bold = regex(@"\+(\S[\w\W]*?\S)\+", "g")
var/static/regex/bold = regex(@"\+((?=\S)[\w\W]*?(?<=\S))\+", "g")
input = bold.Replace_char(input, "<b>$1</b>")
var/static/regex/underline = regex(@"_(\S[\w\W]*?\S)_", "g")
var/static/regex/underline = regex(@"_((?=\S)[\w\W]*?(?<=\S))_", "g")
input = underline.Replace_char(input, "<u>$1</u>")
return input
+2
View File
@@ -163,6 +163,8 @@
while (pulling != null)
var/next_pulling = pulling.pulling
if(next_pulling == pulling)
break // no loops
var/turf/T = get_step(puller.loc, turn(puller.dir, 180))
pulling.can_be_z_moved = FALSE