mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 16:42:13 +00:00
Enabling gift-based RP (#7598)
This commit is contained in:
@@ -3,47 +3,48 @@
|
|||||||
desc = "You can use this to wrap items in."
|
desc = "You can use this to wrap items in."
|
||||||
icon = 'icons/obj/stacks/wrap.dmi'
|
icon = 'icons/obj/stacks/wrap.dmi'
|
||||||
icon_state = "wrap_paper"
|
icon_state = "wrap_paper"
|
||||||
|
singular_name = "square unit"
|
||||||
amount = 20.0
|
amount = 20.0
|
||||||
|
|
||||||
/obj/item/stack/wrapping_paper/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/item/stack/wrapping_paper/attackby(obj/item/W, mob/user)
|
||||||
..()
|
..()
|
||||||
if (!( locate(/obj/structure/table, src.loc) ))
|
if (!isturf(loc))
|
||||||
to_chat(user, "<span class='warning'>You MUST put the paper on a table!</span>")
|
to_chat(user, span("warning", "The paper must be set down for you to wrap a gift!"))
|
||||||
|
return
|
||||||
if (W.w_class < 4)
|
if (W.w_class < 4)
|
||||||
if ((istype(user.l_hand, /obj/item/wirecutters) || istype(user.r_hand, /obj/item/wirecutters)))
|
var/a_used = 2 * (src.w_class - 1)
|
||||||
var/a_used = 2 ** (src.w_class - 1)
|
if (src.amount < a_used)
|
||||||
if (src.amount < a_used)
|
to_chat(user, span("warning", "You need more paper!"))
|
||||||
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
return
|
||||||
return
|
|
||||||
else
|
|
||||||
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/gift)) //No gift wrapping gifts!
|
|
||||||
return
|
|
||||||
|
|
||||||
src.amount -= a_used
|
|
||||||
user.drop_item()
|
|
||||||
var/obj/item/gift/G = new /obj/item/gift( src.loc )
|
|
||||||
G.size = W.w_class
|
|
||||||
G.w_class = G.size + 1
|
|
||||||
G.icon_state = text("gift[]", G.size)
|
|
||||||
G.gift = W
|
|
||||||
W.forceMove(G)
|
|
||||||
G.add_fingerprint(user)
|
|
||||||
W.add_fingerprint(user)
|
|
||||||
src.add_fingerprint(user)
|
|
||||||
if (src.amount <= 0)
|
|
||||||
new /obj/item/c_tube( src.loc )
|
|
||||||
qdel(src)
|
|
||||||
return
|
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='warning'>You need scissors!</span>")
|
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/gift)) //No gift wrapping gifts!
|
||||||
|
return
|
||||||
|
|
||||||
|
src.amount -= a_used
|
||||||
|
user.drop_item()
|
||||||
|
var/obj/item/gift/G = new /obj/item/gift(src.loc)
|
||||||
|
G.size = W.w_class
|
||||||
|
G.w_class = G.size + 1
|
||||||
|
G.icon_state = text("gift[]", G.size)
|
||||||
|
G.gift = W
|
||||||
|
W.forceMove(G)
|
||||||
|
G.add_fingerprint(user)
|
||||||
|
W.add_fingerprint(user)
|
||||||
|
src.add_fingerprint(user)
|
||||||
|
if (src.amount <= 0)
|
||||||
|
new /obj/item/c_tube(src.loc)
|
||||||
|
qdel(src)
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='warning'>The object is FAR too large!</span>")
|
to_chat(user, span("warning", "This object is far too large to wrap!"))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/stack/wrapping_paper/examine(mob/user)
|
/obj/item/stack/wrapping_paper/examine(mob/user)
|
||||||
if(..(user, 1))
|
if(..(user, 1))
|
||||||
to_chat(user, text("There is about [] square units of paper left!", src.amount))
|
to_chat(user, "There [amount == 1 ? "is" : "are"] about [amount] [singular_name]\s of paper left!")
|
||||||
|
|
||||||
/obj/item/stack/wrapping_paper/attack(mob/target as mob, mob/user as mob)
|
/obj/item/stack/wrapping_paper/attack(mob/target as mob, mob/user as mob)
|
||||||
if (!istype(target, /mob/living/carbon/human)) return
|
if (!istype(target, /mob/living/carbon/human)) return
|
||||||
|
|||||||
42
html/changelogs/doxxmedearly - wrapnerfs.yml
Normal file
42
html/changelogs/doxxmedearly - wrapnerfs.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
################################
|
||||||
|
# Example Changelog File
|
||||||
|
#
|
||||||
|
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||||
|
#
|
||||||
|
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||||
|
# When it is, any changes listed below will disappear.
|
||||||
|
#
|
||||||
|
# Valid Prefixes:
|
||||||
|
# bugfix
|
||||||
|
# wip (For works in progress)
|
||||||
|
# tweak
|
||||||
|
# soundadd
|
||||||
|
# sounddel
|
||||||
|
# rscadd (general adding of nice things)
|
||||||
|
# rscdel (general deleting of nice things)
|
||||||
|
# imageadd
|
||||||
|
# imagedel
|
||||||
|
# maptweak
|
||||||
|
# spellcheck (typo fixes)
|
||||||
|
# experiment
|
||||||
|
# balance
|
||||||
|
# admin
|
||||||
|
# backend
|
||||||
|
# security
|
||||||
|
# refactor
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Your name.
|
||||||
|
author: Doxxmedearly
|
||||||
|
|
||||||
|
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
# Any changes you've made. See valid prefix list above.
|
||||||
|
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||||
|
# SCREW THIS UP AND IT WON'T WORK.
|
||||||
|
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||||
|
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||||
|
changes:
|
||||||
|
- tweak: "In order to facilitate holiday commercialism, you no longer need wirecutters in hand to wrap a gift. You also no longer need a table; the ground works just fine."
|
||||||
|
- tweak: "Tidied up description text when examining a roll of wrapping paper."
|
||||||
Reference in New Issue
Block a user