Merge branch 'master' into overhaul-event-mob-selection

This commit is contained in:
mochi
2020-07-20 07:01:11 +02:00
204 changed files with 38138 additions and 282212 deletions
@@ -0,0 +1,81 @@
// Airlock painter
/obj/item/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on a completed airlock to change its paintjob."
icon = 'icons/obj/device.dmi'
icon_state = "airlock_painter"
item_state = "airlock_painter"
flags = CONDUCT | NOBLUDGEON
usesound = 'sound/effects/spray2.ogg'
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
materials = list(MAT_METAL = 3000, MAT_GLASS = 1000)
var/paint_setting
// All the different paint jobs that an airlock painter can apply.
// If the airlock you're using it on is glass, the new paint job will also be glass
var/list/available_paint_jobs = list(
"Atmospherics" = /obj/machinery/door/airlock/atmos,
"Command" = /obj/machinery/door/airlock/command,
"Engineering" = /obj/machinery/door/airlock/engineering,
"External" = /obj/machinery/door/airlock/external,
"External Maintenance"= /obj/machinery/door/airlock/maintenance/external,
"Freezer" = /obj/machinery/door/airlock/freezer,
"Maintenance" = /obj/machinery/door/airlock/maintenance,
"Medical" = /obj/machinery/door/airlock/medical,
"Mining" = /obj/machinery/door/airlock/mining,
"Public" = /obj/machinery/door/airlock/public,
"Research" = /obj/machinery/door/airlock/research,
"Science" = /obj/machinery/door/airlock/science,
"Security" = /obj/machinery/door/airlock/security,
"Standard" = /obj/machinery/door/airlock,
)
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/airlock_painter/proc/paint(mob/user)
playsound(loc, usesound, 30, TRUE)
return TRUE
/obj/item/airlock_painter/attack_self(mob/user)
paint_setting = input(user, "Please select a paintjob for this airlock.") as null|anything in available_paint_jobs
if(!paint_setting)
return
to_chat(user, "<span class='notice'>The [paint_setting] paint setting has been selected.</span>")
/obj/item/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/internal/lungs/L = user.get_organ_slot("lungs")
var/lungs_name = "\improper[L.name]"
if(L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
// Once you've inhaled the toner, you throw up your lungs
// and then die.
// they managed to lose their lungs between then and now. Good job.
if(!L)
return FALSE
L.remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.reaction(L, REAGENT_TOUCH, 1)
user.emote("scream")
user.visible_message("<span class='suicide'>[user] vomits out [user.p_their()] [lungs_name]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, TRUE)
// make some vomit under the player, and apply colorful reagent
var/obj/effect/decal/cleanable/vomit/V = new(get_turf(user))
V.create_reagents(10)
V.reagents.add_reagent("colorful_reagent", 10)
V.reagents.reaction(V, REAGENT_TOUCH, 1)
L.forceMove(get_turf(user))
return OXYLOSS
else
return SHAME
@@ -33,8 +33,6 @@
if(H && H.mind && H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(H.mind)
span = H.mind.speech_span
if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice))
span = "sans"
if(spamcheck)
@@ -272,7 +272,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
tcm.sender_job = "Automated Announcement"
tcm.vname = "synthesized voice"
tcm.data = SIGNALTYPE_AINOTRACK
// Datum radios dont have a location (obviously
// Datum radios dont have a location (obviously)
if(loc && loc.z)
tcm.source_level = loc.z // For anyone that reads this: This used to pull from a LIST from the CONFIG DATUM. WHYYYYYYYYY!!!!!!!! -aa
else
+14 -14
View File
@@ -253,7 +253,16 @@
to_chat(user, "<span class='warning'>This [W] does not seem to fit.</span>")
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
var/datum/ai_laws/laws_to_give
if(M.syndiemmi)
aisync = FALSE
lawsync = FALSE
laws_to_give = new /datum/ai_laws/syndicate_override
if(!aisync)
lawsync = FALSE
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1, ai_to_sync_to = forced_ai)
if(!O)
return
@@ -263,24 +272,15 @@
if(istype(task))
task.unit_completed()
if(M.syndiemmi)
aisync = 0
lawsync = 0
O.laws = new /datum/ai_laws/syndicate_override
O.invisibility = 0
//Transfer debug settings to new mob
O.custom_name = created_name
O.rename_character(O.real_name, O.get_default_name())
O.locked = panel_locked
if(!aisync)
lawsync = 0
O.connected_ai = null
else
O.notify_ai(1)
if(forced_ai)
O.connected_ai = forced_ai
if(!lawsync && !M.syndiemmi)
if(laws_to_give)
O.laws = laws_to_give
else if(!lawsync)
O.lawupdate = 0
O.make_laws()
@@ -48,7 +48,7 @@
if(..())
return
if(!R.allow_rename)
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
return 0
R.notify_ai(3, R.name, heldname)
R.name = heldname
@@ -196,7 +196,7 @@
if(R.emagged)
return
if(R.weapons_unlock)
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
return
R.emagged = 1
return TRUE
+5 -2
View File
@@ -31,6 +31,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/smoketime = 150
var/chem_volume = 60
var/list/list_reagents = list("nicotine" = 40)
var/first_puff = TRUE // the first puff is a bit more reagents ingested
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi',
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
@@ -194,8 +195,9 @@ LIGHTERS ARE IN LIGHTERS.DM
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(is_being_smoked) // if it's being smoked, transfer reagents to the mob
var/mob/living/carbon/C = loc
for (var/datum/reagent/R in reagents.reagent_list)
reagents.trans_id_to(C, R.id, max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
for(var/datum/reagent/R in reagents.reagent_list)
reagents.trans_id_to(C, R.id, first_puff ? 1 : max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
first_puff = FALSE
if(!reagents.total_volume) // There were reagents, but now they're gone
to_chat(C, "<span class='notice'>Your [name] loses its flavor.</span>")
else // else just remove some of the reagents
@@ -377,6 +379,7 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>")
reagents.add_reagent("nicotine", chem_volume)
smoketime = initial(smoketime)
first_puff = TRUE
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers))