mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into alert_alert_ur_a_faget
Conflicts: code/modules/mob/living/carbon/alien/humanoid/life.dm code/modules/mob/living/carbon/alien/larva/life.dm code/modules/mob/living/carbon/alien/life.dm code/modules/mob/living/carbon/monkey/life.dm icons/mob/screen_alien.dmi
This commit is contained in:
@@ -5,18 +5,32 @@
|
||||
icon_state = "empty"
|
||||
req_access = list(access_bar)
|
||||
var/list/barsigns=list()
|
||||
var/list/hiddensigns
|
||||
var/broken = 0
|
||||
var/emagged = 0
|
||||
var/state = 0
|
||||
var/prev_sign = ""
|
||||
var/panel_open = 0
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/New()
|
||||
..()
|
||||
|
||||
|
||||
//filling the barsigns list
|
||||
for(var/bartype in typesof(/datum/barsign) - /datum/barsign)
|
||||
var/datum/barsign/signinfo = new bartype
|
||||
barsigns += signinfo
|
||||
if(!signinfo.hidden)
|
||||
barsigns += signinfo
|
||||
|
||||
|
||||
//randomly assigning a sign
|
||||
set_sign(pick(barsigns))
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/proc/set_sign(var/datum/barsign/sign)
|
||||
if(!istype(sign))
|
||||
return
|
||||
@@ -27,91 +41,205 @@
|
||||
else
|
||||
desc = "It displays \"[name]\"."
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user as mob)
|
||||
if (!src.allowed(user))
|
||||
user << "<span class = 'info'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if (broken)
|
||||
user << "<span class ='danger'>The controls seem unresponsive.</span>"
|
||||
return
|
||||
pick_sign()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!allowed(user))
|
||||
user << "<span class = 'info'>Access denied.</span>"
|
||||
return
|
||||
if( istype(I, /obj/item/weapon/screwdriver))
|
||||
if(!panel_open)
|
||||
user << "You open the maintenance panel."
|
||||
set_sign(new /datum/barsign/hiddensigns/signoff)
|
||||
panel_open = 1
|
||||
else
|
||||
user << "You close the maintenance panel."
|
||||
if(!broken && !emagged)
|
||||
set_sign(pick(barsigns))
|
||||
else if(emagged)
|
||||
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
|
||||
else
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
panel_open = 0
|
||||
|
||||
if(istype(I, /obj/item/stack/cable_coil) && panel_open)
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if(emagged) //Emagged, not broken by EMP
|
||||
user << "Sign has been damaged beyond repair."
|
||||
return
|
||||
else if(!broken)
|
||||
user << "This sign is functioning properly."
|
||||
return
|
||||
|
||||
if(C.use(2))
|
||||
user << "<span class='notice'>You replace the burnt wiring.</span>"
|
||||
broken = 0
|
||||
else
|
||||
user << "<span class='warning'>You need at least two lengths of cable.</span>"
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emp_act(severity)
|
||||
var/prev_icon = icon_state
|
||||
icon_state = "empbarsign"
|
||||
sleep(300*severity) //measured in deci-seconds
|
||||
icon_state = prev_icon
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
broken = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emag_act(mob/user)
|
||||
if(broken || emagged)
|
||||
user << "Nothing interesting happens."
|
||||
return
|
||||
user << "<span class='notice'>You emag the barsign. Takeover in progress...</span>"
|
||||
sleep(100) //10 seconds
|
||||
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
|
||||
emagged = 1
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/proc/pick_sign()
|
||||
var/picked_name = input("Available Signage", "Bar Sign") as null|anything in barsigns
|
||||
if(!picked_name)
|
||||
return
|
||||
|
||||
set_sign(picked_name)
|
||||
|
||||
|
||||
|
||||
//Code below is to define useless variables for datums. It errors without these
|
||||
|
||||
|
||||
|
||||
/datum/barsign
|
||||
var/name = "Name"
|
||||
var/icon = "Icon"
|
||||
var/desc = "desc"
|
||||
var/hidden = 0
|
||||
|
||||
|
||||
//Anything below this is where all the specific signs are. If people want to add more signs, add them below.
|
||||
|
||||
|
||||
|
||||
/datum/barsign/maltesefalcon
|
||||
name = "Maltese Falcon"
|
||||
icon = "maltesefalcon"
|
||||
desc = "The Maltese Faclon, Space Bar and Grill"
|
||||
desc = "The Maltese Falcon, Space Bar and Grill"
|
||||
|
||||
|
||||
/datum/barsign/thebark
|
||||
name = "The Bark"
|
||||
icon = "thebark"
|
||||
desc = "Ian's bar of choice"
|
||||
|
||||
|
||||
/datum/barsign/harmbaton
|
||||
name = "The Harmbaton"
|
||||
icon = "theharmbaton"
|
||||
desc = "A great dining experience for both security members and assistants"
|
||||
|
||||
|
||||
/datum/barsign/thesingulo
|
||||
name = "The Singulo"
|
||||
icon = "thesingulo"
|
||||
desc = "Where people go that'd rather not be called by their name"
|
||||
|
||||
|
||||
/datum/barsign/thedrunkcarp
|
||||
name = "The Drunk Carp"
|
||||
icon = "thedrunkcarp"
|
||||
desc = "Don't drink and Swim"
|
||||
|
||||
|
||||
/datum/barsign/scotchservinwill
|
||||
name = "Scotch Servin Willy's"
|
||||
icon = "scotchservinwill"
|
||||
desc = "Willy sure moved up in the world from clown to bartender"
|
||||
|
||||
|
||||
/datum/barsign/officerbeersky
|
||||
name = "Officer Beersky's"
|
||||
icon = "officerbeersky"
|
||||
desc = "Man eat a dong, these drinks are great"
|
||||
|
||||
|
||||
/datum/barsign/thecavern
|
||||
name = "The Cavern"
|
||||
icon = "thecavern"
|
||||
desc = "Fine drinks while listening to some fine tunes"
|
||||
|
||||
|
||||
/datum/barsign/theouterspess
|
||||
name = "The Outer Spess"
|
||||
icon = "theouterspess"
|
||||
desc = "This bar isn't actually located in outer space"
|
||||
|
||||
|
||||
/datum/barsign/slipperyshots
|
||||
name = "Slippery Shots"
|
||||
icon = "slipperyshots"
|
||||
desc = "Slippery slope to drunkeness with our shots!"
|
||||
|
||||
|
||||
/datum/barsign/thegreytide
|
||||
name = "The Grey Tide"
|
||||
icon = "thegreytide"
|
||||
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
|
||||
|
||||
|
||||
/datum/barsign/honkednloaded
|
||||
name = "Honked 'n' Loaded"
|
||||
icon = "honkednloaded"
|
||||
desc = "Honk."
|
||||
desc = "Honk."
|
||||
|
||||
/datum/barsign/thenest
|
||||
name = "The Nest"
|
||||
icon = "thenest"
|
||||
desc = "A good place to retire for a drink after a long night of crime fighting."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns
|
||||
hidden = 1
|
||||
|
||||
|
||||
//Hidden signs list below this point
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/empbarsign
|
||||
name = "Haywire Barsign"
|
||||
icon = "empbarsign"
|
||||
desc = "Something has gone very wrong."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/syndibarsign
|
||||
name = "Syndi Cat Takeover"
|
||||
icon = "syndibarsign"
|
||||
desc = "Syndicate or die."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/signoff
|
||||
name = "Bar Sign"
|
||||
icon = "empty"
|
||||
desc = "This sign doesn't seem to be on."
|
||||
@@ -260,7 +260,7 @@
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if(!src.toggle())
|
||||
usr << "<span class='notice'>It won't budge!</span>"
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/flash/handheld(src)
|
||||
new /obj/item/clothing/glasses/meson/engine(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
@@ -113,7 +114,7 @@
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/tapeproj/engineering(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/clothing/glasses/meson/engine(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/atmospherics
|
||||
|
||||
@@ -24,4 +24,8 @@
|
||||
new /obj/item/clothing/mask/bandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/storage/backpack/botany(src)
|
||||
new /obj/item/weapon/storage/backpack/botany(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
|
||||
return
|
||||
@@ -17,6 +17,10 @@
|
||||
new /obj/item/device/radio/headset/headset_sci(src)
|
||||
new /obj/item/weapon/tank/internals/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/storage/backpack/science(src)
|
||||
new /obj/item/weapon/storage/backpack/science(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_tox(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/head/santa(src)
|
||||
new /obj/item/clothing/head/santa(src)
|
||||
new /obj/item/clothing/head/santa(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
@@ -294,6 +291,10 @@
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
|
||||
new /obj/item/weapon/storage/backpack/chemistry(src)
|
||||
new /obj/item/weapon/storage/backpack/chemistry(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -309,6 +310,10 @@
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_gen(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_gen(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -326,6 +331,10 @@
|
||||
new /obj/item/clothing/suit/toggle/labcoat/virologist(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/weapon/storage/backpack/virology(src)
|
||||
new /obj/item/weapon/storage/backpack/virology(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_vir(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_vir(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -246,17 +246,20 @@ Crematorium Switch
|
||||
user << "That's not connected to anything."
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
if(!istype(O, /atom/movable) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
if(!ismob(O))
|
||||
if(!istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
else
|
||||
var/mob/M = O
|
||||
if(M.buckled)
|
||||
return
|
||||
if(!ismob(user) || user.lying || user.incapacitated())
|
||||
return
|
||||
O.loc = src.loc
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
B.show_message("<span class='danger'>[user] stuffs [O] into [src]!</span>", 1)
|
||||
//Foreach goto(99)
|
||||
visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -70,10 +70,9 @@
|
||||
else
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_y = initial(buckled_mob.pixel_y)
|
||||
if(buckled_mob.lying)
|
||||
buckled_mob.pixel_y -= buckled_pixel_y_offset
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
if(M.lying)
|
||||
M.pixel_y -= buckled_pixel_y_offset
|
||||
|
||||
|
||||
/obj/item/roller
|
||||
|
||||
@@ -324,8 +324,11 @@
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
I.pixel_x = (text2num(click_params["icon-x"]) - 16)
|
||||
I.pixel_y = (text2num(click_params["icon-y"]) - 16)
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user