-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds sunscreen #570
Merged
Merged
Adds sunscreen #570
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0ced948
actually fixes Volkan's shoulder companions space issue!! for real th…
Constellado 96c5299
Merge branch 'MrMelbert:master' into master
Constellado a51c4e3
Merge branch 'MrMelbert:master' into master
Constellado 50feca9
Sunscreen has been invented again, but it does nothing... YET
Constellado 997f57d
more than one brand of sunscreen
Constellado dc6a556
sunscreen with... functionality!!! It lowers burns a teeny bit when a…
Constellado d539256
sunscreen sprites!!
Constellado 40ef067
minor balance edit
Constellado 413b7d4
more balance
Constellado af5c801
woopsies! fix that!
Constellado 8858077
OK maybe Volkan's AIs would make the SPF very good. I will think of a…
Constellado 5b5febf
aaaaa
Constellado 3ad316a
variables be annoying sometimes. compiles!!
Constellado 415aa31
Volkan umbrella inventory sprites
Constellado b4df485
fixes up the sunscreen
Constellado 6301051
we dont need the umbreallas here, umbrella will be separate PR!
Constellado 8139f5a
sunscreen descriptions
Constellado 924962b
more description stuff
Constellado 62eab15
A big woopsie doodles fixed!!
Constellado 3dc033d
turns out seconds need to be divided by 600 instead of 60.
Constellado 39e3929
what's with the checks aa???
Constellado 2ae5a1b
aaaaa
Constellado 3527cff
actually ticked
Constellado 9c24f36
I moved the umbrellas to another branch, removed the two sprites.
Constellado 02fd321
Update maplestation_modules/story_content/volkan_equipment/code/sunit…
Constellado c37c782
Update maplestation_modules/story_content/volkan_equipment/code/sunit…
Constellado d307b11
Update maplestation_modules/story_content/volkan_equipment/code/sunit…
Constellado 1537f83
brackett
Constellado 7020713
ok it compiles now.
Constellado 3f4941f
code review thingys
Constellado File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
maplestation_modules/story_content/volkan_equipment/code/sunitems.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/* | ||
* # Stuff for the beach! | ||
* Volkan has 0 pigment, so the sun damages him a lot IC. | ||
* His synth avatar also has this flaw, mainly due to the type of synthflesh used. He made it too damn realistic. | ||
* As a result, have items that help with dealing with the sun! | ||
*/ | ||
|
||
///Sunscreen! | ||
/obj/item/sunscreen | ||
name = "generic sunscreen" | ||
desc = "A generic sunscreen product. Cream based application." | ||
w_class = WEIGHT_CLASS_TINY | ||
icon = 'maplestation_modules/story_content/volkan_equipment/icons/sun_items.dmi' | ||
icon_state = "sunscreen_generic" | ||
|
||
///how long it takes to apply in seconds | ||
var/application_time = 10 SECONDS | ||
///How long it takes before sunscreen runs out in seconds | ||
var/reaplication_time = 1800 SECONDS | ||
///The sunscreen's burn modifier. | ||
var/burn_modifier = 0.03 | ||
|
||
/obj/item/sunscreen/shitty | ||
name = "cheap generic sunscreen" | ||
desc = "A budget generic sunscreen product. Cream based application." | ||
|
||
reaplication_time = 60 SECONDS | ||
burn_modifier = 0.02 | ||
|
||
/obj/item/sunscreen/nanotrasen | ||
name = "Nanotrasen sunscreen" | ||
desc = "A Nanotrasen sunscreen product. Cream based application." | ||
icon_state = "sunscreen_nanotrasen" | ||
|
||
application_time = 5 SECONDS | ||
burn_modifier = 0.05 | ||
|
||
///HaSE has developed a pretty good sunscreen. It doesn't smell too great though. | ||
/obj/item/sunscreen/volkan | ||
name = "strange sunscreen" | ||
desc = "A sunscreen product in a metal container. It seems to be a spray based application. Smells like industrial chemicals when sprayed." | ||
icon_state = "sunscreen_volkan" | ||
|
||
application_time = 1 SECONDS | ||
reaplication_time = 900 SECONDS//spray based doesn't last as long, plus it's funny to have volkan be applying sunscreen all the time. | ||
burn_modifier = 0.1 | ||
|
||
/obj/item/sunscreen/attack_self(mob/user) | ||
if(ishuman(user) && user.is_holding(src)) | ||
apply(user, user) | ||
|
||
/obj/item/sunscreen/examine() | ||
. = ..() | ||
. += span_info("It's labeled SPF [burn_modifier * 1000]. Reapply in [reaplication_time / 600] minutes.") | ||
|
||
/obj/item/sunscreen/interact_with_atom(atom/target, mob/living/user) | ||
if(!ishuman(target)) | ||
return NONE | ||
apply(target, user) | ||
return ITEM_INTERACT_SUCCESS | ||
Constellado marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Applies sunscreen to a mob. | ||
* | ||
* Arguments: | ||
* * target - The mob who we will apply the sunscreen to. | ||
* * user - the mob that is applying the sunscreen. | ||
*/ | ||
/obj/item/sunscreen/proc/apply(mob/living/carbon/target, mob/user) | ||
if(!ishuman(target)) | ||
return | ||
|
||
if(target == user) | ||
user.visible_message( | ||
span_notice("[user] starts to apply [src] on [user.p_them()]self..."), | ||
span_notice("You begin applying [src] on yourself...") | ||
) | ||
else | ||
user.visible_message( | ||
span_notice("[user] starts to apply [src] on [target]."), | ||
span_notice("You begin applying [src] on [target]...") | ||
) | ||
|
||
if(do_after(user, application_time, target)) | ||
target.apply_status_effect(/datum/status_effect/sunscreen, reaplication_time, burn_modifier) | ||
|
||
target.visible_message(span_warning("[target] has applied sunscreen!"), | ||
span_notice("You are covered in sunscreen!")) | ||
|
||
//sunscreen status effect | ||
/atom/movable/screen/alert/status_effect/sunscreen | ||
name = "Sunscreen" | ||
desc = "You are covered in sunscreen!" | ||
icon = 'maplestation_modules/story_content/volkan_equipment/icons/sun_items.dmi' | ||
icon_state = "sunscreen_generic" | ||
|
||
/datum/status_effect/sunscreen | ||
id = "sunscreen" | ||
duration = 1800 SECONDS | ||
alert_type = /atom/movable/screen/alert/status_effect/sunscreen | ||
var/burn_modifier = 0.03 | ||
|
||
/datum/status_effect/sunscreen/on_creation(mob/living/new_owner, duration, burn_modifier) | ||
src.duration = duration | ||
src.burn_modifier = burn_modifier | ||
return ..() | ||
|
||
/datum/status_effect/sunscreen/on_apply() | ||
if(ishuman(owner)) | ||
var/mob/living/carbon/human/applying_to = owner | ||
applying_to.physiology.burn_mod -= burn_modifier | ||
return ..() | ||
|
||
///Stuff that happens when the sunscreen runs out. | ||
/datum/status_effect/sunscreen/on_remove() | ||
if(ishuman(owner)) | ||
var/mob/living/carbon/human/H = owner | ||
H.physiology.burn_mod += burn_modifier | ||
Constellado marked this conversation as resolved.
Show resolved
Hide resolved
|
||
to_chat(owner, span_notice("You no longer feel protected by your sunscreen.")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+563 Bytes
maplestation_modules/story_content/volkan_equipment/icons/sun_items.dmi
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to change it but keep in mind you can just as easily write
30 MINUTES
(and it's a fair bit easier to see at a glance)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, if I had it in minutes the status affect would still treat it like seconds?
Thats why I changed it to seconds. Maybe it was some one time fluke or something strange but I don't want to touch it now because of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
30 MINUTES
is identical to1800 SECONDS
🤔