9e1ef0ffe2
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
175 lines
5.9 KiB
Plaintext
175 lines
5.9 KiB
Plaintext
/obj/structure/bigDelivery
|
|
name = "large parcel"
|
|
desc = "A large delivery parcel."
|
|
icon = 'icons/obj/storage.dmi'
|
|
icon_state = "deliverycloset"
|
|
density = 1
|
|
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
|
var/giftwrapped = 0
|
|
var/sortTag = 0
|
|
|
|
/obj/structure/bigDelivery/attack_hand(mob/user)
|
|
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
|
qdel(src)
|
|
|
|
/obj/structure/bigDelivery/Destroy()
|
|
var/turf/T = get_turf(src)
|
|
for(var/atom/movable/AM in contents)
|
|
AM.forceMove(T)
|
|
return ..()
|
|
|
|
/obj/structure/bigDelivery/contents_explosion(severity, target)
|
|
for(var/atom/movable/AM in contents)
|
|
AM.ex_act()
|
|
|
|
/obj/structure/bigDelivery/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/device/destTagger))
|
|
var/obj/item/device/destTagger/O = W
|
|
|
|
if(sortTag != O.currTag)
|
|
var/tag = uppertext(GLOB.TAGGERLOCATIONS[O.currTag])
|
|
to_chat(user, "<span class='notice'>*[tag]*</span>")
|
|
sortTag = O.currTag
|
|
playsound(loc, 'sound/machines/twobeep.ogg', 100, 1)
|
|
|
|
else if(istype(W, /obj/item/weapon/pen))
|
|
var/str = copytext(sanitize(input(user,"Label text?","Set label","")),1,MAX_NAME_LEN)
|
|
if(!str || !length(str))
|
|
to_chat(user, "<span class='warning'>Invalid text!</span>")
|
|
return
|
|
user.visible_message("[user] labels [src] as [str].")
|
|
name = "[name] ([str])"
|
|
|
|
else if(istype(W, /obj/item/stack/wrapping_paper) && !giftwrapped)
|
|
var/obj/item/stack/wrapping_paper/WP = W
|
|
if(WP.use(3))
|
|
user.visible_message("[user] wraps the package in festive paper!")
|
|
giftwrapped = 1
|
|
icon_state = "gift[icon_state]"
|
|
else
|
|
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/bigDelivery/relay_container_resist(mob/living/user, obj/O)
|
|
if(istype(loc, /atom/movable))
|
|
var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something.
|
|
AM.relay_container_resist(user, O)
|
|
return
|
|
to_chat(user, "<span class='notice'>You lean on the back of [O] and start pushing to rip the wrapping around it.</span>")
|
|
if(do_after(user, 50, target = O))
|
|
if(!user || user.stat != CONSCIOUS || user.loc != O || O.loc != src )
|
|
return
|
|
to_chat(user, "<span class='notice'>You successfully removed [O]'s wrapping !</span>")
|
|
O.loc = loc
|
|
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
|
qdel(src)
|
|
else
|
|
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
|
to_chat(user, "<span class='warning'>You fail to remove [O]'s wrapping!</span>")
|
|
|
|
|
|
/obj/item/smallDelivery
|
|
name = "parcel"
|
|
desc = "A brown paper delivery parcel."
|
|
icon = 'icons/obj/storage.dmi'
|
|
icon_state = "deliverypackage3"
|
|
var/giftwrapped = 0
|
|
var/sortTag = 0
|
|
|
|
/obj/item/smallDelivery/contents_explosion(severity, target)
|
|
for(var/atom/movable/AM in contents)
|
|
AM.ex_act()
|
|
|
|
/obj/item/smallDelivery/attack_self(mob/user)
|
|
user.temporarilyRemoveItemFromInventory(src, TRUE)
|
|
for(var/X in contents)
|
|
var/atom/movable/AM = X
|
|
user.put_in_hands(AM)
|
|
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
|
qdel(src)
|
|
|
|
/obj/item/smallDelivery/attack_self_tk(mob/user)
|
|
if(ismob(loc))
|
|
var/mob/M = loc
|
|
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
|
for(var/X in contents)
|
|
var/atom/movable/AM = X
|
|
M.put_in_hands(AM)
|
|
else
|
|
for(var/X in contents)
|
|
var/atom/movable/AM = X
|
|
AM.forceMove(src.loc)
|
|
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
|
qdel(src)
|
|
|
|
/obj/item/smallDelivery/attackby(obj/item/W, mob/user, params)
|
|
if(istype(W, /obj/item/device/destTagger))
|
|
var/obj/item/device/destTagger/O = W
|
|
|
|
if(sortTag != O.currTag)
|
|
var/tag = uppertext(GLOB.TAGGERLOCATIONS[O.currTag])
|
|
to_chat(user, "<span class='notice'>*[tag]*</span>")
|
|
sortTag = O.currTag
|
|
playsound(loc, 'sound/machines/twobeep.ogg', 100, 1)
|
|
|
|
else if(istype(W, /obj/item/weapon/pen))
|
|
var/str = copytext(sanitize(input(user,"Label text?","Set label","")),1,MAX_NAME_LEN)
|
|
if(!str || !length(str))
|
|
to_chat(user, "<span class='warning'>Invalid text!</span>")
|
|
return
|
|
user.visible_message("[user] labels [src] as [str].")
|
|
name = "[name] ([str])"
|
|
|
|
else if(istype(W, /obj/item/stack/wrapping_paper) && !giftwrapped)
|
|
var/obj/item/stack/wrapping_paper/WP = W
|
|
if(WP.use(1))
|
|
icon_state = "gift[icon_state]"
|
|
giftwrapped = 1
|
|
user.visible_message("[user] wraps the package in festive paper!")
|
|
else
|
|
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
|
|
|
|
|
/obj/item/device/destTagger
|
|
name = "destination tagger"
|
|
desc = "Used to set the destination of properly wrapped packages."
|
|
icon_state = "cargotagger"
|
|
var/currTag = 0
|
|
//The whole system for the sorttype var is determined based on the order of this list,
|
|
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
|
|
|
|
//If you don't want to fuck up disposals, add to this list, and don't change the order.
|
|
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
|
|
|
|
w_class = WEIGHT_CLASS_TINY
|
|
item_state = "electronic"
|
|
flags = CONDUCT
|
|
slot_flags = SLOT_BELT
|
|
|
|
/obj/item/device/destTagger/proc/openwindow(mob/user)
|
|
var/dat = "<tt><center><h1><b>TagMaster 2.2</b></h1></center>"
|
|
|
|
dat += "<table style='width:100%; padding:4px;'><tr>"
|
|
for (var/i = 1, i <= GLOB.TAGGERLOCATIONS.len, i++)
|
|
dat += "<td><a href='?src=\ref[src];nextTag=[i]'>[GLOB.TAGGERLOCATIONS[i]]</a></td>"
|
|
|
|
if(i%4==0)
|
|
dat += "</tr><tr>"
|
|
|
|
dat += "</tr></table><br>Current Selection: [currTag ? GLOB.TAGGERLOCATIONS[currTag] : "None"]</tt>"
|
|
|
|
user << browse(dat, "window=destTagScreen;size=450x350")
|
|
onclose(user, "destTagScreen")
|
|
|
|
/obj/item/device/destTagger/attack_self(mob/user)
|
|
openwindow(user)
|
|
return
|
|
|
|
/obj/item/device/destTagger/Topic(href, href_list)
|
|
add_fingerprint(usr)
|
|
if(href_list["nextTag"])
|
|
var/n = text2num(href_list["nextTag"])
|
|
currTag = n
|
|
openwindow(usr)
|